lkml.org 
[lkml]   [2008]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] e1000e: Useset_memory_ro()/set_memory_rw() to protect flash memory
On Tue, Sep 23, 2008 at 03:45:54PM -0700, Jeff Kirsher wrote:
> +#ifdef _ASM_X86_CACHEFLUSH_H
> + set_memory_rw((unsigned long)hw->flash_address,
> + hw->flash_len >> PAGE_SHIFT);
> +#endif
> writew(val, hw->flash_address + reg);
> +#ifdef _ASM_X86_CACHEFLUSH_H
> + set_memory_ro((unsigned long)hw->flash_address,
> + hw->flash_len >> PAGE_SHIFT);
> +#endif
> }

Hi Jeff,

You're making the entire read-only mapping read-write for the single
writel call... why not just limit it to the page that the writel is
targetting?

regards, Kyle
[sorry, I've only been following this at a glance, but it's somewhat
important for rawhide... does someone have a way to reproduce this at
whim? Has someone tried catching it using an IOMMU on one of the newer
Intel boxes, if it is a DMA going awry?]


\
 
 \ /
  Last update: 2008-09-24 19:57    [W:0.078 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site