x86/paravirt: Use a single ops structure
A message that is not in the archive (sent off-list or not yet received): git-mailbomb-linux-master-5c83511bdb9832c86be20fb86b783356e2f58062@kernel.org
Quoted 12 lines · Linux Kernel Mailing List
Commit: 5c83511bdb9832c86be20fb86b783356e2f58062 Parent: 27876f3882fdd4acb3d3614a0133ecdc777fc292 Refname: refs/heads/master Web: https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062 Author: Juergen Gross <[email protected]> AuthorDate: Tue Aug 28 09:40:19 2018 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Mon Sep 3 16:50:35 2018 +0200x86/paravirt: Use a single ops structure
Quoted 7 lines
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_templateat runtime on the stack each timeapply_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. WhenCONFIG_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
Quoted 22 lines · Marc Dionne
Quoted 12 lines · Linux Kernel Mailing List
Commit: 5c83511bdb9832c86be20fb86b783356e2f58062 Parent: 27876f3882fdd4acb3d3614a0133ecdc777fc292 Refname: refs/heads/master Web: https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062 Author: Juergen Gross <[email protected]> AuthorDate: Tue Aug 28 09:40:19 2018 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Mon Sep 3 16:50:35 2018 +0200x86/paravirt: Use a single ops structure
Quoted 7 lines
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_templateat runtime on the stack each timeapply_paravirt()is being called (i.e. when loading a module).
Quoted 5 lines
The above commit replaces
pv_lock_ops, which wasEXPORT_SYMBOL, with
something that is part ofpv_ops, which isEXPORT_SYMBOL_GPL. WhenCONFIG_PARAVIRT_SPINLOCKSis set, this has the side effect of makingspin_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
Quoted 30 lines · Juergen Gross
Quoted 22 lines · Marc Dionne
Quoted 12 lines · Linux Kernel Mailing List
Commit: 5c83511bdb9832c86be20fb86b783356e2f58062 Parent: 27876f3882fdd4acb3d3614a0133ecdc777fc292 Refname: refs/heads/master Web: https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062 Author: Juergen Gross <[email protected]> AuthorDate: Tue Aug 28 09:40:19 2018 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Mon Sep 3 16:50:35 2018 +0200x86/paravirt: Use a single ops structure
Quoted 7 lines
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_templateat runtime on the stack each timeapply_paravirt()is being called (i.e. when loading a module).Quoted 5 lines
The above commit replaces
pv_lock_ops, which wasEXPORT_SYMBOL, with
something that is part ofpv_ops, which isEXPORT_SYMBOL_GPL. WhenCONFIG_PARAVIRT_SPINLOCKSis set, this has the side effect of makingspin_lock()unusable by out of tree modules, which will likely be an issue for many, if not most of them.
Quoted 6 lines
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
Quoted 33 lines · Marc Dionne
Quoted 32 lines · Juergen Gross
Quoted 22 lines · Marc Dionne
Quoted 12 lines · Linux Kernel Mailing List
Commit: 5c83511bdb9832c86be20fb86b783356e2f58062 Parent: 27876f3882fdd4acb3d3614a0133ecdc777fc292 Refname: refs/heads/master Web: https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062 Author: Juergen Gross <[email protected]> AuthorDate: Tue Aug 28 09:40:19 2018 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Mon Sep 3 16:50:35 2018 +0200x86/paravirt: Use a single ops structure
Quoted 7 lines
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_templateat runtime on the stack each timeapply_paravirt()is being called (i.e. when loading a module).Quoted 5 lines
The above commit replaces
pv_lock_ops, which wasEXPORT_SYMBOL, with
something that is part ofpv_ops, which isEXPORT_SYMBOL_GPL. WhenCONFIG_PARAVIRT_SPINLOCKSis set, this has the side effect of makingspin_lock()unusable by out of tree modules, which will likely be an issue for many, if not most of them.Thanks for noticing!
Quoted 7 lines
Quoted 4 lines
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