public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: erich@uruk.org
Cc: landley@trommello.org, Andy Pfiffer <andyp@osdl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Suparna Bhattacharya <suparna@in.ibm.com>,
	Petr Vandrovec <VANDROVE@vc.cvut.cz>,
	fastboot@osdl.org, Werner Almesberger <wa@almesberger.net>
Subject: Re: [Fastboot] [CFT] kexec syscall for 2.5.43 (linux booting linux)
Date: 22 Oct 2002 20:23:28 -0600	[thread overview]
Message-ID: <m1wuo9sxjz.fsf@frodo.biederman.org> (raw)
In-Reply-To: <E1841sp-000270-00@trillium-hollow.org>

erich@uruk.org writes:

> ebiederm@xmission.com (Eric W. Biederman) wrote:
> 
> > In the process of setting up hooks, I have run across a very interesting
> > data point.  If I load %ds, %es, %ss in my hook the problem goes away.
> > But I must load all 3.
> > 
> > Given that the code sequence that is executed if my hook is not run is:
> > 
> > 	cld
> > 	cli
> > 	movl $(__KERNEL_DS),%eax
> > 	movl %eax,%ds
> > 	movl %eax,%es
> > 	movl %eax,%fs
> > 	movl %eax,%gs
> > 
> > 	lss stack_start,%esp
> > 
> > I am rather confused.  I am not changing the gdt or anything like that so it
> > appears I may have found a way to tickle a processor errata.
> 
> I kind of doubt you found an errata... 

Me too but the number of remaining possibilities is quite small.

>  the mode switch combinations in most
> of the modern x86-variants has been tested pretty exhaustively because
> people use so many variations on it.
> 
> Let's see:
> 
> %ds and %es are implicit operands for the source and destination of a
> MOVS operation, so if you or the Linux kernel performs a MOVS copy
> before that point, that is likely the problem there.

Nope.  In fact on a another 2.4.17 kernel built with slightly different
options the code works.
 
> The requirement of %ss is a bit more puzzling, but are you 100% sure
> you don't reference the stack anywhere?  Else it may blow up.

Absolutely.
 
> For example, the start sequence calls "cli", but do you have interrupts
> disabled before that point?  Maybe you have a stray interrupt catching
> you there...

Yep.  In fact last I checked I had interrupts disabled at the interrupt
controller as well, but that may not be a certaintly.  But it doesn't matter
as I also have nmi disabled at that point.

> I had to deal with these problems, and had exactly something like the
> last case, in my early work on the GRUB bootloader.

I will certainly take any help people can give.  But I am tickling some
very weird things in there.

Eric

  reply	other threads:[~2002-10-23  2:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-18 19:59 [CFT] kexec syscall for 2.5.43 (linux booting linux) Eric W. Biederman
     [not found] ` <20021018173248.E14894@almesberger.net>
     [not found]   ` <m1bs5rz1d6.fsf@frodo.biederman.org>
     [not found]     ` <20021018231540.C7951@almesberger.net>
     [not found]       ` <20021019025309.A24579@almesberger.net>
     [not found]         ` <m17kgfyltc.fsf@frodo.biederman.org>
     [not found]           ` <20021019040600.D7951@almesberger.net>
2002-10-19  9:34             ` Eric W. Biederman
2002-10-19 17:18               ` Werner Almesberger
2002-10-19 17:37                 ` Eric W. Biederman
2002-10-21 23:11 ` [Fastboot] " Andy Pfiffer
2002-10-22  4:18   ` Eric W. Biederman
2002-10-22  6:04     ` Eric W. Biederman
2002-10-22  8:33       ` Eric W. Biederman
2002-10-22  3:57         ` Rob Landley
2002-10-22 14:48           ` Eric W. Biederman
2002-10-22 16:02             ` Eric W. Biederman
2002-10-22 16:27               ` erich
2002-10-23  2:23                 ` Eric W. Biederman [this message]
2002-10-22 16:30               ` erich
2002-10-22 23:27         ` Andy Pfiffer
2002-10-22 23:32           ` Andy Pfiffer
2002-10-22  8:30     ` Werner Almesberger
2002-10-22  8:55       ` Eric W. Biederman
2002-10-22 23:17     ` Andy Pfiffer
2002-10-23  6:29       ` Eric W. Biederman
2002-10-23 17:11         ` Andy Pfiffer
2002-10-24 17:10           ` Eric W. Biederman
2002-10-28  7:45 ` Kasper Dupont
2002-10-28  8:24   ` Eric W. Biederman
2002-10-28  8:48     ` Kasper Dupont
2002-10-28 17:14       ` Eric W. Biederman

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=m1wuo9sxjz.fsf@frodo.biederman.org \
    --to=ebiederm@xmission.com \
    --cc=VANDROVE@vc.cvut.cz \
    --cc=andyp@osdl.org \
    --cc=erich@uruk.org \
    --cc=fastboot@osdl.org \
    --cc=landley@trommello.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suparna@in.ibm.com \
    --cc=wa@almesberger.net \
    /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