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 BB7ABCA0EC2 for ; Mon, 11 Sep 2023 21:31:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348499AbjIKV1G (ORCPT ); Mon, 11 Sep 2023 17:27:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239673AbjIKO0E (ORCPT ); Mon, 11 Sep 2023 10:26:04 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2638FDE for ; Mon, 11 Sep 2023 07:26:00 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 675FAC433C9; Mon, 11 Sep 2023 14:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694442359; bh=U+rdpYITGSATQnSbvs7W8O7fAgVegDAVV8V7I8IEOLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MgsDQ8fOHFj+WAK8KdIzeDCGoXPXKDa6fyAcs9u3GaE4Aibx0/KiKRvIYx6CMUpVq TOiqRwRzAFKAseRZ1lFTugRB0kc5WLOum0LXbaQJEIbn7qezt8PHDsBpTVFDduD31b hCghmgbZksR9cLgy+G7noVJywdxu/m7uaBqYXx/I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Damian Tometzki , Aleksa Sarai , Christian Brauner , Daniel Verkamp , Jeff Xu , Kees Cook , Shuah Khan , Andrew Morton Subject: [PATCH 6.5 738/739] revert "memfd: improve userspace warnings for missing exec-related flags". Date: Mon, 11 Sep 2023 15:48:57 +0200 Message-ID: <20230911134711.671046183@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911134650.921299741@linuxfoundation.org> References: <20230911134650.921299741@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrew Morton 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 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 Signed-off-by: Greg Kroah-Hartman --- 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)); }