Patch "revert "memfd: improve userspace warnings for missing exec-related flags"." has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    revert "memfd: improve userspace warnings for missing exec-related flags".

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-memfd-improve-userspace-warnings-for-missing-exec-related-flags.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0 Mon Sep 17 00:00:00 2001
From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Sep 2023 15:59:31 -0700
Subject: revert "memfd: improve userspace warnings for missing exec-related flags".

From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

commit 2562d67b1bdf91c7395b0225d60fdeb26b4bc5a0 upstream.

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@xxxxxxxxxxxxxxxxx>
Closes: https://lkml.kernel.org/r/ZPFzCSIgZ4QuHsSC@xxxxxxxxxxxxxxxx
Cc: Aleksa Sarai <cyphar@xxxxxxxxxx>
Cc: Christian Brauner <brauner@xxxxxxxxxx>
Cc: Daniel Verkamp <dverkamp@xxxxxxxxxxxx>
Cc: Jeff Xu <jeffxu@xxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Shuah Khan <shuah@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 mm/memfd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/memfd.c
+++ b/mm/memfd.c
@@ -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));
 	}


Patches currently in stable-queue which might be from akpm@xxxxxxxxxxxxxxxxxxxx are

queue-6.5/revert-memfd-improve-userspace-warnings-for-missing-exec-related-flags.patch
queue-6.5/arm64-mm-use-ptep_clear-instead-of-pte_clear-in-clea.patch
queue-6.5/selftests-memfd-error-out-test-process-when-child-te.patch
queue-6.5/memfd-do-not-eacces-old-memfd_create-users-with-vm.m.patch
queue-6.5/memfd-improve-userspace-warnings-for-missing-exec-re.patch
queue-6.5/rcu-dump-vmalloc-memory-info-safely.patch
queue-6.5/watchdog-hardlockup-avoid-large-stack-frames-in-watc.patch
queue-6.5/mm-memfd-sysctl-fix-memfd_noexec_scope_noexec_enforc.patch
queue-6.5/multi-gen-lru-fix-per-zone-reclaim.patch
queue-6.5/fs-ocfs2-namei-check-return-value-of-ocfs2_add_entry.patch
queue-6.5/mm-vmalloc-add-a-safer-version-of-find_vm_area-for-debug.patch
queue-6.5/scripts-gdb-fix-lx-lsmod-show-the-wrong-size.patch
queue-6.5/selftests-memfd-sysctl-fix-memfd_noexec_scope_noexec.patch
queue-6.5/nmi_backtrace-allow-excluding-an-arbitrary-cpu.patch
queue-6.5/memfd-replace-ratcheting-feature-from-vm.memfd_noexe.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux