LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: x86/paravirt: Use a single ops structure
       [not found] <git-mailbomb-linux-master-5c83511bdb9832c86be20fb86b783356e2f58062@kernel.org>
@ 2018-10-29 12:58 ` Marc Dionne
  2018-10-29 14:24   ` Juergen Gross
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Dionne @ 2018-10-29 12:58 UTC (permalink / raw)
  To: jgross; +Cc: Linux Kernel Mailing List, Thomas Gleixner

On Tue, Oct 23, 2018 at 2:37 PM Linux Kernel Mailing List
<linux-kernel@vger.kernel.org> wrote:
>
> Commit:     5c83511bdb9832c86be20fb86b783356e2f58062
> Parent:     27876f3882fdd4acb3d3614a0133ecdc777fc292
> Refname:    refs/heads/master
> Web:        https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062
> Author:     Juergen Gross <jgross@suse.com>
> AuthorDate: Tue Aug 28 09:40:19 2018 +0200
> Committer:  Thomas Gleixner <tglx@linutronix.de>
> CommitDate: Mon Sep 3 16:50:35 2018 +0200
>
>     x86/paravirt: Use a single ops structure
>
>     Instead of using six globally visible paravirt ops structures combine
>     them in a single structure, keeping the original structures as
>     sub-structures.
>
>     This avoids the need to assemble struct paravirt_patch_template at
>     runtime on the stack each time apply_paravirt() is being called (i.e.
>     when loading a module).

The above commit replaces pv_lock_ops, which was EXPORT_SYMBOL, with
something that is part of pv_ops, which is EXPORT_SYMBOL_GPL.    When
CONFIG_PARAVIRT_SPINLOCKS is set, this has the side effect of making
spin_lock() unusable by out of tree modules, which will likely be an
issue for many, if not most of them.

Marc

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

* Re: x86/paravirt: Use a single ops structure
  2018-10-29 12:58 ` x86/paravirt: Use a single ops structure Marc Dionne
@ 2018-10-29 14:24   ` Juergen Gross
  2018-10-30 13:33     ` Marc Dionne
  0 siblings, 1 reply; 4+ messages in thread
From: Juergen Gross @ 2018-10-29 14:24 UTC (permalink / raw)
  To: Marc Dionne; +Cc: Linux Kernel Mailing List, Thomas Gleixner

On 29/10/2018 13:58, Marc Dionne wrote:
> On Tue, Oct 23, 2018 at 2:37 PM Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org> wrote:
>>
>> Commit:     5c83511bdb9832c86be20fb86b783356e2f58062
>> Parent:     27876f3882fdd4acb3d3614a0133ecdc777fc292
>> Refname:    refs/heads/master
>> Web:        https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062
>> Author:     Juergen Gross <jgross@suse.com>
>> AuthorDate: Tue Aug 28 09:40:19 2018 +0200
>> Committer:  Thomas Gleixner <tglx@linutronix.de>
>> CommitDate: Mon Sep 3 16:50:35 2018 +0200
>>
>>     x86/paravirt: Use a single ops structure
>>
>>     Instead of using six globally visible paravirt ops structures combine
>>     them in a single structure, keeping the original structures as
>>     sub-structures.
>>
>>     This avoids the need to assemble struct paravirt_patch_template at
>>     runtime on the stack each time apply_paravirt() is being called (i.e.
>>     when loading a module).
> 
> The above commit replaces pv_lock_ops, which was EXPORT_SYMBOL, with
> something that is part of pv_ops, which is EXPORT_SYMBOL_GPL.    When
> CONFIG_PARAVIRT_SPINLOCKS is set, this has the side effect of making
> spin_lock() unusable by out of tree modules, which will likely be an
> issue for many, if not most of them.

Thanks for noticing!

Sending a patch soon...


Juergen


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

* Re: x86/paravirt: Use a single ops structure
  2018-10-29 14:24   ` Juergen Gross
@ 2018-10-30 13:33     ` Marc Dionne
  2018-10-30 13:50       ` Juergen Gross
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Dionne @ 2018-10-30 13:33 UTC (permalink / raw)
  To: jgross; +Cc: Linux Kernel Mailing List, Thomas Gleixner

