powerpcs390-ptdump-define-ptdump_check_wx-regardless-of-config_debug_wx.patch removed from -mm tree
The quilt patch titled
Subject: powerpc,s390: ptdump: define ptdump_check_wx() regardless of CONFIG_DEBUG_WX
has been removed from the -mm tree. Its filename was
powerpcs390-ptdump-define-ptdump_check_wx-regardless-of-config_debug_wx.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Christophe Leroy <[email protected]>
Subject: powerpc,s390: ptdump: define ptdump_check_wx() regardless of CONFIG_DEBUG_WX
Date: Tue, 30 Jan 2024 11:34:34 +0100
Following patch will use ptdump_check_wx() regardless of CONFIG_DEBUG_WX, so define it at all times on powerpc and s390 just like other architectures. Though keep the WARN_ON_ONCE() only when CONFIG_DEBUG_WX is set.
---
arch/powerpc/mm/ptdump/ptdump.c | 7 +++---- arch/s390/mm/dump_pagetables.c | 7 ++----- 2 files changed, 5 insertions(+), 9 deletions(-)
arch/powerpc/mm/ptdump/ptdump.c renamed from arch/powerpc/mm/ptdump/ptdump.c~powerpcs390-ptdump-define-ptdump_check_wx-regardless-of-config_debug_wx +3 -4
@@ -184,13 +184,14 @@ static void note_prot_wx(struct pg_state {pte_t pte =__pte (st->current_flags); -if (!IS_ENABLED (CONFIG_DEBUG_WX ) || !st->check_wx) +if (!st->check_wx)return ;if (!pte_write (pte) || !pte_exec (pte))return ; -WARN_ONCE (1 ,"powerpc/mm: Found insecure W+X mapping at address %p/%pS\n" , +WARN_ONCE (IS_ENABLED (CONFIG_DEBUG_WX ), +"powerpc/mm: Found insecure W+X mapping at address %p/%pS\n" , (void *)st->start_address, (void *)st->start_address); st->wx_pages += (addr - st->start_address) /PAGE_SIZE ;
@@ -326,7 +327,6 @@ static void __init build_pgtable_complet pg_level[i].mask |= pg_level[i].flag[j].mask; } -#ifdef CONFIG_DEBUG_WXvoid ptdump_check_wx (void ) {struct pg_state st = {
@@ -354,7 +354,6 @@ void ptdump_check_wx(void)else pr_info ("Checked W+X mappings: passed, no W+X pages found\n" ); } -#endif static int __init ptdump_init (void ) {
arch/s390/mm/dump_pagetables.c renamed from arch/s390/mm/dump_pagetables.c~powerpcs390-ptdump-define-ptdump_check_wx-regardless-of-config_debug_wx +2 -5
@@ -121,7 +121,6 @@ static void print_prot(struct seq_file *static void note_prot_wx (struct pg_state *st,unsigned long addr) { -#ifdef CONFIG_DEBUG_WX if (!st->check_wx)return ;if (st->current_prot & _PAGE_INVALID)
@@ -138,10 +137,10 @@ static void note_prot_wx(struct pg_state*/ if (addr ==PAGE_SIZE && (nospec_uses_trampoline () || !static_key_enabled (&cpu_has_bear)))return ; -WARN_ONCE (1 ,"s390/mm: Found insecure W+X mapping at address %pS\n" , +WARN_ONCE (IS_ENABLED (CONFIG_DEBUG_WX ), +"s390/mm: Found insecure W+X mapping at address %pS\n" , (void *)st->start_address); st->wx_pages += (addr - st->start_address) /PAGE_SIZE ; -#endif /* CONFIG_DEBUG_WX */ }static void note_page (struct ptdump_state *pt_st,unsigned long addr,int level,u64 val)
@@ -193,7 +192,6 @@ static void note_page(struct ptdump_stat } } -#ifdef CONFIG_DEBUG_WXvoid ptdump_check_wx (void ) {struct pg_state st = {
@@ -226,7 +224,6 @@ void ptdump_check_wx(void) (nospec_uses_trampoline () || !static_key_enabled (&cpu_has_bear)) ? "unexpected " : ""); } -#endif /* CONFIG_DEBUG_WX */ #ifdef CONFIG_PTDUMP_DEBUGFS static int ptdump_show (struct seq_file *m,void *v)
_
Patches currently in -mm which might be from [email protected] are