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 F38DCC83F27 for ; Wed, 16 Jul 2025 11:33:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7AB476B00A6; Wed, 16 Jul 2025 07:33:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 75C306B00A7; Wed, 16 Jul 2025 07:33:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 698F26B00AA; Wed, 16 Jul 2025 07:33:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 5B0B56B00A6 for ; Wed, 16 Jul 2025 07:33:11 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6CCB910EF82 for ; Wed, 16 Jul 2025 11:33:10 +0000 (UTC) X-FDA: 83669916540.11.178C8F1 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf13.hostedemail.com (Postfix) with ESMTP id BC15C20005 for ; Wed, 16 Jul 2025 11:33:08 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="mFXun/AC"; dkim=pass header.d=linutronix.de header.s=2020e header.b=Si8PLErS; spf=pass (imf13.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752665589; 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=/kR7LcrsxKijUwYNswy3miVNVgGptwZeFr0D7nxGSi0=; b=y0ffxgUwowQscfONT3o8Tsmz4ngvtsAajzCF8PBevTNChe9fGe61Xt7PpwCfUqrX2uJp6F 99SI5+ER2sclEKP2vxWHvN4QrrY7+AaZgVRGOKVjjalCsq6Y7l8tXkLR9wjo8psUv/YEuZ 01ICki/wKaRssEj0J3aCG7bEps9X0gM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752665589; a=rsa-sha256; cv=none; b=6bGkhgSodnZp50iR7pOyUTmvyxrGRQFA3jHWWFZYjSiQFusdY2cm7PIla+KSaf36b5T5nD 7UFCLv/445SS1gnx81TzJwbc/JmLajwNA6tLg7y1e7OIOqVwj4FmWw0NGwfSOpon8vG7Yh F/y7Ggg22iglE6Ob5se0q7qLby8cLfM= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="mFXun/AC"; dkim=pass header.d=linutronix.de header.s=2020e header.b=Si8PLErS; spf=pass (imf13.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de Date: Wed, 16 Jul 2025 13:33:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1752665586; h=from:from: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; bh=/kR7LcrsxKijUwYNswy3miVNVgGptwZeFr0D7nxGSi0=; b=mFXun/ACNobdrZHYzesF7z9GzYnPHb18tVL34S3wEmE5Rh49G7AW4BHng/O1UVq0UAZRcx kN2lCKQa0s2UsYE1NGaa3WMU+XcbbEQ1bpxRnHn+0Lm7D4yemXsguROhSy+RZoiVGHneCg zqThnlw27fSVpjfz1yfgxRAFFbTTJmjqALScf6a0/a1sn+bvkAgyQiKt8LkCDibN9fq/yD vLgNtcjMw7qrxmb/IY+QPwrDN/g442GUQ767XAvghprBijHYyfBwVeVWUoDxrPG2hQivad rJS1+ebwtvQOoIBtL3777ceqYu1NzA4Zob8FA6/6E03XabTn9Cnhvz/MkrXM/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1752665586; h=from:from: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; bh=/kR7LcrsxKijUwYNswy3miVNVgGptwZeFr0D7nxGSi0=; b=Si8PLErSndRrX68Q3AZundbYy3m1S9btk3KOsHGMdRDELFjRkRwqPDDOy7bp21y+XGiAXN H+vO6vTJpqYF+5BQ== From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Christoph Hellwig Cc: Al Viro , Luis Chamberlain , Kees Cook , Christian Brauner , Jan Kara , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 06/15] fs,fork,exit: export symbols necessary for KUnit UAPI support Message-ID: <20250716132337-ee01c8f1-0942-4d45-a906-67d4884a765e@linutronix.de> References: <20250626-kunit-kselftests-v4-0-48760534fef5@linutronix.de> <20250626-kunit-kselftests-v4-6-48760534fef5@linutronix.de> <20250711123215-12326d5f-928c-40cd-8553-478859d9ed18@linutronix.de> <20250711154423.GW1880847@ZenIV> <20250714073704-ad146959-da12-4451-be01-819aba61c917@linutronix.de> <20250716072228-2dc39361-80b4-4603-8c20-4670a41e06ec@linutronix.de> <20250716101207-c4201cef-abbe-481d-bca5-c2b27f324506@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: BC15C20005 X-Stat-Signature: dqc331udiywzabaqnwoqqqqttnm3jnwj X-Rspam-User: X-Rspamd-Server: rspam07 X-HE-Tag: 1752665588-826375 X-HE-Meta: U2FsdGVkX185/2nqngxGrlhG8RGBdV2MbKqigZsVVLZGMS9coZpVa/E2sF0UXHND5hoyp8YqUW5FF+SA5UTV1cmXEKiyoI0NowKdLbEOli/B4y+3MwqsoQXtXdOyBP51VIU/8nicuByaB2IiC8wPDCduJeSARchbxjauK40h8iwkSSuh47QW2zC4KCniPZBjZgjkEUfvw9flildGWV876JzQZihGHPmguOGAgDZqC4Ncyx/bW2XQ+jOHUo/HpwilfPBMhHFOHG6jkdkUgo3oMWnZagKA92KgSw5DQH7KwA5dDobfVumAjZTTfMUflqJyCnqOwB0YSdO9/+HAF3v/ffj8z4M0uixhHU7HL24qctRjmq4DIwqPFvA7wua+/3tct1w6c8eU0BPlauXiyfBY3Vi7pLycHdYjKBx10zyw8TrOYdwf2uXOHfFc+Yex6mSUTtCkyWppj3esXBhab2DMD7eiF8LOqa6U1P4UuLZAWS0hahJ7ZOf2xoEicFcPeW58ixw6Lcl2Hjx8G2DExOlnCYqzhATHCFNi2R1I7cVtuvGgb6Vpp4L5tMTJfhshTL2Y3UtCrWwepAcMlG12I8j8e9jVxV6pqv3UrJsD3C0AEum1DEzY91Ej7yUiVMecevgIL98bcaVwS9eyx9V6Y8bdpmoLeTJAiysF/BMTi3FTg/WFiI55EJTuyOBFZey5UJQxgSpoOnAHbdmRhy6/V3iftR3aveWBPRAWK5cVVQkGe1C6kTx8ev1FkzRUJPhpasMGXZgTbOGSMIFys4dX9MGrCbImvx7/Oof7WvaRRyt4ZhIPTJDm/+b5CMj+inQ6A5YUEZfw+Piocch2eVpZTMhoojl2i6TbSTfzR3ZeYkv+6sOZHzJMT3YE3DwTZ51akxEDTXqnX5QuzIP80n297zhJb300U1Cg4uVZ1Orudz2Zlae1Glu3JknYOeMBITI3yTk8hPrUOgn0Sj6ZSU3KipG 7HScxNKm Dzj736TDU/L4HQzfvIr6gkjK9gkjxvixPB8z0oagRBrI0t/w9PnsBoJ0IdqpcvzWzPVB0y7PSnZIbm7IUi5PnpVzW7A== 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 Wed, Jul 16, 2025 at 04:11:04AM -0700, Christoph Hellwig wrote: > On Wed, Jul 16, 2025 at 10:39:57AM +0200, Thomas Weißschuh wrote: > > Let's take kernel_execve() as example, there is no way around using this > > function in one way or another. It only has two existing callers. > > init/main.c: It is completely unsuitable for this usecase. > > kernel/umh.c: It is also what Al suggested and I am all for it. > > Unfortunately it is missing features. Citation from my response to Al: > > But why does the code that calls it need to be modular? I get why > the actual test cases should be modular, but the core test runner is > small and needs a lot of kernel internals. Just require it to be > built-in and all this mess goes away. KUnit UAPI calls into KUnit proper which itself is modular. As such it needs to be modular, too. This also makes a small always-builtin component annoying as it will need to call into KUnit through indirect calls. But again: I see that it makes sense to restrict random out-of-tree modules from accessing kernel internals. But here the symbols are only exported for one single, in-tree user. What is the advantage of forcing this user to be non-modular to get access? > That being said some of this stuff, like get_fs_type / put_filesystem > or replace_fd seem like the wrong level of abstractions for something > running tests anyway. This was modelled after usermode helper and usermode driver. To me it makes sense, and I don't see an obvious way to get rid of these. Or do you mean to introduce a new in-core helper to abstract this away? Then everybody would need to pay the cost for this helper even if it is only used from some modular code. Thomas