summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/skas/clone.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-04-14 15:46:39 +0200
committerRichard Weinberger <richard@nod.at>2023-04-20 23:08:43 +0200
commit6032aca0deb9c138df122192f8ef02de1fdccf25 (patch)
treef9acfe2a2c09cfa1b3a86351b8bdf2ccd8fa48ef /arch/um/kernel/skas/clone.c
parentfc54a4f15988e228cf88f888483e985c5f35031e (diff)
downloadlinux-6032aca0deb9c138df122192f8ef02de1fdccf25.tar.gz
linux-6032aca0deb9c138df122192f8ef02de1fdccf25.tar.bz2
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/kernel/skas/clone.c')
-rw-r--r--arch/um/kernel/skas/clone.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/kernel/skas/clone.c b/arch/um/kernel/skas/clone.c
index ff5061f29167..62435187dda4 100644
--- a/arch/um/kernel/skas/clone.c
+++ b/arch/um/kernel/skas/clone.c
@@ -24,11 +24,12 @@
void __attribute__ ((__section__ (".__syscall_stub")))
stub_clone_handler(void)
{
- struct stub_data *data = get_stub_page();
+ struct stub_data *data = get_stub_data();
long err;
err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
- (unsigned long)data + UM_KERN_PAGE_SIZE / 2);
+ (unsigned long)data +
+ STUB_DATA_PAGES * UM_KERN_PAGE_SIZE / 2);
if (err) {
data->parent_err = err;
goto done;