From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 F3B8B37F330 for ; Mon, 10 Aug 2026 21:17:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786396629; cv=none; b=LYVWFtE4WkKbEliPgALeiIeC60I0uK1ViwTkyNUVtoCRESnEGOPMMVg6O7YcDiavvI6/OmiOsh0cd9fBg0tRFClUEUBo5n+2w6oVlgEGrz5JGTvYJTBmklLrdbpNOhskCGp5KVr85tzbiPlbXxF5XbuEgI0XqsUv7S/7Y5f2HlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786396629; c=relaxed/simple; bh=/eNYr7gxVXsiS8OzeIt6VKgmVPGjQFiSXlFgr5Z/Kmk=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=QIKMDWmyw58sqUSCyuaW+WTrEkKjCrT34qm19Rnf1IfIbwMbKWJqVkSE0kkh9Z68K4Q19zJ9eMIqkWM5b2D0hzbRIJb2O3VkFWaGsJARYGlhP9RCBrWKdddkRY9is22kXcJlLqXrvFgW/NQvsirIL+OlTGV9czMr17wJcpq82lM= 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=SUbKpo3k; arc=none smtp.client-ip=209.85.216.52 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="SUbKpo3k" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-38fdeaed181so3039197a91.1 for ; Mon, 10 Aug 2026 14:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786396627; x=1787001427; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=/eNYr7gxVXsiS8OzeIt6VKgmVPGjQFiSXlFgr5Z/Kmk=; b=SUbKpo3kt04x+E+jGgF+F3MwobcvCt1/iT9nDI+kOqUFVNxOCFAlsTQkEn/ZZAu+px ympOvGB0W6zcgItzEgOkuzPpenPAhpIfc0vxIYcBoFIg9B0NTBP9QC3n/N7/l6EihLYo XZplMBqe16xnivHauMH7co+yy85er4iZDfdRQeijJV9HsZqdwEvMURCueYla5vs0SMAP zu75Pm0+st1rgZh2wMOpOwIfPELSX7Xm/G/3RCYdo49MH6happx67iDeVRR1rOyyTINn JzsqV9y2ECxp2pLwk42sfHTSj+ud4Ecne5zy1sLjpASr0ruGJedKWZddopRxLih0jcEe 912Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786396627; x=1787001427; h=mime-version:user-agent:content-transfer-encoding:content-type :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 :content-type; bh=/eNYr7gxVXsiS8OzeIt6VKgmVPGjQFiSXlFgr5Z/Kmk=; b=QnCo/GLj88UF99KDb4XuLHxb+zeJswvudolqpQTnimp5sNraqP9dYY/EpmjXZvMl6q 1EQFWnHo6+kmT7IP6BuMIGmVpMGZjKAQlbTuvxvyCzfQSAkHo3J/jJc8tWys/pQaBOc6 fEAMY1EUJ32avP2Z1xaO2Ew4K+X8q5yZK6GtjDhqS8TlqTcPr54DgFj/vL4rDpubQbIK PZ9q86NfIHK6jBZkAQPYi2NWaXzQl9VTTJdw1WBtcTGm710QYnQCCNw9bgslxyPiWtrr z8vmNwKOH075owb5JsKP6hqCn9jB2n3Lh3hyUT6yYtpzANEmfSzb65MXt5559i/ATfdE x5qQ== X-Forwarded-Encrypted: i=1; AHgh+RqnzBhWMd8rsbFpNm4vz5OWGPF8gdZyHa2tah7sTU7DfASBWIBd8d2LCViJUvcJmCqVoDt/QZKqNqomSuU=@vger.kernel.org X-Gm-Message-State: AOJu0YwihZciaNna4+sQX8dgJjoIA0+vh4HdmdwX0Ym5VkgLCqIB09dZ ZbnwZZ2htyF1xeCU/PQOGvK11fzCIMgwotkmyfzxqJ3sMEPFGTFEBS8+ X-Gm-Gg: AR+sD13t6zx2VZxgI2WcylIGf4Ukmz0cNv4rVy8DKljBQjdiAJXQSijrXpvfbfimGR6 yNdEcDnu/cZqACPjkcwAXIYdmNQIfnruLaRZNWv/UuYm4h1e8uiYF+mbjRM+4zn6Ev1sV6c4PTx a7SpfAoqhkGnpvn4pVQnVS7AMRxIRHpvDxRYcD8j92/MagquzKOJTaVumJmaAGfXf8ccIzkL10a EX9dZzu4OyEBVI4OQUTpTM+YCrfLi+gZ2SmBvn/4PlRmFWJY2hKoY72PIqe4zsGvf2+WwNZdObT +LjNFvgfuR/CqfrgZU5dgghYqf1X9kYrIgWQKDAac6wSINgxd5DT89p2Q6cz4qpVCAZi4Ly1KLS Djb4Ivsc6t1u11NXODgOvEYlBzJ9Aotm0E+JW8UQ8eE2RyeQrrIrEBYE1MH/49G36hXaThNGRo7 6HoPEP7kLZ76C5Wc2A3HCr55vbLRX3Olx+GbYZSN8WBI4amRnGO+aGkuUCCzuDWf7eRvjRkmkgV r6yRc+rUtPIvYGdtQmr4k5354Uk X-Received: by 2002:a17:90b:2dc1:b0:38e:6d4c:14e6 with SMTP id 98e67ed59e1d1-392cc9369f8mr4512493a91.3.1786396627113; Mon, 10 Aug 2026 14:17:07 -0700 (PDT) Received: from [192.168.0.13] ([38.34.87.7]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-392d51c333bsm1022849a91.8.2026.08.10.14.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 14:17:06 -0700 (PDT) Message-ID: <96eceba605b2cb7e93b3e33abf545a02c4eeb1cd.camel@gmail.com> Subject: Re: [PATCH bpf-next v2 1/2] bpf: Eliminate dup/restore of insn_aux_data From: Eduard Zingerman To: Xu Kuohai , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Kumar Kartikeya Dwivedi , Emil Tsalapatis , Yonghong Song , Anton Protopopov Date: Mon, 10 Aug 2026 14:17:03 -0700 In-Reply-To: <5a4528f019c8d2638c019a2f37475cccc16a9503.1785240296.git.xukuohai@huawei.com> References: <5a4528f019c8d2638c019a2f37475cccc16a9503.1785240296.git.xukuohai@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-10 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2026-07-28 at 20:25 +0000, Xu Kuohai wrote: > From: Xu Kuohai >=20 > 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. >=20 > 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. >=20 > 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 instructio= n, > whose jt is never set and can be absorbed into the jt check itself. >=20 > 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. >=20 > Signed-off-by: Xu Kuohai > --- Hi Xu, sorry for the delayed response, the patch lgtm. Acked-by: Eduard Zingerman ...