From: Cyril Hrubis Date: Tue, 21 Jul 2020 17:26:49 +0200 Subject: [LTP] [PATCH 2/3] ioperm01: skip test if kernel is locked down In-Reply-To: <20200720194920.22784-2-ernunes@redhat.com> References: <20200720194920.22784-1-ernunes@redhat.com> <20200720194920.22784-2-ernunes@redhat.com> Message-ID: <20200721152649.GB13733@yuki.lan> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi! > ioperm is restricted under kernel lockdown. > > Signed-off-by: Erico Nunes > --- > 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