From: Bodo Eggert <harvested.in.lkml@7eggert.dyndns.org>
To: Kyle Moffett <mrmacman_g4@mac.com>,
"Vincent W. Freeh" <vin@csc.ncsu.edu>,
linux-kernel@vger.kernel.org
Subject: Re: Understanding Linux addr space, malloc, and heap
Date: Sun, 23 Oct 2005 12:41:35 +0200 [thread overview]
Message-ID: <E1ETdIF-0000h8-Iw@be1.lrz> (raw)
In-Reply-To: 50xnU-7s2-37@gated-at.bofh.it
Kyle Moffett <mrmacman_g4@mac.com> wrote:
> On Oct 21, 2005, at 12:24:50, Vincent W. Freeh wrote:
>> I guess I live in a different world. I do lots of things I'm not
>> "supposed" to do.
>
> So why are you complaining that it doesn't work? "Doctor, it hurts
> when I use my toes to hold a nail as I hammer it in!" "Well don't do
> that then!"
I'm not supposed to run linux on i386, ask Bill. Why do I do it then?
>> Moreover, it is very sensible and usable to mprotect malloc pages.
>
> DANGER! DANGER WILL ROBINSON! DANGER! malloc() is *NOT* guaranteed
> or even theoretically implemented to return pages.
If you allocate a block of 2*PAGESIZE-1 bytes, *any* allocation method is
*guaranteed* return at least one complete page. (BTW: The example from the
manpage is wrong since it does only make sure the starting address is on
the page, but not that the end of the protected memory is within the
allocated area. Whom should I contact?)
But even if Vincend makes the next malloc/free/whatever to be fubar,
or if he made the world explode, mprotect is still required to report
an error if the requested action failed. If it doesn't do that for
mprotecting _any_ range, no matter how strange it may be, it is broken.
--
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
next parent reply other threads:[~2005-10-23 10:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <505ru-8qi-1@gated-at.bofh.it>
[not found] ` <505Lp-B4-81@gated-at.bofh.it>
[not found] ` <506QZ-2cH-3@gated-at.bofh.it>
[not found] ` <5070Y-2qP-23@gated-at.bofh.it>
[not found] ` <507ac-2Cm-25@gated-at.bofh.it>
[not found] ` <507NL-3Em-29@gated-at.bofh.it>
[not found] ` <507Xd-3QT-19@gated-at.bofh.it>
[not found] ` <50xnU-7s2-37@gated-at.bofh.it>
2005-10-23 10:41 ` Bodo Eggert [this message]
2005-10-23 10:44 ` Understanding Linux addr space, malloc, and heap Arjan van de Ven
2005-10-23 21:29 ` Kyle Moffett
2005-10-21 13:45 Vincent W. Freeh
2005-10-21 14:03 ` Arjan van de Ven
2005-10-21 15:11 ` Vincent W. Freeh
2005-10-21 15:20 ` Anton Altaparmakov
2005-10-21 15:21 ` Paulo Marques
2005-10-21 15:22 ` Arjan van de Ven
2005-10-21 15:37 ` Vincent W. Freeh
2005-10-21 15:48 ` Arjan van de Ven
2005-10-21 16:04 ` Vincent W. Freeh
2005-10-21 16:23 ` Arjan van de Ven
2005-10-21 15:52 ` Kyle Moffett
2005-10-21 16:10 ` Vincent W. Freeh
2005-10-21 16:19 ` Theodore Ts'o
2005-10-21 16:26 ` Paulo Marques
2005-10-21 16:14 ` Andreas Schwab
2005-10-21 16:24 ` Vincent W. Freeh
2005-10-22 19:27 ` Kyle Moffett
2005-10-21 15:37 ` Alex Bligh - linux-kernel
2005-10-21 15:47 ` Arjan van de Ven
2005-10-21 15:58 ` Paulo Marques
-- strict thread matches above, loose matches on Subject: below --
2005-10-21 12:46 Vincent W. Freeh
2005-10-21 13:00 ` 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=E1ETdIF-0000h8-Iw@be1.lrz \
--to=harvested.in.lkml@7eggert.dyndns.org \
--cc=7eggert@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mrmacman_g4@mac.com \
--cc=vin@csc.ncsu.edu \
/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