linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	Mark Salter <msalter@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Russell King <rmk@arm.linux.org.uk>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org,
	Linux-Arch <linux-arch@vger.kernel.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Pavel Emelyanov <xemul@parallels.com>
Subject: Re: sys_kcmp
Date: Tue, 25 Sep 2012 00:53:18 +0400	[thread overview]
Message-ID: <20120924205318.GK16532@moon> (raw)
In-Reply-To: <87bogvup4w.fsf@xmission.com>

On Mon, Sep 24, 2012 at 01:44:47PM -0700, Eric W. Biederman wrote:
> Cyrill Gorcunov <gorcunov@openvz.org> writes:
> 
> > On Mon, Sep 24, 2012 at 10:51:19PM +0400, Cyrill Gorcunov wrote:
> >> > I expect what you want is a call to access_ok, rather than hard coding
> >> > details about task layout here.  This test certainly looks wrong
> >> > for a 32bit process on a 64bit kernel. If I read your test right it
> >> > appears I can set values of say 0x100000000 on a 32bit process...
> >> > 
> >> > As for mmap_min_addr I would expect your find_vma check would make that
> >> > test unnecessary, simply by not finding a vma...
> >> 
> >> Good point, Eric, thanks! I'm cooking a new patch now.
> >
> > Btw, Eric, I somehow miss one bit -- how would you set this 0x100000000
> > if TASK_SIZE is a macro which does check for TIF_ADDR32 and sets limit
> > acordingly? What i'm missing?
> 
> How odd.  Last time I had looked TASK_SIZE was a simple constant.

Ah, I see.

> Still I wonder a little if all architectures currently run from 0 to
> TASK_SIZE, for address space available.  I seem to remember there have
> been some exceptions to that rule.  But I can't recall what they were.

Actually I;ve tuned up the code to use access_ok instead but now I'm trying
to fugure out situation if it can somehow affect c/r process (well, i've
ran all test cases we use for c/r and all are passed well, but still...).

Mark, after some more thinking, I agree that your proposal with min-address
should work better than mine explicit CONFIG_MMU. Could you please send
your patch for that? As to access_ok -- gimme some more time, i need to double
check everything and I'll patch the code on top of your patch a bit later, ok?

      reply	other threads:[~2012-09-24 20:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22 10:56 sys_kcmp (was: Re: [PATCH 1/2] ARM: add finit_module syscall to ARM) Geert Uytterhoeven
2012-09-22 10:56 ` Geert Uytterhoeven
2012-09-22 11:45 ` Cyrill Gorcunov
2012-09-22 13:20   ` Russell King
2012-09-22 13:20     ` Russell King
2012-09-22 13:38     ` Ralf Baechle
2012-09-22 15:37       ` Cyrill Gorcunov
2012-09-22 18:47     ` Andrew Morton
2012-09-24 16:21       ` Mark Salter
2012-09-24 16:21         ` Mark Salter
2012-09-24 16:49         ` Cyrill Gorcunov
2012-09-24 17:42           ` Cyrill Gorcunov
2012-09-24 18:16             ` Mark Salter
2012-09-24 18:55               ` Cyrill Gorcunov
2012-09-24 18:29             ` sys_kcmp Eric W. Biederman
2012-09-24 18:51               ` sys_kcmp Cyrill Gorcunov
2012-09-24 20:35                 ` sys_kcmp Cyrill Gorcunov
2012-09-24 20:35                   ` sys_kcmp Cyrill Gorcunov
2012-09-24 20:44                   ` sys_kcmp Eric W. Biederman
2012-09-24 20:53                     ` Cyrill Gorcunov [this message]

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=20120924205318.GK16532@moon \
    --to=gorcunov@openvz.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=geert@linux-m68k.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msalter@redhat.com \
    --cc=rmk@arm.linux.org.uk \
    --cc=xemul@parallels.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).