Re: [GIT PULL] Landlock fixes for v7.4-rc6

From: Mickaël Salaün

Date: Fri Dec 04 2026 - 06:21:07 EST


On Thu, Dec 03, 2026 at 12:30:05PM -0800, Linus Torvalds wrote:
> On Thu, 3 Dec 2026 at 11:22, Mickaël Salaün <mic@xxxxxxxxxxx> wrote:
> >
> > Please pull these changes for v7.4-rc6 .
>
> No.
>
> I'm not taking some random new core signal flag like this for some
> random security module. That's against the whole point of having a
> security layer.
>
> What makes landlock so special here, and why would it need special
> flags in the signal structure?

Landlock needs to serialize TSYNC callers in each thread group without
holding exec_update_lock across an unbounded wait [1]. seccomp updates
sibling filter state directly under siglock, with cred_guard_mutex
against exec. Landlock's siblings update their own credentials through
task work [2]. A competing caller must restart, not block, so it can
run the winner's task work.

An unused bit in signal_struct has the right lifetime and doesn't grow
the structure. siglock protects the bit, not the wait.
A Landlock-owned table adds storage, lookup, insertion and removal, plus
allocation and freeing if entries are heap-backed.

The original RFC also discussed set*id() and capability updates [3];
neither changes here. I posted v3 for review [4]. The signal code now
manages the reservation instead of Landlock setting the bit directly.
Landlock still handles the restart. Does this address your concern?

>
> And I see another pointless "Link:" that points to the same
> information that is in the commit message, but none of the discussion
> that resulted in reviews etc. This is garbage, and I need explanations
> for why some security module is so special that it wants to modify the
> signal flags.

The Link pointed to the patch, not the discussion. Christian's reply
explains why we need to get off exec_update_lock here [1].

[1] https://patch.msgid.link/20261124-gehisst-modeerscheinung-hermelin-b3e1d5983901@brauner
[2] https://patch.msgid.link/CAG48ez3MxN524ge_sZeTwL0FEDASaSTb-gm1vPO8UwpijTeHqw@xxxxxxxxxxxxxx
[3] https://patch.msgid.link/20250310.990b29c809af@xxxxxxxxxx
[4] https://patch.msgid.link/20261204111754.1452982-1-mic@xxxxxxxxxxx