On Tue, Jun 5, 2018 at 2:31 PM Arnd Bergmann wrote:
>
> On Tue, Jun 5, 2018 at 11:28 PM, Arnd Bergmann wrote:
> > On Tue, Jun 5, 2018 at 7:05 PM, Nick Desaulniers
> > wrote:
> >>
> >> The semantics of extern inline has changed since gnu89. This means that
> >> folks using GCC versions >= 5.1 may
On Tue, Jun 5, 2018 at 11:28 PM, Arnd Bergmann wrote:
> On Tue, Jun 5, 2018 at 7:05 PM, Nick Desaulniers
> wrote:
>>
>> The semantics of extern inline has changed since gnu89. This means that
>> folks using GCC versions >= 5.1 may see symbol redefinition errors at
>> link time for subdirs that ov
On Tue, Jun 5, 2018 at 7:05 PM, Nick Desaulniers
wrote:
>
> The semantics of extern inline has changed since gnu89. This means that
> folks using GCC versions >= 5.1 may see symbol redefinition errors at
> link time for subdirs that override KBUILD_CFLAGS (making the C standard
> used implicit) re
On 06/05/18 10:52, Nick Desaulniers wrote:
>
> Does the kernel have a different calling convention for 32b x86? How
> does that work? regparm=3? Does that need to be added to the
> declaration?
>
Yes, -mregparm=3. No, doesn't need to be added to the declaration.
>> Something like this added t
On 06/05/18 10:28, H. Peter Anvin wrote:
> On 06/05/18 10:05, Nick Desaulniers wrote:
>> +
>> +/*
>> + * void native_restore_fl(unsigned long flags)
>> + * %rdi: flags
>> + */
>> +ENTRY(native_restore_fl)
>> +push %_ASM_DI
>> +popf
>> +ret
>> +ENDPROC(native_restore_fl)
>> +EXPORT_SYMBO
On Tue, Jun 5, 2018 at 7:31 PM, H. Peter Anvin wrote:
> On 06/05/18 10:28, H. Peter Anvin wrote:
>> On 06/05/18 10:05, Nick Desaulniers wrote:
>>> +
>>> +/*
>>> + * void native_restore_fl(unsigned long flags)
>>> + * %rdi: flags
>>> + */
>>> +ENTRY(native_restore_fl)
>>> +push %_ASM_DI
>>> +
On 06/05/18 10:28, H. Peter Anvin wrote:
> On 06/05/18 10:05, Nick Desaulniers wrote:
>> +
>> +/*
>> + * void native_restore_fl(unsigned long flags)
>> + * %rdi: flags
>> + */
>> +ENTRY(native_restore_fl)
>> +push %_ASM_DI
>> +popf
>> +ret
>> +ENDPROC(native_restore_fl)
>> +EXPORT_SYMBO
On 06/05/18 10:05, Nick Desaulniers wrote:
> +
> +/*
> + * void native_restore_fl(unsigned long flags)
> + * %rdi: flags
> + */
> +ENTRY(native_restore_fl)
> + push %_ASM_DI
> + popf
> + ret
> +ENDPROC(native_restore_fl)
> +EXPORT_SYMBOL(native_restore_fl)
>
To work on i386, this woul
native_save_fl() is marked static inline, but by using it as
a function pointer in arch/x86/kernel/paravirt.c, it MUST be outlined.
paravirt's use of native_save_fl() also requires that no GPRs other than
%rax are clobbered.
Compilers have different heuristics which they use to emit stack guard
c