From: Stas Sergeev <stsp@aknet.ru>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Petr Vandrovec <VANDROVE@vc.cvut.cz>
Subject: Re: crash in entry.S restore_all, 2.6.12-rc2, x86, PAGEALLOC
Date: Wed, 06 Apr 2005 19:44:54 +0400 [thread overview]
Message-ID: <425403F6.409@aknet.ru> (raw)
In-Reply-To: <Pine.LNX.4.58.0504051249090.2215@ppc970.osdl.org>
Hi,
Linus Torvalds wrote:
> Yes. But how do you have _such_ an empty stack when the interrupt comes
> in? See what I mean?
Yes, I hope so.
> IOW, that requires that the kernel stack would have
> only two words on it when the interrupt happens. How?
Well, you can simply do something like this:
--- entry.S.old1 2005-04-05 22:54:43.000000000 +0400
+++ entry.S 2005-04-06 19:35:14.000000000 +0400
@@ -179,9 +179,9 @@
ENTRY(sysenter_entry)
movl TSS_sysenter_esp0(%esp),%esp
sysenter_past_esp:
- sti
pushl $(__USER_DS)
pushl %ebp
+ sti
pushfl
pushl $(__USER_CS)
pushl $SYSENTER_RETURN
And this will "elimenate" the problem
(modulo NMI and there could be other places
too, but for me it elimenates it completely).
So I don't think this is something strange.
> So I definitely think the "bug" is in your optimization,
Yes, and I think the patch I posted, can
just work, or are there the problems with
the taken forward jump on a fast path?
> I just think it
> should be a valid optimization
But it is totally bogus, why not should it
crash? It is probably even very good that
it does:)
> and we should just make sure our kernel
> stack is never _so_ empty that "struct pt_regs" is not safe to
> dereference.
I guess you'll just need to adjust the tss.esp0
then, but do you really want this? Accesing
the registers that are simply not there, doesn't
sound too good I think.
Or am I still missing your point?
next prev parent reply other threads:[~2005-04-06 15:44 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-05 6:55 crash in entry.S restore_all, 2.6.12-rc2, x86, PAGEALLOC Ingo Molnar
2005-04-05 7:03 ` Andrew Morton
2005-04-05 7:07 ` Ingo Molnar
2005-04-05 7:16 ` Ingo Molnar
2005-04-05 7:29 ` Ingo Molnar
2005-04-05 7:40 ` Ingo Molnar
2005-04-05 9:51 ` Mikael Pettersson
2005-04-05 18:09 ` Ingo Molnar
2005-04-05 7:05 ` Ingo Molnar
2005-04-05 19:11 ` Stas Sergeev
2005-04-05 19:19 ` Linus Torvalds
2005-04-05 19:41 ` Stas Sergeev
2005-04-05 19:53 ` Linus Torvalds
2005-04-05 20:44 ` Ingo Molnar
2005-04-05 21:04 ` Linus Torvalds
2005-04-06 15:44 ` Stas Sergeev [this message]
2005-04-07 8:00 ` Ingo Molnar
2005-04-07 11:10 ` Andrew Morton
2005-04-07 14:47 ` Linus Torvalds
2005-04-07 14:51 ` Ingo Molnar
2005-04-07 16:47 ` Dave Jones
2005-04-07 17:17 ` Richard B. Johnson
2005-04-07 17:23 ` Linus Torvalds
2005-04-07 16:11 ` Stas Sergeev
2005-04-07 16:35 ` Linus Torvalds
2005-04-07 16:46 ` Stas Sergeev
2005-04-07 16:55 ` Linus Torvalds
2005-04-07 18:10 ` Stas Sergeev
2005-04-10 13:20 ` Stas Sergeev
2005-04-10 22:32 ` Andrew Morton
2005-04-11 17:15 ` Stas Sergeev
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=425403F6.409@aknet.ru \
--to=stsp@aknet.ru \
--cc=VANDROVE@vc.cvut.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox