From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F8EE1A3166 for ; Fri, 3 Apr 2026 15:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775230445; cv=none; b=rsqZcHD6sBcKJu+GCMu7n8Z+pBsBseJhjvooObSLhb/QioXmVxv5WRapu09dpVbWwx3pk+a65F2DySj5w2bWP0Q/VBCA0mgwGbLCr/zv+IDVNr6Wcx1Xgseliy15IUSF1orDMT+YWaCrWGCxVtP3afUFNho1GEfSUZD0mU5WfHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775230445; c=relaxed/simple; bh=3SpeUw/IezxhhEw/OMLS4tDxYj5A4Yt7t6aUoVs9BB8=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=US/lNhs486ZBC6Ok+vCaDEOL5WpeYH6aNFqWPvCVDhfz4fEVMF0gVQPyBXsvfc2RJyEc2WHtYo1gEoTf4PknTFVu5YU49FA6/qVL7SdBTEI3vllMucI+tuhdWUw1aCdo2lY/Ugojsuq/5YdEViBfvxhZVt3bU4u8N5pRPljLf3s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YNtMpbAc; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YNtMpbAc" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-482f454be5bso33451605e9.0 for ; Fri, 03 Apr 2026 08:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775230442; x=1775835242; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=RHNdw2dyYsz31h4qKYc2LNjmW6JHeLmR4hJnhOhLhl4=; b=YNtMpbAcr7ZQFfmzbnDYTGWODR4jPfT67LwN9ZaBvnjNgSTfbNiRtoBnc27X9AnL3Y qRX3IkyO+HaDOyplHopjYNf1TDZ5V/iFL9F+ohGHE4vMp1KiL+o/XQ+gBq0CEA+uH5fv OD6PU2yfCsoqOM7euK3/bNAMsT5Kv6KRmFgTX04l738IzLYqsACLrEdQWbSAYoxoi5sr 5fWcemoxKHBaGpLkvukQQHWKzw9Us3Zl5agerf+wLGsN35srxhd5gF4QgpQz3eWQIv/F xe4HVe0N/zDycny5OrwhU/f/dzWxVAUZBPFCIWMPbkwaD3whG61l4pmBSwJ4MzwKxJWk QQxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775230442; x=1775835242; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RHNdw2dyYsz31h4qKYc2LNjmW6JHeLmR4hJnhOhLhl4=; b=gpLViQzsiTd28JNq1AOYdMcvVp35fryM2Pd/wLBrRIERqEEIrNKT+tF0zpFd2VbakS Yn6iT0eRtI2JZOuH9O9i6R0pCk3EVUF98dJyl7Jt0Ldth266xpeqxGEjOkUfLdYYof09 WMw8SIXn42nzFSpouh6EE6ZeHHNSqesh7w+8vVKip/A7NqoP+Wz1p9dGeePvt+S14L2q 2TE9n7H+FDn6U/jq8ylvQOcylrcVqggdCM3dbVu5gzD9R16fh6ljeCyRh1r/9snGvGkj d0/sM0/zUHjxk15Xxpd8jtO9Wv6odYw8V/cm64esUCLXJanVa+qm7wQRIlF+Eeb8uybA XzLw== X-Gm-Message-State: AOJu0YyALfxWHYgQzRLreNrl4df/bQlHJNf3iaA7iY98qGGM/xouXe8n AOdJuUBpgV9sglf54/A8kWmnDNWy8MxQPz22xhRw8sZnngyc4UTOOv/K9EGyVjJu X-Gm-Gg: ATEYQzyOG5cfM6TRCDh9UD00ilquBkIdOHLP3d2gNcdHHDVAFsSFPjux/1QwVUfEtlg SGmgeFpCXKc6vKFciLOwwMptZs+IQaRHZwQGT7RLfuXswse9mMOt7ieU69qfk736UHj6n7nF3nt SS9AiEPpOoi4uPdCTCWgz9jEdqTCf1DFSag9tjxegiNjM/80sbf8JE1Kcvbe1H3ljAYsNVVLi6b Np7YjRigsV8tQ0zmTLK1x8CN85HoUeZNvYxzBu8aWTmutFf7hc2NMk/psYUbd+Y2NCGyH59SW79 /BjTqT+ps8yhmryahHWyGlX+28InaJsYzQo76M3fyIRYQXbM/h88mc+qGvAJCnldvIeJVeXZuRJ 32RT98Z6jOrowGl4+nS9zQ2n+nakWDTPKQ0t+vS0ZNyKshuPFqJSz25ZLyLyPu11fXBMtNxk2P/ wsL+bHV5ucljqOOIJBo6rvnnVREgwR/d8MKlF90oaGiGz4o7P20eKFlydU1cXCKuLpUDjBKzdIy ylhs5cMMZ3KdiiBLR9wnNTIdh8vumRBevexQ2zKNR2QcBUTDjQOCCJz+r2b5yjm7sSNTkmHr365 yY1bAkkKNKhZVWBNF4iGVUliZz5igIo/fxIn7Pd3KeM= X-Received: by 2002:a05:600c:45cf:b0:477:9890:9ab8 with SMTP id 5b1f17b1804b1-4889945f8c3mr51593825e9.3.1775230442049; Fri, 03 Apr 2026 08:34:02 -0700 (PDT) Received: from mail.gmail.com (2a01cb0889497e00c96ae484ac75459c.ipv6.abo.wanadoo.fr. [2a01:cb08:8949:7e00:c96a:e484:ac75:459c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48899eb50cfsm21702745e9.32.2026.04.03.08.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2026 08:34:01 -0700 (PDT) Date: Fri, 3 Apr 2026 17:33:59 +0200 From: Paul Chaignon To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , Eduard Zingerman , Alexei Starovoitov , Shung-Hsi Yu Subject: [PATCH stable 6.6 0/6] bpf: Fix bounds when ranges cross sign boundary Message-ID: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline As discussed in [1] yesterday, this series backports two sets of fixes for BPF, with their selftests: - 00bf8d0c6c9b ("bpf: Improve bounds when s64 crosses sign boundary") - 26e5e346a52c ("selftests/bpf: Test cross-sign 64bits range refinement") - f96841bbf4a1 ("selftests/bpf: Test invariants on JSLT crossing sign") - 5dbb19b16ac4 ("bpf: Add third round of bounds deduction") - fbc7aef517d8 ("bpf: Fix u32/s32 bounds when ranges cross min/max boundary") - f81fdfd16771 ("selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundary") Using Shung-Hsi's stable CI repo [2], I verified the BPF selftests pass with these commits applied on top of v6.12. 1: https://lore.kernel.org/stable/2026040240-friday-gurgling-7088@gregkh/ 2: https://github.com/pchaigno/stable-bpf-ci/actions/runs/23940850516/job/69826632354 Eduard Zingerman (2): bpf: Fix u32/s32 bounds when ranges cross min/max boundary selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundary Paul Chaignon (4): bpf: Improve bounds when s64 crosses sign boundary selftests/bpf: Test cross-sign 64bits range refinement selftests/bpf: Test invariants on JSLT crossing sign bpf: Add third round of bounds deduction kernel/bpf/verifier.c | 77 +++++++++ .../selftests/bpf/prog_tests/reg_bounds.c | 62 ++++++- .../selftests/bpf/progs/verifier_bounds.c | 159 +++++++++++++++++- 3 files changed, 292 insertions(+), 6 deletions(-) -- 2.43.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9737239478B for ; Sat, 4 Apr 2026 07:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775289533; cv=none; b=lp0NPDaK6QIwyZttDDFrhtePW86hEmki5TWc7OQPEM1WVCSCTVtOtuXHDX1lHnrKV6HYWQAyc9TyTUKuRu1afpXE0OFfz492m9I6+r1dh5FfRR08B+NVLzl8B5Fx1qpeOrAhWqBTUnzzlrSdMo5NhGcHW50V82wOd7hMY5xfa+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775289533; c=relaxed/simple; bh=C+vMg1YlMyfty13mqdz4qeWPls9uxbXIgpCleZAEnGw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=pnARMa6j6dZp5WeXrWqx+Di0d5vcDJJxOKkRnoyONuFQPP8XLbTO5JS29psEYxGTqNcCev/eQYYZBKqSt/Yyb/PxMcukrAvvEtnrP1iGIRoAV1kMfX91njX+cU2mpPM4fDQhOnMRQvt0sqKyf7IUFjGhaZi8k1x7tvpERDB2g/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=qYHpZII9; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qYHpZII9" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-43cf3ee0fc1so2502240f8f.1 for ; Sat, 04 Apr 2026 00:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775289528; x=1775894328; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=MreoZ10HIj2la67+33C3EG5FgMyfYV0YUsu+euJrCsg=; b=qYHpZII9BHChSLnbO37Api2crJbouZ6t66OsFC/wxGJX2P+RBXMzsV77nMPk0Iputr 0qlVY+IOzGuP5swSCTLglmreEON46dMSZvFK3agy8gQzBR9cEroEeSfxUW6+G14cUc9/ zN1Dpw20IFeJddi3WZUf+aMPOJSe44eUt4qoQLTLowlxwzd3YGxMuLkL1AK5kLRvZ1f7 uY050LHTQozEb8fyFC5iHCozYUybgIFNxDpYvy02syEBzuXlR3rEyCkvLr3vMwrB9NVY ECLzUqB6GHtlanVGIjgIt1hU9RyZ7gtSzvPqVItqfyVx91zvgfAn61aR15GLCJI/WL6b lMpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775289528; x=1775894328; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MreoZ10HIj2la67+33C3EG5FgMyfYV0YUsu+euJrCsg=; b=NzwOSitOXQvEYQLRfjY1PJbKwAXDHTKSWoLmMM9UlukHlERGKIiA44CWwUaqkOpC/a Rak+k8oucss6AMFqeQirTvg6vzkygMYSSvQ8Siv3aRWNVhpUW92NglaljpHXS6QPcNbK 6qtFy9owISaRyR8dzj8O8nHI58REEH84s1uaSK0IjVw+2Vn6eMleb8XYPsjlCZczdEYy TMKWUkacLhB+IX7pBbnzf62kzeHkxtLvTtvUQP4VArSE+57ZnfNzGcbOB7enDLbgvMTB AsQUGrJI7DCViFQNyK9ufpU8g6WHtyRtRzFRCwZceHESuI4LVdSZVmyUR80Jekgxnt3Q 6YSA== X-Gm-Message-State: AOJu0YzPwzoggccZ5MHULRrIDxB02J3MjSgqdD6Ci598iz8UeH+IVdLc 7Mnr8baqnK+wV4n4NtfpUbvvtIQkXD1HAYadSQxbXZH2QWw5JrHfZIEl921uPBht X-Gm-Gg: AeBDietcqqVdDGdqxdRt+0lebGyngRDvgjDQeDxWzzKlu2v9vrUBIxBRHyI5DsTENmS I1dbEBS8I1SOJIIjuwNjQTVpDtObfFYH1cunNaZGh+t7wowIhZ9XQ9MokyNofHsic4f9ycgx8Ah xK/X3Tn53znIqIzvvCwLQcu2CqXAhhr5bJ059AyLRshDtzOnuqiLIfnXfrizfkVUYvYHUj5p8oI +C+DIs6qfdD+Dy2Gz99toBUAYg9wIO+xjlk2gAoi5uWh3DLGHBViloOrQi7r9t+rglr/blGQLL+ xbWzq3fL2+Wrn2e4G6o8t8weOueh9hXoPyZsIclAr0kAJyhUipd6ZJbgZsDUy8ly05/3y5IoKCY cVdK21JzOfpEXd2kkh4vyS0DkZwuXsTsuXZlbh9Disvh1wxyqDIgzbYImVt9W1CIuNc+VMa7zB5 hqTQo1hJXP014Pv5lMtpJsVxqPr+5B2ktEckAJ+xjBJeX9Kj8eQzLRXoh38y9BxQmZ1NZWe1/Jn xrLhXpsHswwtpX0ohcdLrSS7vsG1KY3StK+8vPvDmSvSNJ+Ti8lEdFnNC1ZpUV+BLsN2vujITAx 2NhElifMlnhYWXL42d30rhtTcelZmrIH4qtQjN4EpAo= X-Received: by 2002:a05:600c:4e42:b0:486:f893:56c6 with SMTP id 5b1f17b1804b1-4889949c0f1mr83189655e9.10.1775289528334; Sat, 04 Apr 2026 00:58:48 -0700 (PDT) Received: from mail.gmail.com (2a01cb0889497e00359acd79a267583c.ipv6.abo.wanadoo.fr. [2a01:cb08:8949:7e00:359a:cd79:a267:583c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4888a567bfasm412749505e9.0.2026.04.04.00.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2026 00:58:47 -0700 (PDT) Date: Sat, 4 Apr 2026 09:58:46 +0200 From: Paul Chaignon To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , Eduard Zingerman , Alexei Starovoitov , Shung-Hsi Yu Subject: [PATCH stable 6.12 0/6] bpf: Fix bounds when ranges cross sign boundary Message-ID: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID: <20260404075846.oQ1a29JAblx1zBWjJxdBR0_kLkrZhGk9eOYxxwzYXAo@z> As discussed in [1], this series backports two sets of fixes for BPF, with their selftests: - 00bf8d0c6c9b ("bpf: Improve bounds when s64 crosses sign boundary") - 26e5e346a52c ("selftests/bpf: Test cross-sign 64bits range refinement") - f96841bbf4a1 ("selftests/bpf: Test invariants on JSLT crossing sign") - 5dbb19b16ac4 ("bpf: Add third round of bounds deduction") - fbc7aef517d8 ("bpf: Fix u32/s32 bounds when ranges cross min/max boundary") - f81fdfd16771 ("selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundary") Using Shung-Hsi's stable CI repo [2], I verified the BPF selftests pass with these commits applied on top of v6.12. 1: https://lore.kernel.org/stable/2026040240-friday-gurgling-7088@gregkh/ 2: https://github.com/pchaigno/stable-bpf-ci/actions/runs/23940850516/job/69826632354 Eduard Zingerman (2): bpf: Fix u32/s32 bounds when ranges cross min/max boundary selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundary Paul Chaignon (4): bpf: Improve bounds when s64 crosses sign boundary selftests/bpf: Test cross-sign 64bits range refinement selftests/bpf: Test invariants on JSLT crossing sign bpf: Add third round of bounds deduction kernel/bpf/verifier.c | 77 +++++++++ .../selftests/bpf/prog_tests/reg_bounds.c | 62 ++++++- .../selftests/bpf/progs/verifier_bounds.c | 159 +++++++++++++++++- 3 files changed, 292 insertions(+), 6 deletions(-) -- 2.43.0