Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -fixes 0/2] Fix WX mappings in the linear mapping after module unloading
@ 2023-12-13 13:40 Alexandre Ghiti
  2023-12-13 13:40 ` [PATCH -fixes 1/2] riscv: Fix module_alloc() that did not reset the linear mapping permissions Alexandre Ghiti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexandre Ghiti @ 2023-12-13 13:40 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Vincent Chen, Zong Li,
	linux-riscv, linux-kernel
  Cc: Alexandre Ghiti

I fell onto a bunch of WX mappings in the linear mapping after a module
gets unloaded, this is because our module_alloc() does not set the
VM_FLUSH_RESET_PERMS flag (patch 1) and that
set_direct_map_default_noflush() must clean the X bit (patch 2).

Note that the Fixes tags are correct but patch 2 will fail to apply
since a change in this function just landed in 6.7.

Alexandre Ghiti (2):
  riscv: Fix module_alloc() that did not reset the linear mapping
    permissions
  riscv: Fix set_direct_map_default_noflush() to reset _PAGE_EXEC

 arch/riscv/kernel/module.c | 3 ++-
 arch/riscv/mm/pageattr.c   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-21  3:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 13:40 [PATCH -fixes 0/2] Fix WX mappings in the linear mapping after module unloading Alexandre Ghiti
2023-12-13 13:40 ` [PATCH -fixes 1/2] riscv: Fix module_alloc() that did not reset the linear mapping permissions Alexandre Ghiti
2023-12-13 13:40 ` [PATCH -fixes 2/2] riscv: Fix set_direct_map_default_noflush() to reset _PAGE_EXEC Alexandre Ghiti
2023-12-21  3:00 ` [PATCH -fixes 0/2] Fix WX mappings in the linear mapping after module unloading patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox