]> git.proxmox.com Git - mirror_kronosnet.git/log
mirror_kronosnet.git
6 years agoMerge pull request #62 from chrissie-c/new-apis2
Fabio M. Di Nitto [Thu, 26 Oct 2017 14:48:20 +0000 (16:48 +0200)]
Merge pull request #62 from chrissie-c/new-apis2

libknet: Add APIs to query crypto & compression models

6 years agolibknet: Add APIs to query crypto & compression models
Christine Caulfield [Thu, 26 Oct 2017 13:28:17 +0000 (14:28 +0100)]
libknet: Add APIs to query crypto & compression models

Also add API call to clear the handle and link stats

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
6 years agoMerge pull request #60 from wferi/autotools
Fabio M. Di Nitto [Thu, 26 Oct 2017 14:01:29 +0000 (16:01 +0200)]
Merge pull request #60 from wferi/autotools

Autotools

6 years agoconfigure: initialize pkg-config with its standard macro
Ferenc Wágner [Thu, 26 Oct 2017 11:31:30 +0000 (13:31 +0200)]
configure: initialize pkg-config with its standard macro

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoconfigure: remove some superfluous checks
Ferenc Wágner [Thu, 26 Oct 2017 11:29:46 +0000 (13:29 +0200)]
configure: remove some superfluous checks

We've got no C++ code in here.
No need for ranlib when using libtool.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
6 years agoMerge pull request #59 from kronosnet/ci-fixes
Fabio M. Di Nitto [Wed, 25 Oct 2017 15:01:45 +0000 (17:01 +0200)]
Merge pull request #59 from kronosnet/ci-fixes

Ci fixes

6 years ago[build] enable valgrind automatic supressions generation during make check-*
Fabio M. Di Nitto [Wed, 25 Oct 2017 14:33:57 +0000 (16:33 +0200)]
[build] enable valgrind automatic supressions generation during make check-*

this is useful to create exception when false errors are found on CI run

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[tests] add exception for lzma on Ubuntu 17.10 i386
Fabio M. Di Nitto [Wed, 25 Oct 2017 14:26:58 +0000 (16:26 +0200)]
[tests] add exception for lzma on Ubuntu 17.10 i386

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #58 from liu4480/run-autogen
Fabio M. Di Nitto [Wed, 25 Oct 2017 06:37:50 +0000 (08:37 +0200)]
Merge pull request #58 from liu4480/run-autogen

add "runautogen" option for compiling

6 years agoadd "runautogen" option for compiling
Bin Liu [Wed, 25 Oct 2017 05:43:17 +0000 (13:43 +0800)]
add "runautogen" option for compiling

6 years agoMerge pull request #56 from kronosnet/fabbione-cleanup
Fabio M. Di Nitto [Thu, 19 Oct 2017 10:16:11 +0000 (12:16 +0200)]
Merge pull request #56 from kronosnet/fabbione-cleanup

[testing] drop travis support as we are moving all builders to https:…

6 years ago[testing] drop travis support as we are moving all builders to https://ci.kronosnet...
Fabio M. Di Nitto [Thu, 19 Oct 2017 04:20:21 +0000 (06:20 +0200)]
[testing] drop travis support as we are moving all builders to https://ci.kronosnet.org/

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #57 from kronosnet/fabbione-udp-fixes
Fabio M. Di Nitto [Thu, 19 Oct 2017 09:40:28 +0000 (11:40 +0200)]
Merge pull request #57 from kronosnet/fabbione-udp-fixes

[udp] fix incorrect return code

6 years ago[udp] fix incorrect return code
Fabio M. Di Nitto [Tue, 17 Oct 2017 14:36:53 +0000 (16:36 +0200)]
[udp] fix incorrect return code

UDP TX is tricky and racy and in theory TX never fails, as UDP is allowed
to drop packets internally anyway.

In some race condition situations, we can endup in a situation where:
- thread X attempts to send a packet
- socket receives an ICMP back (for whatever reasons) generated
  by some other random thread/packet combo
- thread X detects an error in TX and decode the error (correct)

pre patch:
- thread X would treat that as error and drop the packet
post patch:
- thread X should simply resend the packet

