mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: Make cpu_tss available to external modules
@ 2015-05-04 18:16 Marc Dionne
  2015-05-05 13:59 ` Andy Lutomirski
  2015-05-05 18:42 ` [tip:x86/urgent] " tip-bot for Marc Dionne
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Dionne @ 2015-05-04 18:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: x86, Andy Lutomirski, Marc Dionne

Commit 75182b1632 ("x86/asm/entry: Switch all C consumers of
kernel_stack to this_cpu_sp0()") changed current_thread_info
to use this_cpu_sp0, and indirectly made it rely on init_tss
which was exported with EXPORT_PER_CPU_SYMBOL_GPL.
As a result some macros and inline functions such as set/get_fs,
test_thread_flag and variants have been made unusable for
external modules.

Make cpu_tss exported with EXPORT_PER_CPU_SYMBOL so that these
functions are accessible again, as they were previously.

Signed-off-by: Marc Dionne <marc.dionne@your-file-system.com>
---
 arch/x86/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 8213da6..bfc99b3 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -57,7 +57,7 @@ __visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = {
 	.io_bitmap		= { [0 ... IO_BITMAP_LONGS] = ~0 },
 #endif
 };
-EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss);
+EXPORT_PER_CPU_SYMBOL(cpu_tss);
 
 #ifdef CONFIG_X86_64
 static DEFINE_PER_CPU(unsigned char, is_idle);
-- 
2.1.0


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

* Re: [PATCH] x86: Make cpu_tss available to external modules
  2015-05-04 18:16 [PATCH] x86: Make cpu_tss available to external modules Marc Dionne
@ 2015-05-05 13:59 ` Andy Lutomirski
  2015-05-05 18:42 ` [tip:x86/urgent] " tip-bot for Marc Dionne
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Lutomirski @ 2015-05-05 13:59 UTC (permalink / raw)
  To: Marc Dionne; +Cc: Marc Dionne, X86 ML, linux-kernel

On May 4, 2015 11:46 PM, "Marc Dionne" <marc.c.dionne@gmail.com> wrote:
>
> Commit 75182b1632 ("x86/asm/entry: Switch all C consumers of
> kernel_stack to this_cpu_sp0()") changed current_thread_info
> to use this_cpu_sp0, and indirectly made it rely on init_tss
> which was exported with EXPORT_PER_CPU_SYMBOL_GPL.
> As a result some macros and inline functions such as set/get_fs,
> test_thread_flag and variants have been made unusable for
> external modules.

This is okay with me.  I have my doubts as to whether set_fs/get_fs is
a sane interface at all, let alone in non-GPL modules, but both it and
cond_resched (my best guess as to the test_thread_flag offender) have
plenty of historical precedent for non-GPL use, and I didn't intend to
break that.

Acked-by: Andy Lutomirski <luto@kernel.org>

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

* [tip:x86/urgent] x86: Make cpu_tss available to external modules
  2015-05-04 18:16 [PATCH] x86: Make cpu_tss available to external modules Marc Dionne
  2015-05-05 13:59 ` Andy Lutomirski
@ 2015-05-05 18:42 ` tip-bot for Marc Dionne
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Marc Dionne @ 2015-05-05 18:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, marc.c.dionne, luto, marc.dionne, hpa, tglx, mingo

Commit-ID:  de71ad2c97862eae1516aa36528cc3b317c17b2f
Gitweb:     http://git.kernel.org/tip/de71ad2c97862eae1516aa36528cc3b317c17b2f
Author:     Marc Dionne <marc.c.dionne@gmail.com>
AuthorDate: Mon, 4 May 2015 15:16:44 -0300
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 5 May 2015 20:40:31 +0200

x86: Make cpu_tss available to external modules

Commit 75182b1632 ("x86/asm/entry: Switch all C consumers of
kernel_stack to this_cpu_sp0()") changed current_thread_info
to use this_cpu_sp0, and indirectly made it rely on init_tss
which was exported with EXPORT_PER_CPU_SYMBOL_GPL.
As a result some macros and inline functions such as set/get_fs,
test_thread_flag and variants have been made unusable for
external modules.

Make cpu_tss exported with EXPORT_PER_CPU_SYMBOL so that these
functions are accessible again, as they were previously.

Signed-off-by: Marc Dionne <marc.dionne@your-file-system.com>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/1430763404-21221-1-git-send-email-marc.dionne@your-file-system.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 8213da6..bfc99b3 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -57,7 +57,7 @@ __visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = {
 	.io_bitmap		= { [0 ... IO_BITMAP_LONGS] = ~0 },
 #endif
 };
-EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss);
+EXPORT_PER_CPU_SYMBOL(cpu_tss);
 
 #ifdef CONFIG_X86_64
 static DEFINE_PER_CPU(unsigned char, is_idle);

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

end of thread, other threads:[~2015-05-05 18:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 18:16 [PATCH] x86: Make cpu_tss available to external modules Marc Dionne
2015-05-05 13:59 ` Andy Lutomirski
2015-05-05 18:42 ` [tip:x86/urgent] " tip-bot for Marc Dionne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome