From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 8FC503AD536 for ; Thu, 2 Apr 2026 11:02:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775127731; cv=none; b=qHfMc5i9qKKRYUNeBSfDQXteDIoVwsxNL2w/FXQaoQ4fR1z3b+dIz6DDwCQ4LKfdGGy8Ty88HRdK33HVxZVBIp1xGslwhT3WxZ+dIkJDem9xP4M98RrMC8AChUTXAYEVepIg4ItrOD4Hxt2PeBJHsQun/2dNerytDYo6oAvhRwo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775127731; c=relaxed/simple; bh=g1PUzPDOerdwNyKi6ER2gbfLx+t48czd+Z5hXY6tY4M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=m4FjIItMXyqKTHrC2knkpj3YsQ+N0t7xAvgoxeY/bJr0sUlZ0SZ4dWOvRoifZtku1d1KOEyAOXgLko5/hYOu5eAPwiCJvnXqfTXz2gwm6KrjQhNxDeGKWNwZI2AG9w+IK03EAyyvQVqCiFnlBopJ4yccYeCL/3kniKiipzwmVlY= 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=bVgp8y95; arc=none smtp.client-ip=209.85.128.50 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="bVgp8y95" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-486ff201041so6983625e9.1 for ; Thu, 02 Apr 2026 04:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775127728; x=1775732528; 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=tf3op5lKH+OvN0zw8qp3z/h5oZygSPqopKpCD8089zY=; b=bVgp8y95SQqdqXXFeP77cHYe/zryT10pV1j2LM6P5iXkWM008Llu5+hSdze34c7vA6 n0RwrsYECtBbwRC6A+DVYmlztpZJH8jgGQwcmgZRUVVS58e3TYZtVJOVmSUQMk6HOBUm WDIqO5FAIu0zh0a8yF8IXxTegmoUyvJozX6tNG8n/GMorQy8MXovxvkWzapekAZSnNt8 wdYAKV6alrD78mafdjSdGaWP+XJqoyIIHieDks38xr9mScDCS0AzMR5HeozP9+cfnpwd KSwk0RDCR2Y2FnOLJxVg4d6cP+oDWETjCQgbYokEpvPK4Dup/8TYWVVpKDk8SfhQpIvm Yz3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775127728; x=1775732528; 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=tf3op5lKH+OvN0zw8qp3z/h5oZygSPqopKpCD8089zY=; b=RqOS9BBQB1C+jz+Jime3ooFSPN3cajNwW4f8IqfCF4A8fMUFMfzPWdZmIeD0nNA1Hj 2bcNS59fbMnKzbBDVkO/xaZuq/p1g4AeCPE2OAz9s75AxTpwmoVZu8RG7zWdLE9Qzxli kHy5zs4d+IWirSXTgiDLu+JP6RI4bfAXD8gHVmGi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002:a05:600c:c107:b0:485:445a:87d1 with SMTP id 5b1f17b1804b1-4888b6f7f5emr34209405e9.8.1775127727616; Thu, 02 Apr 2026 04:02:07 -0700 (PDT) Received: from mail.gmail.com (2a01cb0889497e00981c6411e4c4d8e7.ipv6.abo.wanadoo.fr. [2a01:cb08:8949:7e00:981c:6411:e4c4:d8e7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887aacb88fsm65229755e9.2.2026.04.02.04.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 04:02:06 -0700 (PDT) Date: Thu, 2 Apr 2026 13:02:05 +0200 From: Paul Chaignon To: Greg Kroah-Hartman Cc: Alexei Starovoitov , 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> <2026040240-friday-gurgling-7088@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: <2026040240-friday-gurgling-7088@gregkh> On Thu, Apr 02, 2026 at 12:46:10PM +0200, Greg Kroah-Hartman wrote: > On Wed, Apr 01, 2026 at 06:42:49PM +0200, Paul Chaignon wrote: > > 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. > > > > I'll keep this dropped for now as I have no idea what 1f8fe377855b is, > as that's not a valid git id in Linus's tree. My bad, I meant commit 00bf8d0c6c9b ("bpf: Improve bounds when s64 crosses sign boundary"). > > Can you send the 2 patches needed here and I will queue them up. Will do. Thanks! > > thanks, > > greg k-h