simply also the ordering of parsing socket error code to make it easier to read

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years agoMerge pull request #53 from digimer/master
Fabio M. Di Nitto [Wed, 18 Oct 2017 07:29:15 +0000 (09:29 +0200)]
Merge pull request #53 from digimer/master

Added 'gcc' to .spec BuildRequires

6 years ago* Added a requirement for 'gcc' as that is not installed on fedora minimal by default...
Digimer [Wed, 18 Oct 2017 05:58:03 +0000 (01:58 -0400)]
* Added a requirement for 'gcc' as that is not installed on fedora minimal by default, breaking rpmbuild's build attempt.

Signed-off-by: Digimer <digimer@alteeve.ca>
6 years ago[global] use memmove instead of memcpy
Fabio M. Di Nitto [Mon, 16 Oct 2017 03:47:30 +0000 (05:47 +0200)]
[global] use memmove instead of memcpy

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] more casting fixes
Fabio M. Di Nitto [Sun, 15 Oct 2017 17:59:00 +0000 (19:59 +0200)]
[build] more casting fixes

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] more signed/unsigned fixes
Fabio M. Di Nitto [Sun, 15 Oct 2017 17:36:39 +0000 (19:36 +0200)]
[build] more signed/unsigned fixes

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] fix some signed/unsigned declarations
Fabio M. Di Nitto [Sun, 15 Oct 2017 17:32:12 +0000 (19:32 +0200)]
[build] fix some signed/unsigned declarations

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] allow make check-memcheck and check-hellgrind only if valgrind is avalable
Fabio M. Di Nitto [Sun, 15 Oct 2017 08:32:50 +0000 (10:32 +0200)]
[build] allow make check-memcheck and check-hellgrind only if valgrind is avalable

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] bump minimum requirements for automake
Fabio M. Di Nitto [Sun, 15 Oct 2017 07:43:16 +0000 (09:43 +0200)]
[build] bump minimum requirements for automake

this is required for distclean + subdir-object to work properly

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[tests] fix build and cast aligment on Debian/sparc64 unstable (gcc7)
Fabio M. Di Nitto [Tue, 26 Sep 2017 06:45:54 +0000 (08:45 +0200)]
[tests] fix build and cast aligment on Debian/sparc64 unstable (gcc7)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] cleanup whitespace
Fabio M. Di Nitto [Mon, 25 Sep 2017 04:04:38 +0000 (06:04 +0200)]
[build] cleanup whitespace

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
6 years ago[build] disable poc code by default
Fabio M. Di Nitto [Mon, 25 Sep 2017 04:02:35 +0000 (06:02 +0200)]
[build] disable poc code by default

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] drop support for unload of libraries
Fabio M. Di Nitto [Thu, 21 Sep 2017 10:04:53 +0000 (12:04 +0200)]
[dlopen] drop support for unload of libraries

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] check for errors when initializing openssl1.1
Fabio M. Di Nitto [Thu, 21 Sep 2017 08:14:48 +0000 (10:14 +0200)]
[openssl] check for errors when initializing openssl1.1

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] fix build on freebsd11 (and others)
Fabio M. Di Nitto [Thu, 21 Sep 2017 07:46:41 +0000 (09:46 +0200)]
[build] fix build on freebsd11 (and others)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] fix build with no nss
Fabio M. Di Nitto [Tue, 19 Sep 2017 19:45:16 +0000 (21:45 +0200)]
[tests] fix build with no nss

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] move dump_all to callback section
Fabio M. Di Nitto [Tue, 19 Sep 2017 19:19:52 +0000 (21:19 +0200)]
[tests] move dump_all to callback section

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] add exception for lzma on Debian Unstable
Fabio M. Di Nitto [Tue, 19 Sep 2017 19:12:30 +0000 (21:12 +0200)]
[tests] add exception for lzma on Debian Unstable

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[test] drop useless library count check
Fabio M. Di Nitto [Tue, 19 Sep 2017 19:04:48 +0000 (21:04 +0200)]
[test] drop useless library count check

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] add support for openssl1.0.2 and openssl1.1.0 to accomodate Debian unstable
Fabio M. Di Nitto [Tue, 19 Sep 2017 19:03:26 +0000 (21:03 +0200)]
[crypto] add support for openssl1.0.2 and openssl1.1.0 to accomodate Debian unstable

