kernel-testers.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Justin P. Mattock" <justinmattock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Justin Madru <jdm64-u1xxEuL7cY4AvxtiuMwx3w@public.gmane.org>
Cc: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>,
	Hiroshi Shimamoto
	<h-shimamoto-ehU+Cx/zZe18UrSeD/g0lQ@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Roland McGrath <roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Kernel Testers List
	<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [Bug #12505] 2.6.29-rc1 Firefox crashing on page load
Date: Wed, 21 Jan 2009 01:40:41 -0800	[thread overview]
Message-ID: <4976ED99.3070007@gmail.com> (raw)
In-Reply-To: <4976EB66.2010301-u1xxEuL7cY4AvxtiuMwx3w@public.gmane.org>

Justin Madru wrote:
> Ingo Molnar wrote:
>> * Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org> wrote:
>>
>>  
>>> * Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org> wrote:
>>>
>>>    
>>>> (added Cc:s)
>>>>       Justin, does it work if you apply the patch below instead of 
>>>> the revert?
>>>>       
>>> hm, that patch wont build because the protect_asmlinkage macro is 
>>> rather limited - it cannot deal with structure parameters.
>>>
>>> We might be better off with a revert here, and a comment added that 
>>> points out the problem.
>>>     
>>
>> Below is the revert+document commit that i have queued up.
>>
>> Justin, could you try the tip/master tree (which has this fix included):
>>
>>   http://people.redhat.com/mingo/tip.git/README
>>
>> does Firefox still work fine?
>>
>>     Ingo
>>
>> ------------->
>> >From 779c9b9f8cb87cdfbd299ee7beb62e50ce139a92 Mon Sep 17 00:00:00 2001
>> From: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
>> Date: Tue, 20 Jan 2009 09:31:49 +0100
>> Subject: [PATCH] Revert "x86: signal: change type of paramter for 
>> sys_rt_sigreturn()"
>>
>> This reverts commit 4217458dafaa57d8e26a46f5d05ab8c53cf64191.
>>
>> Justin Madru bisected this commit, it was causing weird Firefox
>> crashes.
>>
>> The reason is that GCC mis-optimizes (re-uses) the on-stack 
>> parameters of
>> the calling frame, which corrupts the syscall return pt_regs state and
>> thus corrupts user-space register state.
>>
>> So we go back to the slightly less clean but more optimization-safe
>> method of getting to pt_regs. Also add a comment to explain this.
>>
>> Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=12505
>>
>> Reported-and-bisected-by: Justin Madru <jdm64-u1xxEuL7cY4AvxtiuMwx3w@public.gmane.org>
>> Signed-off-by: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
>> ---
>>  arch/x86/include/asm/syscalls.h |    2 +-
>>  arch/x86/kernel/signal.c        |   11 +++++++++--
>>  2 files changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/x86/include/asm/syscalls.h 
>> b/arch/x86/include/asm/syscalls.h
>> index 9c6797c..c0b0bda 100644
>> --- a/arch/x86/include/asm/syscalls.h
>> +++ b/arch/x86/include/asm/syscalls.h
>> @@ -40,7 +40,7 @@ asmlinkage int sys_sigaction(int, const struct 
>> old_sigaction __user *,
>>                   struct old_sigaction __user *);
>>  asmlinkage int sys_sigaltstack(unsigned long);
>>  asmlinkage unsigned long sys_sigreturn(unsigned long);
>> -asmlinkage int sys_rt_sigreturn(struct pt_regs);
>> +asmlinkage int sys_rt_sigreturn(unsigned long);
>>  
>>  /* kernel/ioport.c */
>>  asmlinkage long sys_iopl(unsigned long);
>> diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
>> index 89bb766..df0587f 100644
>> --- a/arch/x86/kernel/signal.c
>> +++ b/arch/x86/kernel/signal.c
>> @@ -632,9 +632,16 @@ badframe:
>>  }
>>  
>>  #ifdef CONFIG_X86_32
>> -asmlinkage int sys_rt_sigreturn(struct pt_regs regs)
>> +/*
>> + * Note: do not pass in pt_regs directly as with tail-call optimization
>> + * GCC will incorrectly stomp on the caller's frame and corrupt 
>> user-space
>> + * register state:
>> + */
>> +asmlinkage int sys_rt_sigreturn(unsigned long __unused)
>>  {
>> -    return do_rt_sigreturn(&regs);
>> +    struct pt_regs *regs = (struct pt_regs *)&__unused;
>> +
>> +    return do_rt_sigreturn(regs);
>>  }
>>  #else /* !CONFIG_X86_32 */
>>  asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
>>
>>   
> Ok, I officially tested tip/master and firefox is happy it can talk to 
> friends with google talk ;-)
> Although.... I don't use google talk.... it just seems to be this 
> mandatory tab I can't get rid of
> on my google page that caused a regression to be noticed so that the 
> kernel could be improved!
>
> Justin Madru
>
Well I guess the problem has been bisected.

regards;

Justin P. Mattock

  parent reply	other threads:[~2009-01-21  9:40 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 21:28 2.6.29-rc2-git1: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-01-19 21:28 ` [Bug #12399] USB wakeup problem on multiple machines Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12414] iwl4965 cannot use "ap auto" on latest 2.6.28/29? Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12416] Recent change to kernel spikes out ccache/distcc Rafael J. Wysocki
2009-01-20 10:31   ` [PATCH] " Jan Beulich
2009-01-19 21:32 ` [Bug #12400] git-latest: kernel oops in IOMMU setup Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12415] WARNING: at drivers/net/wireless/iwlwifi/iwl-sta.c:689 Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12402] 2.6.29-rc: kernel BUG at fs/xfs/support/debug.c:108 Rafael J. Wysocki
2009-01-28 23:39   ` Alexander Beregalov
     [not found]     ` <a4423d670901281539s958128avcaf4756021125795-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-03 22:56       ` Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12417] glx performance drop with: "x86: PAT: implement track/untrack of pfnmap regions for x86 - v3" Rafael J. Wysocki
