From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 4/4] Add error coverage for landlock network support
Date: Wed, 6 Nov 2024 11:38:11 +0100 [thread overview]
Message-ID: <ZytHE-4rpsrycuI_@yuki.lan> (raw)
In-Reply-To: <d3f0719e-a1e3-4eb1-8613-1506d137351a@suse.com>
Hi!
> >> - verify_landlock_is_enabled();
> >> + abi_current = verify_landlock_is_enabled();
> >>
> >> ruleset_attr->handled_access_fs = LANDLOCK_ACCESS_FS_EXECUTE;
> >>
> >> ruleset_fd = TST_EXP_FD_SILENT(tst_syscall(__NR_landlock_create_ruleset,
> >> - ruleset_attr, sizeof(struct tst_landlock_ruleset_attr_abi1), 0));
> >> + ruleset_attr, sizeof(struct tst_landlock_ruleset_attr_abi4), 0));
> > ^
> > This should be abi_current otherwise we
> > will fail on v1 only system.
> >
> >> }
> >>
>
> In what sense? abi4 is already the last one. At least the last supported
> by LTP.
Because if we request abi4 it will fail on kernels that only support
abi1. We try hard to skip the abi4 tests, but we wouldn't get there at
all on abi1 kernel because we would fail to create the ruleset_fd in the
test setup.
And we cannot initialize the abi to anything newer than abi4 either,
because we pass abi4 structure in the test. It's fine that we pass abi4
structure on abi1 system here, because the test only checks for invalid
cases and all we need here is to pass a valid attr and size so that we
get rejected by the kernel on the rest of the parameters.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-11-06 10:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 9:34 [LTP] [PATCH v2 0/4] landlock network coverage support Andrea Cervesato
2024-11-05 9:34 ` [LTP] [PATCH v2 1/4] Fallback landlock network support Andrea Cervesato
2024-11-05 12:31 ` Li Wang
2024-11-05 12:42 ` Li Wang
2024-11-05 12:59 ` Andrea Cervesato via ltp
2024-11-05 13:15 ` Cyril Hrubis
2024-11-05 15:13 ` Cyril Hrubis
2024-11-06 7:13 ` Li Wang
2024-11-05 12:47 ` Andrea Cervesato via ltp
2024-11-05 13:08 ` Cyril Hrubis
2024-11-05 13:15 ` Andrea Cervesato via ltp
2024-11-05 9:34 ` [LTP] [PATCH v2 2/4] Network helpers in landlock suite common functions Andrea Cervesato
2024-11-05 15:27 ` Cyril Hrubis
2024-11-05 9:34 ` [LTP] [PATCH v2 3/4] Add landlock08 test Andrea Cervesato
2024-11-05 15:26 ` Cyril Hrubis
2024-11-05 9:34 ` [LTP] [PATCH v2 4/4] Add error coverage for landlock network support Andrea Cervesato
2024-11-05 15:39 ` Cyril Hrubis
2024-11-05 17:45 ` Cyril Hrubis
2024-11-06 10:29 ` Andrea Cervesato via ltp
2024-11-06 10:38 ` Cyril Hrubis [this message]
2024-11-06 11:01 ` Andrea Cervesato via ltp
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=ZytHE-4rpsrycuI_@yuki.lan \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox