* [parisc-linux] Making the stack executable
@ 2000-08-08 18:30 David Huggins-Daines
0 siblings, 0 replies; only message in thread
From: David Huggins-Daines @ 2000-08-08 18:30 UTC (permalink / raw)
To: parisc-linux
Hi,
It turns out that my mysterious lockups in the rt_sigreturn path were
due to the fact that our stack pages are not executable.
They are being mapped with PAGE_COPY protection in exec.c, like every
other architecture does, but unlike every other architecture, our
PAGE_COPY did not include execute permissions.
Sorry folks but we do need trampolines.
What is more disturbing is that without _PAGE_EXEC set in PAGE_COPY,
attempting to execute code on the stack just hangs the machine solid!
(without printing out any error messages or register dumps)
The following program should demonstrate this problem:
.LEVEL 1.1
.text
.align 4
.globl main
main:
.PROC
.CALLINFO FRAME=64
stw %rp,-20(%sp)
copy %sp,%r19
ldo 64(%sp),%sp
ldil L%0xebe0c002,%r20 /* bv,n %r0(%r31) */
ldo R%0xebe0c002(%r20),%r20
stw %r20,0(%r19)
fdc %r0(%r19)
sync
fic %r0(%r19)
sync
ble 0(%sr7,%r19)
nop
ldo -64(%sp),%sp
bv,n %r0(%rp)
.ENTRY
.EXIT
.PROCEND
Is this some kind of issue with our ITLB miss handlers?
I'll check in the change to <asm/pgtable.h> shortly, but I'd like
someone to also look into the problem above (without the change).
--
dhd@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-08-09 4:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-08 18:30 [parisc-linux] Making the stack executable David Huggins-Daines
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.