ell/settings.c, ell/settings.h dependancy rabbit hole
by Gix, Brian
Hi All,
In BlueZ, we are implementing a mesh.conf file, similar to the main.conf file already in use for the Bluetooth
daemon. This will also be an issue with the main daemon once we start changing it over to using ELL as well.
Our conf files are farely simple Key+Value files like this:
==============
[General]
# Comments
Name = BlueZ
AlwaysPairable = false
PairableTimeout = 0
[GATT]
ExchangeMTU = 517
==============
For this we want to include ell/settings.[ch] into our build, which performs this simple parsing. However,
settings.c is currently including ell/pem-private.h, and has a link reference to pem_next(), via an extension
mechanism. The PEM module then requires inclusion of cert, key, pkcs5 and base64.
Is there a way to make this pem more "optional"? Because we have gone from a fairly simple inclusion of
settings.c and it's header to needing to including the following modules, which is defeating part of the
purpose of keeping ELL lean and mean:
ell/settings.c
ell/pem.c
ell/cert.c
ell/key.c
ell/pkcs5.c
ell/base64.c
ell/settings.h
ell/pem.h
ell/pem-private.h
ell/asn1-private.h
ell/base64.h
ell/cert.h
ell/cert-private.h
ell/key.h
ell/pkcs5.h
ell/pkcs5-private.h
As far as I can tell, we do not use or need pem, cert, key, pkcs5, or base64
--Brian
2 years, 8 months
ELL unit test problem with Link Time Optimization, l_getrandom,
test-ecdh
by Gix, Brian
While examining my BlueZ issues with building with LTO, I came accross
the following issue in the ELL unit test of ECDH:
.../ell > export CFLAGS="-flto=auto"
.../ell > ./bootstrap-configure
.../ell > make
make --no-print-directory all-am
CCLD unit/test-ecdh
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/test-
ecdh.XGzxNu.ltrans0.ltrans.o: in function `__wrap_l_getrandom':
/home/bgix/work/user_space/ell/unit/test-ecdh.c:52: undefined reference to `l_getrandom'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1541: unit/test-ecdh] Error 1
make: *** [Makefile:1190: all] Error 2
This is on an up-to-date openSUSE tumbleweed VM, and I have been told that building with the LTO flag is the
preferred build method on that system. This problem does not seem to affect anything *except* that one unit
test, and is probably related to the explicit link rule for it in Makefile.am:
unit_test_ecdh_LDFLAGS = -Wl,-wrap,l_getrandom
2 years, 9 months
ELL double free during debug exit cleanup
by Gix, Brian
Hi Guys,
I am copying this over to the ELL reflector, hoping for some insight. The new bluez-5.52 release has a unit
test segfaulting in a test I added. This only occurs on Link Time Optimization (LTO) builds, but that appears
to be the favored build flavor of openSUSE.
The segfault occurs in the ELL code during exit, specifically due to a double call of:
> l_queue_destroy(debug_sections, l_free);
Here is a bug report, that disects the problem, and suggests an ELL patch (scroll down in the bug report to
"Comment 6":
https://bugzilla.opensuse.org/show_bug.cgi?id=1155889#c6
I would like your opinion before creating a patch to submit.
Regards,
Brian Gix
2 years, 9 months
(no subject)
by Gix, Brian
Hi Guys,
I am copying this over to the ELL reflector, hoping for some insight. The new bluez-5.52 release has a unit
test segfaulting in a test I added. This only occurs on Link Time Optimization (LTO) builds, but that appears
to be the favored build flavor of openSUSE.
The segfault occurs in the ELL code during exit, specifically due to a double call of:
> l_queue_destroy(debug_sections, l_free);
Here is a bug report, that disects the problem, and suggests an ELL patch (scroll down in the bug report to
"Comment 6":
https://bugzilla.opensuse.org/show_bug.cgi?id=1155889#c6
I would like your opinion before creating a patch to submit.
Regards,
Brian Gix
2 years, 9 months
[PATCH 0/1] Make PKCS8 dependant unit tests fail gracefully
by Brian Gix
This patch is based on the failure check in unit/test-cipher, which
gives mitigation instructions for known and easily correctable
deficiencies in Kernel space. In the case of these three unit tests,
the pkcs8_key_parser must be loaded for the unit test to pass. If not
loaded the mitigation is given, and the test exits with an exit(1)
rather than an assert fail.
Brian Gix (1):
unit: Add graceful fail of pem, tls and key tests
unit/test-key.c | 9 +++++++++
unit/test-pem.c | 9 +++++++++
unit/test-tls.c | 12 +++++++++++-
3 files changed, 29 insertions(+), 1 deletion(-)
--
2.21.0
2 years, 9 months