From: nfortino@nvidia•com (Nickolas Fortino)
To: linux-arm-kernel@lists•infradead.org
Subject: preempted dup_mm misses TLB invalidate
Date: Wed, 17 Jul 2013 13:09:52 -0700 [thread overview]
Message-ID: <51E6FA10.5070504@nvidia.com> (raw)
In-Reply-To: <51E6F60D.6060804@wwwdotorg.org>
On 7/17/2013 12:52 PM, Stephen Warren wrote:
> On 07/17/2013 01:27 PM, Catalin Marinas wrote:
>> On Mon, Jul 15, 2013 at 07:19:23PM +0100, Nickolas Fortino wrote:
>>> The page tables have a page marked as user read only, but the TLB has
>>> the page marked as user read/write.
>>
>> This happens during fork() for the current process. I think mprotect()
>> as well. The caller is supposed not to have threads that write its
>> memory while another thread does a fork().
To be clear, the complaint is not that the page tables are ephemerally
out of sync with the TLBs. I agree that is part of the expected
operation of fork(), and if a TLB invalidate occurs prior to any memory
access the code is valid.
The problem is eventually a user process performs a store which hits on
a writeable TLB entry with the PTE marked as read only. Is it supposed
to be possible for a user threading bug to end up in this state? I would
have expected the kernel to be responsible for assuring no stores occur
to a page it has marked as read only.
As for whether the application is threaded, it almost certainly is -
it's cfbench equivalent to
https://play.google.com/store/apps/details?id=eu.chainfire.cfbench&hl=en
next prev parent reply other threads:[~2013-07-17 20:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 18:19 preempted dup_mm misses TLB invalidate Nickolas Fortino
2013-07-17 19:27 ` Catalin Marinas
2013-07-17 19:52 ` Stephen Warren
2013-07-17 20:01 ` Russell King - ARM Linux
2013-07-17 20:11 ` Stephen Warren
2013-07-17 20:09 ` Nickolas Fortino [this message]
2013-07-17 20:34 ` Russell King - ARM Linux
2013-07-17 21:03 ` Nickolas Fortino
2013-07-17 21:21 ` Russell King - ARM Linux
2013-07-18 1:48 ` Nickolas Fortino
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=51E6FA10.5070504@nvidia.com \
--to=nfortino@nvidia$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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