On Mon, Jan 14, 2013 at 10:59 AM, H. Peter Anvin <h...@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)); + } +} + -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/