diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-03-25 22:29:03 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-04-11 23:13:33 +1000 |
commit | d195ce4695ca1061993424e2d6c8995e5fc81606 (patch) | |
tree | 980e31fa5e29ce9c3ea8157bbb1a21fd65080a34 /arch/powerpc/kernel/interrupt_64.S | |
parent | powerpc: differentiate kthread from user kernel thread start (diff) | |
download | linux-d195ce4695ca1061993424e2d6c8995e5fc81606.tar.gz linux-d195ce4695ca1061993424e2d6c8995e5fc81606.tar.bz2 linux-d195ce4695ca1061993424e2d6c8995e5fc81606.zip |
powerpc: copy_thread don't set _TIF_RESTOREALL
In the kernel user thread path, don't set _TIF_RESTOREALL because
the thread is required to call kernel_execve() before it returns,
which will set _TIF_RESTOREALL if necessary via start_thread().
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230325122904.2375060-8-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/interrupt_64.S')
-rw-r--r-- | arch/powerpc/kernel/interrupt_64.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/interrupt_64.S b/arch/powerpc/kernel/interrupt_64.S index a44c8aab63ec..2a059214c1a9 100644 --- a/arch/powerpc/kernel/interrupt_64.S +++ b/arch/powerpc/kernel/interrupt_64.S @@ -748,6 +748,11 @@ _GLOBAL(ret_from_kernel_user_thread) #endif bctrl li r3,0 + /* + * It does not matter whether this returns via the scv or sc path + * because it returns as execve() and therefore has no calling ABI + * (i.e., it sets registers according to the exec()ed entry point). + */ b .Lsyscall_exit _GLOBAL(start_kernel_thread) |