Skip to contentSkip to conversation

FAILED: patch "[PATCH] revert "memfd: improve userspace warnings for missing" failed to apply to 6.4-stable tree

PATCH [email protected] 1 participant 1 message Sep 7, 2023

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.4.y
git checkout FETCH_HEAD
git cherry-pick -x 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023090735-lyrically-fabulous-bbb1@gregkh' --subject-prefix 'PATCH 6.4.y' HEAD^..

Possible dependencies:

2562d67b1bdf ("revert "memfd: improve userspace warnings for missing exec-related flags".") 434ed3350f57 ("memfd: improve userspace warnings for missing exec-related flags") 202e14222fad ("memfd: do not -EACCES old memfd_create() users with vm.memfd_noexec=2") badbbcd76545 ("selftests/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED") 72de25913022 ("mm/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0 Mon Sep 17 00:00:00 2001
From: Andrew Morton <[email protected]>
Date: Sat, 2 Sep 2023 15:59:31 -0700
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")
Cc Aleksa Sarai <[email protected]>
Cc Christian Brauner <[email protected]>
Cc Daniel Verkamp <[email protected]>
Cc Jeff Xu <[email protected]>
Cc Kees Cook <[email protected]>
Cc Shuah Khan <[email protected]>
mm/memfd.c +1 -1
index 1cad1904fc26..2dba2cb6f0d0 100644
@@ -316,7 +316,7 @@ SYSCALL_DEFINE2(memfd_create,
 		return -EINVAL;
 
 	if (!(flags & (MFD_EXEC | MFD_NOEXEC_SEAL))) {
-		pr_info_ratelimited(
+		pr_warn_once(
 			"%s[%d]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set\n",
 			current->comm, task_pid_nr(current));
 	}