Re: [PATCH] x86: pad assembly functions with INT3

From: H. Peter Anvin
Date: Wed May 09 2018 - 15:29:12 EST


On 05/09/18 09:55, Alexey Dobriyan wrote:
> On Mon, May 07, 2018 at 02:41:14PM -0700, hpa@xxxxxxxxx wrote:
>>> -#define __ALIGN .p2align 4, 0x90
>>> +#define __ALIGN .p2align 4, 0xCC
>>
>> Acked-by: H. Peter Anvin <h.peter.anvin@in tel.com>
>
> Thanks!
>
> If someone knows how to control _compiler_ inter-function padding,
> please tell.
>

I think I have a gcc feature enhancement request for that. It can't be
done without gcc's knowledge of when a fallthrough is happening (I
presume you took that into account in your patch set.)

-hpa