From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75619C88E77 for ; Wed, 16 Sep 2026 08:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3Ecnaj3AKGyX1m3l7eOuM3CrzBXHNWQhHtc+psZy9ew=; b=kh/Djt/lQmHbJd0mjODDrLADSu TNbiXDrRKIQ4wYYNxtOO5b/YTTQCkhk780n+h1tJYLBEXtqHsHKQ2K2R5GuAkmqsC7W1hFscHfkNf PhCniAWHNffeacUte1A89KCCJu6Jmd/p3b1w6Npn1MVs6m4TubUCaKllOFeU3fr/qqi1cC/o88ex/ p/h3nN2F1vl2WX6acbeNQU0lXP6rkXQCHJc0MlRql5ofQek5EW1FBvr5HlranuKbCjEPJ/L49WSLq XQ5aYcSo/DXJ2GuxChjiFK7Y/8om0BOZWc/Ho4a04TD9YFxuJyPsHtT73uF84Owqoq38/kNX7Qh8/ XBCSZwSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x6kcz-00000008g8y-0WGU; Wed, 16 Sep 2026 08:04:25 +0000 Received: from canpmsgout06.his.huawei.com ([113.46.200.221]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x6kcv-00000008g7V-4Aqe for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2026 08:04:24 +0000 dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=3Ecnaj3AKGyX1m3l7eOuM3CrzBXHNWQhHtc+psZy9ew=; b=IrMNpRVpvYOhH5wgWDkxhUQXpee6ma/HN229fbqv8ym6hhxwjJGpLt+WftiZ0CnuDeKTWW7TN Fbv5ZrTFEcCSaOKUlWeG4KWeQJ3LS9DDadnPoYMT34dAq/nobiLlbST50tmPFk6ONdQIsHB/9Vk 01X9FTKgkhrq8MB511mMr5k= Received: from mail.maildlp.com (unknown [172.19.162.223]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4hlB2l2zlBzRhQs; Wed, 16 Sep 2026 15:53:19 +0800 (CST) Received: from kwepemk300012.china.huawei.com (unknown [7.202.194.175]) by mail.maildlp.com (Postfix) with ESMTPS id 8764640561; Wed, 16 Sep 2026 16:04:15 +0800 (CST) Received: from DESKTOP-A37P9LK.huawei.com (10.67.109.17) by kwepemk300012.china.huawei.com (7.202.194.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 16 Sep 2026 16:04:14 +0800 From: Xie Yuanbin To: , , , , , , , , , , , , CC: , , , , , , , Xie Yuanbin Subject: [PATCH 5.10.y/5.15.y 4/4] ARM: 9484/1: enable interrupts when unhandled user faults are triggered Date: Wed, 16 Sep 2026 16:00:11 +0800 Message-ID: <20260916080011.170295-4-xieyuanbin1@huawei.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260916080011.170295-1-xieyuanbin1@huawei.com> References: <20260916080011.170295-1-xieyuanbin1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.67.109.17] X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemk300012.china.huawei.com (7.202.194.175) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260916_010422_399034_9F1F66B9 X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [ Upstream commit e79ca91165d4fd18549c536abdb86101e889052f ] PREEMPT_RT requires interrupts to be enabled when sending signals. When do_DataAbort()/do_PrefetchAbort() triggers unhandled user faults, that is `inf->fn()` return a non-zero value, and the interrupts are not enabled within the hook function, force_sig_fault() will be called with interrupts disabled. This can be triggered by user programs executing the bkpt instruction, with kernel config CONFIG_PERF_EVENTS=n. Enable interrupts in do_DataAbort()/do_PrefetchAbort() when unhandled user faults are triggered to fix the issue. Fixes: c6e61c06d606 ("ARM: 9463/1: Allow to enable RT") Link: https://lore.kernel.org/20260629123349.134224-1-xieyuanbin1@huawei.com Suggested-by: Russell King Reviewed-by: Sebastian Andrzej Siewior Reviewed-by: Linus Walleij Signed-off-by: Xie Yuanbin Signed-off-by: Russell King --- arch/arm/mm/fault.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 8b31d7704626..7ac46e1b85a6 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -585,6 +585,9 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs)) return; + if (likely(user_mode(regs))) + local_irq_enable(); + pr_alert("8<--- cut here ---\n"); pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n", inf->name, fsr, addr); @@ -623,6 +626,9 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs) if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs)) return; + if (likely(user_mode(regs))) + local_irq_enable(); + pr_alert("8<--- cut here ---\n"); pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n", inf->name, ifsr, addr); -- 2.55.0