lkml.org 
[lkml]   [2013]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v7u1 22/31] x86, boot: add fields to support load bzImage and ramdisk above 4G
From
On Mon, Jan 14, 2013 at 10:59 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> No, there were other fields that were also left uninitialized, per your
> analysis from last year. I don't remember the details, but I seem to
> recall they included the EFI and graphics-related fields.
>
> So yes, just zero them all out.

?

+static void sanitize_real_mode(struct boot_params *real_mode)
+{
+ if (real_mode->sentinel) {
+ /*fields in boot_params are not valid, clear them */
+ memset(&real_mode->olpc_ofw_header, 0,
+ (char *)&real_mode->alt_mem_k -
+ (char *)&real_mode->olpc_ofw_header);
+ memset(&real_mode->_pad7[0], 0,
+ (char *)&real_mode->edd_mbr_sig_buffer[0] -
+ (char *)&real_mode->_pad7[0]);
+ memset(&real_mode->_pad8[0], 0,
+ (char *)&real_mode->eddbuf[0] -
+ (char *)&real_mode->_pad8[0]);
+ memset(&real_mode->_pad9[0], 0, sizeof(real_mode->_pad9));
+ }
+}
+


\
 
 \ /
  Last update: 2013-01-14 21:22    [W:0.232 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site