[Question] flush_dcache_page() need to flush icache?

Catalin Marinas catalin.marinas at arm.com
Wed May 1 04:22:38 EDT 2013


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 at 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



More information about the linux-arm-kernel mailing list