From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Ingo Molnar <mingo@elte.hu>, Arjan van de Ven <arjanv@redhat.com>
Cc: linux-mm mailing list <linux-mm@kvack.org>
Subject: arch_get_unmapped_area_topdown vs stack reservations
Date: Tue, 17 Aug 2004 15:18:34 -0700 [thread overview]
Message-ID: <170170000.1092781114@flay> (raw)
I worry that the current code will allow us to intrude into the
reserved stack space with a vma allocation if it's requested at
an address too high up. One could argue that they got what they
asked for ... but not sure we should be letting them do that?
Is the following change acceptable? Not tested yet, but will do
if you're happy with it.
Signed-off-by: Martin J. Bligh <mbligh@aracnet.com>
diff -purN -X /home/mbligh/.diff.exclude /home/linux/views/linux-2.6.8.1-mm1/mm/mmap.c 2.6.8.1-mm1-topdown_fix/mm/mmap.c
--- /home/linux/views/linux-2.6.8.1-mm1/mm/mmap.c 2004-08-17 14:43:07.000000000 -0700
+++ 2.6.8.1-mm1-topdown_fix/mm/mmap.c 2004-08-17 14:52:55.000000000 -0700
@@ -1101,7 +1101,7 @@ arch_get_unmapped_area_topdown(struct fi
if (addr) {
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
- if (TASK_SIZE - len >= addr &&
+ if (base - len >= addr &&
(!vma || addr + len <= vma->vm_start))
return addr;
}
--
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:"aart@kvack.org"> aart@kvack.org </a>
next reply other threads:[~2004-08-17 22:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-17 22:18 Martin J. Bligh [this message]
2004-08-18 6:11 ` Arjan van de Ven
2004-08-18 6:18 ` Martin J. Bligh
2004-08-18 6:36 ` Arjan van de Ven
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=170170000.1092781114@flay \
--to=mbligh@aracnet.com \
--cc=arjanv@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
/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