]> git.baikalelectronics.ru Git - kernel.git/commit
KEYS: Expand the capacity of a keyring
authorDavid Howells <dhowells@redhat.com>
Tue, 24 Sep 2013 09:35:18 +0000 (10:35 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 24 Sep 2013 09:35:18 +0000 (10:35 +0100)
commitb0ee37410d9b04e1c3e045adc83adfda458ba30c
tree7fa48ae3c5ecff90d6d1f662fd91af5ddf74d56d
parent152f2c7640a1f6c1d7869337b393bc29f77e17f6
KEYS: Expand the capacity of a keyring

Expand the capacity of a keyring to be able to hold a lot more keys by using
the previously added associative array implementation.  Currently the maximum
capacity is:

(PAGE_SIZE - sizeof(header)) / sizeof(struct key *)

which, on a 64-bit system, is a little more 500.  However, since this is being
used for the NFS uid mapper, we need more than that.  The new implementation
gives us effectively unlimited capacity.

With some alterations, the keyutils testsuite runs successfully to completion
after this patch is applied.  The alterations are because (a) keyrings that
are simply added to no longer appear ordered and (b) some of the errors have
changed a bit.

Signed-off-by: David Howells <dhowells@redhat.com>
include/keys/keyring-type.h
include/linux/key.h
lib/assoc_array.c
security/keys/Kconfig
security/keys/gc.c
security/keys/internal.h
security/keys/key.c
security/keys/keyring.c
security/keys/request_key.c