From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 633E73A6EF9 for ; Wed, 25 Mar 2026 10:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774433713; cv=none; b=GYQhY/TF7ga3+0tXKcsGeEVD55Kfz8hyJcKn6qPuM77z7hZVLH2kyyShQ840L/xfq2KyG75tO1ZZlY2qEnvGu32aUvmUI2CjVfgGbbpIxRfTr6qviQS0QgYj5kWWSAQigMolSmIwYuS4szDyl6xH5ERGUBQTElpvTJbr9plmgZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774433713; c=relaxed/simple; bh=/5jcfcm+QZh4bxx3qZPCeJHymhFI4h1sx5H1Fe2oMhI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=O8J2Q/SjGBtAVWVwZ2Pbw0YL4iN5OGFR+WNwJ7U41ORog+AtI3x9A8Ru6H18DdYX1G46C2RqphC5KmiUZG8bBBRx2S6msgL/fSiEFJzywuYlGIvj67Yy7JlSrIzSmU6okPy8Oe1JxG9jvu4+PFHKLhqqIY+ojZexDvglwnE7TmI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=QlgkJmdi; arc=none smtp.client-ip=95.215.58.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="QlgkJmdi" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1774433710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dgOX2Ueq2+jdgqSbhNggaZUcUNC7RJqS127l3Eab4gA=; b=QlgkJmdickflLaFfKx3wSePqh64y2bLOlWkY6yFHeG8ZzVP31aJMeNc572xoQFRhCGYDKF kwAq4R0G2EDBUA3MAQqZ2ce31T5qMqLJnZCpUvzJiLWZ5kzSQ61646XIuifUaY21CNr3pn StPmY8yn1+F9gGonqj1MgaiJPkAj+h8= Date: Wed, 25 Mar 2026 18:14:52 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v10 5/5] bpf, arm64: Emit BTI for indirect jump target Content-Language: en-US To: Xu Kuohai , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Yonghong Song , Puranjay Mohan , Anton Protopopov , =?UTF-8?Q?Alexis_Lothor=C3=A9?= , Shahab Vahedi , Russell King , Tiezhu Yang , Hengqi Chen , Johan Almbladh , Paul Burton , Hari Bathini , Christophe Leroy , Naveen N Rao , Luke Nelson , Xi Wang , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Pu Lehui , Ilya Leoshkevich , Heiko Carstens , Vasily Gorbik , "David S . Miller" , Wang YanQing References: <20260324122052.342751-1-xukuohai@huaweicloud.com> <20260324122052.342751-6-xukuohai@huaweicloud.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Hwang In-Reply-To: <20260324122052.342751-6-xukuohai@huaweicloud.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 24/3/26 20:20, Xu Kuohai wrote: > From: Xu Kuohai > > On CPUs that support BTI, the indirect jump selftest triggers a kernel > panic because there is no BTI instructions at the indirect jump targets. > > Fix it by emitting a BTI instruction for each indirect jump target. > > For reference, below is a sample panic log. > > Internal error: Oops - BTI: 0000000036000003 [#1] SMP > ... > Call trace: > bpf_prog_2e5f1c71c13ac3e0_big_jump_table+0x54/0xf8 (P) > bpf_prog_run_pin_on_cpu+0x140/0x468 > bpf_prog_test_run_syscall+0x280/0x3b8 > bpf_prog_test_run+0x22c/0x2c0 > > Fixes: f4a66cf1cb14 ("bpf: arm64: Add support for indirect jumps") > Reviewed-by: Anton Protopopov > Signed-off-by: Xu Kuohai Acked-by: Leon Hwang > --- [...]