Re: [PATCH 1/1] x86/boot: clear some fields explicitly

From: Thomas Gleixner
Date: Thu Jul 25 2019 - 17:48:41 EST


On Thu, 25 Jul 2019, John Hubbard wrote:
> On 7/25/19 12:22 AM, Thomas Gleixner wrote:
> > It removes the clearing of the range between kbd_status and hdr without any
> > replacement. It neither clears edid_info.
>
>
> Yes. Somehow I left that chunk out. Not my finest hour.

S*** happens

> > + char *p = (char *) boot_params;
> > + int i;
> > +
> > + for (i = 0; i < ARRAY_SIZE(toclear); i++)
> > + memset(p + toclear[i].start, 0, toclear[i].len);
> > }
> > }
>
> Looks nice.

I have no idea whether it works and I have no cycles either, so I would
appreciate it if you could polish it up so we can handle that new fangled
GCC "feature" nicely.

Alternatively file a bug report to the GCC folks :)

But seriously I think it's not completely insane what they are doing and
the table based approach is definitely more readable and maintainable than
the existing stuff.

Thanks,

tglx