* Re: LWS, futex and pthread problems
[not found] ` <BLU0-SMTP27DC0B7C2C7D265788CE2A97A60@phx.gbl>
@ 2011-12-20 14:54 ` John David Anglin
0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2011-12-20 14:54 UTC (permalink / raw)
To: Carlos O'Donell; +Cc: linux-parisc
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
^ permalink raw reply [flat|nested] only message in thread