selinux/libselinux
Christian Göttsche f1178a13dc libselinux: use DJB2a string hash function
The hash table implementation uses `& (SIDTAB_SIZE - 1)` to truncate
generated hashes to the number of buckets.  This operation is equal to
`% SIDTAB_SIZE` if and only if the size is a power of two (which seems
to be always the case).  One property of the binary and with a power of
two (and probably a small one <=2048) is all higher bits are discarded.
Thus a hash function is needed with a good avalanche effect, which the
current one is not.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2023-11-21 08:55:42 -05:00
..
include libselinux: constify selabel_cmp(3) parameters 2023-10-11 14:59:19 -04:00
man Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
src libselinux: use DJB2a string hash function 2023-11-21 08:55:42 -05:00
utils libselinux/utils: update getdefaultcon 2023-11-07 16:27:27 -05:00
LICENSE
Makefile libselinux: use PCRE2 by default 2021-12-09 11:07:00 -05:00
VERSION Update VERSIONs to 3.6-rc1 for release. 2023-11-08 12:51:35 +01:00