From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 EE3163C3450; Wed, 30 Sep 2026 19:04:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790795053; cv=none; b=PlChM5U/B8O/HTgD5p+FqZaLurs8nur2gg/xmplgBOdy2j+jzWaFhXWbGqNZU4qqXLfBYqPX4vuKHaxskis5Q+DeVLyfSJBuhKphHiUF0gqd0vq55dvDPvpx8GDXhBZ0iPLVCeYPrtP21h6lyPJ6AjlU3NX1Zqd4jdqTdfXbKdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790795053; c=relaxed/simple; bh=Dxck+I8LPiEJuf21xNq9vZ+oUx3VyxHPw9oQ7hzKQdE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Bls+XrkTrkMdjjnjdqoAVRYqp1F+8G7pQhqlcK6jseVG97Mg8muwSypirO3Op/YrhHeYjnAU/vHwQOiqs3bJlas0pQoD6W0o3jjv1nHDHsP696MeWKAxyyxKSaDO+ap1JGaQ/WWqqrf3VjGGAI8vN0Ie9Otk0OMuE+WM0sKauCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ImBT2A/Y; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ImBT2A/Y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE6A1F000FF; Wed, 30 Sep 2026 19:04:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790795051; bh=27ok7Z8UMeYs5Dvwrl9cJkuH7avA+yKJH7lwEXkTcxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ImBT2A/YcNj7pUGBk6yYMqJnKmAk0gD4jDT4vJRBW8UUlwxn3dwf5aOcFuSCexIDm qwrmELqNg6B+DF1RbavXZ/tEI7VNLIBd31I24jkytvqOYkTfik3hMc3uPQNKUk0E2E Fy6akCyAO2tSJjXcGzHvdIOtEdD3DXT/8K1MX6ag= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Russell King , Sebastian Andrzej Siewior , Linus Walleij , Xie Yuanbin , Sasha Levin Subject: [PATCH 6.6 0371/1193] ARM: 9484/1: enable interrupts when unhandled user faults are triggered Date: Wed, 30 Sep 2026 17:17:35 +0200 Message-ID: <20260930152442.422373399@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152434.301151190@linuxfoundation.org> References: <20260930152434.301151190@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xie Yuanbin [ 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 Signed-off-by: Sasha Levin --- 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 d6e3121c6a3fe..24114877b8e1f 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -587,6 +587,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); @@ -625,6 +628,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.53.0