Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'powerpc-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Madhavan Srinivasan:

- Couple of patches to fix KASAN failduring boot

- Fix to avoid warnings/errors when building with 4k page size

Thanks to Christophe Leroy, Ritesh Harjani (IBM), and Erhard Furtner

* tag 'powerpc-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC
powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline
powerpc/code-patching: Disable KASAN report during patching via temporary mm

+13 -3
+10 -2
arch/powerpc/include/asm/book3s/64/hash-4k.h
··· 77 77 /* 78 78 * With 4K page size the real_pte machinery is all nops. 79 79 */ 80 - #define __real_pte(e, p, o) ((real_pte_t){(e)}) 80 + static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep, int offset) 81 + { 82 + return (real_pte_t){pte}; 83 + } 84 + 81 85 #define __rpte_to_pte(r) ((r).pte) 82 - #define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> H_PAGE_F_GIX_SHIFT) 86 + 87 + static inline unsigned long __rpte_to_hidx(real_pte_t rpte, unsigned long index) 88 + { 89 + return pte_val(__rpte_to_pte(rpte)) >> H_PAGE_F_GIX_SHIFT; 90 + } 83 91 84 92 #define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \ 85 93 do { \
+3 -1
arch/powerpc/lib/code-patching.c
··· 108 108 unsigned long addr; 109 109 int err; 110 110 111 - area = get_vm_area(PAGE_SIZE, VM_ALLOC); 111 + area = get_vm_area(PAGE_SIZE, 0); 112 112 if (!area) { 113 113 WARN_ONCE(1, "Failed to create text area for cpu %d\n", 114 114 cpu); ··· 493 493 494 494 orig_mm = start_using_temp_mm(patching_mm); 495 495 496 + kasan_disable_current(); 496 497 err = __patch_instructions(patch_addr, code, len, repeat_instr); 498 + kasan_enable_current(); 497 499 498 500 /* context synchronisation performed by __patch_instructions */ 499 501 stop_using_temp_mm(patching_mm, orig_mm);