linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>,
	Pavel Emelyanov <xemul@parallels.com>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Borislav Petkov <bp@alien8.de>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	X86 ML <x86@kernel.org>,
	Ruslan Kabatsayev <b7.10110111@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Getting rid of dynamic TASK_SIZE (on x86, at least)
Date: Wed, 11 May 2016 20:08:47 +0200	[thread overview]
Message-ID: <20160511180847.GA27195@redhat.com> (raw)
In-Reply-To: <CALCETrU4me1X7oTriLgFQpTqwaebMsT5sdYZzjC=_EERXNbqzA@mail.gmail.com>

On 05/10, Andy Lutomirski wrote:
>
> On May 10, 2016 11:21 AM, "Oleg Nesterov" <oleg@redhat.com> wrote:
> >
> > On 05/10, Andy Lutomirski wrote:
> > >
> > >  - xol_add_vma: This one is weird: uprobes really is doing something
> > > behind the task's back, and the addresses need to be consistent with
> > > the address width.  I'm not quite sure what to do here.
> >
> > It can use mm->task_size instead, plus this is just a hint. And perhaps
> > mm->task_size should have more users, say get_unmapped_area...
>
> Ick.  I hadn't noticed mm->task_size.  We have a *lot* of different
> indicators of task size.  mm->task_size appears to have basically no
> useful uses except maybe for ppc.
>
> On x86, bitness can change without telling the kernel, and tasks
> running in 64-bit mode can do 32-bit syscalls.

Sure, but imo this doesn't mean that mm->task_size or (say) is_64bit_mm()
make no sense.

> So maybe I should add mm->task_size to my list of things that would be
> nice to remove.  Or maybe I'm just tilting at windmills.

I dunno. But afaics there is no other way to look at foreign mm and find
out its limit. Say, the usage of mm->task_size in validate_range() looks
valid even if (afaics) nothing bad can happen if start/end >= task_size,
so validate_range() could just check that len+start doesn't overflow.

Oleg.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2016-05-11 18:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 16:07 Getting rid of dynamic TASK_SIZE (on x86, at least) Andy Lutomirski
2016-05-10 16:30 ` Cyrill Gorcunov
2016-05-10 16:45   ` Andy Lutomirski
2016-05-10 17:05     ` Cyrill Gorcunov
2016-05-10 17:26       ` Andy Lutomirski
2016-05-10 17:49         ` Cyrill Gorcunov
2016-05-10 21:11           ` Andy Lutomirski
2016-05-11  5:59             ` Cyrill Gorcunov
2016-05-10 18:20 ` Oleg Nesterov
2016-05-10 20:29   ` Andy Lutomirski
2016-05-11 18:08     ` Oleg Nesterov [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=20160511180847.GA27195@redhat.com \
    --to=oleg@redhat.com \
    --cc=0x7f454c46@gmail.com \
    --cc=b7.10110111@gmail.com \
    --cc=bp@alien8.de \
    --cc=gorcunov@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=x86@kernel.org \
    --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).