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=1796382088; b=hdHjTLZhX9KwIMG0yfhngluiGEKiDniC8kh+ovJVF8s41pUZ3292pNA/IphlqJGbizPT 0fC4e4jbcf5Au3N3Czs9hfcV+nFV44etUscFqYeCj7RMsCczi8x6CuU4yRYUiWG9o/ZIO FM8TepH7N52jy3Ti2Djh0XntKYfnvcJXOWK0I7U2o3bibdEd9YEYFadpgrlpzPqfhMHuE CxH3uk9F2cGF3Y41fcFHPmsqo2b9pYPtTY7kxtTw4vrDPO2bs6KPoyFhs+2juj+0s5cFN GOoGa3l6YfIlnvv1mtpq4FBkKdKy3SrtPT9CmMunQGTjEsTJtM3Gk8YsENJX8tTmYaA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382088; 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=YRS1mxecr3Ld5MAPKkcYRDSckH5FS+Yu6OxCGqlPWOY=; b=fCvBnHirMe5m92/k90FI89NStQ23XVF3w4doyTcuVjfd9TCGPBQsfitKNylDCVLI66i3 xuc7xqz9/7c6diXSv4OQcvKccncShS2wxthuyktgVyF1VIoXdBF17Qu0lDXPAEdwU8wOC DRy5a9n0bYxAX8+wn0BOrbTGlxLmGdSNTevWnDzbak50FpLakMCTu/xcV7CIa4HWyYddd yJOP9HZQmvgPk+nKKUq/2cKVAA3Fq4aNiJysRTocCXgL9UwEEgmF5gEby4xhByIgVbWoA G86MYBLk4nwerQ4JTq83zL+Y2B0dWCX+cpLJcwBvqBbOPSJDs2B8Wh5mh0t3LV56XOw== 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=adzKgdEQ; 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 7C878606A322; Fri, 4 Dec 2026 11:01:28 +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=adzKgdEQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7ED81F00897; Fri, 4 Dec 2026 11:01:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382088; bh=YRS1mxecr3Ld5MAPKkcYRDSckH5FS+Yu6OxCGqlPWOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=adzKgdEQYV+he6nJKkiFQj/2qQF+DSzCc6XkJy8r/GDjivBjQaSAvr1kWgMU6fUNj TcqBvSwR1l2rmsvdmDcGBoXaTlC6avsJ26SMRqL6LQByy609j5Xv0PhsQd8eMNyDLf 49BkRBafVF+9otkxpMkeXFVZAsqkVM1Va+U9cUJ0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Starovoitov , Sasha Levin Subject: [PATCH 6.18 302/703] bpf: Keep the names in front of a number in delegate options Date: Fri, 4 Dec 2026 19:03:21 +0900 Message-ID: <20261204100635.811656733@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@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 6.18-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 cf907fab3721f..795af4a1c436f 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -888,7 +888,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; @@ -927,9 +927,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