linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* More 3.16 vdso fallout
@ 2014-06-21 13:30 Josh Boyer
  2014-06-21 14:31 ` [PATCH] x86_32,signal: Fix vdso rt_sigreturn Andy Lutomirski
  0 siblings, 1 reply; 4+ messages in thread
From: Josh Boyer @ 2014-06-21 13:30 UTC (permalink / raw)
  To: Andy Lutomirski, H. Peter Anvin; +Cc: Linux-Kernel@Vger. Kernel. Org

We've had a report[1] of d-bus getting a SEGV only on i686 machines
with the 3.16 kernel.  It's a bit light on specifics, but the relevant
detail seems to be:

"I'm pretty sure kernel is to blame here.

The crash occurs when signal handler for RT signal 33 (used internaly
by NPTL/pthreads) returns to address zero (not sure why).

This only happens with 3.16 kernel, works fine with 3.15."

and

"Seems to be related to v3.16's arch/x86 VDSO changes. Works fine when
booting with vdso=0."

There isn't an actual backtrace for the SEGV in the bug, but we can
ask for one.  The kernels in question should be very recent, but lack
the 5 patch series Andy recently sent as those aren't in Linus' tree
yet.  Not sure if those would impact anything or not.

josh

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1110968

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

* [PATCH] x86_32,signal: Fix vdso rt_sigreturn
  2014-06-21 13:30 More 3.16 vdso fallout Josh Boyer
@ 2014-06-21 14:31 ` Andy Lutomirski
  2014-06-21 15:43   ` Andy Lutomirski
  2014-06-23 22:57   ` [tip:x86/urgent] x86_32, signal: " tip-bot for Andy Lutomirski
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Lutomirski @ 2014-06-21 14:31 UTC (permalink / raw)
  To: Josh Boyer, H. Peter Anvin
  Cc: Linux-Kernel@Vger. Kernel. Org, Andy Lutomirski

This commit:

    commit 6f121e548f83674ab4920a4e60afb58d4f61b829
    Author: Andy Lutomirski <luto@amacapital.net>
    Date:   Mon May 5 12:19:34 2014 -0700

        x86, vdso: Reimplement vdso.so preparation in build-time C

Contained this obvious typo:

-               restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
+               restorer = current->mm->context.vdso +
+                       selected_vdso32->sym___kernel_sigreturn;

Note the missing 'rt_' in the new code.  Fix it.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
---

Compile-tested only.  I bet that someone will test it here far more quickly
than I can figure out how to test it:

https://bugzilla.redhat.com/show_bug.cgi?id=1110968

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

diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index a0da58d..2851d63 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -363,7 +363,7 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,
 
 		/* Set up to return from userspace.  */
 		restorer = current->mm->context.vdso +
-			selected_vdso32->sym___kernel_sigreturn;
+			selected_vdso32->sym___kernel_rt_sigreturn;
 		if (ksig->ka.sa.sa_flags & SA_RESTORER)
 			restorer = ksig->ka.sa.sa_restorer;
 		put_user_ex(restorer, &frame->pretcode);
-- 
1.9.3


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

* Re: [PATCH] x86_32,signal: Fix vdso rt_sigreturn
  2014-06-21 14:31 ` [PATCH] x86_32,signal: Fix vdso rt_sigreturn Andy Lutomirski
@ 2014-06-21 15:43   ` Andy Lutomirski
  2014-06-23 22:57   ` [tip:x86/urgent] x86_32, signal: " tip-bot for Andy Lutomirski
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Lutomirski @ 2014-06-21 15:43 UTC (permalink / raw)
  To: Josh Boyer, H. Peter Anvin
  Cc: Linux-Kernel@Vger. Kernel. Org, Andy Lutomirski

On Sat, Jun 21, 2014 at 7:31 AM, Andy Lutomirski <luto@amacapital.net> wrote:
> This commit:
>
>     commit 6f121e548f83674ab4920a4e60afb58d4f61b829
>     Author: Andy Lutomirski <luto@amacapital.net>
>     Date:   Mon May 5 12:19:34 2014 -0700
>
>         x86, vdso: Reimplement vdso.so preparation in build-time C
>
> Contained this obvious typo:
>
> -               restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
> +               restorer = current->mm->context.vdso +
> +                       selected_vdso32->sym___kernel_sigreturn;
>
> Note the missing 'rt_' in the new code.  Fix it.
>
> Signed-off-by: Andy Lutomirski <luto@amacapital.net>
> ---
>
> Compile-tested only.  I bet that someone will test it here far more quickly
> than I can figure out how to test it:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1110968

Tested now at the link above.

--Andy

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

* [tip:x86/urgent] x86_32, signal: Fix vdso rt_sigreturn
  2014-06-21 14:31 ` [PATCH] x86_32,signal: Fix vdso rt_sigreturn Andy Lutomirski
  2014-06-21 15:43   ` Andy Lutomirski
@ 2014-06-23 22:57   ` tip-bot for Andy Lutomirski
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Andy Lutomirski @ 2014-06-23 22:57 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, luto, hpa, mingo, tglx, hpa

Commit-ID:  6ba19a670c8b604e9802d30b511e6a4778118592
Gitweb:     http://git.kernel.org/tip/6ba19a670c8b604e9802d30b511e6a4778118592
Author:     Andy Lutomirski <luto@amacapital.net>
AuthorDate: Sat, 21 Jun 2014 07:31:55 -0700
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 23 Jun 2014 15:54:42 -0700

x86_32, signal: Fix vdso rt_sigreturn

This commit:

    commit 6f121e548f83674ab4920a4e60afb58d4f61b829
    Author: Andy Lutomirski <luto@amacapital.net>
    Date:   Mon May 5 12:19:34 2014 -0700

        x86, vdso: Reimplement vdso.so preparation in build-time C

Contained this obvious typo:

-               restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
+               restorer = current->mm->context.vdso +
+                       selected_vdso32->sym___kernel_sigreturn;

Note the missing 'rt_' in the new code.  Fix it.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/1eb40ad923acde2e18357ef2832867432e70ac42.1403361010.git.luto@amacapital.net
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index a0da58d..2851d63 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -363,7 +363,7 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,
 
 		/* Set up to return from userspace.  */
 		restorer = current->mm->context.vdso +
-			selected_vdso32->sym___kernel_sigreturn;
+			selected_vdso32->sym___kernel_rt_sigreturn;
 		if (ksig->ka.sa.sa_flags & SA_RESTORER)
 			restorer = ksig->ka.sa.sa_restorer;
 		put_user_ex(restorer, &frame->pretcode);

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

end of thread, other threads:[~2014-06-23 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-21 13:30 More 3.16 vdso fallout Josh Boyer
2014-06-21 14:31 ` [PATCH] x86_32,signal: Fix vdso rt_sigreturn Andy Lutomirski
2014-06-21 15:43   ` Andy Lutomirski
2014-06-23 22:57   ` [tip:x86/urgent] x86_32, signal: " tip-bot for Andy Lutomirski

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