Re: [PATCH v4 3/9] x86/entry: Convert ret_from_fork to C

From: Josh Poimboeuf
Date: Wed Mar 17 2021 - 20:42:43 EST


On Wed, Mar 17, 2021 at 11:12:42AM -0700, Andy Lutomirski wrote:
> ret_from_fork is written in asm, slightly differently, for x86_32 and
> x86_64. Convert it to C.
>
> This is a straight conversion without any particular cleverness. As a
> further cleanup, the code that sets up the ret_from_fork argument registers
> could be adjusted to put the arguments in the correct registers.
>
> This will cause the ORC unwinder to find pt_regs even for kernel threads on
> x86_64. This seems harmless.
>
> The 32-bit comment above the now-deleted schedule_tail_wrapper was
> obsolete: the encode_frame_pointer mechanism (see copy_thread()) solves the
> same problem more cleanly.
>
> Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxx>

Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

--
Josh