Please note that openssl1.1.0 needs more testing

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[host] Never mark loopback-connected hosts as unreachable
Christine Caulfield [Tue, 19 Sep 2017 14:36:57 +0000 (15:36 +0100)]
[host] Never mark loopback-connected hosts as unreachable

There's no point in checking the links of a host with a LOOPBACK
link - it's always up and reachable.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
7 years ago[openssl] update libknet.h to document openssl support
Fabio M. Di Nitto [Tue, 19 Sep 2017 08:14:46 +0000 (10:14 +0200)]
[openssl] update libknet.h to document openssl support

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] extend lib load/unload to cover for openssl
Fabio M. Di Nitto [Tue, 19 Sep 2017 08:11:24 +0000 (10:11 +0200)]
[openssl] extend lib load/unload to cover for openssl

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] filter "none" from *getbyname openssl functions
Fabio M. Di Nitto [Tue, 19 Sep 2017 08:10:20 +0000 (10:10 +0200)]
[openssl] filter "none" from *getbyname openssl functions

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] drop unrequired OPENSSL_config
Fabio M. Di Nitto [Tue, 19 Sep 2017 08:07:06 +0000 (10:07 +0200)]
[openssl] drop unrequired OPENSSL_config

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] revert debugging code
Fabio M. Di Nitto [Tue, 19 Sep 2017 08:01:20 +0000 (10:01 +0200)]
[openssl] revert debugging code

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] go back to the original minimal keysize
Fabio M. Di Nitto [Tue, 19 Sep 2017 08:00:26 +0000 (10:00 +0200)]
[openssl] go back to the original minimal keysize

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] move to dlopen model
Fabio M. Di Nitto [Tue, 19 Sep 2017 06:26:13 +0000 (08:26 +0200)]
[openssl] move to dlopen model

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[nss] protect shutdown from segfaults in case we cannot resolve all syms
Fabio M. Di Nitto [Tue, 19 Sep 2017 06:14:04 +0000 (08:14 +0200)]
[nss] protect shutdown from segfaults in case we cannot resolve all syms

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] add api_knet_handle_crypto test
Fabio M. Di Nitto [Tue, 19 Sep 2017 05:17:46 +0000 (07:17 +0200)]
[openssl] add api_knet_handle_crypto test

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[openssl] drop incorrect keylen management code
Fabio M. Di Nitto [Tue, 19 Sep 2017 05:13:41 +0000 (07:13 +0200)]
[openssl] drop incorrect keylen management code

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] add openssl support (first cut)
Fabio M. Di Nitto [Mon, 18 Sep 2017 12:36:29 +0000 (14:36 +0200)]
[crypto] add openssl support (first cut)

