lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48695FD5.7000605@goop.org>
Date:	Mon, 30 Jun 2008 15:36:05 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Sean Young <sean@...s.org>, Rusty Russell <rusty@...tcorp.com.au>,
	linux-kernel@...r.kernel.org
Subject: Re: Regression: boot failure on AMD Elan TS-5500

H. Peter Anvin wrote:
> H. Peter Anvin wrote:
>>>>
>>>> startup_32:
>>>>         cld
>>>>         /* test KEEP_SEGMENTS flag to see if the bootloader is asking
>>>>          * us to not reload segments */
>>>>         testb $(1<<6), BP_loadflags(%esi)
>>>>         jnz 1f
>>>>
>>>>         cli
>>>>         movl $(__BOOT_DS),%eax
>>>>         movl %eax,%ds
>>>>         movl %eax,%es
>>>>         movl %eax,%fs
>>>>         movl %eax,%gs
>>>>         movl %eax,%ss
>>>> 1:
>
> On this general subject... I keep thinking that it would be better to 
> have this as:
>
>     movl    %cs, %eax
>     addl    $8, %eax
>     movl    %eax, %cs

What's your intent?  You can't directly load %cs; do you mean the other 
segment registers?

>
> ... instead of a hard-coded constant.  That actually removes all 
> hard-coded uses of BOOT_CS/BOOT_DS until we eventually load the 
> kernel's own boot GDT at head_32.S:94.
>
> Does anyone see any problem with that?  As far as I can tell, we're 
> requiring %cs == BOOT_CS for the current code anyway (unless 
> KEEP_SEGMENTS), but %ds == %cs + 8 seems like a more sensible 
> requirement.
>

Oh, you mean

	mov %cs, %eax
	add $8, %eax
	mov %eax, %ds (etc)
?

Seems reasonable.

	J

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