From: Andrew Morton <akpm@linux-foundation.org>
To: Kyle McMartin <kyle@parisc-linux.org>
Cc: linux-arch@vger.kernel.org, tony.luck@intel.com,
torvalds@linux-foundation.org
Subject: Re: [PARISC] Handle wrapping in expand_upwards()
Date: Sat, 23 Jun 2007 09:55:48 -0700 [thread overview]
Message-ID: <20070623095548.a7117833.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070621091104.GA10043@fattire.cabal.ca>
> On Thu, 21 Jun 2007 05:11:04 -0400 Kyle McMartin <kyle@parisc-linux.org> wrote:
> From: Helge Deller <deller@gmx.de>
>
> Function expand_upwards() did not guarded against wrapping
> around to address 0. This fixes the adjtimex02 testcase from
> the Linux Test Project on a 32bit PARISC kernel.
>
> [expand_upwards is only used on parisc and ia64; it looks like it does
> the right thing on both. --kyle]
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> Cc: Tony Luck <tony.luck@intel.com>
> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
> ---
>
> Index: linux-2.6/mm/mmap.c
> ===================================================================
> --- linux-2.6.orig/mm/mmap.c 2007-05-19 13:30:10.000000000 -0400
> +++ linux-2.6/mm/mmap.c 2007-06-21 05:18:46.000000000 -0400
> @@ -1536,9 +1536,14 @@
> * vma->vm_start/vm_end cannot change under us because the caller
> * is required to hold the mmap_sem in read mode. We need the
> * anon_vma lock to serialize against concurrent expand_stacks.
> + * Also guard against wrapping around to address 0.
> */
> - address += 4 + PAGE_SIZE - 1;
> - address &= PAGE_MASK;
> + if (address < PAGE_ALIGN(address+4))
> + address = PAGE_ALIGN(address+4);
> + else {
> + anon_vma_unlock(vma);
> + return -ENOMEM;
> + }
> error = 0;
>
You did't really provide enough information for us to be able to decide
whether this change is needed in 2.6.22, let alone 2.6.21.
I will magically infer from your To: line that you consider it 2.6.22
material, but if so I think that we'll need suitable reviewing, testing and
acking from Tony, please. If he's offline (ols, perhaps?) then we might
have a problem. Perhaps find a suitable ia64-enabled alternate?
As for 2.6.21: I'll assume it's needed there as well. Please advise if
otherwise.
next prev parent reply other threads:[~2007-06-23 16:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 9:11 [PARISC] Handle wrapping in expand_upwards() Kyle McMartin
2007-06-23 16:55 ` Andrew Morton [this message]
2007-06-25 1:01 ` Kyle McMartin
2007-06-25 21:36 ` Luck, Tony
2007-06-29 14:48 ` Kyle McMartin
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=20070623095548.a7117833.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=kyle@parisc-linux.org \
--cc=linux-arch@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/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).