From: grundler@dsl2.external.hp.com (Grant Grundler)
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Randolph Chung <randolph@tausq.org>, parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] 2.5 randomly kills applications with page faults
Date: Fri, 20 Dec 2002 18:38:24 -0700 [thread overview]
Message-ID: <20021221013824.GA18983@dsl2.external.hp.com> (raw)
In-Reply-To: <200212202212.gBKMCbv08741@localhost.localdomain>
On Fri, Dec 20, 2002 at 04:12:37PM -0600, James Bottomley wrote:
...
> The problem is that they forgot to increment the stack pointer. Thus, if we
> take an interruption between this instruction and the corresponding
> retrieval, the value can be trashed.
It doesn't look like this bug is present in 2.4.
Richard suspects it was introduced when the task struct was split
from the stack. (I hope I recall his statement correctly)
The new code sequence is:
95 mtsp %r0,%sr7 /* get kernel space into sr7 */
96 STREGM %r1,FRAME_SIZE(%r30) /* save r1 (usp) here for now */
97 mfctl %cr30,%r1 /* get task ptr in %r1 */
98 LDREG TI_TASK(%r1),%r1
105 STREG %r0, TASK_PT_PSW(%r1)
106 STREG %r2, TASK_PT_GR2(%r1) /* preserve rp */
107 LDREGM FRAME_SIZE(%r30), %r2 /* get users sp back */
108 STREG %r2, TASK_PT_GR30(%r1) /* ... and save it */
where STREGM/LDREGM are new macros that use st<X>,ma instructions.
I'll commit this once I see it boots on my c3000.
But, given the assertion we could take an interrupt between line 96 and
107, would an interrupt between 95/96 cause Bad Things (tm) to happen?
grant
next prev parent reply other threads:[~2002-12-21 1:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-18 16:37 [parisc-linux] 2.5 randomly kills applications with page faults James Bottomley
2002-12-18 17:02 ` Randolph Chung
2002-12-20 22:12 ` James Bottomley
2002-12-20 22:19 ` John David Anglin
2002-12-20 22:37 ` Grant Grundler
2002-12-22 7:11 ` Grant Grundler
2002-12-22 10:17 ` Helge Deller
2002-12-22 16:35 ` James Bottomley
2002-12-21 1:38 ` Grant Grundler [this message]
2002-12-21 1:46 ` James Bottomley
2002-12-21 4:34 ` Grant Grundler
2002-12-21 5:03 ` James Bottomley
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=20021221013824.GA18983@dsl2.external.hp.com \
--to=grundler@dsl2.external.hp.com \
--cc=James.Bottomley@steeleye.com \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=randolph@tausq.org \
/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.