Skip to content

riscv: entry: further clean up and VMAP_STACK fix

Jisheng Zhang linux-riscv lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 2 repliesIn review
  2. v24 patches 13 repliesSuperseded
  3. v14 patches 11 repliesSuperseded

Changes in v3 from the cover letter

- the patch of removing wrappers of trace_hardirqs_{on,off} is in Guo's v6 generic entry series[2], so remove it.
- add a new patch to fix kernel info leakage.
- collect Acked-by tag.
- the GP saving and restoring macros range from x5 to x31 now per Guo's suggestion.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4riscv: process: fix kernel info leakagearch/riscv/kernel/process.c+2 -01 reply
2/4riscv: consolidate ret_from_kernel_thread into ret_from_forkarch/riscv/kernel/entry.S arch/riscv/kernel/process.c+5 -110 replies
3/4riscv: fix race when vmap stack overflow and remove shadow_stackarch/riscv/include/asm/asm-prototypes.h arch/riscv/include/asm/thread_info.h arch/riscv/kernel/asm-offsets.c +2 more+28 -650 replies
4/4riscv: entry: consolidate general regs saving/restoringarch/riscv/include/asm/asm.h arch/riscv/kernel/entry.S arch/riscv/kernel/mcount-dyn.S+68 -1351 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchGuo Ren
1/4R-b
2/4A-b
3/4
4/4R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/4] riscv: entry: further clean up and VMAP_STACK fix

I planed to do similar generic entry transaction as Guo Ren did[1], and I had some commits in local. Since Guo has sent out the series, I dropped my version and just provide those in my local repo but missing in Guo's series. However, this doesn't mean this series depends on Guo's series, in fact except the first one, the remaining three patches are independent on generic entry.

Since v2:
- the patch of removing wrappers of trace_hardirqs_{on,off} is in Guo's v6 generic entry series[2], so remove it.
- add a new patch to fix kernel info leakage.
- collect Acked-by tag.
- the GP saving and restoring macros range from x5 to x31 now per Guo's suggestion.

Since v1:
- consolidate gp saving/restoring in mcount-dyn.S as well
- avoid non-trival memory waste if NR_CPUs is large
- collect Reviewed-by tag.

[1]https://lore.kernel.org/linux-riscv/[email protected]/T/#t [2]https://lore.kernel.org/linux-riscv/[email protected]/T/#t

Jisheng Zhang (4):
riscv: process: fix kernel info leakage
riscv: consolidate ret_from_kernel_thread into ret_from_fork
riscv: fix race when vmap stack overflow and remove shadow_stack
riscv: entry: consolidate general regs saving/restoring

 arch/riscv/include/asm/asm-prototypes.h |   1 -
 arch/riscv/include/asm/asm.h            |  63 ++++++++++
 arch/riscv/include/asm/thread_info.h    |   3 -
 arch/riscv/kernel/asm-offsets.c         |   1 +
 arch/riscv/kernel/entry.S               | 151 +++---------------------
 arch/riscv/kernel/mcount-dyn.S          |  56 +--------
 arch/riscv/kernel/process.c             |   7 +-
 arch/riscv/kernel/traps.c               |  32 ++---
 8 files changed, 103 insertions(+), 211 deletions(-)
Signature · 1 line
2.37.2