linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Christopher Yeoh <cyeoh@au1.ibm.com>
Cc: linux-kernel@vger.kernel.org, Chris Yeoh <yeohc@au1.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Howells <dhowells@redhat.com>
Subject: Re: cross memory attach && security check
Date: Tue, 10 Jan 2012 14:14:46 +0100	[thread overview]
Message-ID: <20120110131446.GA30465@redhat.com> (raw)
In-Reply-To: <20120109145342.GA1777@redhat.com>

On 01/09, Oleg Nesterov wrote:
>
> Partly I was confused because (I guess) there is another minor bug in
> process_vm_rw(), I think we need
>
> 	--- x/mm/process_vm_access.c
> 	+++ x/mm/process_vm_access.c
> 	@@ -375,10 +375,10 @@ static ssize_t process_vm_rw(pid_t pid,
> 	 
> 		/* Check iovecs */
> 		if (vm_write)
> 	-		rc = rw_copy_check_uvector(WRITE, lvec, liovcnt, UIO_FASTIOV,
> 	+		rc = rw_copy_check_uvector(READ, lvec, liovcnt, UIO_FASTIOV,
> 						   iovstack_l, &iov_l, 1);
> 		else
> 	-		rc = rw_copy_check_uvector(READ, lvec, liovcnt, UIO_FASTIOV,
> 	+		rc = rw_copy_check_uvector(WRITE, lvec, liovcnt, UIO_FASTIOV,
> 						   iovstack_l, &iov_l, 1);

Argh. No, I was wrong, vrfy_dir() swaps READ/WRITE.

Oleg.


  reply	other threads:[~2012-01-10 13:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 15:10 cross memory attach && security check Oleg Nesterov
2012-01-09  7:11 ` Christopher Yeoh
2012-01-09 14:53   ` Oleg Nesterov
2012-01-10 13:14     ` Oleg Nesterov [this message]
2012-01-11  1:17     ` Christopher Yeoh
2012-01-11 15:49       ` Oleg Nesterov

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=20120110131446.GA30465@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cyeoh@au1.ibm.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yeohc@au1.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).