pve-kernel/patches/kernel/0010-revert-memfd-improve-userspace-warnings-for-missing-.patch
Thomas Lamprecht 9ecdffc222 update source and patches to Ubuntu 25.04 Plucky based 6.14 kernel
Provide a newer – currently – opt-in kernel that will form the base
for Ubuntu's 25.04 release.

Using the current relevant tag Ubuntu-6.14.0-12.12 (the newer 13.13
tag includes only some packaging changes that do not affect us) from
the upstream repo [0].

Update the patches, drop those that got applied upstream or are simply
not relevant for the newer kernel anymore. Update the ZFS submodule to
include a cherry-pick of the two Linux 6.14 compat patches that
already got applied to ZFS upstream [1].

[0]: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/plucky/
[1]: https://github.com/openzfs/zfs/pull/17026

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-03-28 14:27:55 +01:00

45 lines
1.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Mon, 6 Nov 2023 10:17:02 +0100
Subject: [PATCH] revert "memfd: improve userspace warnings for missing
exec-related flags".
This warning is telling userspace developers to pass MFD_EXEC and
MFD_NOEXEC_SEAL to memfd_create(). Commit 434ed3350f57 ("memfd: improve
userspace warnings for missing exec-related flags") made the warning more
frequent and visible in the hope that this would accelerate the fixing of
errant userspace.
But the overall effect is to generate far too much dmesg noise.
Fixes: 434ed3350f57 ("memfd: improve userspace warnings for missing exec-related flags")
Reported-by: Damian Tometzki <dtometzki@fedoraproject.org>
Closes: https://lkml.kernel.org/r/ZPFzCSIgZ4QuHsSC@fedora.fritz.box
Cc: Aleksa Sarai <cyphar@cyphar.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Daniel Verkamp <dverkamp@chromium.org>
Cc: Jeff Xu <jeffxu@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
mm/memfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memfd.c b/mm/memfd.c
index 37f7be57c2f505cbee9c5d7b661dfd6c1e99b758..8e8b2799a17e4b02b8e796b468b4021f848fbef0 100644
--- a/mm/memfd.c
+++ b/mm/memfd.c
@@ -318,7 +318,7 @@ static int check_sysctl_memfd_noexec(unsigned int *flags)
}
if (!(*flags & MFD_NOEXEC_SEAL) && sysctl >= MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED) {
- pr_err_ratelimited(
+ pr_warn_once(
"%s[%d]: memfd_create() requires MFD_NOEXEC_SEAL with vm.memfd_noexec=%d\n",
current->comm, task_pid_nr(current), sysctl);
return -EACCES;