From: "Mickaël Salaün" <mic@digikod.net>
To: Yves Rutschle <landlock@rutschle.net>, landlock@lists.linux.dev
Subject: Re: Landlock setup
Date: Tue, 8 Nov 2022 15:13:39 +0100 [thread overview]
Message-ID: <f0b57f51-e7c8-41f6-28eb-5dcb11686cc2@digikod.net> (raw)
In-Reply-To: <20221108112722.GB10688@rutschle.net>
On 08/11/2022 12:27, Yves Rutschle wrote:
> On Mon, Nov 07, 2022 at 07:02:04PM +0100, Mickaël Salaün wrote:
>> This is correct, but you may also want to enable other LSMs if you are using
>> them (e.g. Yama). You should probably stick to the new default Debian Sid
>> cmdline: https://salsa.debian.org/kernel-team/linux/-/commit/1ef40f40e593a5dc223e9ce171fa8f2cd5aba198
>
> I'm on Debian 11 on this PC, which enables... nothing.
Right, but it doesn't hurt to stick to the future default. :)
>
>> Your setup is good and it should work. You can debug a bit more with an
>> up-to-date strace (which will print the Landlock syscalls). I guess you are
>> running this sample in a strict seccomp environment that denies Landlock
>> syscalls. This may be the result of using an old container runtime (Docker,
>> Podman and runc are now patched but the related fix may not be backported).
>
> strace:
>
> [...]
> mprotect(0x7f5189b04000, 16384, PROT_READ) = 0
> mprotect(0x558557b7c000, 4096, PROT_READ) = 0
> mprotect(0x7f5189b5c000, 8192, PROT_READ) = 0
> munmap(0x7f5189b15000, 94575) = 0
> [ Process PID=3958 runs in x32 mode. ]
> syscall_0x400001bc(0, 0, 0x1, 0, 0x7f5189b3d2b0, 0x40) = -1 ENOSYS (Function not implemented)
> [ Process PID=3958 runs in 64 bit mode. ]
> dup(2) = 3
> [...]
>
> => I guess strace is not up to date. I dont think I have
> seccomp enabled either, and I think it would interrupt (as
> in kill) the syscall rather than return ENOSYS. I am not
> running from a docker either.
If you see "landlock: Up and running." in the running kernel log, I
don't see any reason why the kernel would return ENOSYS for the Landlock
syscalls.
The default kernel for Debian 11 is Linux 5.10, which doesn't support
Landlock. I tested with linux-image-5.18.0-0.deb11.4-amd64 and
linux-image-6.0.0-0.deb11.2-amd64-unsigned and it works fine.
On which architecture are you?
>
>
> Ok, so I guess I'll look into upgrading the kernel and
> strace, or compiling it myself.
No need to update strace to debug this issue, it will just not print the
syscall names and not format their arguments.
>
> Cheers,
> Y.
>
next prev parent reply other threads:[~2022-11-08 16:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 17:22 Landlock setup Yves Rutschle
2022-11-07 18:02 ` Mickaël Salaün
2022-11-08 11:27 ` Yves Rutschle
2022-11-08 14:13 ` Mickaël Salaün [this message]
2022-11-08 17:15 ` Yves Rutschle
2022-12-16 9:44 ` Mickaël Salaün
2022-12-16 9:53 ` Yves Rutschle
2022-12-16 10:34 ` Mickaël Salaün
2023-01-08 15:29 ` Yves Rutschle
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=f0b57f51-e7c8-41f6-28eb-5dcb11686cc2@digikod.net \
--to=mic@digikod.net \
--cc=landlock@lists.linux.dev \
--cc=landlock@rutschle.net \
/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.