On Thu, 05 Dec 2024 22:58:52 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-12-05 at 22:56 +0900, Hajime Tazaki wrote:
> >
> > > > +++ b/arch/x86/um/asm/processor.h
> > > > @@ -38,6 +38,18 @@ static __always_inline void cpu_relax(void)
> > > >
> > > > #define task_pt_regs(t) (&(t)->thread.regs
On Thu, 2024-12-05 at 22:56 +0900, Hajime Tazaki wrote:
>
> > > +++ b/arch/x86/um/asm/processor.h
> > > @@ -38,6 +38,18 @@ static __always_inline void cpu_relax(void)
> > >
> > > #define task_pt_regs(t) (&(t)->thread.regs)
> > >
> > > +#ifndef CONFIG_MMU
> > > +#define task_top_of_stack(task)
On Thu, 05 Dec 2024 01:50:07 +0900,
Johannes Berg wrote:
>
> On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
> >
> > +++ b/arch/um/kernel/process.c
> > @@ -117,13 +117,17 @@ void new_thread_handler(void)
> > * callback returns only if the kernel thread execs a process
> > */
>
On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
>
> +++ b/arch/um/kernel/process.c
> @@ -117,13 +117,17 @@ void new_thread_handler(void)
>* callback returns only if the kernel thread execs a process
>*/
> fn(arg);
> +#ifndef CONFIG_MMU
> + arch_switch_to(current);
Since ptrace facility isn't used under !MMU of UML, there is different
code path to invoke processes/threads; on an entry to the syscall
interface, the stack pointer should be manipulated to handle vfork(2)
return address, no external process is used, and need to properly
configure some of register