still needs dlopen and memcheck love + sync with nss key size

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[cryto] nss: add namespace to internal functions
Fabio M. Di Nitto [Sat, 16 Sep 2017 03:31:14 +0000 (05:31 +0200)]
[cryto] nss: add namespace to internal functions

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] fix casting with gcc-7 (debian unstable)
Fabio M. Di Nitto [Mon, 18 Sep 2017 20:11:05 +0000 (22:11 +0200)]
[build] fix casting with gcc-7 (debian unstable)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[debian] fix tests/ linking with debian unstable
Fabio M. Di Nitto [Mon, 18 Sep 2017 20:10:43 +0000 (22:10 +0200)]
[debian] fix tests/ linking with debian unstable

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[debian] fix build deps (pass 3 or 4)
Fabio M. Di Nitto [Mon, 18 Sep 2017 20:10:19 +0000 (22:10 +0200)]
[debian] fix build deps (pass 3 or 4)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[debian] be more specific about builddeps
Fabio M. Di Nitto [Mon, 18 Sep 2017 20:02:09 +0000 (22:02 +0200)]
[debian] be more specific about builddeps

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[debian] fix build dependency in control file
Fabio M. Di Nitto [Mon, 18 Sep 2017 19:58:12 +0000 (21:58 +0200)]
[debian] fix build dependency in control file

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[test] fix conditional build of int_lib_load_unload
Fabio M. Di Nitto [Thu, 14 Sep 2017 13:40:29 +0000 (15:40 +0200)]
[test] fix conditional build of int_lib_load_unload

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[global] bump lib soname to 1.0.0
Fabio M. Di Nitto [Thu, 14 Sep 2017 13:35:14 +0000 (15:35 +0200)]
[global] bump lib soname to 1.0.0

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] compress: drop unnecessary tracker and use init array instead
Fabio M. Di Nitto [Thu, 14 Sep 2017 08:47:10 +0000 (10:47 +0200)]
[dlopen] compress: drop unnecessary tracker and use init array instead

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] move tracking update into a write lock context
Fabio M. Di Nitto [Thu, 14 Sep 2017 03:01:24 +0000 (05:01 +0200)]
[compress] move tracking update into a write lock context

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] compress: fix load/unload of libraries and add extensive test
Fabio M. Di Nitto [Wed, 13 Sep 2017 12:43:53 +0000 (14:43 +0200)]
[dlopen] compress: fix load/unload of libraries and add extensive test

each handle should only unload libraries that has loaded or referenced
on exit, attempt to close all libraries from that handle
on compress_fini close only the one that's open

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] make sure to unload resources before re-init the new config
Fabio M. Di Nitto [Tue, 12 Sep 2017 13:04:46 +0000 (15:04 +0200)]
[compress] make sure to unload resources before re-init the new config

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[global] rename link.(c|h) to links.(c|h) as they conflict with global /usr/include...
Fabio M. Di Nitto [Mon, 11 Sep 2017 11:47:43 +0000 (13:47 +0200)]
[global] rename link.(c|h) to links.(c|h) as they conflict with global /usr/include/link.h

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] split check_lib_init into 2 functions
Fabio M. Di Nitto [Mon, 11 Sep 2017 07:50:28 +0000 (09:50 +0200)]
[compress] split check_lib_init into 2 functions

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] simplify lib init code and fix error handling
Fabio M. Di Nitto [Sun, 10 Sep 2017 07:55:39 +0000 (09:55 +0200)]
[crypto] simplify lib init code and fix error handling

also update the valgrind exception file

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] move all dlopen lib names at the top of the respective files
Fabio M. Di Nitto [Sun, 10 Sep 2017 07:25:23 +0000 (09:25 +0200)]
[dlopen] move all dlopen lib names at the top of the respective files

makes it easier to figure out library supported version

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] add suppress entries for internal NSPR/NSS memory leaks (part 2)
Fabio M. Di Nitto [Sun, 10 Sep 2017 07:24:54 +0000 (09:24 +0200)]
[dlopen] add suppress entries for internal NSPR/NSS memory leaks (part 2)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[docs] fix a typo
Fabio M. Di Nitto [Sun, 10 Sep 2017 06:53:33 +0000 (08:53 +0200)]
[docs] fix a typo

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] fix crypto/compress internal name space for similar functions
Fabio M. Di Nitto [Sun, 10 Sep 2017 06:51:04 +0000 (08:51 +0200)]
[dlopen] fix crypto/compress internal name space for similar functions

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] add suppress entries for internal NSPR/NSS memory leaks
Fabio M. Di Nitto [Sun, 10 Sep 2017 06:50:30 +0000 (08:50 +0200)]
[dlopen] add suppress entries for internal NSPR/NSS memory leaks

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] use RTLD_NOW instead of RTLD_LAZY to avoid perf hit on fast path
Fabio M. Di Nitto [Sun, 10 Sep 2017 06:39:49 +0000 (08:39 +0200)]
[dlopen] use RTLD_NOW instead of RTLD_LAZY to avoid perf hit on fast path

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] partially revert and partially fix b22ef0ca65d687dbc
Fabio M. Di Nitto [Sun, 10 Sep 2017 06:31:56 +0000 (08:31 +0200)]
[crypto] partially revert and partially fix b22ef0ca65d687dbc

