* [GIT PULL] Landlock fixes for v7.4-rc6
@ 2026-12-03 19:22 Mickaël Salaün
2026-12-03 20:30 ` Linus Torvalds
0 siblings, 1 reply; 4+ messages in thread
From: Mickaël Salaün @ 2026-12-03 19:22 UTC (permalink / raw)
To: Linus Torvalds
Cc: Mickaël Salaün, Christian Brauner, Günther Noack,
Lee Seong Hyeon, Oleg Nesterov, linux-kernel,
linux-security-module
Hi,
This fixes a Landlock issue where TSYNC could hold exec_update_lock
indefinitely while waiting for sibling threads. A per-process flag now
serializes TSYNC calls instead.
Please pull these changes for v7.4-rc6 . This commit merges cleanly
with your master branch. Kernel changes have been tested in the latest
linux-next releases.
Test coverage for security/landlock is 91.9% of 2911 lines according to
LLVM 23, and it was 91.8% of 2894 lines before this PR.
Regards,
Mickaël
--
The following changes since commit b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f:
Linux 7.4-rc4 (2026-11-22 14:57:40 -0800)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git tags/landlock-7.4-rc6
for you to fetch changes up to e39d4badb631f2b1fe6dafd4e988cd2da81a6b9b:
landlock: Do not hold exec_update_lock across the TSYNC wait (2026-11-30 15:39:10 +0100)
----------------------------------------------------------------
Landlock fixes for v7.4-rc6
----------------------------------------------------------------
Mickaël Salaün (1):
landlock: Do not hold exec_update_lock across the TSYNC wait
include/linux/sched/signal.h | 1 +
security/landlock/tsync.c | 140 +++++++++++++++++++++++++++++++++++++++----
2 files changed, 128 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [GIT PULL] Landlock fixes for v7.4-rc6
2026-12-03 19:22 [GIT PULL] Landlock fixes for v7.4-rc6 Mickaël Salaün
@ 2026-12-03 20:30 ` Linus Torvalds
2026-12-04 11:20 ` Mickaël Salaün
0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2026-12-03 20:30 UTC (permalink / raw)
To: Mickaël Salaün
Cc: Christian Brauner, Günther Noack, Lee Seong Hyeon,
Oleg Nesterov, linux-kernel, linux-security-module
On Thu, 3 Dec 2026 at 11:22, Mickaël Salaün <mic@digikod.net> 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?
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.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [GIT PULL] Landlock fixes for v7.4-rc6
2026-12-03 20:30 ` Linus Torvalds
@ 2026-12-04 11:20 ` Mickaël Salaün
2026-12-04 18:49 ` Linus Torvalds
0 siblings, 1 reply; 4+ messages in thread
From: Mickaël Salaün @ 2026-12-04 11:20 UTC (permalink / raw)
To: Linus Torvalds
Cc: Christian Brauner, Günther Noack, Lee Seong Hyeon,
Oleg Nesterov, linux-kernel, linux-security-module
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@digikod.net> 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@mail.gmail.com
[3] https://patch.msgid.link/20250310.990b29c809af@gnoack.org
[4] https://patch.msgid.link/20261204111754.1452982-1-mic@digikod.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] Landlock fixes for v7.4-rc6
2026-12-04 11:20 ` Mickaël Salaün
@ 2026-12-04 18:49 ` Linus Torvalds
0 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2026-12-04 18:49 UTC (permalink / raw)
To: Mickaël Salaün
Cc: Christian Brauner, Günther Noack, Lee Seong Hyeon,
Oleg Nesterov, linux-kernel, linux-security-module
On Fri, 4 Dec 2026 at 03:20, Mickaël Salaün <mic@digikod.net> wrote:
>
> Landlock needs to serialize TSYNC callers in each thread group without
> holding exec_update_lock across an unbounded wait [1].
Oh, I agree that exec_update_lock is a horrible lock to hold.
What I do *not* agree with is adding random LANDLOCK bits into the
core signal handler flags, naming them for some incomprehensible
landlock-only reason ("TSYNC"? WTF?) and updating them inside the
landlock code.
That's a disaster in so many ways, and I will *not* be taking code like that.
Your other patch at least looks like it has an explanation for it, and
uses names that make more sense. But I still feel like it should
actually be shown to be a generic thing. I don't see that approach
working for other users as-is, since there is no way to wait for it.
You rely on system call restart and if I read it right it seems to
busy-loop in user space.
Which is not acceptable *either* - now you're potentially just having
livelocks with user space in any realtime scheduling situation.
So I still think this whole approach is entirely broken.
I *do* agree that using exec_update_lock is *also* entirely broken,
but two brokens do not make a whole.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-12-04 18:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 19:22 [GIT PULL] Landlock fixes for v7.4-rc6 Mickaël Salaün
2026-12-03 20:30 ` Linus Torvalds
2026-12-04 11:20 ` Mickaël Salaün
2026-12-04 18:49 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox