Re: gpf in do_exit

Linus Torvalds (torvalds@transmeta.com)
Mon, 14 Sep 1998 15:08:16 -0700 (PDT)


On Mon, 14 Sep 1998, Richard B. Johnson wrote:
> >
> > pushl %ss;\
> > popl %ds;\
> > pushl %ss;\
> > popl %es;\
> > pushl $11;\
> > call do_exit
> >
> [SNIPPED]
>
> The segment registers are 16-bit registers!

Yes. However, you should still use "pushl" and "popl", because they are
smaller and faster. The upper bits are just ignored and/or push undefined
values.

Go figure, the x86 is a strange and wonderful beast.

However, in this particular case the right thing to do is to just reset
the segment register values in the trap handler rather than in entry.S.
I'm doing that in my current kernel, I'll make a pre-2.1.122-3 shortly.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/