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 D399BC7115C for ; Wed, 25 Jun 2025 09:18:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 738A96B00A8; Wed, 25 Jun 2025 05:18:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E8D26B00A9; Wed, 25 Jun 2025 05:18:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 589BE6B00AB; Wed, 25 Jun 2025 05:18:42 -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 3FE986B00A8 for ; Wed, 25 Jun 2025 05:18:42 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D2DF7161A49 for ; Wed, 25 Jun 2025 09:18:41 +0000 (UTC) X-FDA: 83593372842.19.37600B1 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf18.hostedemail.com (Postfix) with ESMTP id 4AAC91C0002 for ; Wed, 25 Jun 2025 09:18:39 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Rc3VDVLg; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=nLuuWivq; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Rc3VDVLg; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=nLuuWivq; spf=pass (imf18.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 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=1750843119; 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=7p8V/HcjuDoXzYJew4W06L45XhBYsDDwJYVyCTKAtR8=; b=hkLSOrFO/V+JMzTUMNpsC3rVywNd+AsX0MQGMKswNWZ/WHsS1q3CuUIh+5yAHaWVC+XIMT tIgEWxy7JL+hn0w5K31BalOTH/lKkOzF51rFDCMEQKXltFSWejLDZwPlpLaiV76KlnzYBj cKlY9OKBNAmUM5hphNo+gNO5WPDK4b8= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Rc3VDVLg; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=nLuuWivq; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Rc3VDVLg; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=nLuuWivq; spf=pass (imf18.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750843119; a=rsa-sha256; cv=none; b=XpXcxmKHgzi+UwZV5ZJS+AZL65S+rUuvxAI/MBPbKT6RTS36m7dDUDTeJe7eMjJRI8QVry IQhiFJ1R7JvaI5+XKHJeD12AYgMjMFhBKhNzn5NZWFZNfDH3q7nQUmmvpYx7wHKdB5Askj gGqZr3lZBkDmE/G4CCvpp/DIUwL+MxA= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 71C8B21175; Wed, 25 Jun 2025 09:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1750843117; 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:autocrypt:autocrypt; bh=7p8V/HcjuDoXzYJew4W06L45XhBYsDDwJYVyCTKAtR8=; b=Rc3VDVLgmJkdVE7IY1rdd35P1l+63GkQK+HURCY02hYZtOp8gMfRtEfFUl3McII4iiHuuG 3opGhdtf/48FGixIp6OjK7VolPLrl06fkwZmiotIW+zIxCq2YqCCSKdPaRClgph1VxFCXe jswurKVzsJ4cuUPqOwu4gOPo4V0EW4s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1750843117; 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:autocrypt:autocrypt; bh=7p8V/HcjuDoXzYJew4W06L45XhBYsDDwJYVyCTKAtR8=; b=nLuuWivqAHM/7RIZ+PbGbpWKTgudpfoifs/0i24JeJ6hLebW3FUR9O5RnwV835zXvi/+gt O/abH+/rNCiV7KAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1750843117; 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:autocrypt:autocrypt; bh=7p8V/HcjuDoXzYJew4W06L45XhBYsDDwJYVyCTKAtR8=; b=Rc3VDVLgmJkdVE7IY1rdd35P1l+63GkQK+HURCY02hYZtOp8gMfRtEfFUl3McII4iiHuuG 3opGhdtf/48FGixIp6OjK7VolPLrl06fkwZmiotIW+zIxCq2YqCCSKdPaRClgph1VxFCXe jswurKVzsJ4cuUPqOwu4gOPo4V0EW4s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1750843117; 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:autocrypt:autocrypt; bh=7p8V/HcjuDoXzYJew4W06L45XhBYsDDwJYVyCTKAtR8=; b=nLuuWivqAHM/7RIZ+PbGbpWKTgudpfoifs/0i24JeJ6hLebW3FUR9O5RnwV835zXvi/+gt O/abH+/rNCiV7KAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 454E913485; Wed, 25 Jun 2025 09:18:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id afxXEO2+W2j0LwAAD6G6ig (envelope-from ); Wed, 25 Jun 2025 09:18:37 +0000 Message-ID: Date: Wed, 25 Jun 2025 11:18:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass Content-Language: en-US To: Christian Brauner , Peter Zijlstra Cc: Christoph Hellwig , Sean Christopherson , Mike Rapoport , Shivank Garg , david@redhat.com, akpm@linux-foundation.org, paul@paul-moore.com, viro@zeniv.linux.org.uk, willy@infradead.org, pbonzini@redhat.com, tabba@google.com, afranji@google.com, ackerleytng@google.com, jack@suse.cz, cgzones@googlemail.com, ira.weiny@intel.com, roypat@amazon.co.uk, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org References: <20250619-ablichten-korpulent-0efe2ddd0ee6@brauner> <20250623-warmwasser-giftig-ff656fce89ad@brauner> <20250623142836.GT1613200@noisy.programming.kicks-ass.net> <20250624-einwickeln-geflecht-f9cc9cc67d3c@brauner> <20250625-blatt-lieblich-8e6896fe618b@brauner> From: Vlastimil Babka Autocrypt: addr=vbabka@suse.cz; keydata= xsFNBFZdmxYBEADsw/SiUSjB0dM+vSh95UkgcHjzEVBlby/Fg+g42O7LAEkCYXi/vvq31JTB KxRWDHX0R2tgpFDXHnzZcQywawu8eSq0LxzxFNYMvtB7sV1pxYwej2qx9B75qW2plBs+7+YB 87tMFA+u+L4Z5xAzIimfLD5EKC56kJ1CsXlM8S/LHcmdD9Ctkn3trYDNnat0eoAcfPIP2OZ+ 9oe9IF/R28zmh0ifLXyJQQz5ofdj4bPf8ecEW0rhcqHfTD8k4yK0xxt3xW+6Exqp9n9bydiy tcSAw/TahjW6yrA+6JhSBv1v2tIm+itQc073zjSX8OFL51qQVzRFr7H2UQG33lw2QrvHRXqD Ot7ViKam7v0Ho9wEWiQOOZlHItOOXFphWb2yq3nzrKe45oWoSgkxKb97MVsQ+q2SYjJRBBH4 8qKhphADYxkIP6yut/eaj9ImvRUZZRi0DTc8xfnvHGTjKbJzC2xpFcY0DQbZzuwsIZ8OPJCc LM4S7mT25NE5kUTG/TKQCk922vRdGVMoLA7dIQrgXnRXtyT61sg8PG4wcfOnuWf8577aXP1x 6mzw3/jh3F+oSBHb/GcLC7mvWreJifUL2gEdssGfXhGWBo6zLS3qhgtwjay0Jl+kza1lo+Cv BB2T79D4WGdDuVa4eOrQ02TxqGN7G0Biz5ZLRSFzQSQwLn8fbwARAQABzSBWbGFzdGltaWwg QmFia2EgPHZiYWJrYUBzdXNlLmN6PsLBlAQTAQoAPgIbAwULCQgHAwUVCgkICwUWAgMBAAIe AQIXgBYhBKlA1DSZLC6OmRA9UCJPp+fMgqZkBQJnyBr8BQka0IFQAAoJECJPp+fMgqZkqmMQ AIbGN95ptUMU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mZAUCZ8gcVAUJFhTonwAKCRAiT6fnzIKmZLY8D/9uo3Ut9yi2YCuASWxr7QQZ lJCViArjymbxYB5NdOeC50/0gnhK4pgdHlE2MdwF6o34x7TPFGpjNFvycZqccSQPJ/gibwNA zx3q9vJT4Vw+YbiyS53iSBLXMweeVV1Jd9IjAoL+EqB0cbxoFXvnjkvP1foiiF5r73jCd4PR rD+GoX5BZ7AZmFYmuJYBm28STM2NA6LhT0X+2su16f/HtummENKcMwom0hNu3MBNPUOrujtW khQrWcJNAAsy4yMoJ2Lw51T/5X5Hc7jQ9da9fyqu+phqlVtn70qpPvgWy4HRhr25fCAEXZDp xG4RNmTm+pqorHOqhBkI7wA7P/nyPo7ZEc3L+ZkQ37u0nlOyrjbNUniPGxPxv1imVq8IyycG AN5FaFxtiELK22gvudghLJaDiRBhn8/AhXc642/Z/yIpizE2xG4KU4AXzb6C+o7LX/WmmsWP Ly6jamSg6tvrdo4/e87lUedEqCtrp2o1xpn5zongf6cQkaLZKQcBQnPmgHO5OG8+50u88D9I rywqgzTUhHFKKF6/9L/lYtrNcHU8Z6Y4Ju/MLUiNYkmtrGIMnkjKCiRqlRrZE/v5YFHbayRD dJKXobXTtCBYpLJM4ZYRpGZXne/FAtWNe4KbNJJqxMvrTOrnIatPj8NhBVI0RSJRsbilh6TE m6M14QORSWTLRg== In-Reply-To: <20250625-blatt-lieblich-8e6896fe618b@brauner> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Action: no action X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 4AAC91C0002 X-Stat-Signature: ks7kxb4mpzop8474xsqw5iw5j8zken8t X-HE-Tag: 1750843119-188566 X-HE-Meta: U2FsdGVkX1/7AAOPq/jrS5hJUUZwgEd9nl2d0jV38N3WQOImFKhq7fsQypq+TV0Vz+9ee8UWXKBlFHLi6mVVBqhx5OKuiOGY9bEDxBY6Cq0J9h/YrksXrpo9UvUdK5xNWVAv6QpwGyJ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qHqRM6YkWI+yfGjaExBfH2ByW/wfxpYXw5s6APMepB+N6eBvZYkPJw70pNPs4mHdGks2F8BKNG4fPt0/18u33uerJG+HNsq/ljT2+FEqA1K89XjL3/nmZvMgnRXs3K53RWKQ6MODg== 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: List-Subscribe: List-Unsubscribe: On 6/25/25 11:05, Christian Brauner wrote: > On Tue, Jun 24, 2025 at 11:02:16AM +0200, Christian Brauner wrote: > I don't understand that argument. I don't care if out-of-tree users > abuse some symbol because: > > * If they ever show up with a complaint we'll tell them to go away. > * If they want to be merged upstream, we'll tell them to either change > the code in question to not rely on the offending symbol or we decide > that it's ok for them to use it and allow-list them. > > I do however very much care about in-tree consumers even for non-GPLd > symbols. I want anyone who tries to use a symbol that we decided > requires substantial arguments to be used to come to us and justify it. > So EXPORT_*_FOR_MODULES() would certainly help with that. > > The other things is that using EXPORT_SYMBOL() or even > EXPORT_SYMBOL_GPL() sends the wrong message to other module-like > wanna-be consumers of these functions. I'm specifically thinking about > bpf. They more than once argued that anything exposed to modules can > also be exposed as a bpf kfunc as the stability guarantees are > comparable. > > And it is not an insane argument. Being able to use > EXPOR_SYMBOL_FOR_MODULES() would also allow to communicate "Hey, this > very much just exists for the purpose of this one-off consumer that > really can't do without it or without some other ugly hack.". > > Because this is where the pain for us is: If you do large-scale > refactorings (/me glares at Al, Christoph, and in the mirror) the worst > case is finding out that some special-purpose helper has grown N new > users with a bunch of them using it completely wrong and now having to > massage core code to not break something that's technically inherently > broken. > > Out-of-tree consumers have zero relevance for all of this. For all I > care they don't exist. It's about the maintainers ability to chop off > the Kraken's tentacles. Then I think you can just use EXPORT_SYMBOL_GPL_FOR_MODULES() as it is today. It's intended for a particular in-tree module, which is by definition going to be GPL. I doubt anyone will come complaining that you've cut off their ability to fake the name of the in-tree module while having non-GPL license. So I don't really see the danger of causing holy license wars there. The _FOR_MODULES() part is restricting enough even without _GPL_. But if we can indeed enforce in-tree-ness and drop _GPL_ from the name, it would be cleaner IMHO.