LKML Archive on lore.kernel.org
 help / Atom feed
* [PATCH] x86/process: Export start_thread()
@ 2018-08-19 23:08 Rian Hunter
  2018-08-20  2:29 ` Andy Lutomirski
  2018-08-20 16:11 ` [tip:x86/urgent] x86/process: Re-export start_thread() tip-bot for Rian Hunter
  0 siblings, 2 replies; 6+ messages in thread
From: Rian Hunter @ 2018-08-19 23:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rian Hunter, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Andy Lutomirski, Borislav Petkov, Vitaly Kuznetsov, Joerg Roedel,
	Dmitry Safonov, Josh Poimboeuf

Commit e634d8fc792c ("x86-64: merge the standard and compat
start_thread() functions") removed exporting for the start_thread()
function in what seems like a typo. Add it back to
arch/x86/kernel/process_64.c for parity with process_32.c and other
arch.

Signed-off-by: Rian Hunter <rian@alum.mit.edu>
---
 arch/x86/kernel/process_64.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 476e3ddf8890..a451bc374b9b 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -384,6 +384,7 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
 	start_thread_common(regs, new_ip, new_sp,
 			    __USER_CS, __USER_DS, 0);
 }
+EXPORT_SYMBOL_GPL(start_thread);
 
 #ifdef CONFIG_COMPAT
 void compat_start_thread(struct pt_regs *regs, u32 new_ip, u32 new_sp)
-- 
2.16.3


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

* Re: [PATCH] x86/process: Export start_thread()
  2018-08-19 23:08 [PATCH] x86/process: Export start_thread() Rian Hunter
@ 2018-08-20  2:29 ` Andy Lutomirski
  2018-08-20  4:34   ` Rian Hunter
  2018-08-20  7:30   ` Thomas Gleixner
  2018-08-20 16:11 ` [tip:x86/urgent] x86/process: Re-export start_thread() tip-bot for Rian Hunter
  1 sibling, 2 replies; 6+ messages in thread
From: Andy Lutomirski @ 2018-08-20  2:29 UTC (permalink / raw)
  To: Rian Hunter
  Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Andy Lutomirski, Borislav Petkov, Vitaly Kuznetsov, Joerg Roedel,
	Dmitry Safonov, Josh Poimboeuf



> On Aug 19, 2018, at 4:08 PM, Rian Hunter <rian@alum.mit.edu> wrote:
> 
> Commit e634d8fc792c ("x86-64: merge the standard and compat
> start_thread() functions") removed exporting for the start_thread()
> function in what seems like a typo. Add it back to
> arch/x86/kernel/process_64.c for parity with process_32.c and other
> arch.

What for?  Perhaps 32-bit could remove it instead?

> 
> Signed-off-by: Rian Hunter <rian@alum.mit.edu>
> ---
> arch/x86/kernel/process_64.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
> index 476e3ddf8890..a451bc374b9b 100644
> --- a/arch/x86/kernel/process_64.c
> +++ b/arch/x86/kernel/process_64.c
> @@ -384,6 +384,7 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
>    start_thread_common(regs, new_ip, new_sp,
>                __USER_CS, __USER_DS, 0);
> }
> +EXPORT_SYMBOL_GPL(start_thread);
> 
> #ifdef CONFIG_COMPAT
> void compat_start_thread(struct pt_regs *regs, u32 new_ip, u32 new_sp)
> -- 
> 2.16.3
> 

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