On Mon, Oct 29, 2018 at 11:25 AM Juergen Gross <jgross@suse.com> wrote:
>
> On 29/10/2018 13:58, Marc Dionne wrote:
> > On Tue, Oct 23, 2018 at 2:37 PM Linux Kernel Mailing List
> > <linux-kernel@vger.kernel.org> wrote:
> >>
> >> Commit:     5c83511bdb9832c86be20fb86b783356e2f58062
> >> Parent:     27876f3882fdd4acb3d3614a0133ecdc777fc292
> >> Refname:    refs/heads/master
> >> Web:        https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062
> >> Author:     Juergen Gross <jgross@suse.com>
> >> AuthorDate: Tue Aug 28 09:40:19 2018 +0200
> >> Committer:  Thomas Gleixner <tglx@linutronix.de>
> >> CommitDate: Mon Sep 3 16:50:35 2018 +0200
> >>
> >>     x86/paravirt: Use a single ops structure
> >>
> >>     Instead of using six globally visible paravirt ops structures combine
> >>     them in a single structure, keeping the original structures as
> >>     sub-structures.
> >>
> >>     This avoids the need to assemble struct paravirt_patch_template at
> >>     runtime on the stack each time apply_paravirt() is being called (i.e.
> >>     when loading a module).
> >
> > The above commit replaces pv_lock_ops, which was EXPORT_SYMBOL, with
> > something that is part of pv_ops, which is EXPORT_SYMBOL_GPL.    When
> > CONFIG_PARAVIRT_SPINLOCKS is set, this has the side effect of making
> > spin_lock() unusable by out of tree modules, which will likely be an
> > issue for many, if not most of them.
>
> Thanks for noticing!
>
> Sending a patch soon...
>
>
> Juergen

Thanks for the quick patch.  Does this also need fixing for arm/arm64?
I can't easily verify but it seems like it would have the same issue.

Marc

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

* Re: x86/paravirt: Use a single ops structure
  2018-10-30 13:33     ` Marc Dionne
@ 2018-10-30 13:50       ` Juergen Gross
  0 siblings, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2018-10-30 13:50 UTC (permalink / raw)
  To: Marc Dionne; +Cc: Linux Kernel Mailing List, Thomas Gleixner

On 30/10/2018 14:33, Marc Dionne wrote:
> On Mon, Oct 29, 2018 at 11:25 AM Juergen Gross <jgross@suse.com> wrote:
>>
>> On 29/10/2018 13:58, Marc Dionne wrote:
>>> On Tue, Oct 23, 2018 at 2:37 PM Linux Kernel Mailing List
>>> <linux-kernel@vger.kernel.org> wrote:
>>>>
>>>> Commit:     5c83511bdb9832c86be20fb86b783356e2f58062
>>>> Parent:     27876f3882fdd4acb3d3614a0133ecdc777fc292
>>>> Refname:    refs/heads/master
>>>> Web:        https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062
>>>> Author:     Juergen Gross <jgross@suse.com>
>>>> AuthorDate: Tue Aug 28 09:40:19 2018 +0200
>>>> Committer:  Thomas Gleixner <tglx@linutronix.de>
>>>> CommitDate: Mon Sep 3 16:50:35 2018 +0200
>>>>
>>>>     x86/paravirt: Use a single ops structure
>>>>
>>>>     Instead of using six globally visible paravirt ops structures combine
>>>>     them in a single structure, keeping the original structures as
>>>>     sub-structures.
>>>>
>>>>     This avoids the need to assemble struct paravirt_patch_template at
>>>>     runtime on the stack each time apply_paravirt() is being called (i.e.
>>>>     when loading a module).
>>>
>>> The above commit replaces pv_lock_ops, which was EXPORT_SYMBOL, with
>>> something that is part of pv_ops, which is EXPORT_SYMBOL_GPL.    When
>>> CONFIG_PARAVIRT_SPINLOCKS is set, this has the side effect of making
>>> spin_lock() unusable by out of tree modules, which will likely be an
>>> issue for many, if not most of them.
>>
>> Thanks for noticing!
>>
>> Sending a patch soon...
>>
>>
>> Juergen
> 
> Thanks for the quick patch.  Does this also need fixing for arm/arm64?
> I can't easily verify but it seems like it would have the same issue.

pv_lock_ops was x86 only.


Juergen

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

end of thread, other threads:[~2018-10-30 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <git-mailbomb-linux-master-5c83511bdb9832c86be20fb86b783356e2f58062@kernel.org>
2018-10-29 12:58 ` x86/paravirt: Use a single ops structure Marc Dionne
2018-10-29 14:24   ` Juergen Gross
2018-10-30 13:33     ` Marc Dionne
2018-10-30 13:50       ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).