1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 3 #ifndef _ASM_S390_KFENCE_H 4 #define _ASM_S390_KFENCE_H 5 6 #include <linux/mm.h> 7 #include <linux/kfence.h> 8 #include <asm/set_memory.h> 9 #include <asm/page.h> 10 11 void __kernel_map_pages(struct page *page, int 12 13 static __always_inline bool arch_kfence_init_p 14 { 15 return true; 16 } 17 18 #define arch_kfence_test_address(addr) ((addr) 19 20 /* 21 * Do not split kfence pool to 4k mapping with 22 * but earlier where page table allocations st 23 * Reason is that arch_kfence_init_pool() gets 24 * is still in a limbo state - disabling and e 25 * not yet allowed, but that is what our page_ 26 */ 27 static __always_inline void kfence_split_mappi 28 { 29 #ifdef CONFIG_KFENCE 30 unsigned long pool_pages = KFENCE_POOL 31 32 set_memory_4k((unsigned long)__kfence_ 33 #endif 34 } 35 36 static inline bool kfence_protect_page(unsigne 37 { 38 __kernel_map_pages(virt_to_page((void 39 return true; 40 } 41 42 #endif /* _ASM_S390_KFENCE_H */ 43
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.