Thread (45 messages) 45 messages, 4 authors, 2023-03-30

Re: [RFC 00/12] module: avoid userspace pressure on unwanted allocations

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2023-03-24 19:11:31
Also in: lkml

On Fri, Mar 24, 2023 at 10:54 AM Luis Chamberlain [off-list ref] wrote:
+/*
+ * This clutch ensures we only allow a certain number concurrent threads at a
kludge, not clutch.

And it's much worse than a kludge. It's just wrong and disgusting.
quoted hunk ↗ jump to hunk
+               pr_warn_ratelimited("kread_concurrent_max (%u) close to 0 (max_loads: %u), throttling...",
+                                   atomic_read(&kread_concurrent_max),
+                                   MAX_KREAD_CONCURRENT);
This is also wrong, since it's not kernel_read_file() that is the
problem, but whatever broken caller.

Yeah, yeah, in practice it's presumably always just finit_module()
doing kernel_read_file_from_fd(), but it's still *completely* wrong to
just say "function X is throttling" when "X" isn't the problem, and
doesn't tell what the _real_ problem is.

I really think this all needs some core fixing at the module layer,
not these kinds of horrific hacks.

          Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help