From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 3D935313534 for ; Thu, 25 Jun 2026 18:53:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782413606; cv=none; b=i1pbcD6B1XiMe0icZN/iFTuHE9Gj32Hk08PIlZ2uznjN9DR7YZOlLRVhtxuTMLuzCgEcs0bQseHJuy4jnyQ1214Mxloej6AENPBZxvxRYmnQu56ThchOdME9n4qBJtXy0lQ6nwB0jjszrepjjPd1NujNqn6H1jaYojuPajo/pjw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782413606; c=relaxed/simple; bh=jX4tjDS2TY1o65mCKlxOrdJcyr8jfpPpm95ymgwH6o8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=A+9TD1jxEFJpdvkTt4x35wRyqSyruLBKAbpjd/knsG4sQ+MICGfdq6sTmP1uLAPn/2VcEQVbaFWczWAhfQEX5W2D9c6kstHPEmtblPDP+MO+jv8hNnL7pm6AT/BChD1skrZ1PM3EAslbvip91d2jOeTmGjaLeGVAyZ7vvK6q/po= 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=qKttOaDz; arc=none smtp.client-ip=209.85.214.181 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="qKttOaDz" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2c7f1db3ad2so1152585ad.3 for ; Thu, 25 Jun 2026 11:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782413604; x=1783018404; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=jX4tjDS2TY1o65mCKlxOrdJcyr8jfpPpm95ymgwH6o8=; b=qKttOaDzk25+CQnub6y7OvKXKEiCA8KpzD5HHFUpOh+DkktHoDXcKeO679lN4e5ehS B7b2MH0CamvYW4ojDQrlQaOSWl8U8ih13XYhEZmik7ug8GYommbP2qfuoGDoTQs9uhrF bykBr0ryFYT8u5/O9zavDNxh9D8LP1jc7JEja1eWBszdGDuC4Jtzi3kjc6yR3ioAA1Q1 e3lMIzOXEfAUnaNkEanbuf5fPK7tZIisI2dtWFW2b6RlPk4m4nb+TYGBH7KHPHXsBFjQ ZaM9wFzi2V/i3MrpPb0lQ4nO+7mrqNCHqZAVEHEq0Fb9LRI1Vg4cmnoQIp2kgsiOuOy9 /G2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782413604; x=1783018404; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jX4tjDS2TY1o65mCKlxOrdJcyr8jfpPpm95ymgwH6o8=; b=TLs2ynR/96xtPZBAB8njNnPsiUkunpxvZv+Q+KNZfHKVwUKKsBuvzlXx19kNrOq9Rc 8LcQxBHhI1wGMuCHUoofv3YXJwftmx89EFogA6ltIZWGULmB3azip9QRgHDDUkt8n5Pp yN3fjjZrRcCksgeuI/dZq47M/QalwgeA3IJUpBcXXBEauU+Q4Y450k9HGK2aZ+lqsCxc zuexGFWbxjVP2G9X6bSWpMz19RneKZoOSrmq4kXD+P9iTZ5vXYC8fpq3B6vMh5oOEw0G tPISZbhoQYsaexHmqlIfUOCMMMbaxB5Jr/dnYJw+qxNNp2OkOeSOPVTPLWaiOMTYkLi0 lleA== X-Gm-Message-State: AOJu0Yw8O0tNxOgVs8ROXhHKk2Il6j9S9C8EQiwTCX3wpog1rFbTBDrH aaBhWVxpcIGpchNEFhgYNvjLI7eqU8pMGM1HLaeq3KferGt+lmTzh3KU X-Gm-Gg: AfdE7cnMr+34UBWXmXv2s5PJCGRMl7fR+qIRlRBhc4XT/Nw9Nir4MyY9TuFNcqRivQb xWBIZronCr7MjjqZzIvY6LNiVBlf3jUtw9Zk9CjHlJH1JkIAPF/gesaXzu7oeQgYB5+ykX72shd c2/v8vJ+Y78PUX4wIVcI/hVNn3RN++wpHwb7Z3l9pWFyJdwmgjKbrLthqmWcvDTnPD5934DI2t0 g+R832k5vXV+Jy/vma/6FCVrJXGqSTlgzzO9aiBoXBPMxbpAbs83BJNhusjAfa2Zmk3bgnqnI+J +pDsOgXmtlSL8jmeCyDnnxkg5SvMPgYkJvoUeVxW+2r1oPHVGaBywzOl8DR1Y6pohnq94i41b5A 5Knd0AQIt3leT9t7iKanG2NXGYoYiVFb6cRf+rQCp70ZyTOgy56ycp0/HbFHaLNHSpm7q6V40OD 3p8urWLVgxmrkvbQ2JLn3/v4P0Dnjg2lByK5c50Rh9mVNNqSsUiRc8 X-Received: by 2002:a17:902:c40e:b0:2bf:281c:d2d3 with SMTP id d9443c01a7336-2c7fc7300c6mr39782095ad.9.1782413604402; Thu, 25 Jun 2026 11:53:24 -0700 (PDT) Received: from [192.168.0.226] ([38.34.87.7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c7f63d09f0sm26396125ad.56.2026.06.25.11.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 11:53:24 -0700 (PDT) Message-ID: <01858c50447df77199abbe570d3ce06288200721.camel@gmail.com> Subject: Re: [PATCH bpf 1/2] bpf: Avoid eliding lookup NULLness for inner map templates From: Eduard Zingerman To: Sun Jian , bpf@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, andrii@kernel.org, martin.lau@linux.dev, memxor@gmail.com, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, shuah@kernel.org, dxu@dxuuu.xyz Date: Thu, 25 Jun 2026 11:53:13 -0700 In-Reply-To: <20260624072031.735846-1-sun.jian.kdev@gmail.com> References: <20260624072031.735846-1-sun.jian.kdev@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.1 (3.60.1-1.fc44) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2026-06-24 at 15:20 +0800, Sun Jian wrote: > Commit d2102f2f5d75 ("bpf: verifier: Support eliding map lookup > nullness") allowed the verifier to elide NULLness of > bpf_map_lookup_elem() for array maps when the key is statically known to > be within max_entries. >=20 > This is not valid for array maps used as inner map templates. For such > maps, the template's max_entries is not necessarily the same as the > max_entries of the concrete inner map used at runtime. As a result, a > key that is within the template's max_entries can still be out of range > for the concrete inner map, and the lookup may return NULL. >=20 > Do not elide lookup NULLness for array maps used as inner map templates. >=20 > Fixes: d2102f2f5d75 ("bpf: verifier: Support eliding map lookup nullness"= ) > Signed-off-by: Sun Jian > --- This was already fixed by commit: 53040a81ae57 ("bpf: Keep dynamic inner array lookups nullable") Please do not send stale patches. [...]