diff options
| author | Benjamin Berg <benjamin.berg@intel.com> | 2024-09-19 14:45:11 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2024-10-10 13:37:22 +0200 |
| commit | 41ab5fe7471ff38d2909d1c93b88197a89c6a00f (patch) | |
| tree | ea76a3b75fd7d8d2b7a4be194e74081113d0b595 /arch/um/include/asm/page.h | |
| parent | um: clear all memory in new userspace processes (diff) | |
| download | linux-41ab5fe7471ff38d2909d1c93b88197a89c6a00f.tar.gz linux-41ab5fe7471ff38d2909d1c93b88197a89c6a00f.zip | |
um: Switch to 4 level page tables on 64 bit
The larger memory space is useful to support more applications inside
UML. One example for this is ASAN instrumentation of userspace
applications which requires addresses that would otherwise not be
available.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20240919124511.282088-11-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/include/asm/page.h')
| -rw-r--r-- | arch/um/include/asm/page.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h index 8d2ac5e86cf5..f0ad80fc8c10 100644 --- a/arch/um/include/asm/page.h +++ b/arch/um/include/asm/page.h @@ -35,14 +35,22 @@ struct page; typedef struct { unsigned long pte; } pte_t; typedef struct { unsigned long pgd; } pgd_t; -#ifdef CONFIG_3_LEVEL_PGTABLES +#if CONFIG_PGTABLE_LEVELS > 2 + typedef struct { unsigned long pmd; } pmd_t; #define pmd_val(x) ((x).pmd) #define __pmd(x) ((pmd_t) { (x) } ) -#endif -#define pte_val(x) ((x).pte) +#if CONFIG_PGTABLE_LEVELS > 3 +typedef struct { unsigned long pud; } pud_t; +#define pud_val(x) ((x).pud) +#define __pud(x) ((pud_t) { (x) } ) + +#endif /* CONFIG_PGTABLE_LEVELS > 3 */ +#endif /* CONFIG_PGTABLE_LEVELS > 2 */ + +#define pte_val(x) ((x).pte) #define pte_get_bits(p, bits) ((p).pte & (bits)) #define pte_set_bits(p, bits) ((p).pte |= (bits)) |
