All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Huggins-Daines <dhd@linuxcare.com>
To: parisc-linux@thepuffingroup.com
Subject: [parisc-linux] Making the stack executable
Date: 08 Aug 2000 14:30:20 -0400	[thread overview]
Message-ID: <87zomnobb7.fsf@linuxcare.com> (raw)

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.

                 reply	other threads:[~2000-08-09  4:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87zomnobb7.fsf@linuxcare.com \
    --to=dhd@linuxcare.com \
    --cc=parisc-linux@thepuffingroup.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.