From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 398FFEC8741 for ; Thu, 7 Sep 2023 15:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236785AbjIGP27 (ORCPT ); Thu, 7 Sep 2023 11:28:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbjIGPXH (ORCPT ); Thu, 7 Sep 2023 11:23:07 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3F3610F7 for ; Thu, 7 Sep 2023 08:22:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1A54C4AF7B; Thu, 7 Sep 2023 15:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694099083; bh=IodVwTY0fkLMrD4rI6PkKZzwWJQlF/i15P93zM6W7Ms=; h=Subject:To:Cc:From:Date:From; b=18eqxrZP8hN8TRrWUtbdl+FP8gbkkLnOeU4H1AabJfRt6SRj2qzxEwV/c7iNdwYnq iIQP/pEgQAM9yWkDqvAxki5x96H7SIE8mcxDZoVo46EaNnXCO6X7hDoRImJ2wKHu/A 4eA9yOElk7wvIz1mpoKcMabTKZ9aMoz2ctJmWlzM= Subject: FAILED: patch "[PATCH] revert "memfd: improve userspace warnings for missing" failed to apply to 6.4-stable tree To: akpm@linux-foundation.org, brauner@kernel.org, cyphar@cyphar.com, dtometzki@fedoraproject.org, dverkamp@chromium.org, jeffxu@google.com, keescook@chromium.org, shuah@kernel.org, stable@vger.kernel.org Cc: From: Date: Thu, 07 Sep 2023 16:04:35 +0100 Message-ID: <2023090735-lyrically-fabulous-bbb1@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 . 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 # git commit -s git send-email --to '' --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 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") Reported-by: Damian Tometzki Closes: https://lkml.kernel.org/r/ZPFzCSIgZ4QuHsSC@fedora.fritz.box Cc: Aleksa Sarai Cc: Christian Brauner Cc: Daniel Verkamp Cc: Jeff Xu Cc: Kees Cook Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton diff --git a/mm/memfd.c b/mm/memfd.c index 1cad1904fc26..2dba2cb6f0d0 100644 --- 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)); }