Thread (13 messages) flat view 13 messages, 5 authors, 2022-01-12

Re: [RFC PATCH v2 1/2] rseq: x86: implement abort-at-ip extension

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2022-01-12 15:05:45
Also in: lkml

----- On Jan 12, 2022, at 9:58 AM, David Laight David.Laight@ACULAB.COM wrote:
quoted
 * [*] The openrisc, powerpc64 and x86-64 architectures define a "redzone" as a
 *     stack area beyond the stack pointer which can be used by the compiler
 *     to store local variables in leaf functions.
I wonder if that is really worth the trouble it causes!
By the time a function is spilling values to stack the cost
of a %sp update is almost certainly noise.

Someone clearly thought it was a 'good idea (tm)'.
I must admit that I've been surprised to learn about these redzones. Thanks for
pointing them out to me, it was clearly a blind spot. I suspect it would be useful
to introduce per-architecture KERNEL_REDZONE, USER_REDZONE and COMPAT_USER_REDZONE
with a asm-generic version defining them to 0, with proper documentation. It would
make it clearer to kernel developers working on stuff similar to signal handler
delivery that they need to consider these carefully.

Mathieu
David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT,
UK
Registration No: 1397386 (Wales)
-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help