2009-01-20  7:47   ` Ingo Molnar
     [not found]     ` <20090120074758.GB26284-X9Un+BFzKDI@public.gmane.org>
2009-01-20  9:09       ` Alexey Fisher
2009-01-20 13:45       ` Alexey Fisher
2009-01-19 21:32 ` [Bug #12419] possible circular locking dependency on i915 dma Rafael J. Wysocki
2009-01-20  0:29   ` Wang Chen
2009-01-19 21:32 ` [Bug #12418] Repeated ioctl(4, 0x40046445, ..) loop in glxgears Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12422] 2.6.28-git can't resume from str Rafael J. Wysocki
2009-01-20  0:39   ` Harvey Harrison
2009-01-20  1:46   ` Jeff Chua
2009-01-19 21:32 ` [Bug #12427] cpumask change causes sparc build bustage Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12441] Xorg can't use dri on radeon X1950 AGP Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12444] X hangs following switch from radeonfb console - Bisected Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12469] XFS : Corruption of in-memory data Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-01-20 22:44   ` Bob Copeland
2009-01-19 21:32 ` [Bug #12491] i915 lockdep warning Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12468] Crash in acpi_cpufreq_init Rafael J. Wysocki
2009-01-20  0:33   ` Alex Riesen
     [not found]     ` <81b0412b0901191633y130c4cf0w5531af81c3749ee2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-01-20 14:23       ` Ingo Molnar
     [not found]         ` <20090120142312.GB10224-X9Un+BFzKDI@public.gmane.org>
2009-01-20 22:35           ` Alex Riesen
     [not found]             ` <81b0412b0901201435mabecad3i66957a6463140b82-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-01-21 11:59               ` Ingo Molnar
2009-01-19 21:32 ` [Bug #12494] Sony backlight regression from 2.6.28 to 29-rc Rafael J. Wysocki
2009-01-20 16:46   ` Norbert Preining
2009-01-19 21:32 ` [Bug #12496] swsusp cannot find resume device (sometimes) Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12493] ACPI related kernel panic when booting 2.6.29-rc2 Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12495] thinkpad problems during resume Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12499] Problem with using bluetooth adaper connected to usb port Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12501] build bug in eeepc-laptop.c Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12498] OOPS and panic on 2.6.29-rc1 on xen-x86 Rafael J. Wysocki
2009-01-20  0:35   ` Nick Piggin
2009-01-19 21:32 ` [Bug #12497] new barrier warnings in 2.6.29-rc1 Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12502] pipe_read oops on sh Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12503] [slab corruption] BUG key_jar: Poison overwritten Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12504] 2.6.29-rc1 vs selinux Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12505] 2.6.29-rc1 Firefox crashing on page load Rafael J. Wysocki
2009-01-20  6:29   ` Justin Madru
     [not found]     ` <49756F3E.6050304-u1xxEuL7cY4AvxtiuMwx3w@public.gmane.org>
2009-01-20  7:43       ` Ingo Molnar
     [not found]         ` <20090120074312.GD16426-X9Un+BFzKDI@public.gmane.org>
2009-01-20  8:16           ` Ingo Molnar
     [not found]             ` <20090120081650.GA29725-X9Un+BFzKDI@public.gmane.org>
2009-01-20  8:37               ` Ingo Molnar
     [not found]                 ` <20090120083700.GA5277-X9Un+BFzKDI@public.gmane.org>
2009-01-21  9:31                   ` Justin Madru
     [not found]                     ` <4976EB66.2010301-u1xxEuL7cY4AvxtiuMwx3w@public.gmane.org>
2009-01-21  9:40                       ` Justin P. Mattock [this message]
2009-01-19 21:32 ` [Bug #12507] e100: netconsole not functional because of missing firmware Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12506] Undefined symbols when CONFIG_MFD_PCF50633 is enabled Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12510] 2.6.29-rc2 dies on startup Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12508] "powerpc/pci: Reserve legacy regions on PCI" broke my G3 Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12511] WARNING: at drivers/dma/dmaengine.c:352 Rafael J. Wysocki
2009-01-19 21:32 ` [Bug #12509] lockdep report. fb_mmap vs sys_mmap2 Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2009-02-04 10:21 2.6.29-rc3-git6: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12505] 2.6.29-rc1 Firefox crashing on page load Rafael J. Wysocki
2009-02-04 15:23   ` Justin Mattock
     [not found]     ` <dd18b0c30902040723m70f87f7fp4af32702410036d7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-04 16:46       ` Ingo Molnar
     [not found]         ` <20090204164623.GE25996-X9Un+BFzKDI@public.gmane.org>
2009-02-04 18:15           ` Justin Mattock
     [not found]             ` <dd18b0c30902041015m2213d94cx72d41bd225afa3e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-05  1:08               ` Rafael J. Wysocki
     [not found]                 ` <200902050208.15776.rjw-KKrjLPT3xs0@public.gmane.org>
2009-02-05  1:37                   ` Justin Mattock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4976ED99.3070007@gmail.com \
    --to=justinmattock-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=h-shimamoto-ehU+Cx/zZe18UrSeD/g0lQ@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=jdm64-u1xxEuL7cY4AvxtiuMwx3w@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mingo-X9Un+BFzKDI@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.org \
    --cc=roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).