From: Chris Friesen <hidden> Date: 2007-08-27 20:22:14
Hi all,
I've got a ppc64 box running 2.6.14. 64-bit kernel, 32-bit userspace.
It has a ~86KB chunk of memory near the top of the process address
space, and I'm not sure who's setting it up and what the purpose is. In
/proc/<pid>/maps it looks like this:
fffea000-fffff000 rw-p fffea000 00:00 0
Can anyone enlighten me as to what this is for and who is allocating it?
Thanks,
Chris
From: Anton Blanchard <hidden> Date: 2007-08-27 20:31:57
Hi,
I've got a ppc64 box running 2.6.14. 64-bit kernel, 32-bit userspace.
It has a ~86KB chunk of memory near the top of the process address
space, and I'm not sure who's setting it up and what the purpose is. In
/proc/<pid>/maps it looks like this:
fffea000-fffff000 rw-p fffea000 00:00 0
Can anyone enlighten me as to what this is for and who is allocating it?
Looks like your process stack. BTW we leave the top page
(0xfffff000 - 0xffffffff) unmapped mostly because of test cases that
expect
*(unsigned long *)-1UL
to fail.
Anton
From: Chris Friesen <hidden> Date: 2007-08-27 22:05:54
Anton Blanchard wrote:
Hi,
quoted
I've got a ppc64 box running 2.6.14. 64-bit kernel, 32-bit userspace.
It has a ~86KB chunk of memory near the top of the process address
space, and I'm not sure who's setting it up and what the purpose is. In
/proc/<pid>/maps it looks like this:
fffea000-fffff000 rw-p fffea000 00:00 0
Can anyone enlighten me as to what this is for and who is allocating it?
Looks like your process stack. BTW we leave the top page
(0xfffff000 - 0xffffffff) unmapped mostly because of test cases that
expect
*(unsigned long *)-1UL
to fail.
Doh. Of course, that's almost certainly it.
For some background, we're running an emulator that uses a null pointer
value of 0xffff0000 and we want any accesses to that address to trap.
Do you anticipate any issues with the following change?
-#define TASK_SIZE_USER32 (0x0000000100000000UL - (1*PAGE_SIZE))
+#define TASK_SIZE_USER32 (0x00000000FFFF0000UL - (1*PAGE_SIZE))
Thanks,
Chris
From: Anton Blanchard <hidden> Date: 2007-08-27 23:19:56
Hi,
For some background, we're running an emulator that uses a null pointer
value of 0xffff0000 and we want any accesses to that address to trap.
Weird :)
Do you anticipate any issues with the following change?
-#define TASK_SIZE_USER32 (0x0000000100000000UL - (1*PAGE_SIZE))
+#define TASK_SIZE_USER32 (0x00000000FFFF0000UL - (1*PAGE_SIZE))
Should be OK, for a 64kB kernel we will put the stack top at 0xFFFF0000
anyway.
Anton
From: Paul Mackerras <hidden> Date: 2007-08-28 05:19:31
Chris Friesen writes:
For some background, we're running an emulator that uses a null pointer
value of 0xffff0000 and we want any accesses to that address to trap.
Do you anticipate any issues with the following change?
-#define TASK_SIZE_USER32 (0x0000000100000000UL - (1*PAGE_SIZE))
+#define TASK_SIZE_USER32 (0x00000000FFFF0000UL - (1*PAGE_SIZE))
Can you fix this in userspace instead by moving the stack down below
0xffff0000 and then doing munmap(0xffff0000, 0x1000) ?
Paul.
From: Chris Friesen <hidden> Date: 2007-08-28 15:34:23
Paul Mackerras wrote:
Chris Friesen writes:
quoted
For some background, we're running an emulator that uses a null pointer
value of 0xffff0000 and we want any accesses to that address to trap.
Can you fix this in userspace instead by moving the stack down below
0xffff0000 and then doing munmap(0xffff0000, 0x1000) ?
It sounds like it would work. I'm not entirely clear on how to move the
starting point of the stack though--could you elaborate or point me to a
reference?
Chris