From: Richard Palethorpe <rpalethorpe@suse.de>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 4/4] can_bcm01: Move vcan to .modprobe
Date: Thu, 02 Nov 2023 09:22:07 +0000 [thread overview]
Message-ID: <87il6kse1z.fsf@suse.de> (raw)
In-Reply-To: <20231013074748.702214-5-pvorel@suse.cz>
Hello,
Petr Vorel <pvorel@suse.cz> writes:
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/network/can/cve/can_bcm01.c | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/testcases/network/can/cve/can_bcm01.c b/testcases/network/can/cve/can_bcm01.c
> index d9a835b03..ec98db133 100644
> --- a/testcases/network/can/cve/can_bcm01.c
> +++ b/testcases/network/can/cve/can_bcm01.c
> @@ -41,14 +41,6 @@ static void setup(void)
> {
> struct sockaddr_can addr = { .can_family = AF_CAN };
>
> - /*
> - * Older kernels require explicit modprobe of vcan. Newer kernels
> - * will load the modules automatically and support CAN in network
> - * namespace which would eliminate the need for running the test
> - * with root privileges.
> - */
> - tst_cmd((const char*[]){"modprobe", "vcan", NULL}, NULL, NULL, 0);
> -
> NETDEV_ADD_DEVICE(LTP_DEVICE, "vcan");
> NETDEV_SET_STATE(LTP_DEVICE, 1);
> addr.can_ifindex = NETDEV_INDEX_BY_NAME(LTP_DEVICE);
> @@ -143,10 +135,19 @@ static struct tst_test test = {
> .skip_in_compat = 1,
> .max_runtime = 30,
> .needs_drivers = (const char *const[]) {
> - "vcan",
> "can-bcm",
> NULL
> },
> + /*
> + * Older kernels require explicit modprobe of vcan. Newer kernels
> + * will load the modules automatically and support CAN in network
> + * namespace which would eliminate the need for running the test
> + * with root privileges.
> + */
This comment is wrong and can be removed. It also (or only?) depends on
kernel config whether modules are loaded automatically. It is a security
feature to remove automatic modprobe. IDK if older kernels lacked auto
module loading.
> + .modprobe = (const char *const[]) {
> + "vcan",
> + NULL
> + },
> .tags = (const struct tst_tag[]) {
> {"linux-git", "d5f9023fa61e"},
> {"CVE", "2021-3609"},
> --
> 2.42.0
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-11-02 9:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 7:47 [LTP] [PATCH 0/4] Add .modprobe (loading modules in C API) Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 1/4] tst_kernel: Add safe_check_driver() Petr Vorel
2023-10-13 12:24 ` Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 2/4] lib: Add .modprobe Petr Vorel
2023-10-13 12:09 ` Li Wang
2023-10-13 12:22 ` Petr Vorel
2023-10-16 9:05 ` Li Wang
2023-10-27 12:01 ` Petr Vorel
2023-11-01 16:33 ` Cyril Hrubis
2023-11-03 15:22 ` Petr Vorel
2023-10-13 12:30 ` Petr Vorel
2023-10-13 13:27 ` Li Wang
2023-10-13 13:50 ` Petr Vorel
2023-10-16 8:28 ` Li Wang
2023-11-01 16:26 ` Cyril Hrubis
2023-11-01 16:35 ` Cyril Hrubis
2023-11-03 15:54 ` Petr Vorel
2023-11-03 16:31 ` Edward Liaw via ltp
2023-11-03 12:12 ` Petr Vorel
2023-11-03 12:21 ` Cyril Hrubis
2023-11-03 14:58 ` Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 3/4] madvise11: Replace .needs_drivers with .modprobe Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 4/4] can_bcm01: Move vcan to .modprobe Petr Vorel
2023-11-02 9:22 ` Richard Palethorpe [this message]
2023-11-03 15:08 ` Petr Vorel
2023-10-16 7:47 ` [LTP] [PATCH 0/4] Add .modprobe (loading modules in C API) Richard Palethorpe
2023-10-16 8:41 ` Richard Palethorpe
2023-10-16 15:12 ` Cyril Hrubis
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=87il6kse1z.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox