All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erico Nunes <ernunes@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/3] ioperm01: skip test if kernel is locked down
Date: Wed, 22 Jul 2020 17:52:22 +0200	[thread overview]
Message-ID: <0386a2c0-607b-7f20-fb2a-221e963b45fc@redhat.com> (raw)
In-Reply-To: <20200721152649.GB13733@yuki.lan>

On 7/21/20 5:26 PM, Cyril Hrubis wrote:
> 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?
> 

Good point. I think it is a good idea, but can be done in a separate
patchset.
There are many other things that can be covered together with that by
new tests considering the recent lockdown feature (enum lockdown_reason
seems to provide a good list and starting point).

Erico


  reply	other threads:[~2020-07-22 15:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 19:49 [LTP] [PATCH 1/3] lib: add function to check for kernel lockdown Erico Nunes
2020-07-20 19:49 ` [LTP] [PATCH 2/3] ioperm01: skip test if kernel is locked down Erico Nunes
2020-07-21 15:26   ` Cyril Hrubis
2020-07-22 15:52     ` Erico Nunes [this message]
2020-07-20 19:49 ` [LTP] [PATCH 3/3] iopl01: " Erico Nunes
2020-07-21 15:29   ` Cyril Hrubis
2020-07-21  7:46 ` [LTP] [PATCH 1/3] lib: add function to check for kernel lockdown Li Wang
2020-07-21  8:57   ` Erico Nunes
2020-07-21 13:19     ` Li Wang
2020-07-22 15:52       ` Erico Nunes
2020-07-22 15:58         ` Cyril Hrubis
2020-07-23  7:51         ` Li Wang
2020-07-21 15:26 ` Cyril Hrubis
2020-07-22 15:52   ` Erico Nunes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0386a2c0-607b-7f20-fb2a-221e963b45fc@redhat.com \
    --to=ernunes@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.