nss/nspr still leaks approx 2kb on unload, but it's much cleaner
now than the many Kb before those fixes.

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Memory_allocation

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[handle] remove knet handle tracker
Fabio M. Di Nitto [Wed, 30 Aug 2017 19:00:03 +0000 (21:00 +0200)]
[handle] remove knet handle tracker

reload of shlib should be done on a per handle base to avoid complex
global functions.

For example, if you application is using 2 knet_h and you need to reload
libbz2, then switch both knet_h to use another compression method (or none)
and switch back to libbz2.

Similar can be done with nss/openssl once openssl support is added.

A global function to reload all library would a very complex error reporting
mechanism and could leave some handles improperly configured.

The application would have a better understanding of the needs at any given
time.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] fix nss unload/reload memory leak
Fabio M. Di Nitto [Wed, 30 Aug 2017 08:42:14 +0000 (10:42 +0200)]
[crypto] fix nss unload/reload memory leak

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] if the library is a symlink, display the symlink info to the final binary
Fabio M. Di Nitto [Tue, 29 Aug 2017 06:31:42 +0000 (08:31 +0200)]
[dlopen] if the library is a symlink, display the symlink info to the final binary

it cannot prevent symlink attacks but definetely helps to identify them

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[common] don't hardcode max path size
Fabio M. Di Nitto [Tue, 29 Aug 2017 04:12:18 +0000 (06:12 +0200)]
[common] don't hardcode max path size

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlclose] add logging messages around unloading libraries
Fabio M. Di Nitto [Mon, 28 Aug 2017 04:40:31 +0000 (06:40 +0200)]
[dlclose] add logging messages around unloading libraries

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[common] use a standard fn to dlopen libraries and print load path info
Fabio M. Di Nitto [Mon, 28 Aug 2017 04:30:01 +0000 (06:30 +0200)]
[common] use a standard fn to dlopen libraries and print load path info

might be useful to detect LD_PRELOAD attack

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] nss: be more clear about shut down/unload situation
Fabio M. Di Nitto [Mon, 28 Aug 2017 03:52:25 +0000 (05:52 +0200)]
[crypto] nss: be more clear about shut down/unload situation

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[tests] fix crypto test to deal with new nss dlopen space
Fabio M. Di Nitto [Sat, 26 Aug 2017 10:42:30 +0000 (12:42 +0200)]
[tests] fix crypto test to deal with new nss dlopen space

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[nss] clear error before dlopen
Fabio M. Di Nitto [Sat, 26 Aug 2017 09:54:02 +0000 (11:54 +0200)]
[nss] clear error before dlopen

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[nss] warn the users that library cannot be unloaded
Fabio M. Di Nitto [Sat, 26 Aug 2017 09:34:28 +0000 (11:34 +0200)]
[nss] warn the users that library cannot be unloaded

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] fix libnss horror show to avoid leaking memory
Fabio M. Di Nitto [Sat, 26 Aug 2017 09:32:25 +0000 (11:32 +0200)]
[crypto] fix libnss horror show to avoid leaking memory

libnss simply can't be unloaded at runtime as it leaks memory.
switch back to the hold atexit code and don't allow unloading
of the library.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] handle properly errors reported from .init functions
Fabio M. Di Nitto [Sat, 26 Aug 2017 09:31:57 +0000 (11:31 +0200)]
[crypto] handle properly errors reported from .init functions

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] fix libnss unload crash and remove that atexit horror show
Fabio M. Di Nitto [Sat, 26 Aug 2017 07:37:28 +0000 (09:37 +0200)]
[crypto] fix libnss unload crash and remove that atexit horror show

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] fix libref count the same way as compress
Fabio M. Di Nitto [Sat, 26 Aug 2017 07:19:12 +0000 (09:19 +0200)]
[crypto] fix libref count the same way as compress

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] centralize handling of libref in compress abstraction layer
Fabio M. Di Nitto [Sat, 26 Aug 2017 06:55:58 +0000 (08:55 +0200)]
[compress] centralize handling of libref in compress abstraction layer

the complexity come from a mix and match of those modules that
have/don't have .is_init/.init functions, and makes handling
more delicate.

