diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-04-14 15:46:39 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2023-04-20 23:08:43 +0200 |
commit | 6032aca0deb9c138df122192f8ef02de1fdccf25 (patch) | |
tree | f9acfe2a2c09cfa1b3a86351b8bdf2ccd8fa48ef /arch/um/include/shared/as-layout.h | |
parent | um: prevent user code in modules (diff) | |
download | linux-6032aca0deb9c138df122192f8ef02de1fdccf25.tar.xz linux-6032aca0deb9c138df122192f8ef02de1fdccf25.zip |
um: make stub data pages size tweakable
There's a lot of code here that hard-codes that the
data is a single page, and right now that seems to
be sufficient, but to make it easier to change this
in the future, add a new STUB_DATA_PAGES constant
and use it throughout the code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include/shared/as-layout.h')
-rw-r--r-- | arch/um/include/shared/as-layout.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h index 9a0bd648d872..9ec3015bc5e2 100644 --- a/arch/um/include/shared/as-layout.h +++ b/arch/um/include/shared/as-layout.h @@ -23,7 +23,8 @@ #define STUB_START stub_start #define STUB_CODE STUB_START #define STUB_DATA (STUB_CODE + UM_KERN_PAGE_SIZE) -#define STUB_END (STUB_DATA + UM_KERN_PAGE_SIZE) +#define STUB_DATA_PAGES 1 /* must be a power of two */ +#define STUB_END (STUB_DATA + STUB_DATA_PAGES * UM_KERN_PAGE_SIZE) #ifndef __ASSEMBLY__ |