[PATCH 0/2] Hashmap fix
by Tomasz Bursztyka
Hi,
First patch's commit message details the fix.
Tomasz Bursztyka (2):
hashmap: Ensure one unique key ever exists in all entries
unit: Slightly change hash duplicity test to verify key unitiy
behavior
ell/hashmap.c | 26 ++++++++++++++------------
unit/test-hashmap.c | 4 ++--
2 files changed, 16 insertions(+), 14 deletions(-)
--
2.0.5
6 years
[PATCH 0/3] Add DBus disconnect watch support
by Jukka Rissanen
Hi,
this set allows user to monitor the disconnect status
of a service.
Cheers,
Jukka
Jukka Rissanen (3):
dbus: Add AddMatch and RemoveMatch support
dbus: Add disconnect watch support
unit: dbus: Add test for disconnect watch API
Makefile.am | 4 +
ell/dbus-watch.c | 267 ++++++++++++++++++++++++++++++++++
ell/dbus.c | 26 ++++
ell/dbus.h | 21 +++
unit/test-dbus-watch.c | 388 +++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 706 insertions(+)
create mode 100644 ell/dbus-watch.c
create mode 100644 unit/test-dbus-watch.c
--
1.8.3.1
6 years
[PATCH] dbus: Move generic DBus paths to header file
by Jukka Rissanen
DBus defines moved to header file so that they can be used
by other source files.
---
ell/dbus.c | 5 -----
ell/dbus.h | 4 ++++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/ell/dbus.c b/ell/dbus.c
index 4c4ba2d..26456ac 100644
--- a/ell/dbus.c
+++ b/ell/dbus.c
@@ -45,11 +45,6 @@
#define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
-#define DBUS_SERVICE_DBUS "org.freedesktop.DBus"
-
-#define DBUS_PATH_DBUS "/org/freedesktop/DBus"
-
-#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus"
#define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
#define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties"
diff --git a/ell/dbus.h b/ell/dbus.h
index a6ad109..7622b47 100644
--- a/ell/dbus.h
+++ b/ell/dbus.h
@@ -32,6 +32,10 @@
extern "C" {
#endif
+#define DBUS_SERVICE_DBUS "org.freedesktop.DBus"
+#define DBUS_PATH_DBUS "/org/freedesktop/DBus"
+#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus"
+
enum l_dbus_bus {
L_DBUS_SYSTEM_BUS,
L_DBUS_SESSION_BUS,
--
1.8.3.1
6 years
[PATCH v2 0/2] Cipher infrastructure
by Tomasz Bursztyka
Hi,
Looks like we need to re-inject the keys to the master socket (the one which
is binded so the selected crypto) once before an operation type, so first encrypt
and/or first decrypt.
Now it seems to work. Should it handle an initialization vector?
Tomasz Bursztyka (2):
cipher: Add a basic infrastructure for kernel based cipher operations
unit: Add unit test for the cipher infrastructure
Makefile.am | 11 ++-
ell/cipher.c | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ell/cipher.h | 52 +++++++++++++
ell/ell.h | 1 +
unit/test-cipher.c | 107 ++++++++++++++++++++++++++
5 files changed, 389 insertions(+), 3 deletions(-)
create mode 100644 ell/cipher.c
create mode 100644 ell/cipher.h
create mode 100644 unit/test-cipher.c
--
2.0.5
6 years
[RFC 0/2] Random infrastructure
by Tomasz Bursztyka
I am sending this as an RFC since I cannot get the stdrng working yet.
The bind fails, so it's probably an issue around type/name.
Tomasz Bursztyka (2):
random: Add a basic infrastructure for kernel based rng
unit: Add a unit test for the random infrastructure
Makefile.am | 11 ++-
ell/ell.h | 1 +
ell/random.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ell/random.h | 50 ++++++++++++
unit/test-random.c | 91 ++++++++++++++++++++++
5 files changed, 372 insertions(+), 3 deletions(-)
create mode 100644 ell/random.c
create mode 100644 ell/random.h
create mode 100644 unit/test-random.c
--
2.0.5
6 years
[PATCH 0/2] cipher infrastructure
by Tomasz Bursztyka
Hi,
I applied the comments on the RFC. Now ARV4 works.
I introduced as well the iv/iv_length parameters to l_cipher_new(), however
it's not implemented yet. There will be time to support it as well as other
ciphers (twofish, blowfish... )
Tomasz Bursztyka (2):
cipher: Add a basic infrastructure for kernel based cipher operations
unit: Add unit test for the cipher infrastructure
Makefile.am | 11 ++-
ell/cipher.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ell/cipher.h | 53 ++++++++++++
ell/ell.h | 1 +
unit/test-cipher.c | 109 ++++++++++++++++++++++++
5 files changed, 409 insertions(+), 3 deletions(-)
create mode 100644 ell/cipher.c
create mode 100644 ell/cipher.h
create mode 100644 unit/test-cipher.c
--
2.0.5
6 years
[RFC 0/2] Cipher infrastructure
by Tomasz Bursztyka
Hi,
Went quickly through the cipher proposal, to get a somehow working implementation.
Seems to work with aes, but not with arc4.
And now I wonder if we should not provide an initialization vector for some ciphers? (like arc4).
I thought I could set one IV per socket once, but it does not seems so. (thus there is
nothing related to IV in this RFC).
So, should I set iv elements in struct l_cipher, so I could set one one encrypting/decrypting?
It's just a bit annoying with cmsg handling, but I got nice example with libkapi (though this
one mandate the user to provide the iv. I tought we could handle randomly generated ones?)
libkapi is kind of nice as it uses vmsplice and so on. It's just a lot of code, I don't
think we want something that complex.
Tomasz Bursztyka (2):
cipher: Add a basic infrastructure for kernel based cipher operations
unit: Add unit test for the cipher infrastructure
Makefile.am | 11 ++-
ell/cipher.c | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ell/cipher.h | 51 +++++++++++++
ell/ell.h | 1 +
unit/test-cipher.c | 109 +++++++++++++++++++++++++++
5 files changed, 384 insertions(+), 3 deletions(-)
create mode 100644 ell/cipher.c
create mode 100644 ell/cipher.h
create mode 100644 unit/test-cipher.c
--
2.0.5
6 years
[PATCH] genl: Initialize used memory to avoid valgrind report
by Jukka Rissanen
Valgrind reports following error for uninitialized memory usage:
==4725== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==4725== at 0x33F5EF6B5D: send (in /usr/lib64/libc-2.17.so)
==4725== by 0x40BF0E: can_write_data (genl.c:314)
==4725== by 0x417806: io_callback (io.c:138)
==4725== by 0x40A282: l_main_run (main.c:346)
==4725== by 0x401F69: main (main.c:160)
==4725== Address 0x4c3d092 is 18 bytes inside a block of size 40 alloc'd
==4725== at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4725== by 0x40817D: l_malloc (util.c:62)
==4725== by 0x40C46A: msg_alloc.constprop.13 (genl.c:243)
==4725== by 0x40D454: l_genl_family_new (genl.c:641)
==4725== by 0x405A44: wiphy_init (wiphy.c:1492)
==4725== by 0x401EDD: main (main.c:154)
==4725==
---
ell/genl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/genl.c b/ell/genl.c
index d2c1784..2ef6a34 100644
--- a/ell/genl.c
+++ b/ell/genl.c
@@ -239,7 +239,7 @@ static struct l_genl_msg *msg_alloc(uint8_t cmd, uint8_t version, uint32_t size)
msg->len = NLMSG_HDRLEN + GENL_HDRLEN;
msg->size = msg->len + NLMSG_ALIGN(size);
- msg->data = l_malloc(msg->size);
+ msg->data = l_new(unsigned char, msg->size);
return l_genl_msg_ref(msg);
}
--
1.8.3.1
6 years