From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380440; b=O1YrXXbONrwJW2eluOaBaTAK7eh3CQOe+9Ia8rWKA/Nvl6/h44rPweG+oEiDLKCWFHQF 1bXB3aJJnh0BovLnTec/VSeWgCqt53prObZSrIOS5p9giUXRypP/nyzRLXZHfcW+6yw8l rgo+OWHJiqXA9i0BELqqoYn4DQ1/KrjmB8c+xu+3MVjVZeCOiXFebfI4ejz28QJqx9Hf7 FHvcXFSvuTxbli24+uvmEvUIPoFuInsAmrU6T3zzoBfH0gItv8YfIQiggC3jRquPf7Z5E dyns/M395sMRBxDtRbOrHt8S9JXd2A/pBM/P5VhhpssjlsUFNsSb284YQABIsaUNZKQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380440; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=tE2GY9D5fMA2tMdtiuc06e24FD5F+i0P5ZrZ8b8RpJs=; b=jXgC89v80WudvxIuTJshx4+7IomsAxSuUYw0JDCbjuwimEkCXpio5f1qvY0ktA2/eIc4 MPAeuaz1NkZH1/y+C485YK+jb2vE9zddMGxpYB+rrKYomJYH30ToOpyzoThZPlIFIo2dm YGmoNsx/i1CANZcR2agMa+hLHQ6muYWV9E6euNc9XJniLJD5P51uu0Yr9xfopRqehPGjw qs/YMsswCaRZcmpFEE+MtwAWpcYc1iDxFCou7Oa+QCITsUyBBXmnmPHTw8fR6rULQl9q5 Ji9Ah6Bo67cSx9fi7HUO+PdBaD8V1Chui8B0rzo8xV96tAqGYZEilerCGU69r6SeKoA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=tHmk0f+R; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA4F7606A33B; Fri, 4 Dec 2026 10:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=tHmk0f+R Received: by smtp.kernel.org (Postfix) with ESMTPSA id F033B1F000C2; Fri, 4 Dec 2026 10:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380440; bh=tE2GY9D5fMA2tMdtiuc06e24FD5F+i0P5ZrZ8b8RpJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tHmk0f+RpAp1OGnKUygHyFKkMZveynBZjFyfwOeuHX/eD9X/Nu/R9S6Y4xPfR6iDD X+gEWZkX3Nuq3Z21HGmdLiZmVIvnJ2MrqAu2AoWx62VXoImX57Sg+NCVF2A9zLaONN dINVHcGb8UfPNa8gq6c7Whc70zCstMlIl2SyeBTo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Starovoitov , Sasha Levin Subject: [PATCH 7.3 275/742] bpf: Keep the names in front of a number in delegate options Date: Fri, 4 Dec 2026 19:02:19 +0900 Message-ID: <20261204100642.352969066@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexei Starovoitov [ Upstream commit 4151f3558d6e65d4ae6cf1a431537ed52ad48239 ] The delegate_* mount options of bpffs take names and numbers. A number overwrites the mask, the names in front of it are lost. That is the order in which /proc/mounts shows them. Fixes: 6c1752e0b6ca ("bpf: Support symbolic BPF FS delegation mount options") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261125032938.670542-11-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin --- kernel/bpf/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index 7837968c0842c..f3b1e440d0cb1 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -1055,7 +1055,7 @@ static int bpf_parse_param(struct fs_context *fc, struct fs_parameter *param) struct bpffs_btf_enums info; const struct btf_type *enum_t; const char *enum_pfx; - u64 *delegate_msk, msk = 0; + u64 *delegate_msk, msk = 0, num; char *p, *str; int val; @@ -1094,9 +1094,10 @@ static int bpf_parse_param(struct fs_context *fc, struct fs_parameter *param) } else if (find_btf_enum_const(info.btf, enum_t, enum_pfx, p, &val)) { msk |= 1ULL << val; } else { - err = kstrtou64(p, 0, &msk); + err = kstrtou64(p, 0, &num); if (err) return err; + msk |= num; } } -- 2.53.0