[lkml]   [2017]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: x86-64: Maintain 16-byte stack alignment
On Wed, Jan 11, 2017 at 11:51:10PM -0800, Andy Lutomirski wrote:
> The problem is that we have nasties like TRACE_IRQS_OFF. Performance

I don't understand. What's the issue with TRACE_IRQS_OFF? It should
be treated as any other function call. That is, enter it with an
aligned stack, and the TRACE_IRQS_OFF code itself should ensure
the stack stays aligned before it calls down into C.

> But if we can't do this with automatic verification, then I'm not sure
> I want to do it at all. The asm is already more precarious than I'd
> like, and having a code path that is misaligned is asking for obscure
> bugs down the road.

I understand the need for automated checks at this point in time.
But longer term this is just part of the calling ABI. After all,
we don't add checks everywhere to ensure people preserve rbx.

Email: Herbert Xu <>
Home Page:
PGP Key:

 \ /
  Last update: 2017-01-12 09:05    [W:0.106 / U:0.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site