From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/3] init_module: To handle kernel module signature enforcement
Date: Fri, 8 Mar 2024 09:47:51 +0100 [thread overview]
Message-ID: <20240308084751.GA257921@pevik> (raw)
In-Reply-To: <20240308045230.3106549-2-liwang@redhat.com>
Hi Li,
> The patch modifies init_module syscall test cases to account
> for kernel module signature enforcement. It adds parsing for
> the 'module.sig_enforce' parameter and adjusts test expectations
> based on whether signature enforcement is enabled, using
> new conditional logic.
> If enforcement is active, tests expect an EKEYREJECTED error;
> otherwise, they proceed as normal.
...
> diff --git a/testcases/kernel/syscalls/delete_module/delete_module01.c b/testcases/kernel/syscalls/delete_module/delete_module01.c
> index 90d8b5289..4c31f81b0 100644
> --- a/testcases/kernel/syscalls/delete_module/delete_module01.c
> +++ b/testcases/kernel/syscalls/delete_module/delete_module01.c
> @@ -14,8 +14,10 @@
> * Install dummy_del_mod.ko and delete it with delete_module(2).
> */
> +#include <stdlib.h>
> #include "tst_test.h"
> #include "tst_module.h"
> +#include "tst_kconfig.h"
> #include "lapi/syscalls.h"
> #define MODULE_NAME "dummy_del_mod"
> @@ -25,6 +27,12 @@ static int module_loaded;
> static void do_delete_module(void)
> {
> + struct tst_kcmdline_param params = TST_KCMDLINE_INIT("module.sig_enforce");
> +
> + tst_kcmdline_parse(¶ms, 1);
> + if (atoi(params.value) == 1)
> + tst_brk(TCONF, "module signature is enforced, skip test");
Only 2 tests do tst_brk(TCONF). I was thinking about adding library flag
.skip_in_module_sig_enforce, but probably not worth of it.
The rest LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-03-08 8:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 4:52 [LTP] [PATCH 1/3] kconfig: add funtion to parse /proc/cmdline Li Wang
2024-03-08 4:52 ` [LTP] [PATCH 2/3] init_module: To handle kernel module signature enforcement Li Wang
2024-03-08 8:47 ` Petr Vorel [this message]
2024-03-09 8:11 ` Li Wang
2024-03-08 4:52 ` [LTP] [PATCH 3/3] stack_clash: make use of tst_kcmdline_parse Li Wang
2024-03-08 8:56 ` Petr Vorel
2024-03-08 7:12 ` [LTP] [PATCH 1/3] kconfig: add funtion to parse /proc/cmdline Petr Vorel
2024-03-08 16:31 ` Cyril Hrubis
2024-03-09 8:09 ` Li Wang
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=20240308084751.GA257921@pevik \
--to=pvorel@suse.cz \
--cc=liwang@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.