[LTP] [PATCH 2/3] ioperm01: skip test if kernel is locked down

Cyril Hrubis chrubis@suse.cz
Tue Jul 21 17:26:49 CEST 2020


Hi!
> ioperm is restricted under kernel lockdown.
> 
> Signed-off-by: Erico Nunes <ernunes@redhat.com>
> ---
>  testcases/kernel/syscalls/ioperm/ioperm01.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/ioperm/ioperm01.c b/testcases/kernel/syscalls/ioperm/ioperm01.c
> index 4c5c0e6ea..d1d633b20 100644
> --- a/testcases/kernel/syscalls/ioperm/ioperm01.c
> +++ b/testcases/kernel/syscalls/ioperm/ioperm01.c
> @@ -42,6 +42,9 @@ static void verify_ioperm(void)
>  
>  static void setup(void)
>  {
> +	/* ioperm is restricted under kernel lockdown. */
> +	tst_lockdown_skip();
> +
>  	/*
>  	 * The value of IO_BITMAP_BITS (include/asm-i386/processor.h) changed
>  	 * from kernel 2.6.8 to permit 16-bits ioperm

This looks good, however shouldn't we as well add a third ioperm test
that checks that the call fails for root when lockdown is enabled?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list