Commit 2245096a authored by Ma Wupeng's avatar Ma Wupeng Committed by Wupeng Ma
Browse files

arm64: mm: Use subsequent bits to improve future compatibility for pbha

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I96IZH



--------------------------------

Use subsequent bits to improve future compatibility which avoid conflicts
during backport.

Fixes: 5c5063ac ("arm64: mm: Introduce VM_PBHA_BIT0 to enable pbha bit0 for single vma")
Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
parent c90d7457
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,6 +6,6 @@

#define PROT_BTI	0x10		/* BTI guarded page */
#define PROT_MTE	0x20		/* Normal Tagged mapping */
#define PROT_PBHA_BIT0	0x40		/* PBHA 59 bit */
#define PROT_PBHA_BIT0	0x1000		/* PBHA 59 bit */

#endif /* ! _UAPI__ASM_MMAN_H */
+3 −1
Original line number Diff line number Diff line
@@ -340,11 +340,13 @@ extern unsigned int kobjsize(const void *objp);
#define VM_HIGH_ARCH_BIT_2	34	/* bit only usable on 64-bit architectures */
#define VM_HIGH_ARCH_BIT_3	35	/* bit only usable on 64-bit architectures */
#define VM_HIGH_ARCH_BIT_4	36	/* bit only usable on 64-bit architectures */
#define VM_HIGH_ARCH_BIT_7	39	/* bit only usable on 64-bit architectures */
#define VM_HIGH_ARCH_0	BIT(VM_HIGH_ARCH_BIT_0)
#define VM_HIGH_ARCH_1	BIT(VM_HIGH_ARCH_BIT_1)
#define VM_HIGH_ARCH_2	BIT(VM_HIGH_ARCH_BIT_2)
#define VM_HIGH_ARCH_3	BIT(VM_HIGH_ARCH_BIT_3)
#define VM_HIGH_ARCH_4	BIT(VM_HIGH_ARCH_BIT_4)
#define VM_HIGH_ARCH_7	BIT(VM_HIGH_ARCH_BIT_7)
#endif /* CONFIG_ARCH_USES_HIGH_VMA_FLAGS */

#ifdef CONFIG_ARCH_HAS_PKEYS
@@ -393,7 +395,7 @@ extern unsigned int kobjsize(const void *objp);
#endif

#if defined(CONFIG_ARM64_PBHA)
# define VM_PBHA_BIT0	VM_HIGH_ARCH_2	/* Page Base Hardware Attributes 4 bit*/
# define VM_PBHA_BIT0	VM_HIGH_ARCH_7	/* Page Base Hardware Attributes 4 bit*/
#else
# define VM_PBHA_BIT0	VM_NONE
#endif
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#define PROT_SEM	0x8		/* page may be used for atomic ops */
/*			0x10		   reserved for arch-specific use */
/*			0x20		   reserved for arch-specific use */
/*			0x40		   reserved for arch-specific use */
/*			0x1000		   reserved for arch-specific use */
#define PROT_NONE	0x0		/* page can not be accessed */
#define PROT_GROWSDOWN	0x01000000	/* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP	0x02000000	/* mprotect flag: extend change to end of growsup vma */
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#define PROT_SEM	0x8		/* page may be used for atomic ops */
/*			0x10		   reserved for arch-specific use */
/*			0x20		   reserved for arch-specific use */
/*			0x1000		   reserved for arch-specific use */
#define PROT_NONE	0x0		/* page can not be accessed */
#define PROT_GROWSDOWN	0x01000000	/* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP	0x02000000	/* mprotect flag: extend change to end of growsup vma */