mbox series

[-next,v3,0/2] powerpc: add support for syscall stack randomization

Message ID 20220701082435.126596-1-xiujianfeng@huawei.com (mailing list archive)
Headers show
Series powerpc: add support for syscall stack randomization | expand

Message

Xiu Jianfeng July 1, 2022, 8:24 a.m. UTC
Hi,

This patchset adds support for syscall stack randomization for
powerpc, which can make harder the various stack-based attacks that
rely on deterministic stack structure.

Changes in v3:
  -add a lead-up patch to move system_call_exception() to syscall.c to
  avoid disabling stack protector for all functions in interrupt.c
Changes in v2:
  -move choose choose_random_kstack_offset() to the end of system_call_exception
  -allow full 6 (10) bits of entropy
  -disable stack-protector for interrupt.c

Xiu Jianfeng (2):
  powerpc: Move system_call_exception() to syscall.c
  powerpc: add support for syscall stack randomization

 arch/powerpc/Kconfig            |   1 +
 arch/powerpc/kernel/Makefile    |   9 +-
 arch/powerpc/kernel/interrupt.c | 161 ---------------------------
 arch/powerpc/kernel/syscall.c   | 190 ++++++++++++++++++++++++++++++++
 4 files changed, 199 insertions(+), 162 deletions(-)
 create mode 100644 arch/powerpc/kernel/syscall.c

Comments

Michael Ellerman July 29, 2022, 1:03 p.m. UTC | #1
On Fri, 1 Jul 2022 16:24:33 +0800, Xiu Jianfeng wrote:
> This patchset adds support for syscall stack randomization for
> powerpc, which can make harder the various stack-based attacks that
> rely on deterministic stack structure.
> 
> Changes in v3:
>   -add a lead-up patch to move system_call_exception() to syscall.c to
>   avoid disabling stack protector for all functions in interrupt.c
> Changes in v2:
>   -move choose choose_random_kstack_offset() to the end of system_call_exception
>   -allow full 6 (10) bits of entropy
>   -disable stack-protector for interrupt.c
> 
> [...]

Applied to powerpc/next.

[1/2] powerpc: Move system_call_exception() to syscall.c
      https://git.kernel.org/powerpc/c/1547db7d1f4481c1f3ec731f3edc724ef3026ede
[2/2] powerpc: add support for syscall stack randomization
      https://git.kernel.org/powerpc/c/f4a0318f278d98d9492916722e85f258c2221f88

cheers