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=1796383605; b=lNE72zxMZQXXGo6VVk0YCPsdCSHeVZxlfBXoJrT6Z153Ie4kaigMI1nIOvE15fIu/hN+ dS0xaJbsxaDnPC+jR3X4zitiHSJYLQpVdOakqicLYNh5AdJjKhjryRdEcrEeKI2Evzj6E jDt4vUatVQbef9GnP/vbief6G37GUcSRPWz/7uAWH2O9TzP6daSPsu0IrLAYUgbogOKxO v6tJ+Egv8aqSW3jytGRdS4HhfjipXRpZYxOIZzxRgzBdhTZ9a0N+QdXJrgYva637NUcWq NQFo6MESpqM8dGgZJw9AKUPHoyeZVxsM2Z6H17GucCFlKmw3ZY7aN+9pYjbUgVe0m+Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383605; 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=rjkirCcBQ7AZl5JdxaxvNgiZLKjH2HxFiI+ynRU1zQo=; b=sb/GEaF0PxVM/z5mD3YJY/cOzCNpXMjqq2B0n0PLdlk1Ily/XP9ZnNnwtxX0dk3Gywxk 489PvYeC1euMJu2AK6imokUmr879KHF62sYtoXKgIvKhZKQHujTICFm/ynoCq8arfBRF5 hOYCllKnHQ+KWMOapkDlJywoSul8W8rceDORw3+HmAEcv8MHl72q39LJfIG+coiHHAGSh caM5rDEa6aAdZib+X7UEXcfaGO3YkNhUxLivQ2jg2Mb6AYHyzR5eQgCL6BNiXC9D4+UUO nhO78ZZLSS8RfFehdvKPYdiQz4MOYh/pbY9dVis9KrvM7aHQcLKpuxkvRkaJEQ9tBpw== 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=WndLmCk8; 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 9ACFA606A32F; Fri, 4 Dec 2026 11:26:45 +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=WndLmCk8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 142CB1F000C2; Fri, 4 Dec 2026 11:26:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383605; bh=rjkirCcBQ7AZl5JdxaxvNgiZLKjH2HxFiI+ynRU1zQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WndLmCk8VPBZSgSmHXpklFNivYQgGdueOdoxuxa24YFrn9RuQlx0e4Hp/lswMDram 0iwmVDYR82fk7M7i5d89Ez4Vr0/Qj/YM1wIsffT64662E5IAF74LPZXCarBWimz9wR G6cQls+JvdnQ2fdGY+S+GwzOmbtDPU1ZUNloecrg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Starovoitov , Sasha Levin Subject: [PATCH 6.12 294/555] bpf: Keep the names in front of a number in delegate options Date: Fri, 4 Dec 2026 19:05:37 +0900 Message-ID: <20261204100620.321469657@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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.12-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 57c2c31969997..2d625071f1ee3 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