All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [Question] flush_dcache_page() need to flush icache?
Date: Wed, 1 May 2013 09:22:38 +0100	[thread overview]
Message-ID: <20130501082238.GA10984@arm.com> (raw)
In-Reply-To: <CACVXFVNUu9HKY+Vo7VLWGC3rQoj7TUwC3kfpEsf5kCEibMcThg@mail.gmail.com>

On Wed, May 01, 2013 at 09:11:47AM +0100, Ming Lei wrote:
> On Tue, Apr 30, 2013 at 11:26 PM, Catalin Marinas
> <catalin.marinas@arm.com> wrote:
> >
> > It's not self-modifying code, this would be code running in user space
> > which modifies some other code and it would invoke the ARM-specific
> > syscall for flushing.
> >
> > Here it is about kernel modifying a page which is already mapped in user
> > space, hence the check for mapping && mapping_mapped.
> 
> I understand that flushing icache is only needed when the page is mapped
> as executable in virtual address, right?  If yes, the flush_dcache_page might
> be inside read/write on one mapped page(executable in virtual space), then
> still looks like self-modifying code case?

It depends on the definition of 'self'. If by that you mean the user
application, it hasn't modified itself and it can't trigger
flush_dcache_page().

-- 
Catalin

  reply	other threads:[~2013-05-01  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30  8:16 [Question] flush_dcache_page() need to flush icache? Ming Lei
2013-04-30  9:05 ` Catalin Marinas
2013-04-30 10:02   ` Ming Lei
2013-04-30 15:26     ` Catalin Marinas
2013-05-01  8:11       ` Ming Lei
2013-05-01  8:22         ` Catalin Marinas [this message]
2013-05-01  8:53           ` Ming Lei

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=20130501082238.GA10984@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.