I think it's OK to lock the page for the NIC driver. But I think it is an OS flaw to
clear the _PAGE_RW bit for ptes in the mprotected space. If the _PAGE_RW is set, it
should not get to do_wp_page.
Best regards
>Your analysis is correct. But locking a page to avoid swap has different
>meaning with page locked (TestSetPageLocked()). Looks you missed this.
>
>Thanks,
>Shaohua
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of Yingchao Zhou
>Sent: Wednesday, September 13, 2006 10:03 PM
>To: linux-kernel
>Cc: akpm; alan; zxc
>Subject: [RFC] PAGE_RW Should be added to PAGE_COPY ?
>
>
> The current kernel set PAGE_COPY without write bit. This will cause
>intermittent non-cosistent data for user-level network drivers such as
>Infiniband, Quadrics and Myrinet. Which has also be mentioned by Costin
>Iancu in the paper "HUNTing the Overlap " (PACT'05).
> An example of such phenomena is the following sequences:
> register a memory space BUFF for receive message,
> receive message,
> call mprotect(...PROT_NONE...) and
>mprotect(...PROT_READ|PROT_WRITE) one by one,
> write into BUFF,
> then receive again.
> The second time received data will perhaps not be the data sent by
>the peer machine but the data written by itself in the 4th step.
>
> The reson is that :
> 1) User-level network driver locks phy pages when memory space is
>registered;
>........
___________________________________________________
_ Yingchao Zhou _
_ ICT, CAS _
_ (86)010-62601009 _
___________________________________________________
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]