public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
	nickpiggin@yahoo.com.au, davem@davemloft.net,
	tony.luck@intel.com,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] freepgt: free_pgtables use vma list
Date: Thu, 24 Mar 2005 10:07:19 +1100	[thread overview]
Message-ID: <1111619239.16224.92.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.61.0503231248510.13752@goblin.wat.veritas.com>


> Thanks for the warning, Ben, but I don't see a problem there: that's
> in your separate ioremap_mm, which is rather like init_mm, and won't
> ever go through exit_mmap, and doesn't need its page tables freed -
> isn't that right?

Right.

> But it was worth auditing the different architectures for this: there
> seems to be just one problem, where the x86_64 32-bit vsyscall page
> is mapped into userspace by __map_syscall32 without linking a real
> vma into mm.  Which Andi has already marked with his "RED-PEN".

The ppc64 vDSO is mapped with a real VMA bot not mmap call (the vDMA is
built from scratch from binfmt_elf, or rather from an arch callback
issued by binfmt_elf, like the stack VMA). Though should be fine too
though but you may want to double check.

> That's not something I can fix up in a hurry.  Yes, as the comment
> suggests we should probably allocate a real vma for it, but that might
> have a few consequences (if only /proc/<pid>/maps showing two vdsos?).
> I'll have to let someone else deal with that.

Why 2 ? we map the 32 bits one for 32 bits processes and the 64 bits one
for 64 bits processes on ppc64 without problem ... In fact, Andi could
even re-use our hook I suppose. The way I do it allows also for free
copy-on-write semantics (with mprotect though, I don't set it writeable
by default) so that gdb can put breakpoints in it, etc...

> For the moment, I think the behaviour of x86_64 32bit-support with
> the freepgt patches will depend on personality - ADDR_LIMIT_32BIT
> should usually work fine (unless the app moves its stack elsewhere
> and munmaps the old one: that might well unmap its vdso too); but
> ADDR_LIMIT_3GB will be liable to leak tables (if get_user_pages or
> its /proc/<pid>/maps has been examined).  I don't know how common
> ADDR_LIMIT_3GB use is, but whatever: okay for testing, but not for
> including the patches in a release.
> 
> Hugh
-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>


  reply	other threads:[~2005-03-23 23:08 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21 20:52 [PATCH 1/5] freepgt: free_pgtables use vma list Hugh Dickins
2005-03-21 20:55 ` [PATCH 2/5] freepgt: remove MM_VM_SIZE(mm) Hugh Dickins
2005-03-21 20:56 ` [PATCH 3/5] freepgt: hugetlb_free_pgd_range Hugh Dickins
2005-03-21 20:57 ` [PATCH 4/5] freepgt: remove arch pgd_addr_end Hugh Dickins
2005-03-21 20:58 ` [PATCH 5/5] freepgt: mpnt to vma cleanup Hugh Dickins
2005-03-21 22:26 ` [PATCH 1/5] freepgt: free_pgtables use vma list David S. Miller
2005-03-22  5:47   ` Hugh Dickins
2005-03-22 17:41     ` David S. Miller
2005-03-22 11:40 ` Andrew Morton
2005-03-22 12:17   ` Nick Piggin
2005-03-22 16:37   ` Hugh Dickins
2005-03-22 18:34     ` David S. Miller
2005-03-22 19:01     ` David S. Miller
2005-03-22 19:21       ` David S. Miller
2005-03-22 19:23         ` David S. Miller
2005-03-22 19:36           ` Hugh Dickins
2005-03-22 20:21             ` David S. Miller
2005-03-22 23:45               ` Benjamin Herrenschmidt
2005-03-22 20:33             ` David S. Miller
2005-03-22 21:51               ` Hugh Dickins
2005-03-22 22:41                 ` David S. Miller
2005-03-23  0:51                   ` Hugh Dickins
2005-03-23  2:09                     ` David S. Miller
2005-03-22 23:32                 ` Nick Piggin
2005-03-22 23:44                   ` David S. Miller
2005-03-23  0:19                     ` Nick Piggin
2005-03-23  0:20                       ` David S. Miller
2005-03-23  0:00                   ` David S. Miller
2005-03-23  0:03                   ` David S. Miller
2005-03-22 21:28             ` David S. Miller
2005-03-22 23:30     ` Benjamin Herrenschmidt
2005-03-23 13:28       ` Hugh Dickins
2005-03-23 23:07         ` Benjamin Herrenschmidt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-03-21 22:31 Luck, Tony
2005-03-21 23:02 ` David S. Miller
2005-03-22  4:14   ` Nick Piggin
2005-03-22  5:29     ` David S. Miller
2005-03-22  6:08       ` Hugh Dickins
2005-03-22  6:33         ` Nick Piggin
2005-03-22 17:52         ` David S. Miller
2005-03-22 17:55     ` David S. Miller
2005-03-22  5:42   ` Hugh Dickins
2005-03-22 18:06 Luck, Tony
2005-03-22 18:48 ` Hugh Dickins
2005-03-22 22:40 Luck, Tony
2005-03-22 23:30 ` David S. Miller
2005-03-23  0:40 ` Hugh Dickins
2005-03-22 23:53 Luck, Tony
2005-03-22 23:56 ` David S. Miller
2005-03-23  0:56 ` Hugh Dickins
2005-03-23  1:10   ` Andrew Morton
2005-03-23  2:00     ` David S. Miller
2005-03-23  2:10       ` Nick Piggin
2005-03-23  2:15         ` David S. Miller

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=1111619239.16224.92.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=tony.luck@intel.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