Skip to content

Commit b265854

Browse files
Alexander Gordeevhcahca
authored andcommitted
s390/pgtable: add REGION3_KERNEL_EXEC protection
Similar to existing PAGE_KERNEL_EXEC and SEGMENT_KERNEL_EXEC memory protection add REGION3_KERNEL_EXEC attribute that could be set on PUD pgtable entries. Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent bf2b4af commit b265854

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/s390/include/asm/pgtable.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,12 @@ static inline int is_module_addr(void *addr)
477477
_REGION3_ENTRY_YOUNG | \
478478
_REGION_ENTRY_PROTECT | \
479479
_REGION_ENTRY_NOEXEC)
480+
#define REGION3_KERNEL_EXEC __pgprot(_REGION_ENTRY_TYPE_R3 | \
481+
_REGION3_ENTRY_LARGE | \
482+
_REGION3_ENTRY_READ | \
483+
_REGION3_ENTRY_WRITE | \
484+
_REGION3_ENTRY_YOUNG | \
485+
_REGION3_ENTRY_DIRTY)
480486

481487
static inline bool mm_p4d_folded(struct mm_struct *mm)
482488
{

0 commit comments

Comments
 (0)