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 71BDA34B1AD; Thu, 2 Jul 2026 16:31:18 +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=1783009879; cv=none; b=d0krrHAJjxdXFi6tn6UR8/eVXC5NjxOxY8SZvVb2uFPZQeKqrAoIlkcTld0LuaOlOIjasBKsHyZm4bwzbDFvieKw6tNQV40a9bBYrMmBFWHQdm1f50tYN0afZDxeIZKGFdE4rIxCB6mi2r/cZXznej0MC+/GZKC7x1VQPP+z1Gs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009879; c=relaxed/simple; bh=pV9wAv8oajmNOR+G7cNYuKCmREsT9RmyJDBHcz2gCyU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YkkIpK4cQ5ssELn9Fz78YuN3H3QSfL2TgqiOAD2iza6oTjaVF8HowHl1nq0bSfpv9R7Ub0QOcnFRNwrIfhhL/h78km+TQWx9ictToS0I9Fv/Ror6zO+UQTaipyPCShSGOF/Wfzsl6R6NTQpxNjCgj7O3vHTZEYonPNmJDaFz+Do= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UmrIMMk0; 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="UmrIMMk0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D73961F00A3A; Thu, 2 Jul 2026 16:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783009878; bh=Ncs3meU2k59K2+zyjrqQXYB0ePuXH2mD6Oas7jIYtwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UmrIMMk0AqgZPHnECAmzmXYBo++bcnnXCfFDphyMpu3D61Gy5ILCkqnrB9RJA4QWW WWOX6BiDw+m4qEOK32QvwexI2Yyzv9esR2Z6srxcE88Jk9WPG0VflTwl2xPMOAJyi+ f0joAbIOhYbz6T8v4Ns8RETRsR0E1j2D+dJj1RW4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Russell King (Oracle)" , Sebastian Andrzej Siewior , Sasha Levin Subject: [PATCH 6.1 027/129] ARM: group is_permission_fault() with is_translation_fault() Date: Thu, 2 Jul 2026 18:19:06 +0200 Message-ID: <20260702155112.721594529@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260702155112.163984240@linuxfoundation.org> References: <20260702155112.163984240@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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Russell King (Oracle) commit dea20281ac88226615761c570c8ff7adc18e6ac2 upstream. Group is_permission_fault() with is_translation_fault(), which is needed to use is_permission_fault() in __do_kernel_fault(). As this is static inline, there is no need for this to be under CONFIG_MMU. Signed-off-by: Russell King (Oracle) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Sasha Levin --- arch/arm/mm/fault.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 16a7765511f8e4..2315d40760a787 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -125,6 +125,19 @@ static inline bool is_translation_fault(unsigned int fsr) return false; } +static inline bool is_permission_fault(unsigned int fsr) +{ + int fs = fsr_fs(fsr); +#ifdef CONFIG_ARM_LPAE + if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL) + return true; +#else + if (fs == FS_L1_PERM || fs == FS_L2_PERM) + return true; +#endif + return false; +} + static void die_kernel_fault(const char *msg, struct mm_struct *mm, unsigned long addr, unsigned int fsr, struct pt_regs *regs) @@ -225,19 +238,6 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs) #define VM_FAULT_BADMAP ((__force vm_fault_t)0x010000) #define VM_FAULT_BADACCESS ((__force vm_fault_t)0x020000) -static inline bool is_permission_fault(unsigned int fsr) -{ - int fs = fsr_fs(fsr); -#ifdef CONFIG_ARM_LPAE - if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL) - return true; -#else - if (fs == FS_L1_PERM || fs == FS_L2_PERM) - return true; -#endif - return false; -} - static int __kprobes do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { -- 2.53.0