From: "Günther Noack" <gnoack3000@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: "Mickaël Salaün" <mic@digikod.net>,
"Michael Kerrisk" <mtk.manpages@gmail.com>,
linux-man@vger.kernel.org
Subject: Re: [PATCH v7 1/1] landlock.7: Explain the best-effort fallback mechanism in the example
Date: Wed, 19 Apr 2023 20:21:50 +0200 [thread overview]
Message-ID: <20230419.704027e98f41@gnoack.org> (raw)
In-Reply-To: <84d7c516-41c2-cac6-b5f4-2348eb7201a9@gmail.com>
On Tue, Apr 18, 2023 at 04:24:49PM +0200, Alejandro Colomar wrote:
> Hi Mickaël,
>
> On 4/17/23 22:45, Mickaël Salaün wrote:
>
> [...]
>
> >> +int abi = landlock_create_ruleset(NULL, 0,
> >> + LANDLOCK_CREATE_RULESET_VERSION);
> >> +if (abi <= 0) {
> >> + /*
> >> + * Kernel too old, not compiled with Landlock,
> >> + * or Landlock was not enabled at boot time.
> >> + */
> >> + perror("Giving up \- No Landlock support");
>
> [...]
>
> > As a side note, this syscall and this flag should never return 0, but if
> > it does (e.g. because of weird seccomp filter), the errno value might be
> > unspecified.
>
> Hmm, good catch, we should test for `== -1`, rather than `< 0`.
> Michael Kerrisk explicitly wanted this, and I agree with him, as it makes
> the code slightly more readable (explicit).
Ack, I'll send a small follow-up.
–Günther
next prev parent reply other threads:[~2023-04-19 18:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 17:25 [PATCH v7 0/1] landlock.7: Explain best-effort fallback in example Günther Noack
2023-04-17 17:25 ` [PATCH v7 1/1] landlock.7: Explain the best-effort fallback mechanism in the example Günther Noack
2023-04-17 20:45 ` Mickaël Salaün
2023-04-18 14:24 ` Alejandro Colomar
2023-04-19 18:21 ` Günther Noack [this message]
2023-04-17 18:50 ` [PATCH v7 0/1] landlock.7: Explain best-effort fallback in example Alejandro Colomar
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=20230419.704027e98f41@gnoack.org \
--to=gnoack3000@gmail.com \
--cc=alx.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mic@digikod.net \
--cc=mtk.manpages@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).