From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 5371E3BF669 for ; Wed, 1 Apr 2026 16:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775061774; cv=none; b=Odih90NG8x2xcFtoVKKYRmavXwHijTjdEDlqdYY94aLF4zFVdQB7FMJcCUy2LnkxyiRYysU1PT9gv7tjgKNiv05ky8MENP5drrgtrVDnLpEw2DJdh9wyqtemr5g1sNkkKiOkNoZQeJWb8chWdrePg11LaIyR8OAiwbpfi226+mk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775061774; c=relaxed/simple; bh=bK5VcBzFH7seN9+AMOZbQhRoAWaOmgP6bggqWtU0CKs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=j5e4q0HtInEJzhmoLxrEdbTi2+HuX8uffiUIFTCJml5QYgSxiBuiduujNxKI3yPoEnuGsz1HQDucDyVywWf3+3aK+aoRKpUiz0UD5Vq1xepqwFrDAqkjQKmLuW0rVnG81nSrTLvVcIk0pbjXbWp6zIEKjPelOOeEoN6Eedd8A5c= 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=sAN39xRH; arc=none smtp.client-ip=209.85.128.43 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="sAN39xRH" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-486fe655187so92864135e9.2 for ; Wed, 01 Apr 2026 09:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775061772; x=1775666572; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=KV+tSC2Aqfk5AN8Gr0A0YOBmS6aIW69bjJ/AxSnLy9M=; b=sAN39xRHsT6gzTV4pTJhkLhpQ+BaHe1uz4+TSVXqxiD6IOv3rD19MoKI1TqEpxKcUG W7h3X3ANMAyW+o4EM/w4LL5hvIVsyFdzpFUtEYwWc/IPI8W0tYwmD44/zw8O+1cxENFc vV8yAwlsNb7tiFe640iaPggLsHN/NYqKDwKxH/eFYNcWRrBehsHSQjIXFKB/37euuW2s 3DFk4I4eMLEtMM02UFKngMyH0pFoYiusK4TYoC+fK1FvdGDnhsc1Ag4czxS7Bdbq8HpJ Q6toUrg8ku5/UT2AA6/dHwlVMQ2YU+YSpuDttmkitoDvt5Lu+aJ2eXZ+xvJPVrF4GrYB SjqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775061772; x=1775666572; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KV+tSC2Aqfk5AN8Gr0A0YOBmS6aIW69bjJ/AxSnLy9M=; b=ETwkkoldLD/4fUcuD8XD1iaeUa4Tg2EIL+AgFNILS7AYoaOPqzJ/JM4WqSyQyGTJjw myzMewlyk/EzNM1l6qIxrk91UULo2Ai1PBUp0XhPjtddBRbMjn6xWLzgahxkVeb9pxU2 7IjMRCdnQTG3BdL5KOCZKTP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05:600c:a4a:b0:487:21c7:2885 with SMTP id 5b1f17b1804b1-4888355e52cmr77059995e9.5.1775061771400; Wed, 01 Apr 2026 09:42:51 -0700 (PDT) Received: from mail.gmail.com (2a01cb0889497e0077853c1cf79fe628.ipv6.abo.wanadoo.fr. [2a01:cb08:8949:7e00:7785:3c1c:f79f:e628]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887c8b8e8asm44527295e9.25.2026.04.01.09.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2026 09:42:50 -0700 (PDT) Date: Wed, 1 Apr 2026 18:42:49 +0200 From: Paul Chaignon To: Alexei Starovoitov Cc: Greg Kroah-Hartman , Shung-Hsi Yu , Eduard Zingerman , stable , patches@lists.linux.dev, Andrea Righi , Emil Tsalapatis , Alexei Starovoitov , Sasha Levin Subject: Re: [PATCH 6.12 034/244] bpf: Fix u32/s32 bounds when ranges cross min/max boundary Message-ID: References: <20260331161741.651718120@linuxfoundation.org> <20260331161742.960922011@linuxfoundation.org> <2026040115-dose-aerobics-7c6d@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Apr 01, 2026 at 07:32:26AM -0700, Alexei Starovoitov wrote: > On Wed, Apr 1, 2026 at 4:44 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Apr 01, 2026 at 02:22:58PM +0800, Shung-Hsi Yu wrote: > > > Cc Eduard and Paul since they know this change better. > > > > > > On Tue, Mar 31, 2026 at 06:19:44PM +0200, Greg Kroah-Hartman wrote: > > > > 6.12-stable review patch. If anyone has any objections, please let me know. > > > > > > > > ------------------ > > > > > > > > From: Eduard Zingerman > > > > > > > > [ Upstream commit fbc7aef517d8765e4c425d2792409bb9bf2e1f13 ] > > > > > > > > Same as in __reg64_deduce_bounds(), refine s32/u32 ranges > > > > in __reg32_deduce_bounds() in the following situations: > > > ... > > > > > > Hi Greg, > > > > > > This patch is causing the following BPF selftests to fail > > > > > > #222 reg_bounds_crafted > > > #222/27 reg_bounds_crafted/(u64)[0x7fffffffffffffff; 0xffffffff00000000] (s64) 0 > > > #222/28 reg_bounds_crafted/(u64)0 (s64) [0x7fffffffffffffff; 0xffffffff00000000] > > > #222/29 reg_bounds_crafted/(u64)[0x7fffffff00000001; 0xffffffff00000000] (s64) 0 > > > #222/30 reg_bounds_crafted/(u64)0 (s64) [0x7fffffff00000001; 0xffffffff00000000] > > > #222/59 reg_bounds_crafted/(s64)[0xffffffff00000001; 0] (u64) 0xffffffff00000000 > > > #222/60 reg_bounds_crafted/(s64)0xffffffff00000000 (u64) [0xffffffff00000001; 0] > > > #222/79 reg_bounds_crafted/(s64)[S64_MIN; 0] (u64) 0 > > > #222/80 reg_bounds_crafted/(s64)0 (u64) [S64_MIN; 0] > > > #262 reg_bounds_rand_consts_s64_u64 > > > > > > The failure is caused by the selftests' expectation not aligning to the > > > stable 6.12 behavior. I believe the easier way out is to drop this, then > > > wait for [1] to land and pick it up in stable (or I'll try to backport > > > and send). That should address the root cause of what this patch is > > > trying to workaround. > > > > > > 1: https://lore.kernel.org/bpf/d4fe45f8bd5c6a48efd2ba3b66932bf7eb5aa020.1774025082.git.paul.chaignon@gmail.com/ > > > > Now dropped, thanks. > > I suggest ignoring the selftest failures. > The patch is necessary for stable and backports. > It's fixing a real issue. The selftest is failing because we're missing commit 1f8fe377855b ("bpf: Improve bounds when s64 crosses sign boundary") in v6.12. It's the s64 counterpart to the s32 patch backported here. In bpf-next, we have both the s64 and the s32 patches. The s32 patch also updates the reg_bounds_crafted selftest to cover the logic for both the s64 and s32 patches. If we backport only the s32 patch, the updated selftest fails. I can send v6.12 backports for both the s32 and s64 patchsets if that helps. There are a couple minor conflicts when backporting the new selftests. Or we can just cherry-pick 1f8fe377855b alone.