Re: [PATCH v8 5/7] um: Discover host_task_size from envp

2024-09-19 Thread Tiwei Bie
On 2024/7/5 03:05, Benjamin Berg wrote: [...] > diff --git a/arch/x86/um/os-Linux/task_size.c > b/arch/x86/um/os-Linux/task_size.c > index 1dc9adc20b1c..a91599799b1a 100644 > --- a/arch/x86/um/os-Linux/task_size.c > +++ b/arch/x86/um/os-Linux/task_size.c > @@ -1,151 +1,19 @@ > // SPDX-License-Ide

[PATCH v8 5/7] um: Discover host_task_size from envp

2024-07-04 Thread Benjamin Berg
From: Benjamin Berg When loading the UML binary, the host kernel will place the stack at the highest possible address. It will then map the program name and environment variables onto the start of the stack. As such, an easy way to figure out the host_task_size is to use the highest pointer to a