I tested these changes out on various kernels going back to 4.2, and
keyctl feature detection worked fine.
Cool, much appreciated.
I did run in to some glitches with test-pem and test-cipher on some old
kernels. test-pem needs L_CIPHER_DES_CBC for encrypted certs, and
I've just pushed out an update to test-pem that hopefully takes care of
test-cipher fails because AEAD ciphers had a bogus recv() return
before v4.9 (see kernel commit 0c1e16cd1e).
Not sure what we can do about this one.