Skip to content

Rewrite ret_from_fork() in C

Brian Gerst live-patching lkml 2 versions – Applied

Status from this message: The following commit has been merged into the x86/urgent branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 10 repliesApplied
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Fixed wrong address of pt_regs being passed
- Simplified 64-bit asm stub to not use a tail-call

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2x86/32: Remove schedule_tail_wrapper()arch/x86/entry/entry_32.S+10 -230 replies
2/2x86: Rewrite ret_from_fork() in Carch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/switch_to.h +1 more+40 -4910 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchPetr Mladek
1/2
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Rewrite ret_from_fork() in C

When kCFI is enabled, special handling is needed for the indirect call to the kernel thread function. Handling this in pure assembly is not simple, so moving it to C is more appropriate. Instead of moving just the indirect call to C as Peter Zijlstra has proposed, this patchset rewrites the whole ret_from_fork() function in C (other than some necessary asm glue remaning).

V2:
- Fixed wrong address of pt_regs being passed
- Simplified 64-bit asm stub to not use a tail-call

Brian Gerst (2):
x86/32: Remove schedule_tail_wrapper()
x86: Rewrite ret_from_fork() in C

 arch/x86/entry/entry_32.S        | 53 ++++++++------------------------
 arch/x86/entry/entry_64.S        | 33 +++++---------------
 arch/x86/include/asm/switch_to.h |  4 ++-
 arch/x86/kernel/process.c        | 22 ++++++++++++-
 4 files changed, 45 insertions(+), 67 deletions(-)
Signature · 1 line
2.41.0