All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [committed, PATCH] Add -mshared option to x86 ELF assembler
       [not found]   ` <CAMe9rOrdqc1v7Dzm3T=CO2a7mVNypOXkAZMFxRMJwwcu61jxGQ@mail.gmail.com>
@ 2015-06-01 15:48     ` Andy Lutomirski
  2015-06-02  7:41       ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2015-06-01 15:48 UTC (permalink / raw)
  To: H.J. Lu, X86 ML, linux-kernel
  Cc: Markus Trippelsdorf, Binutils, Andy Lutomirski

On Mon, Jun 1, 2015 at 4:05 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Jun 1, 2015 at 1:32 AM, Markus Trippelsdorf
> <markus@trippelsdorf.de> wrote:
>> On 2015.05.15 at 03:34 -0700, H.J. Lu wrote:
>>> This patch adds -mshared option to x86 ELF assembler.  By default,
>>> assembler will optimize out non-PLT relocations against defined non-weak
>>> global branch targets with default visibility.  The -mshared option tells
>>> the assembler to generate code which may go into a shared library
>>> where all non-weak global branch targets with default visibility can
>>> be preempted.  The resulting code is slightly bigger.  This option
>>> only affects the handling of branch instructions.
>>>
>>> This Linux kernel patch is needed to create a working x86 Linux kernel if
>>> it hasn't been applied:
>>>
>>> diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
>>> index ae6588b..b91a00c 100644
>>> --- a/arch/x86/kernel/head_64.S
>>> +++ b/arch/x86/kernel/head_64.S
>>> @@ -339,8 +339,8 @@ early_idt_handlers:
>>>       i = i + 1
>>>       .endr
>>>
>>> -/* This is global to keep gas from relaxing the jumps */
>>> -ENTRY(early_idt_handler)
>>> +/* This is weak to keep gas from relaxing the jumps */
>>> +WEAK(early_idt_handler)
>>>       cld
>>
>> Have you posted the patch to LKML already?
>> (I hit this issue today and it took me a while to figure out the cause.)
>
> A kernel patch will be checked in soon.
>

It already is:

https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=x86/asm&id=cdeb6048940fa4bfb429e2f1cba0d28a11e20cd5

It's currently queued for 4.2.

Ingo, would it make sense to promote this to 4.1?  It's definitely a
violation of the "no development after the merge window" rule, but
it's sort of a build fix.  Alternatively, we could ask Greg et al to
backport it.

--Andy

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [committed, PATCH] Add -mshared option to x86 ELF assembler
  2015-06-01 15:48     ` [committed, PATCH] Add -mshared option to x86 ELF assembler Andy Lutomirski
@ 2015-06-02  7:41       ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2015-06-02  7:41 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: H.J. Lu, X86 ML, linux-kernel, Markus Trippelsdorf, Binutils,
	Andy Lutomirski, Linus Torvalds, Greg Kroah-Hartman


* Andy Lutomirski <luto@amacapital.net> wrote:

> On Mon, Jun 1, 2015 at 4:05 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > On Mon, Jun 1, 2015 at 1:32 AM, Markus Trippelsdorf
> > <markus@trippelsdorf.de> wrote:
> >> On 2015.05.15 at 03:34 -0700, H.J. Lu wrote:
> >>> This patch adds -mshared option to x86 ELF assembler.  By default,
> >>> assembler will optimize out non-PLT relocations against defined non-weak
> >>> global branch targets with default visibility.  The -mshared option tells
> >>> the assembler to generate code which may go into a shared library
> >>> where all non-weak global branch targets with default visibility can
> >>> be preempted.  The resulting code is slightly bigger.  This option
> >>> only affects the handling of branch instructions.
> >>>
> >>> This Linux kernel patch is needed to create a working x86 Linux kernel if
> >>> it hasn't been applied:
> >>>
> >>> diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
> >>> index ae6588b..b91a00c 100644
> >>> --- a/arch/x86/kernel/head_64.S
> >>> +++ b/arch/x86/kernel/head_64.S
> >>> @@ -339,8 +339,8 @@ early_idt_handlers:
> >>>       i = i + 1
> >>>       .endr
> >>>
> >>> -/* This is global to keep gas from relaxing the jumps */
> >>> -ENTRY(early_idt_handler)
> >>> +/* This is weak to keep gas from relaxing the jumps */
> >>> +WEAK(early_idt_handler)
> >>>       cld
> >>
> >> Have you posted the patch to LKML already?
> >> (I hit this issue today and it took me a while to figure out the cause.)
> >
> > A kernel patch will be checked in soon.
> >
> 
> It already is:
> 
> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=x86/asm&id=cdeb6048940fa4bfb429e2f1cba0d28a11e20cd5
> 
> It's currently queued for 4.2.
> 
> Ingo, would it make sense to promote this to 4.1?  It's definitely a violation 
> of the "no development after the merge window" rule, but it's sort of a build 
> fix. [...]

Yeah, agreed - the commit was problem-free in testing, so I've cherry-picked it 
over into tip:x86/urgent and will push it to Linus for v4.1.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-02  7:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20150515103414.GA20518@intel.com>
     [not found] ` <20150601083214.GA381@x4>
     [not found]   ` <CAMe9rOrdqc1v7Dzm3T=CO2a7mVNypOXkAZMFxRMJwwcu61jxGQ@mail.gmail.com>
2015-06-01 15:48     ` [committed, PATCH] Add -mshared option to x86 ELF assembler Andy Lutomirski
2015-06-02  7:41       ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.