Home
last modified time | relevance | path

Searched hist:"8 c42819b" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/arch/x86/entry/
H A Dcalling.h8c42819b Fri May 06 07:14:34 CDT 2022 Peter Zijlstra <peterz@infradead.org> x86/entry: Use PUSH_AND_CLEAR_REGS for compat

Since the upper regs don't exist for ia32 code, preserving them
doesn't hurt and it simplifies the code.

This doesn't add any attack surface that would not already be
available through INT80.

Notably:

- 32bit SYSENTER: didn't clear si, dx, cx.

- 32bit SYSCALL, INT80: *do* clear si since the C functions don't
take a second argument.

- 64bit: didn't clear si since the C functions take a second
argument; except the error_entry path might have only one argument,
so clearing si was missing here.

32b SYSENTER should be clearing all those 3 registers, nothing uses them
and selftests pass.

Unconditionally clear rsi since it simplifies code.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220506121631.293889636@infradead.org
H A Dentry_64_compat.S8c42819b Fri May 06 07:14:34 CDT 2022 Peter Zijlstra <peterz@infradead.org> x86/entry: Use PUSH_AND_CLEAR_REGS for compat

Since the upper regs don't exist for ia32 code, preserving them
doesn't hurt and it simplifies the code.

This doesn't add any attack surface that would not already be
available through INT80.

Notably:

- 32bit SYSENTER: didn't clear si, dx, cx.

- 32bit SYSCALL, INT80: *do* clear si since the C functions don't
take a second argument.

- 64bit: didn't clear si since the C functions take a second
argument; except the error_entry path might have only one argument,
so clearing si was missing here.

32b SYSENTER should be clearing all those 3 registers, nothing uses them
and selftests pass.

Unconditionally clear rsi since it simplifies code.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220506121631.293889636@infradead.org