powerpc/code-patching: Use temporary mm for Radix MMU
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v10 Latest9 patches 12 repliesIn review
- v97 patches 18 repliesSuperseded
- v86 patches 10 repliesSuperseded
Patches in v10 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | powerpc: Allow clearing and restoring registers independent of saved breakpoint statearch/ arch/ | +37 | 0 replies | |
| 2/9 | powerpc/code-patching: Use WARN_ON and fix check in poking_initarch/ | +9 | 1 reply | |
| 3/9 | powerpc/mm: Remove extern from function prototypesarch/ arch/ | +18 | 2 replies | |
| 4/9 | powerpc/mm: Remove empty hash__ functionsarch/ arch/ | +9 | 1 reply | |
| 5/9 | cxl: Use radix__flush_all_mm instead of generic flush_all_mmarch/ | +3 | 2 replies | |
| 6/9 | powerpc/mm: Remove flush_all_mm, local_flush_all_mmarch/ arch/ | +0 | 1 reply | |
| 7/9 | powerpc/tlb: Add local flush for page given mm_struct and psizearch/ arch/ arch/ +1 more | +31 | 1 reply | |
| 8/9 | powerpc/code-patching: Use temporary mm for Radix MMUarch/ | +172 | 2 replies | |
| 9/9 | powerpc/code-patching: Consolidate and cache per-cpu patching contextarch/ | +30 | 1 reply |
Reviews trailers per patch
6 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Christophe Leroy | Andrew Donnellan |
|---|---|---|
| 1/9 | ||
| 2/9 | R-b | |
| 3/9 | R-b | R-b |
| 4/9 | R-b | |
| 5/9 | R-b | R-b |
| 6/9 | R-b | |
| 7/9 | R-b | |
| 8/9 | ||
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v10 0/9] powerpc/code-patching: Use temporary mm for Radix MMU
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/[email protected]/
v8: https://lore.kernel.org/all/[email protected]/
v7: https://lore.kernel.org/all/[email protected]/
v6: https://lore.kernel.org/all/[email protected]/
v5: https://lore.kernel.org/all/[email protected]/
v4: https://lore.kernel.org/all/[email protected]/
v3: https://lore.kernel.org/all/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
RFC: https://lore.kernel.org/all/[email protected]/
x86: https://lore.kernel.org/kernel-hardening/[email protected]/
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