From patchwork Mon Jan 19 21:48:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1663 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859370; bh=F9K58MuRYJ5LjSORQ8AJmojODmLbrbg15jo/GtY1s88=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qAJn3toFXJ7HH5QQROkNH+i/gSnPytJkS7NGXhIVJaAATzWgex9EYiVuyD/f56yyS NdbPCUVnEFy8y21HsgLZ7/ITFnOQQLu/i8oqouSCxafI+YCLYWcz50F9AqsJaece5e 6sd3TflvryM0xSbAYlmunhGSZo5s9hLtUEypoW7IOh1AY5w86nQ2k6tON0OesdfMty KsLAt+ADOsVbIKFFp9DdIn01B+dNQ009B6IOfsDuSvVh7oziTceiCMax4VRN/wvZXJ RORaPlASTWEWvLrtxxxD7f8T1xFmXEq7aegxXSA+hbRRz+71xnpUGxTDktlkmI+FwN 59paSId+8pKrg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 165F869535 for ; Mon, 19 Jan 2026 14:49:30 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id yjxZQtjNVVi7 for ; Mon, 19 Jan 2026 14:49:30 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859370; bh=F9K58MuRYJ5LjSORQ8AJmojODmLbrbg15jo/GtY1s88=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qAJn3toFXJ7HH5QQROkNH+i/gSnPytJkS7NGXhIVJaAATzWgex9EYiVuyD/f56yyS NdbPCUVnEFy8y21HsgLZ7/ITFnOQQLu/i8oqouSCxafI+YCLYWcz50F9AqsJaece5e 6sd3TflvryM0xSbAYlmunhGSZo5s9hLtUEypoW7IOh1AY5w86nQ2k6tON0OesdfMty KsLAt+ADOsVbIKFFp9DdIn01B+dNQ009B6IOfsDuSvVh7oziTceiCMax4VRN/wvZXJ RORaPlASTWEWvLrtxxxD7f8T1xFmXEq7aegxXSA+hbRRz+71xnpUGxTDktlkmI+FwN 59paSId+8pKrg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 03AD369525 for ; Mon, 19 Jan 2026 14:49:30 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859367; bh=D9tqHdCTc61zeUYJOPbpnEP7zDhIFY1lChv27riGbqo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rZop2oGXQk4Xq052koUPBJUpaarMfm4Em8fdjRfI3vyzbIQt9XSWE/zokVNmx9g98 udJs51st+35A8x+0qg0l8b0gbotufV1BzaJR7CVinBKCt09+VjrZknFxa1DCb09HRi jmpUHoW+ietd4LxzH2RAtQtR7OCe5ZELQbG7QDB3K20MTJdvPFL3Bb/3kA+IhPnMFX 5WNINkKMDQa6/8uttWfVRPrT/IqYxiVS9eRTXUgB/Bbge8xlU0PAVq5OfqIj/AJS1Q o6xRS0kzGK3f6z8Gb/HksT5fPm+A96RAscZba0mH3rCK7eRw65yyk+2iGSpYqAcvFt L0JXtyJkJAMgg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6C2BD69520; Mon, 19 Jan 2026 14:49:27 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id E_6DdTvFKl89; Mon, 19 Jan 2026 14:49:27 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859363; bh=8i6oX2dZH10IxC1+5EGaes29O8XJy0ODg2tOxSxnfU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o3Fxk3Mhm2x37bI34CSPYwaAw9W6eC51iZuEeH5cUZcGpjqu8c9F5JYnFUukQeA0s eCVn2u4yt2wbc2gPlLBfQOC2f/9N30f/+cSh6g5falSEXlHb+e+l7ud+y5Q6onsQLG fdmm5sXLr7Bvolm95fbVZD6sWEcQUoeGm6kTyY21tb5omz5qTlJQq5ovRTwlpsoNBI 5wl4xWe5t+EXG7YSs5IgVktawt3lpH9yAZgg1+Tj9wZpd7pwK0IbiZeJOKM+VIR834 sW1kJg7mtgOP6DYBIbsU4/xBd4Y+pZ/mImOc5+A92yf2/pqcbDuoN8a0pw1atKyqMg 8SJzLQR32b0tg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 235C96951A; Mon, 19 Jan 2026 14:49:23 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 19 Jan 2026 14:48:31 -0700 Message-ID: <20260119214846.3087611-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119214846.3087611-1-sjg@u-boot.org> References: <20260119214846.3087611-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: AQ52J6SJJX2HYCZV5XEEQMYQ6YC3OZR2 X-Message-ID-Hash: AQ52J6SJJX2HYCZV5XEEQMYQ6YC3OZR2 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/16] ext4l: Move user_namespace to linux/cred.h List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move struct user_namespace stub and init_user_ns extern declaration to include/linux/cred.h where they belong with other credential-related definitions. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 6 +----- include/linux/cred.h | 9 +++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 4931bd25cea..55a06d01996 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -174,11 +174,7 @@ static inline void memalloc_nofs_restore(unsigned int flags) { } /* IS_ENCRYPTED and FSCRYPT_SET_CONTEXT_MAX_SIZE are in ext4_fscrypt.h */ #define S_NOQUOTA 0 -/* User namespace - stub */ -struct user_namespace { - int dummy; -}; -extern struct user_namespace init_user_ns; +/* user_namespace and init_user_ns are in linux/cred.h */ /* * BUG_ON / BUG - stubs (not using linux/bug.h which panics) diff --git a/include/linux/cred.h b/include/linux/cred.h index a5afc267ba0..a3a972a5a73 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -50,4 +50,13 @@ struct cred { #define INVALID_UID ((kuid_t){-1}) #define INVALID_GID ((kgid_t){-1}) +/* + * User namespace stub - U-Boot doesn't have namespaces. + */ +struct user_namespace { + int dummy; +}; + +extern struct user_namespace init_user_ns; + #endif /* _LINUX_CRED_H */