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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D0EBC88CB2 for ; Mon, 4 Sep 2023 13:31:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 812578E0002; Mon, 4 Sep 2023 09:31:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C2AE8D0001; Mon, 4 Sep 2023 09:31:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 68A198E0002; Mon, 4 Sep 2023 09:31:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 569758D0001 for ; Mon, 4 Sep 2023 09:31:41 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0125B1406B4 for ; Mon, 4 Sep 2023 13:31:40 +0000 (UTC) X-FDA: 81199002402.02.F93030F Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf13.hostedemail.com (Postfix) with ESMTP id A11C320036 for ; Mon, 4 Sep 2023 13:31:37 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=hENeBDVL; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=xjzrCGoG; spf=pass (imf13.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693834298; a=rsa-sha256; cv=none; b=x+JHpokFIK9lg5rZEWDjXcKjsoQfq7WQioHJX5WsqJbNEzry4nXxOV1JYD0T85WzIx2xL+ s1a/JUe+ngf1BirGFIUSbyWuUhSoIeR4/jKJ9kQ763mmVkpRnIk7YDINbOkq8tRDsRji7J OvQh0x6kcswgZjMyt9QBLqesN1BEfdk= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=hENeBDVL; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=xjzrCGoG; spf=pass (imf13.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693834298; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8xUCxzGeN2LO3k4GTaJqu0a/S4SLZtY9yLR+6ymo9Vs=; b=pJO4zPWQaX9i9pPp0+3gaTfpfZgqdBEIgUeYBEivfBTZ9uRdsJAKqpCdn7m8+AO/WwKFfx KKphVOKHGYwwbMRCGYUL3UDVM+98hbhNJPQDsHmdzWyjNuHzEMpoi7WAnm7OaKQ/abH330 ondv/+jHjGPbVfeKI1yPjzFuUH+VCE8= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7A2B721850; Mon, 4 Sep 2023 13:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1693834295; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8xUCxzGeN2LO3k4GTaJqu0a/S4SLZtY9yLR+6ymo9Vs=; b=hENeBDVLkufawqQjmFjPqwhRZIvJjxcIDlP0bIkA1w5p7ublUOu8Oo51GdSmSZDgVXWmZ6 kexqUMTmBIhytvtR5+a6gQM6oARbu9IfN8oNDoPbRpBJMKyR6VIGi9cVDwP/FLxNpO6pjV n/tOqnnZmTmYgnFXin4d6qJgicYLRro= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1693834295; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8xUCxzGeN2LO3k4GTaJqu0a/S4SLZtY9yLR+6ymo9Vs=; b=xjzrCGoGMj18gFCc/jOlyZvo2Ugj5w7x1Z9epxL++2QXcflL9+LYzICqF2VXvv4OFKb7XU UIX9sdYQxVIzL/AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3E46D13585; Mon, 4 Sep 2023 13:31:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pN9CDjfc9WTiDgAAMHmgww (envelope-from ); Mon, 04 Sep 2023 13:31:35 +0000 Message-ID: <14b4a922-a31a-a329-0264-3d8bd101ee6b@suse.cz> Date: Mon, 4 Sep 2023 15:31:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: Don't fill the kernel log with memfd_create messages Content-Language: en-US To: "Alex Xu (Hello71)" , Christian Brauner , Aleksa Sarai Cc: Andrew Morton , Shuah Khan , Jeff Xu , Kees Cook , Daniel Verkamp , Dominique Martinet , stable@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org References: <1693408388.rwssx8r1h9.none.ref@localhost> <1693408388.rwssx8r1h9.none@localhost> From: Vlastimil Babka In-Reply-To: <1693408388.rwssx8r1h9.none@localhost> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: A11C320036 X-Stat-Signature: 5nbdc3w6gkymun36x8byxu31bpdye5me X-Rspam-User: X-HE-Tag: 1693834297-434540 X-HE-Meta: U2FsdGVkX1+ajiYZ04lCEC5QkiZoVpQnvKwB/P3fXIB/I6eVpytiIjIp7ogAi9pseZnzRoBttfSt51+fYiTSh8mqpcuIBQ0jxn9Wy5zyWNCg+qVr0hFcWTMp1cAAgu+m+9Bop8ghSF7ks3ILxS/z/x1V9yV5YMfamYZBpmMnzhSBXMS80v2aspeW2y6LeQRZM96DfmQQX7U3eT2Mz6hqmrqkCUu6MrrwukXZ8Qm3eJtT5Ilo+hHiCYx5iqzp717EldqeJIqEvM/V5MGGJmyiMNZCma5mNH199vPGFmGrDaIwjkYajy0v5UeJ3etiKiPkwQmpdSs1zmV67abC3UwTe1VqGRh7u6wYQAVkCiw2t3OStEXLGWn6FUDi4hYbHVEiyAUDt76bsaid2NeaZg/34pFdC584PVHtY6JQDTedMV+9SnOypB1abdpnoorn0V9lhBazuLYgwI+EwyTSA7pK/lxJSSdiIPqJboVYY9KRsTG5qJXtOSS1mO0W8aAy3zahDlIgIpOG2OGexx+DY8qVJUOQHbUQ6CeMJXYX7l76qd82O50nHRZ5u4Hxn/TMOH4NZvRJV0bF7KOyGdnlI6Li3CUJzFZz9FipRYqEyEC7Z66oQ0tUMGdMJNzxSywlKibzOxB7UIYm1DZu0bFf71xDEVO+DdecfHnBDAfz7Prrq3Ts9I3gcAnTw0M8UJIQmSVZUPHK8xBv7iZWH0yN0PZQizJp3BBK0CqM4xG1eXTe1JqqCvscOBRpFdzGR2xjHbTYPJlkWzCcbUQvW/3r7AZPB7nonnchHHx6skdvZXiinQMg4i/75ljkRX6J1yV6ST3x1Z00ZaY/x9jsWF6bd1qfORnrJzYM+B2rPW5tBSkbpamvr7tmTA38N7CyJBLgP8+V4MAqraTXissL+vOSOF+5RPliLHkX6mxeAuGacSebZet8OGs0TKPzkffFuDqK5GYSdM9fk4JNtleGSYCka2T bFNeKFKX D0sCSKHdhXa6Jr0XzS93nNTalfqMQ/NOijM6h1S1CzKKMhr1GBwVKHfmKGJVB1AUAGDMGtrGFVvW+qLHeDsmA4i6rlq/6eZKYfZv1Vf5X8kIQwEnIXi7U01y9oaD+MoYvt82Da1tY0GWxHXmXURAM8rIl3Z9QZkO7LeGyMs94LoZUnPdtOOz8LDBblNfSLPG9T2KX9IfyFsoc+OZVLhv6PXYi8HDBJbXUZykAWybqXgYFJQyLL1PfttSbyFsI1sY8/BloAwZl1aomwrm20fVn2QmtWAEWdUTw//3+Ch+WDi1w+E0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 8/30/23 17:52, Alex Xu (Hello71) wrote: > Hi all, > > Recently "memfd: improve userspace warnings for missing exec-related > flags" was merged. On my system, this is a regression, not an > improvement, because the entire 256k kernel log buffer (default on x86) > is filled with these warnings and "__do_sys_memfd_create: 122 callbacks > suppressed". I haven't investigated too closely, but the most likely > cause is Wayland libraries. > > This is too serious of a consequence for using an old API, especially > considering how recently the flags were added. The vast majority of > software has not had time to add the flags: glibc does not define the > macros until 2.38 which was released less than one month ago, man-pages > does not document the flags, and according to Debian Code Search, only > systemd, stress-ng, and strace actually pass either of these flags. > > Furthermore, since old kernels reject unknown flags, it's not just a > matter of defining and passing the flag; every program needs to > add logic to handle EINVAL and try again. > > Some other way needs to be found to encourage userspace to add the > flags; otherwise, this message will be patched out because the kernel > log becomes unusable after running unupdated programs, which will still > exist even after upstreams are fixed. In particular, AppImages, > flatpaks, snaps, and similar app bundles contain vendored Wayland > libraries which can be difficult or impossible to update. It's being reverted: https://lore.kernel.org/all/20230902230530.6B663C433C8@smtp.kernel.org/ Meanwhile stable should avoid backporting 434ed3350f57 ("memfd: improve userspace warnings for missing exec-related flags") > Thanks, > Alex.