linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/fpu/xstate: Export fpu_fpregs_owner_ctx
@ 2019-12-06 23:17 Yu-cheng Yu
  2019-12-06 23:51 ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Yu-cheng Yu @ 2019-12-06 23:17 UTC (permalink / raw)
  To: linux-kernel, x86, H. Peter Anvin, Thomas Gleixner, Ingo Molnar,
	Dave Hansen, Tony Luck, Andy Lutomirski, Borislav Petkov,
	Rik van Riel, Ravi V. Shankar, Sebastian Andrzej Siewior,
	Fenghua Yu, Peter Zijlstra
  Cc: Yu-cheng Yu

After applying my "Invalidate fpregs when __fpu_restore_sig() fails"
patch [1], the following happens:

    ERROR: "fpu_fpregs_owner_ctx" [arch/x86/kvm/kvm.ko] undefined!

Fix it by exporting the symbol.  I apologize for missing this!

[1] https://lkml.kernel.org/r/20191205182648.32257-4-yu-cheng.yu@intel.com/

Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
---
 arch/x86/kernel/fpu/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 743ff5ea4076..4e5151e43a2c 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -42,6 +42,7 @@ static DEFINE_PER_CPU(bool, in_kernel_fpu);
  * Track which context is using the FPU on the CPU:
  */
 DEFINE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx);
+EXPORT_SYMBOL_GPL(fpu_fpregs_owner_ctx);
 
 static bool kernel_fpu_disabled(void)
 {
-- 
2.17.1


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

* Re: [PATCH] x86/fpu/xstate: Export fpu_fpregs_owner_ctx
  2019-12-06 23:17 [PATCH] x86/fpu/xstate: Export fpu_fpregs_owner_ctx Yu-cheng Yu
@ 2019-12-06 23:51 ` Borislav Petkov
  2019-12-07  4:42   ` Yu-cheng Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2019-12-06 23:51 UTC (permalink / raw)
  To: Yu-cheng Yu
  Cc: linux-kernel, x86, H. Peter Anvin, Thomas Gleixner, Ingo Molnar,
	Dave Hansen, Tony Luck, Andy Lutomirski, Rik van Riel,
	Ravi V. Shankar, Sebastian Andrzej Siewior, Fenghua Yu,
	Peter Zijlstra

On Fri, Dec 06, 2019 at 03:17:09PM -0800, Yu-cheng Yu wrote:
> After applying my "Invalidate fpregs when __fpu_restore_sig() fails"
> patch [1], the following happens:
> 
>     ERROR: "fpu_fpregs_owner_ctx" [arch/x86/kvm/kvm.ko] undefined!
> 
> Fix it by exporting the symbol.  I apologize for missing this!

So why a separate patch? Just send a v2 as a reply to the incomplete
one.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* Re: [PATCH] x86/fpu/xstate: Export fpu_fpregs_owner_ctx
  2019-12-06 23:51 ` Borislav Petkov
@ 2019-12-07  4:42   ` Yu-cheng Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Yu-cheng Yu @ 2019-12-07  4:42 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: linux-kernel, x86, H. Peter Anvin, Thomas Gleixner, Ingo Molnar,
	Dave Hansen, Tony Luck, Andy Lutomirski, Rik van Riel,
	Ravi V. Shankar, Sebastian Andrzej Siewior, Fenghua Yu,
	Peter Zijlstra

On Sat, 2019-12-07 at 00:51 +0100, Borislav Petkov wrote:
> On Fri, Dec 06, 2019 at 03:17:09PM -0800, Yu-cheng Yu wrote:
> > After applying my "Invalidate fpregs when __fpu_restore_sig() fails"
> > patch [1], the following happens:
> > 
> >     ERROR: "fpu_fpregs_owner_ctx" [arch/x86/kvm/kvm.ko] undefined!
> > 
> > Fix it by exporting the symbol.  I apologize for missing this!
> 
> So why a separate patch? Just send a v2 as a reply to the incomplete
> one.

I just did that.  Thanks!

Yu-cheng

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

end of thread, other threads:[~2019-12-07  4:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 23:17 [PATCH] x86/fpu/xstate: Export fpu_fpregs_owner_ctx Yu-cheng Yu
2019-12-06 23:51 ` Borislav Petkov
2019-12-07  4:42   ` Yu-cheng Yu

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).