Linux PARISC architecture development
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: linux-parisc@vger.kernel.org
Subject: Re: [PATCH] parisc: Fix gcc miscompilation in pa_memcpy()
Date: Fri, 05 Jul 2013 17:44:18 -0400	[thread overview]
Message-ID: <51D73E32.5060803@bell.net> (raw)
In-Reply-To: <12486210.aWq2PzHOxI@eto>

On 7/5/2013 5:05 PM, Rolf Eike Beer wrote:
> Am Donnerstag 04 Juli 2013, 22:34:11 schrieb Helge Deller:
>> When running the LTP testsuite one may hit this kernel BUG() with the
>> write06 testcase:
>>
>> kernel BUG at mm/filemap.c:2023!
>> CPU: 1 PID: 8614 Comm: writev01 Not tainted 3.10.0-rc7-64bit-c3000+ #6
>> IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000401e6e84
>> 00000000401e6e88 IIR: 03ffe01f    ISR: 0000000010340000  IOR:
>> 000001fbe0380820
>>   CPU:        1   CR30: 00000000bef80000 CR31: ffffffffffffffff
>>   ORIG_R28: 00000000bdc192c0
>>   IAOQ[0]: iov_iter_advance+0x3c/0xc0
>>   IAOQ[1]: iov_iter_advance+0x40/0xc0
>>   RP(r2): generic_file_buffered_write+0x204/0x3f0
>> Backtrace:
>>   [<00000000401e764c>] generic_file_buffered_write+0x204/0x3f0
>>   [<00000000401eab24>] __generic_file_aio_write+0x244/0x448
>>   [<00000000401eadc0>] generic_file_aio_write+0x98/0x150
>>   [<000000004024f460>] do_sync_readv_writev+0xc0/0x130
>>   [<000000004025037c>] compat_do_readv_writev+0x12c/0x340
>>   [<00000000402505f8>] compat_writev+0x68/0xa0
>>   [<0000000040251d88>] compat_SyS_writev+0x98/0xf8
>>
>> Reason for this crash is a gcc miscompilation in the fault handlers of
>> pa_memcpy() which return the fault address instead of the copied bytes.
>> Since this seems to be a generic problem with gcc-4.7.x (and below), it's
>> better to simplify the fault handlers in pa_memcpy to avoid this problem.
> Which gcc PR# is that?
There is no gcc PR as pa_memcpy is not legitimate C code.  There is an 
implicit assumption
that certain variables will contain correct values when an exception 
occurs and the code randomly
jumps to one of the exception blocks.  There is no guarantee of this.  
If a PR was filed, it would likely
be marked as invalid.

I would judge there's no hope in fixing this in 4.7.

Dave

-- 
John David Anglin    dave.anglin@bell.net


      reply	other threads:[~2013-07-05 21:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 20:34 [PATCH] parisc: Fix gcc miscompilation in pa_memcpy() Helge Deller
2013-07-05 21:05 ` Rolf Eike Beer
2013-07-05 21:44   ` John David Anglin [this message]

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=51D73E32.5060803@bell.net \
    --to=dave.anglin@bell.net \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-parisc@vger.kernel.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