[LTP] [PATCH] syscalls/keyctl/keyctl09.c: fix test encrypted key

Cyril Hrubis chrubis@suse.cz
Wed Oct 12 15:31:50 CEST 2022


Hi!
> > This commit fixes the test for adding encrypted keys with unencrypted data.
> > Unencryted data must be provided hex-ascii encoding. Due to a kernel
> > bug, the unencypted data was not decoded to binary thus the length of
> > the key was only half the specified key size. This patch doubles the key
> > size and adds a test with a wrong key size to trigger a corresponding
> > error.
> > 
> > This patch must be used with the kernel fix
> > https://lore.kernel.org/lkml/20220919072317.E41421357@mail.steuer-voss.de
> 
> Petr, please correct me if I'm wrong.  Changing an existing LTP test so
> that it only works on kernels with the kernel patch applied, doesn't
> sound right.  The test should emit a warning if the original "valid
> payload" successfully loads.

We also have a policy not to work around any kernel bugs. So if this
really fixes a kernel bug it's okay that the test will fail on older
kernels without this fix and the patch that fixes kernel should be added
as a tag to the test.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list