From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 6BC37355039 for ; Tue, 17 Feb 2026 13:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771335545; cv=none; b=lY8BmxbA8XC1g+x6d/5aW2MNC9Rl8Mha3HUsDNCSgJLbnYACBiBhqhJSoGSpnbojPf3gHiMhqo0VSGUODKp3+VA8KemUsJUKsjeQGr3daOahW0b0mQYgVluG3L7Kej4XbZaQKkhsatE7CiIPIIuqTAfMPaPVCAnu1PxfQ7kbRL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771335545; c=relaxed/simple; bh=rFqo5/1B8OW4FXE1gAWa3KqljMTcG1/mrFo7ySQzgro=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VeVk2PXaj0A8oj6/RD0MTt5svnJs+wacJRB/qJKIzUMcNUPJ2m/uUxaRQMQzxSgQ/HU3McZEcdaAmNS4r1kDQXF+3M9fkjCqPcWH/ebwUfQJmJJCWpOidrg7WaPRcvTx9XQVjtg+NIrLIdi5oC61dMOftuGdWTsZ25YnsLCK5rM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QR6T7LZq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EUKHStn2; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="QR6T7LZq"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EUKHStn2" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61H9QW3W985497 for ; Tue, 17 Feb 2026 13:39:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=wHG/p1ZM90B prQCvpdYjx62U8YBuCo5FIk6XXtohUYY=; b=QR6T7LZqmmcJgr4HNw1BqizfsC8 9y1yW0XDkj9VHdXAQl14kia6aFEt7dG40MlVO1kBiaNVwfh5FC/7hxx6JUgfQ5UA VgWUEovq43CYxUeRP2xJq4vO9fofWydydSATunkmu6kNSGaITP8kRgwODKLW2pdr XGXv2kHYLmi7yafJLpNlQ7IfB1yHR8QJsXrE+F2aoHtBTeFh8NcdtBvWp1zP3L3i Ky7rBCAPnuhdoWkhjOUULTZ2HUqsiUWFXAptb3WhZcClM/Ss79hVT+BONInWgfoj BytkNsEf9wN8Ly+9Kkun2n5ILpCe6oNqvvUt4y6NGLvuHsh7+nTDwEQqMEA== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cc7ap2dkx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 17 Feb 2026 13:39:02 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8249ba7f6e8so1955581b3a.2 for ; Tue, 17 Feb 2026 05:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771335542; x=1771940342; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wHG/p1ZM90BprQCvpdYjx62U8YBuCo5FIk6XXtohUYY=; b=EUKHStn2Crt+e8yBzSUExQDxWe3MFS3D7ElPzbiL5Z1SrxtpLaGHVcsUhD61ZmP/tu aN5+649ioLq2pJHm4jViwvvoEMcnxOqz5F9DTtleG2aRPT8KIo5Cnu0PDDsldL6y3xvW BzG4DN54Bu0ZwvjwFaHCvqRvoFaT6wdfPuH+J+ixrMHZNRhwR2QjrNrjoAfriCDBXUih NE3TL7L31VoaIUJ6usszBuRHDHDw5ae15feg4fHk+74M/ELFIQFcjHx7EMi5uzefWpRq E1fOkYxBuJ8+rwIfGhZRFsSgn45EhmXUABx5OhcggVyJpbTLZEvlQEqbputLmQNPxl5k 5A6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771335542; x=1771940342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wHG/p1ZM90BprQCvpdYjx62U8YBuCo5FIk6XXtohUYY=; b=tPKqgDz2+bSyEjtvZCa25O8XzYuPSv1VLVFkQoJ5AoJy93+LO8FeSmROvute741Ax3 Yqw5JMNYNyhQvjBtSQUi03zXQeSyGro/pNVVYhPH0DesqmWSCKxoxyLFfXU9Fn6Nbsfb wu1rlAAd5hB5n396g2wJ/Zznby6QaJkGx64sbDTLSf8n59ilyXN4q5TXRs8xPfgK6fhk yLvmT6OE60PVf0jyafFdYrPaMzsF/oFT5tZaSWBks5mY8k69dtOdH1GCikunGpGje2vo zuuOyUW/rpzv8QWOJORGpgl0Bd+XR27X3NRIfoaYD8AByeqNjvOLeUGg/CutYUn7+YIL dHxw== X-Gm-Message-State: AOJu0Yxh6JxnH2Lq2XXZGGNIvLwPafPKXEjhAgVXtj9bbmEK9Mw9beQa cWEYgsNLTSlBYf8RBzQhmKXjGcNDozQjirYUW2e/ecH8ge+NdNs5LP8zsqsvTyIn/y2pLFIslZc ena3jfZTYF6LuEFc4SN+kMOwNbpXcosydGpeNQvpUDaADm7ThVRjYEK/6ncvWx6XmfzQ17XhpTl Q= X-Gm-Gg: AZuq6aJW09IWX+rfeRF7TKq3/JjHyvVb2vOtvricBatyJYrwG43wGudivyNe2lHjsbT mFUIMcok0LLHcwsRch//xPVMKBBTDWiIj8jEZBRwQze/eozWHhus5rweQHcV8vGWI9Hbr1QAPcG 85gLTPaVqR2njE0SHTCnejB3pJsax2Ka+okElKrKkRLHi66ZcDapRwfkSZ0XZzNaqIn2pWc60AN GoZt6U10knia43NfdVRHtgSaw0404osWi/uQFjGziPCuOSwcIdI27EOF8xjsGmO2n5wZPFOe/b1 PsgUwzSmdKKj98BTG0FbR97679/kkNHldgREKZnXug+6p+jvoLQ1Z+e8z5c6kYD0tiUrE3wurqq wnL8gv9eH119UDP+DiS43Ra8B+sQrOC/sY6JyBmdK796fUnJeS+QO X-Received: by 2002:a05:6a00:3919:b0:81f:15b2:21ea with SMTP id d2e1a72fcca58-824d95faaedmr9250199b3a.42.1771335542033; Tue, 17 Feb 2026 05:39:02 -0800 (PST) X-Received: by 2002:a05:6a00:3919:b0:81f:15b2:21ea with SMTP id d2e1a72fcca58-824d95faaedmr9250179b3a.42.1771335541524; Tue, 17 Feb 2026 05:39:01 -0800 (PST) Received: from hu-kshaikkh-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-824c6b935c6sm14633207b3a.47.2026.02.17.05.38.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Feb 2026 05:39:01 -0800 (PST) From: Khaja Hussain Shaik Khaji To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will@kernel.org, mhiramat@kernel.org, yang@os.amperecomputing.com, dev.jain@arm.com, ada.coupriediaz@arm.com, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 0/2] arm64: kprobes: fix XOL preemption window Date: Tue, 17 Feb 2026 19:08:53 +0530 Message-Id: <20260217133855.3142192-1-khaja.khaji@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251106104955.2089268-1-khaja.khaji@oss.qualcomm.com> References: <20251106104955.2089268-1-khaja.khaji@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE3MDExMCBTYWx0ZWRfX6cyXTCET7ceT bSbh9lumOmMEGGSxL0xnjAf3sEamzkOE21GzuGheHikLoIKUdAXsubn6TTUzCAJ/1q/wjythPNA FnkwbedohnVLyIxVAl2/PIJddBlMz4c7VEQZBxHPhtWZ8YePYfhCunSnyke7oHFrMp+EPOixY4Q UZ6eMwYRApJ82wzLTz4ipLMnnpcpmkkmt3KmOBAWnMwK6csUFBiwxyJ2gJJ3s3X3Y5RHIRhY3rJ YKWS3oca7pTCWyZeekhD0lCWAlXBuBW64Xo/hryBy33MnUuHZhRCL+9+l4uQxVhUb5thQTYZzg9 De5xh0atoFac7o5mGOcY4IVzMDCnSe1+s+TGZ2Ek+juFBNjLYpPmO2IGTjjal/jOkwgjBDn8o7A sThop/VEmwi/UwNKh9/Cq2l/dJB+Hf0kn/cSdiquhUSo3gCZr+wa+a3wWWpf3iq3nPFMiwTLiNo owe0IGbFDzFRqynSfCA== X-Proofpoint-ORIG-GUID: mBwKV72waJC5z2G6ysXsXhqRDRpxH0u0 X-Proofpoint-GUID: mBwKV72waJC5z2G6ysXsXhqRDRpxH0u0 X-Authority-Analysis: v=2.4 cv=Rfydyltv c=1 sm=1 tr=0 ts=69946f76 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=_07oBJFWSMtGKjIRfaAA:9 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-17_01,2026-02-16_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 clxscore=1015 phishscore=0 priorityscore=1501 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602170110 Hi Mark, Thanks for the detailed analysis. You're right that this is not BTI-specific. The underlying issue is that XOL execution assumes per-CPU kprobe state remains intact across exception return, which can be violated if execution is preempted or migrated during the XOL window. This v2 series addresses the root cause of kprobe crashes that the previous BTI workaround addressed only indirectly: disable preemption across the XOL instruction and re-enable it in the SS-BRK handler. This ensures the XOL/SS-BRK pair executes on the same CPU and avoids corruption of per-CPU kprobe state. Regarding triggering: this was observed with kretprobes during long stability runs (800+ hours on dwc3 paths), where XOL execution may be preempted or migrated before the SS-BRK is handled, resulting in incorrect per-CPU kprobe state. This series leaves BTI handling unchanged and avoids emulating BTI as NOP. Khaja Hussain Shaik Khaji (2): arm64: kprobes: disable preemption across XOL single-step arm64: insn: drop NOP from steppable hint list arch/arm64/include/asm/insn.h | 1 - arch/arm64/kernel/probes/kprobes.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) -- 2.34.1