All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Nick Piggin <npiggin@suse.de>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [rfc][patch] mm: dirty page accounting race fix
Date: Thu, 14 Aug 2008 13:25:20 -0700	[thread overview]
Message-ID: <48A494B0.3050509@goop.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0808141328090.11013@blonde.site>

Hugh Dickins wrote:
> I realized that was the intended optimization, what I'd missed is that
> dirty_accountable can only be true there if (vma->vm_flags & VM_WRITE):
> that's checked in vma_wants_writenotify(), which is how dirty_accountable
> gets to be set.
>
> So those lines are okay, panic over, phew.
>   

I got bitten by precisely the same train of thought.  I think that code 
officially Non Obvious (or at least Not Immediately Obvious, which is 
bad in security-sensitive code).

    J

WARNING: multiple messages have this Message-ID (diff)
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Nick Piggin <npiggin@suse.de>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [rfc][patch] mm: dirty page accounting race fix
Date: Thu, 14 Aug 2008 13:25:20 -0700	[thread overview]
Message-ID: <48A494B0.3050509@goop.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0808141328090.11013@blonde.site>

Hugh Dickins wrote:
> I realized that was the intended optimization, what I'd missed is that
> dirty_accountable can only be true there if (vma->vm_flags & VM_WRITE):
> that's checked in vma_wants_writenotify(), which is how dirty_accountable
> gets to be set.
>
> So those lines are okay, panic over, phew.
>   

I got bitten by precisely the same train of thought.  I think that code 
officially Non Obvious (or at least Not Immediately Obvious, which is 
bad in security-sensitive code).

    J

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2008-08-14 20:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14  9:45 [rfc][patch] mm: dirty page accounting race fix Nick Piggin
2008-08-14  9:45 ` Nick Piggin
2008-08-14 10:27 ` Peter Zijlstra
2008-08-14 10:27   ` Peter Zijlstra
2008-08-14 11:55 ` Hugh Dickins
2008-08-14 11:55   ` Hugh Dickins
2008-08-14 12:18   ` Peter Zijlstra
2008-08-14 12:18     ` Peter Zijlstra
2008-08-14 12:47     ` Hugh Dickins
2008-08-14 12:47       ` Hugh Dickins
2008-08-14 20:25       ` Jeremy Fitzhardinge [this message]
2008-08-14 20:25         ` Jeremy Fitzhardinge
2008-08-14 12:35   ` Nick Piggin
2008-08-14 12:35     ` Nick Piggin
2008-08-14 13:20     ` Hugh Dickins
2008-08-14 13:20       ` Hugh Dickins
2008-08-14 12:49   ` Peter Zijlstra
2008-08-14 12:49     ` Peter Zijlstra
2008-08-14 13:39     ` Hugh Dickins
2008-08-14 13:39       ` Hugh Dickins
2008-08-14 13:52       ` Nick Piggin
2008-08-14 13:52         ` Nick Piggin
2008-08-14 19:09         ` Hugh Dickins
2008-08-14 19:09           ` Hugh Dickins

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=48A494B0.3050509@goop.org \
    --to=jeremy@goop.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    /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.