All of lore.kernel.org
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: linux-parisc <linux-parisc@vger.kernel.org>
Subject: Re: LWS, futex and pthread problems
Date: Tue, 20 Dec 2011 09:54:51 -0500	[thread overview]
Message-ID: <4EF0A1BB.1040104@bell.net> (raw)
In-Reply-To: <BLU0-SMTP27DC0B7C2C7D265788CE2A97A60@phx.gbl>

On 12/18/2011 5:45 PM, John David Anglin wrote:
> Yes.  R4 is also wrong, so it might be a call has corrupted it and 
> then the restore
> corrupts r19.
>
> This rings a bell.  In the old clone/fork bug, there was a cache issue 
> with the stack
> region created for the thread.  It seemed like it got modified after 
> the thread started.
> It must have something to do with the fact that it is allocated by 
> malloc.
I believe COW is broken.  If you look at set_pte_at, you will see that 
the tlb is not
purged for the address after the need value is stored in the page table, 
so the write
protect doesn't take effect immediately.  Thus, a thread can continue 
writing to a
protected page without generating a fault.  Unfortunately, this doesn't 
fix the problem
by itself (tested this morning).

I'm thinking that copy_user_page needs to be done through the tmp alias 
region,
or the user page needs to be flushed before it is copied.  I'm not sure 
how to do the
latter.

Dave

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


           reply	other threads:[~2011-12-20 14:54 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <BLU0-SMTP27DC0B7C2C7D265788CE2A97A60@phx.gbl>]

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=4EF0A1BB.1040104@bell.net \
    --to=dave.anglin@bell.net \
    --cc=carlos@systemhalted.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.