mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yingchao Zhou" <yc_zhou@ncic.ac.cn>
To: "Li, Shaohua" <shaohua.li@intel.com>
Cc: "zxc" <zxc@ncic.ac.cn>, "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: RE: [RFC] PAGE_RW Should be added to PAGE_COPY ?
Date: Thu, 14 Sep 2006 13:23:26 +0800	[thread overview]
Message-ID: <20060914052328.8B4AFFB044@ncic.ac.cn> (raw)

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: linux-kernel-owner@vger.kernel.org
>[mailto:linux-kernel-owner@vger.kernel.org] 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                           _
___________________________________________________




             reply	other threads:[~2006-09-14  5:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14  5:23 Yingchao Zhou [this message]
2006-09-15  0:58 Yingchao Zhou
2006-09-15  3:32 ` Hugh Dickins

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=20060914052328.8B4AFFB044@ncic.ac.cn \
    --to=yc_zhou@ncic.ac.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=zxc@ncic.ac.cn \
    /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®