linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Chandan Rajendra <chandan@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: Anton Blanchard <anton@au1.ibm.com>,
	Nick Piggin <npiggin@au1.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: BUG: memcmp(): Accessing invalid memory location
Date: Fri, 25 Jan 2019 07:45:14 +0100	[thread overview]
Message-ID: <c6395c70-cac3-649e-c96b-4b109069265b@c-s.fr> (raw)
In-Reply-To: <3517bf7d54e9a2c6cdd054cefd75b5e073823042.camel@kernel.crashing.org>



Le 25/01/2019 à 01:55, Benjamin Herrenschmidt a écrit :
> On Thu, 2019-01-24 at 19:48 +0530, Chandan Rajendra wrote:
>> - Here we execute "LD rB,0,r4". In the case of this bug, r4 has an unaligned
>>    value and hence ends up accessing the "next" double word. The "next" double
>>    word happens to occur after the last page mapped into the kernel's address
>>    space and hence this leads to the previously listed oops.
>>    
> 
> This is interesting ... should we mark the last page of any piece of
> mapped linear mapping as reserved to avoid that sort of issue ?

Or revert to a normal comparison once remaining length is < 8 and r4 in 
unaligned ?

Christophe

> 
> Nick ? Aneesh ?
> 
> Cheers,
> Ben.
> 

  reply	other threads:[~2019-01-25  6:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 14:18 BUG: memcmp(): Accessing invalid memory location Chandan Rajendra
2019-01-25  0:55 ` Benjamin Herrenschmidt
2019-01-25  6:45   ` Christophe Leroy [this message]
2019-01-31 10:30 ` Michael Ellerman
2019-02-01 11:13   ` Michael Ellerman
2019-02-04  3:14     ` Chandan Rajendra
2019-02-06 11:50       ` Michael Ellerman
2019-02-06 12:42         ` Chandan Rajendra
2019-02-06 23:57           ` Michael Ellerman
2019-02-07  2:13             ` Chandan Rajendra

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=c6395c70-cac3-649e-c96b-4b109069265b@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=anton@au1.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=chandan@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@au1.ibm.com \
    /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).