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: <alpine.DEB.2.21.1803211052110.3754@nanos.tec.linutronix.de>
Date:   Wed, 21 Mar 2018 10:57:58 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Cao jin <caoj.fnst@...fujitsu.com>
cc:     Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: questions about header.S

On Wed, 21 Mar 2018, Cao jin wrote:
> On 03/17/2018 06:01 PM, Cao jin wrote:
> >   I find two small questions which confuse me a little.
> > 
> > 1.
> > # Check signature at end of setup
> >        cmpl    $0x5a5aaa55, setup_sig
> >        jne     setup_bad
> > 
> > setup_sig is defined in setup.ld, which points to the constant also
> > defined in setup.ld, so I don't figure out in which case they don't
> > equal and jump to setup_bad?

That's a lame sanity check to make sure that nothing overwrote the loader.

> > In my test, drop these 2 lines seems fine, system can boot without any
> > obvious error.

Sure it does as long as you have no corruption.

> > 2.
> > # Zero the bss
> > 	movw	$__bss_start, %di
> > 	movw	$_end+3, %cx
> > 	xorl	%eax, %eax
> > 	subw	%di, %cx
> > 	shrw	$2, %cx
> > 	rep; stosl
> > 
> > It is not a big deal, but I think replace "_end" with "__bss_end" make
> > more sense, and "_end" is already aligned to word length. And, there is
> > no other code use symbol "__bss_end". So I don't know is there any
> > reason to use "_end" here?

It doesn't matter at all. But its also pointless to change it.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