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: <20130114180423.GA6213@liondog.tnic>
Date:	Mon, 14 Jan 2013 19:04:23 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Yinghai Lu <yinghai@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jan Kiszka <jan.kiszka@....de>,
	Jason Wessel <jason.wessel@...driver.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7u1 24/31] x86, boot: Not need to check setup_header
 version for setup_data

On Mon, Jan 14, 2013 at 09:37:36AM -0800, H. Peter Anvin wrote:
> No, this is a case of cargo-cult programming. I asked Yinghai to
> remove it.
>
> It is cargo-cult programming because the value of boot_params.hdr
> comes from the kernel itself, so all you're doing is telling you the
> boot protocol version associated with the kernel itself, which we
> already know.

LOOL. Great.

> If we find a bootloader that does that incorrectly (e.g. if kexec
> were to blindly copy struct boot_params from the older kernel...
> which ironically would be better than the current situation) then
> the right thing to do would be to have a central place which scrub
> out the fields and just force them to zero rather than putting a
> bunch of tests all over the place.

Ok, I didn't realize that.

And besides, nothing stops a silly boot loader from adjusting
boot_params.hdr.version so that the check - or any check for that matter
- passes, AFAICT.

See, this is exactly the reason why I'm trying to explain to Yinghai
why it is a Good Thing to document stuff like that at least in commit
messages.

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
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