From: Andrew Morton <akpm@osdl.org>
To: Daniel McNeil <daniel@osdl.org>
Cc: bryce@osdl.org, wli@holomorphy.com,
ltp-list@lists.sourceforge.net, linux-kernel@vger.kernel.org,
testdev@osdl.org, markh@osdl.org
Subject: Re: [LTP] Re: Recent changes in LTP test results
Date: Fri, 9 Jul 2004 23:45:22 -0700 [thread overview]
Message-ID: <20040709234522.56cdd515.akpm@osdl.org> (raw)
In-Reply-To: <1089416583.2265.47.camel@ibm-c.pdx.osdl.net>
Daniel McNeil <daniel@osdl.org> wrote:
>
> The /proc/pid/maps looked like this:
>
> without nx-update patch:
> 40017000-40018000 ---p 40017000 00:00 0
> =====
> with -mm1:
> 40017000-40018000 --xp 40017000 00:00 0
Here's mine, with current -linus bk:
40000000-40001000 ---p 40000000 00:00 0
> So it looks like the page being executable allows read
> access.
>
> Not sure why you do not see this on your machine. This
> fails on my 2-proc xeon box (and all the STP machines).
>
#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
main()
{
char *p0 = 0;
char *p1 = (char *)-1;
char *p2;
int err;
p2 = mmap(0, 4096, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
printf("p2=%p\n", p2);
printf("pid=%d\n", getpid());
getchar();
errno = 0;
err = access(p0, R_OK);
printf("access 0 ptr %p return code %d errno %d\n", p0, err, errno);
perror("access result:");
errno = 0;
err = access(p1, R_OK);
printf("access 1 ptr %p return code %d errno %d\n", p1, err, errno);
perror("access result:");
errno = 0;
err = access(p2, R_OK);
printf("access 2 ptr %p return code %d errno %d\n", p2, err, errno);
perror("access result:");
}
vmm:/home/akpm> ./x
p2=0x40000000
pid=2038
access 0 ptr (nil) return code -1 errno 14
access result:: Bad address
access 1 ptr 0xffffffff return code -1 errno 14
access result:: Bad address
access 2 ptr 0x40000000 return code -1 errno 14
access result:: Bad address
I get this result on both p4 xeon and p3 xeon.
next prev parent reply other threads:[~2004-07-10 6:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-29 1:46 Recent changes in LTP test results Bryce Harrington
2004-06-29 4:12 ` Andrew Morton
2004-06-30 7:24 ` Bryce Harrington
2004-06-30 7:34 ` William Lee Irwin III
2004-07-07 1:05 ` [LTP] " Bryce Harrington
2004-07-07 2:10 ` Andrew Morton
2004-07-07 20:48 ` Bryce Harrington
2004-07-07 21:14 ` David S. Miller
2004-07-09 0:19 ` Bryce Harrington
2004-07-08 6:07 ` Andrew Morton
2004-07-09 20:40 ` Rik van Riel
2004-07-09 23:43 ` Daniel McNeil
2004-07-10 6:45 ` Andrew Morton [this message]
2004-07-12 20:49 ` Daniel McNeil
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=20040709234522.56cdd515.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=bryce@osdl.org \
--cc=daniel@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltp-list@lists.sourceforge.net \
--cc=markh@osdl.org \
--cc=testdev@osdl.org \
--cc=wli@holomorphy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.