mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Andi Kleen" <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] kmemcheck: trap uses of uninitialized memory (v2)
Date: Thu, 29 Nov 2007 14:24:05 +0100	[thread overview]
Message-ID: <19f34abd0711290524k49628a0dja8a5a04d10253157@mail.gmail.com> (raw)
In-Reply-To: <p734pf59wf7.fsf@crumb.suse.de>

On 29 Nov 2007 11:29:48 +0100, Andi Kleen <andi@firstfloor.org> wrote:
> Vegard Nossum <vegard.nossum@gmail.com> writes:
> >
> > - We properly flush TLB entries that change. This used to not be the case, and so we
>
> For low values of "properly" @)
>
> > +     pte = lookup_address(addr);
> > +     change_page_attr(page, 1, __pgprot(pte->pte_low | _PAGE_VISIBLE));
> > +     __flush_tlb_one(addr);
>
> That's not enough, you need to flush all CPUs.
>
> Also when you don't call global_flush_tlb() eventually because c_p_a() will leak flush
> objects over time.

We don't need to flush all CPUs. This is my rationale: The debug
exception (single-step trap) will always happen on the same CPU that
the page fault occurred on. Page fault shows the page, debug exception
hides the page again. Between those two operations, nothing else can
happen that will use the TLB entry in question (unless you have some
weird race condition, but then the code is in error anyway).

What is c_p_a() and what is a flush object?

>
> -Andi
>

Vegard

  reply	other threads:[~2007-11-29 13:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 15:16 Vegard Nossum
2007-11-28  6:51 ` Richard Knutsson
2007-11-28 18:31   ` Vegard Nossum
2007-11-29  4:49     ` Richard Knutsson
2007-11-29  8:02 ` Pekka Enberg
2007-11-29  9:10   ` Vegard Nossum
2007-11-29  9:39     ` Pekka J Enberg
2007-11-29 10:04       ` Vegard Nossum
2007-11-29 12:05         ` Pekka J Enberg
2007-11-29 10:29 ` Andi Kleen
2007-11-29 13:24   ` Vegard Nossum [this message]
2007-11-29 13:45     ` Andi Kleen

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=19f34abd0711290524k49628a0dja8a5a04d10253157@mail.gmail.com \
    --to=vegard.nossum@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®