* Re: [PATCH] x86/process: Export start_thread()
  2018-08-20  2:29 ` Andy Lutomirski
@ 2018-08-20  4:34   ` Rian Hunter
  2018-08-20  7:30   ` Thomas Gleixner
  1 sibling, 0 replies; 6+ messages in thread
From: Rian Hunter @ 2018-08-20  4:34 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Andy Lutomirski, Borislav Petkov, Vitaly Kuznetsov, Joerg Roedel,
	Dmitry Safonov, Josh Poimboeuf

On 2018-08-19 19:29, Andy Lutomirski wrote:
>> On Aug 19, 2018, at 4:08 PM, Rian Hunter <rian@alum.mit.edu> wrote:
>> 
>> Commit e634d8fc792c ("x86-64: merge the standard and compat
>> start_thread() functions") removed exporting for the start_thread()
>> function in what seems like a typo. Add it back to
>> arch/x86/kernel/process_64.c for parity with process_32.c and other
>> arch.
> 
> What for?  Perhaps 32-bit could remove it instead?
> 

Came across this while writing a binfmt module. Useful for me but 
probably no one else on Earth, at least for another ~9 years on average.

>> Signed-off-by: Rian Hunter <rian@alum.mit.edu>
>> ---
>> arch/x86/kernel/process_64.c | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/arch/x86/kernel/process_64.c 
>> b/arch/x86/kernel/process_64.c
>> index 476e3ddf8890..a451bc374b9b 100644
>> --- a/arch/x86/kernel/process_64.c
>> +++ b/arch/x86/kernel/process_64.c
>> @@ -384,6 +384,7 @@ start_thread(struct pt_regs *regs, unsigned long 
>> new_ip, unsigned long new_sp)
>>    start_thread_common(regs, new_ip, new_sp,
>>                __USER_CS, __USER_DS, 0);
>> }
>> +EXPORT_SYMBOL_GPL(start_thread);
>> 
>> #ifdef CONFIG_COMPAT
>> void compat_start_thread(struct pt_regs *regs, u32 new_ip, u32 new_sp)
>> --
>> 2.16.3
>> 

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

* Re: [PATCH] x86/process: Export start_thread()
  2018-08-20  2:29 ` Andy Lutomirski
  2018-08-20  4:34   ` Rian Hunter
@ 2018-08-20  7:30   ` Thomas Gleixner
  2018-08-20 14:27     ` Andy Lutomirski
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2018-08-20  7:30 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Rian Hunter, linux-kernel, Ingo Molnar, H. Peter Anvin, x86,
	Andy Lutomirski, Borislav Petkov, Vitaly Kuznetsov, Joerg Roedel,
	Dmitry Safonov, Josh Poimboeuf

On Sun, 19 Aug 2018, Andy Lutomirski wrote:
> > On Aug 19, 2018, at 4:08 PM, Rian Hunter <rian@alum.mit.edu> wrote:
> > 
> > Commit e634d8fc792c ("x86-64: merge the standard and compat
> > start_thread() functions") removed exporting for the start_thread()
> > function in what seems like a typo. Add it back to
> > arch/x86/kernel/process_64.c for parity with process_32.c and other
> > arch.
> 
> What for?  Perhaps 32-bit could remove it instead?

No. start_thread() is called from various binfmt implementations which can
be built as modules.

Thanks,

	tglx

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

* Re: [PATCH] x86/process: Export start_thread()
  2018-08-20  7:30   ` Thomas Gleixner
@ 2018-08-20 14:27     ` Andy Lutomirski
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Lutomirski @ 2018-08-20 14:27 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Rian Hunter, linux-kernel, Ingo Molnar, H. Peter Anvin, x86,
	Andy Lutomirski, Borislav Petkov, Vitaly Kuznetsov, Joerg Roedel,
	Dmitry Safonov, Josh Poimboeuf



> On Aug 20, 2018, at 12:30 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> On Sun, 19 Aug 2018, Andy Lutomirski wrote:
>>> On Aug 19, 2018, at 4:08 PM, Rian Hunter <rian@alum.mit.edu> wrote:
>>> 
>>> Commit e634d8fc792c ("x86-64: merge the standard and compat
>>> start_thread() functions") removed exporting for the start_thread()
>>> function in what seems like a typo. Add it back to
>>> arch/x86/kernel/process_64.c for parity with process_32.c and other
>>> arch.
>> 
>> What for?  Perhaps 32-bit could remove it instead?
> 
> No. start_thread() is called from various binfmt implementations which can
> be built as modules.

Fair enough. I’m fine with the patch.

> 
> Thanks,
> 
>    tglx

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

* [tip:x86/urgent] x86/process: Re-export start_thread()
  2018-08-19 23:08 [PATCH] x86/process: Export start_thread() Rian Hunter
  2018-08-20  2:29 ` Andy Lutomirski
@ 2018-08-20 16:11 ` tip-bot for Rian Hunter
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Rian Hunter @ 2018-08-20 16:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: rian, hpa, bpetkov, tglx, luto, vkuznets, jpoimboe, linux-kernel,
	jroedel, mingo, dima

Commit-ID:  dc76803e57cc86589c4efcb5362918f9b0c0436f
Gitweb:     https://git.kernel.org/tip/dc76803e57cc86589c4efcb5362918f9b0c0436f
Author:     Rian Hunter <rian@alum.mit.edu>
AuthorDate: Sun, 19 Aug 2018 16:08:53 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 20 Aug 2018 18:04:42 +0200

x86/process: Re-export start_thread()

The consolidation of the start_thread() functions removed the export
unintentionally. This breaks binfmt handlers built as a module.

Add it back.

Fixes: e634d8fc792c ("x86-64: merge the standard and compat start_thread() functions")
Signed-off-by: Rian Hunter <rian@alum.mit.edu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Dmitry Safonov <dima@arista.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180819230854.7275-1-rian@alum.mit.edu

---
 arch/x86/kernel/process_64.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 476e3ddf8890..a451bc374b9b 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -384,6 +384,7 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
 	start_thread_common(regs, new_ip, new_sp,
 			    __USER_CS, __USER_DS, 0);
 }
+EXPORT_SYMBOL_GPL(start_thread);
 
 #ifdef CONFIG_COMPAT
 void compat_start_thread(struct pt_regs *regs, u32 new_ip, u32 new_sp)

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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-19 23:08 [PATCH] x86/process: Export start_thread() Rian Hunter
2018-08-20  2:29 ` Andy Lutomirski
2018-08-20  4:34   ` Rian Hunter
2018-08-20  7:30   ` Thomas Gleixner
2018-08-20 14:27     ` Andy Lutomirski
2018-08-20 16:11 ` [tip:x86/urgent] x86/process: Re-export start_thread() tip-bot for Rian Hunter

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox