diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-03 17:22:39 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-09-09 05:21:35 +0300 |
commit | a1d826d475aafe63775b910e86ccd1bcf1e5a6e1 (patch) | |
tree | 4be9e9eae9c63c9079e56d5085bc300457a341a8 /arch/x86/include/asm/page_32_types.h | |
parent | 999c83e8ffd90caa00ee6caf054e037cf8a27d0e (diff) | |
download | linux-a1d826d475aafe63775b910e86ccd1bcf1e5a6e1.tar.xz |
x86: make TASK_SIZE_MAX usable from assembly code
For 64-bit the only thing missing was a strategic _AC, and for 32-bit we
need to use __PAGE_OFFSET instead of PAGE_OFFSET in the TASK_SIZE
definition to escape the explicit unsigned long cast. This just works
because __PAGE_OFFSET is defined using _AC itself and thus never needs
the cast anyway.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/include/asm/page_32_types.h')
-rw-r--r-- | arch/x86/include/asm/page_32_types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/page_32_types.h b/arch/x86/include/asm/page_32_types.h index 26236925fb2c..f462895a33e4 100644 --- a/arch/x86/include/asm/page_32_types.h +++ b/arch/x86/include/asm/page_32_types.h @@ -44,8 +44,8 @@ /* * User space process size: 3GB (default). */ -#define IA32_PAGE_OFFSET PAGE_OFFSET -#define TASK_SIZE PAGE_OFFSET +#define IA32_PAGE_OFFSET __PAGE_OFFSET +#define TASK_SIZE __PAGE_OFFSET #define TASK_SIZE_LOW TASK_SIZE #define TASK_SIZE_MAX TASK_SIZE #define DEFAULT_MAP_WINDOW TASK_SIZE |