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: <f83947fe-8a80-8693-56bd-76cb6f37317e@nvidia.com>
Date:   Wed, 24 Jul 2019 23:49:22 -0700
From:   John Hubbard <jhubbard@...dia.com>
To:     <hpa@...or.com>, <john.hubbard@...il.com>
CC:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] x86/boot: clear some fields explicitly

On 7/24/19 7:12 PM, hpa@...or.com wrote:
> On July 24, 2019 4:15:28 PM PDT, john.hubbard@...il.com wrote:
>> From: John Hubbard <jhubbard@...dia.com>
...
>> +		boot_params->ext_ramdisk_image = 0;
>> +		boot_params->ext_ramdisk_size = 0;
>> +		boot_params->ext_cmd_line_ptr = 0;
>> +
>> +		memset(&boot_params->_pad4, 0, sizeof(boot_params->_pad4));
>> 		memset(&boot_params->_pad7[0], 0,
>> 		       (char *)&boot_params->edd_mbr_sig_buffer[0] -
>> 			(char *)&boot_params->_pad7[0]);
> 
> The problem with this is that it will break silently when changes are made to this structure.
> 
> So, that is a NAK from me.
> 

Understood. It occurs to me, though, that it would be trivial to
just add build time assertions to check a few struct member offset
values, and fail out if they changed. That would give us everything:
warnings-free builds, and no silent failures.

Thoughts?

thanks,
-- 
John Hubbard
NVIDIA

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