Re: [PATCH 05/15] x86: Implement function_nocfi

From: Andy Lutomirski
Date: Mon Apr 19 2021 - 13:46:25 EST



> On Apr 19, 2021, at 8:26 AM, David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> From: Andy Lutomirski
>> Sent: 18 April 2021 01:12
> ..
>> Slightly more complicated:
>>
>> struct opaque_symbol;
>> extern struct opaque_symbol entry_SYSCALL_64;
>>
>> The opaque_symbol variant avoids any possible confusion over the weird
>> status of arrays in C, and it's hard to misuse, since struct
>> opaque_symbol is an incomplete type.
>
> Maybe:
>
> s/opaque_symbol/entry_SYSCALL_64/
>

Cute. OTOH, I’m not sure whether that has much benefit, and having a single type for all of this allows it to be declared just once. I suppose the magic could be wrapped in a macro, though.

> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)