This commit ensures that:
- library is loaded only once (makes load_lib mandatory for every modules)
- use knet_h->compress_int_data to track per handle init.
  modules providing .is_init,.init don't need set anything there
  unless they need to.
- modules don't need to track libref anymore but they must
  provide a unload_lib/load_lib.
- library are closed only once libref is 0.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[crypto] move libnss to a dlopen model (pass 1)
Fabio M. Di Nitto [Sat, 26 Aug 2017 04:10:03 +0000 (06:10 +0200)]
[crypto] move libnss to a dlopen model (pass 1)

unload and exit will coredump for now

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] implement dlopen rate limit to avoid RX DoS
Fabio M. Di Nitto [Fri, 25 Aug 2017 05:39:46 +0000 (07:39 +0200)]
[dlopen] implement dlopen rate limit to avoid RX DoS

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[global] update notes to package maintainers
Fabio M. Di Nitto [Fri, 25 Aug 2017 03:43:48 +0000 (05:43 +0200)]
[global] update notes to package maintainers

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] fix internal ref count for library unload
Fabio M. Di Nitto [Fri, 25 Aug 2017 03:38:10 +0000 (05:38 +0200)]
[compress] fix internal ref count for library unload

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] switch to new load_lib / unload_lib API
Fabio M. Di Nitto [Fri, 25 Aug 2017 03:29:40 +0000 (05:29 +0200)]
[compress] switch to new load_lib / unload_lib API

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] fix error message to be more explicit
Fabio M. Di Nitto [Thu, 24 Aug 2017 09:20:44 +0000 (11:20 +0200)]
[compress] fix error message to be more explicit

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[dlopen] start to cleanup the compress module API
Fabio M. Di Nitto [Thu, 24 Aug 2017 08:31:33 +0000 (10:31 +0200)]
[dlopen] start to cleanup the compress module API

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] consistent error message
Fabio M. Di Nitto [Thu, 24 Aug 2017 06:05:14 +0000 (08:05 +0200)]
[build] consistent error message

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[build] move hardcoding of linking libraries in one place and enforce better check
Fabio M. Di Nitto [Mon, 21 Aug 2017 10:26:15 +0000 (12:26 +0200)]
[build] move hardcoding of linking libraries in one place and enforce better check

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] move bzip2 to dlopen model
Fabio M. Di Nitto [Mon, 21 Aug 2017 06:58:18 +0000 (08:58 +0200)]
[compress] move bzip2 to dlopen model

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] cleanup dlerror before dlopen for lzma
Fabio M. Di Nitto [Mon, 21 Aug 2017 06:57:56 +0000 (08:57 +0200)]
[compress] cleanup dlerror before dlopen for lzma

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] cosmetic cleanup... (part 2)
Fabio M. Di Nitto [Mon, 21 Aug 2017 06:57:35 +0000 (08:57 +0200)]
[compress] cosmetic cleanup... (part 2)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] cosmetic cleanup
Fabio M. Di Nitto [Mon, 21 Aug 2017 06:56:44 +0000 (08:56 +0200)]
[compress] cosmetic cleanup

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] move lzma to dlopen model
Fabio M. Di Nitto [Mon, 21 Aug 2017 06:31:53 +0000 (08:31 +0200)]
[compress] move lzma to dlopen model

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] move lz4 to dlopen model
Fabio M. Di Nitto [Mon, 21 Aug 2017 04:09:14 +0000 (06:09 +0200)]
[compress] move lz4 to dlopen model

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] make sure lib handles are clean after dlclose
Fabio M. Di Nitto [Mon, 21 Aug 2017 03:57:52 +0000 (05:57 +0200)]
[compress] make sure lib handles are clean after dlclose

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] move zlib to dlopen model
Fabio M. Di Nitto [Sun, 20 Aug 2017 14:50:47 +0000 (16:50 +0200)]
[compress] move zlib to dlopen model

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7 years ago[compress] fix library init to work for multiple knet_handle
Fabio M. Di Nitto [Sun, 20 Aug 2017 14:27:37 +0000 (16:27 +0200)]
[compress] fix library init to work for multiple knet_handle

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>