From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f2.google.com (mail-wr2-f2.google.com [74.125.225.66]) (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 CCDBF20ADF8 for ; Thu, 13 Aug 2026 02:37:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786588668; cv=none; b=tzBIMFNCbrkqlX192v5As15CrW461r/Muo50IwpdBMDA84Zv8tWcm6I3WF1AGD/jeSvf1gEdeOxcXexYXdv5zbb+r4IAEbPKW9IE3J8YuE7y8cZcPfcSdtOWewOLCMbY/VfQXVPDclht8s/n0TblzPgBWLFpT/QN7/s5NL6Gwy4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786588668; c=relaxed/simple; bh=Cp/7r3UqGsO/nzKRlaWKpWO+vM+tfG8GSAcYl45XzRk=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=DuNYoJpnCJ0s1P11vdxuse8WpLS5lfI1Feb3dqQtjLrr6+uud1t+xYRFXQNM5rJKhMjr2JE4/o6e8BLhM4tBNoamDBnsjYzzRY0Eod0Tb3B6zT1cgfmhrpt2pKTtbFfeN5rKcW3Sb8aEQuOmFPgf08qLgNWw/fd33CFdmYPGcSs= 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=Ea3y0Uxc; arc=none smtp.client-ip=74.125.225.66 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="Ea3y0Uxc" Received: by mail-wr2-f2.google.com with SMTP id ffacd0b85a97d-47f7f93b3d4so330315f8f.1 for ; Wed, 12 Aug 2026 19:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786588665; x=1787193465; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=Cp/7r3UqGsO/nzKRlaWKpWO+vM+tfG8GSAcYl45XzRk=; b=Ea3y0Uxc3YytxauolBWgCKKYF4jq7xX4raO+F4/wSIMC1BXmwfqGDumP1wdLQM8Y9Q OL9s7wXL4K6ygZMzksGLa/LCqPy0YDrtAzfKmCyIc6qYt/kT5RgbkA8cnVkPr2MDepOD ilVdjBvsLPlcGFGkRJWyQkiPgfv9Z9C4z6xNWWCgT62JfPXBa3Jk/dCoaNol/nNXwJP9 atR4RSQQBcTNewD6xtWWSKgLpyJrMWRaYPF0ICuamWrW3rbJIX0/DleCk2doE6RjZrYs vt1wfElE4qVzDM77fy4crHKyfiD3ETRXs+gzRRBVTkFz60cZ/SfbvUS0aQIEa/lNX+6j vpvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786588665; x=1787193465; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Cp/7r3UqGsO/nzKRlaWKpWO+vM+tfG8GSAcYl45XzRk=; b=Zt5aNJV1VXr2dFdS6ZgpI4Cqjn35Oph4H+wRsxLYCSW5hTalKR10gunyRWFH72TA3m JK9velnvOTjOWqJcnoR685a9hb9r8TFXK99Er+l4/KafxS5n4JJvIxlqFVi24RnA4oqf E4QkOhQywx8yhsIPW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002:a05:6000:2505:b0:47f:e797:41c8 with SMTP id ffacd0b85a97d-48159ca5d62mr2939768f8f.4.1786588664987; Wed, 12 Aug 2026 19:37:44 -0700 (PDT) Received: from localhost (nat-icclus-192-26-29-3.epfl.ch. [192.26.29.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4815a5b6616sm2217698f8f.25.2026.08.12.19.37.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2026 19:37:44 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 13 Aug 2026 04:37:43 +0200 Message-Id: Cc: "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Emil Tsalapatis" , "Yonghong Song" , "Anton Protopopov" Subject: Re: [PATCH bpf-next v2 1/2] bpf: Eliminate dup/restore of insn_aux_data From: "Kumar Kartikeya Dwivedi" To: "Eduard Zingerman" , "Xu Kuohai" , , X-Mailer: aerc 0.21.0 References: <5a4528f019c8d2638c019a2f37475cccc16a9503.1785240296.git.xukuohai@huawei.com> <96eceba605b2cb7e93b3e33abf545a02c4eeb1cd.camel@gmail.com> In-Reply-To: <96eceba605b2cb7e93b3e33abf545a02c4eeb1cd.camel@gmail.com> On Mon Aug 10, 2026 at 11:17 PM CEST, Eduard Zingerman wrote: > On Tue, 2026-07-28 at 20:25 +0000, Xu Kuohai wrote: >> From: Xu Kuohai >> >> The dup/restore of insn_aux_data was introduced to resolve the >> inconsistency between insnsi and insn_aux_data arrays, which occurs >> on the failure path where insnsi was rolled back to the original >> state before constants blinding, while insn_aux_data was not. >> >> After JIT failure, there is only one user, bpf_clear_insn_aux_data(), >> that requires insnsi and insn_aux_data to be synchronized. It accesses >> both insnsi and insn_aux_data using the same array size and index. >> >> However, the access to insnsi in bpf_clear_insn_aux_data() is not >> necessary. It is checked to skip the second slot of an ldimm64 instructi= on, >> whose jt is never set and can be absorbed into the jt check itself. >> >> So remove the access to insnsi from bpf_clear_insn_aux_data(), and add a >> specific length field for insn_aux_data to allow it to have a different >> length from the insnsi array. Then remove dup/restore of insn_aux_data. >> >> Signed-off-by: Xu Kuohai >> --- > > Hi Xu, sorry for the delayed response, the patch lgtm. > > Acked-by: Eduard Zingerman > > ... I applied this one for now, thanks.