All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 0/9] powerpc/code-patching: Use temporary mm for Radix MMU
@ 2022-11-09  4:51 Benjamin Gray
  2022-11-09  4:51 ` [PATCH v10 1/9] powerpc: Allow clearing and restoring registers independent of saved breakpoint state Benjamin Gray
                   ` (9 more replies)
  0 siblings, 10 replies; 23+ messages in thread
From: Benjamin Gray @ 2022-11-09  4:51 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: ajd, jniethe5, Benjamin Gray, npiggin, cmr

This is a revision of Chris and Jordan's series to introduce a per-cpu temporary
mm to be used for patching with strict rwx on radix mmus.

v10:	* Don't set poking_init_enabled on boot CPU init failure
	* Remove extern from functions in files touched by this series
	* Changed book3s/32/tlbflush.h stub body from warning to build bug
	* Remove empty hash__ set of functions. Also removed the ones that are
	  just warnings (would have preferred to make them build bugs, but they
	  blocked the build even though it's all inline inside a radix_enabled()
	  if-block).
	  	- It's not possible to use the radix specific necessary TLB flush
		  in code patching, as code-patching.c is compiled even when radix__*
		  functions aren't visible. #ifdefs would be required.
		  The cxl usage required radix__* be visible anyway, so there is no
		  compile issue.
	* Mention cache benefits of struct of patching context variables
	* Don't open-code mm init and teardown. It seems tlb_gather_mmu does
	  the necessary steps to detect page table pages to free, so it should
	  not leak. get_locked_pte() is used over __get_locked_pte() because I
	  don't know what makes the double-underscore function dangerous.

Previous versions:
v9: https://lore.kernel.org/all/20221025044409.448755-1-bgray@linux.ibm.com/
v8: https://lore.kernel.org/all/20221021052238.580986-1-bgray@linux.ibm.com/
v7: https://lore.kernel.org/all/20211110003717.1150965-1-jniethe5@gmail.com/
v6: https://lore.kernel.org/all/20210911022904.30962-1-cmr@bluescreens.de/
v5: https://lore.kernel.org/all/20210713053113.4632-1-cmr@linux.ibm.com/
v4: https://lore.kernel.org/all/20210429072057.8870-1-cmr@bluescreens.de/
v3: https://lore.kernel.org/all/20200827052659.24922-1-cmr@codefail.de/
v2: https://lore.kernel.org/all/20200709040316.12789-1-cmr@informatik.wtf/
v1: https://lore.kernel.org/all/20200603051912.23296-1-cmr@informatik.wtf/
RFC: https://lore.kernel.org/all/20200323045205.20314-1-cmr@informatik.wtf/
x86: https://lore.kernel.org/kernel-hardening/20190426232303.28381-1-nadav.amit@gmail.com/

Benjamin Gray (9):
  powerpc: Allow clearing and restoring registers independent of saved
    breakpoint state
  powerpc/code-patching: Use WARN_ON and fix check in poking_init
  powerpc/mm: Remove extern from function prototypes
  powerpc/mm: Remove empty hash__ functions
  cxl: Use radix__flush_all_mm instead of generic flush_all_mm
  powerpc/mm: Remove flush_all_mm, local_flush_all_mm
  powerpc/tlb: Add local flush for page given mm_struct and psize
  powerpc/code-patching: Use temporary mm for Radix MMU
  powerpc/code-patching: Consolidate and cache per-cpu patching context

 arch/powerpc/include/asm/book3s/32/tlbflush.h |   9 +
 .../include/asm/book3s/64/tlbflush-hash.h     |  69 +-----
 arch/powerpc/include/asm/book3s/64/tlbflush.h |  41 +---
 arch/powerpc/include/asm/debug.h              |   2 +
 arch/powerpc/include/asm/mmu_context.h        |   6 +-
 arch/powerpc/include/asm/nohash/tlbflush.h    |  27 ++-
 arch/powerpc/kernel/process.c                 |  38 +++-
 arch/powerpc/lib/code-patching.c              | 207 ++++++++++++++++--
 arch/powerpc/mm/nohash/tlb.c                  |   8 +
 9 files changed, 287 insertions(+), 120 deletions(-)


base-commit: 247f34f7b80357943234f93f247a1ae6b6c3a740
--
2.38.1

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

end of thread, other threads:[~2022-12-16  0:33 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09  4:51 [PATCH v10 0/9] powerpc/code-patching: Use temporary mm for Radix MMU Benjamin Gray
2022-11-09  4:51 ` [PATCH v10 1/9] powerpc: Allow clearing and restoring registers independent of saved breakpoint state Benjamin Gray
2022-11-09  4:51 ` [PATCH v10 2/9] powerpc/code-patching: Use WARN_ON and fix check in poking_init Benjamin Gray
2022-11-09  6:12   ` Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 3/9] powerpc/mm: Remove extern from function prototypes Benjamin Gray
2022-11-09  6:16   ` Christophe Leroy
2022-11-25  3:12   ` Andrew Donnellan
2022-11-09  4:51 ` [PATCH v10 4/9] powerpc/mm: Remove empty hash__ functions Benjamin Gray
2022-11-09  6:16   ` Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 5/9] cxl: Use radix__flush_all_mm instead of generic flush_all_mm Benjamin Gray
2022-11-09  6:16   ` Christophe Leroy
2022-11-25  2:42   ` Andrew Donnellan
2022-11-09  4:51 ` [PATCH v10 6/9] powerpc/mm: Remove flush_all_mm, local_flush_all_mm Benjamin Gray
2022-11-09  6:17   ` Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 7/9] powerpc/tlb: Add local flush for page given mm_struct and psize Benjamin Gray
2022-11-09  6:18   ` Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 8/9] powerpc/code-patching: Use temporary mm for Radix MMU Benjamin Gray
2022-12-15 20:17   ` Nathan Chancellor
2022-12-15 20:17     ` Nathan Chancellor
2022-12-16  0:23     ` Michael Ellerman
2022-11-09  4:51 ` [PATCH v10 9/9] powerpc/code-patching: Consolidate and cache per-cpu patching context Benjamin Gray
2022-11-09  6:23   ` Christophe Leroy
2022-12-08 12:39 ` [PATCH v10 0/9] powerpc/code-patching: Use temporary mm for Radix MMU Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.