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

2019-07-26 Thread Thomas Gleixner
On Thu, 25 Jul 2019, John Hubbard wrote: > On 7/25/19 3:28 PM, H. Peter Anvin wrote: > > On 7/25/19 3:03 PM, Thomas Gleixner wrote: > >> On Thu, 25 Jul 2019, h...@zytor.com wrote: > >>> On July 25, 2019 2:48:30 PM PDT, Thomas Gleixner > >>> wrote: > > But seriously I think it's not

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

2019-07-25 Thread John Hubbard
On 7/25/19 3:37 PM, Thomas Gleixner wrote: > On Thu, 25 Jul 2019, H. Peter Anvin wrote: >> On 7/25/19 3:03 PM, Thomas Gleixner wrote: >>> On Thu, 25 Jul 2019, h...@zytor.com wrote: On July 25, 2019 2:48:30 PM PDT, Thomas Gleixner wrote: > > But seriously I think it's not

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

2019-07-25 Thread John Hubbard
On 7/25/19 3:28 PM, H. Peter Anvin wrote: > On 7/25/19 3:03 PM, Thomas Gleixner wrote: >> On Thu, 25 Jul 2019, h...@zytor.com wrote: >>> On July 25, 2019 2:48:30 PM PDT, Thomas Gleixner wrote: But seriously I think it's not completely insane what they are doing and the table based

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

2019-07-25 Thread Thomas Gleixner
On Thu, 25 Jul 2019, H. Peter Anvin wrote: > On 7/25/19 3:03 PM, Thomas Gleixner wrote: > > On Thu, 25 Jul 2019, h...@zytor.com wrote: > >> On July 25, 2019 2:48:30 PM PDT, Thomas Gleixner > >> wrote: > >>> > >>> But seriously I think it's not completely insane what they are doing > >>> and the

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

2019-07-25 Thread H. Peter Anvin
On 7/25/19 3:03 PM, Thomas Gleixner wrote: > On Thu, 25 Jul 2019, h...@zytor.com wrote: >> On July 25, 2019 2:48:30 PM PDT, Thomas Gleixner wrote: >>> >>> But seriously I think it's not completely insane what they are doing >>> and the table based approach is definitely more readable and

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

2019-07-25 Thread Thomas Gleixner
On Thu, 25 Jul 2019, h...@zytor.com wrote: > On July 25, 2019 2:48:30 PM PDT, Thomas Gleixner wrote: > > > > 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. > > Doing

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

2019-07-25 Thread hpa
On July 25, 2019 2:48:30 PM PDT, Thomas Gleixner wrote: >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

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

2019-07-25 Thread Thomas Gleixner
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 > > +

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

2019-07-25 Thread John Hubbard
On 7/25/19 1:38 PM, H. Peter Anvin wrote: > On 7/25/19 12:22 AM, Thomas Gleixner wrote: > The easy way would be to put in a suitable cast to clear the warning -- I > would not be surprised if an explicit cast to something like (void *) would > quiet the warning, or else (yuck) put in an explicit

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

2019-07-25 Thread H. Peter Anvin
On 7/25/19 12:22 AM, Thomas Gleixner wrote: >> >> The problem with this is that it will break silently when changes are >> made to this structure. > > That's not really the worst problem. Changes to that struct which touch any > of the to be cleared ranges will break anyway if not handled

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

2019-07-25 Thread John Hubbard
On 7/25/19 12:22 AM, Thomas Gleixner wrote: > On Wed, 24 Jul 2019, h...@zytor.com wrote: >> On July 24, 2019 4:15:28 PM PDT, john.hubb...@gmail.com wrote: >>> From: John Hubbard >>> >>> Recent gcc compilers (gcc 9.1) generate warnings about an >>> out of bounds memset, if you trying memset across

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

2019-07-25 Thread Thomas Gleixner
On Wed, 24 Jul 2019, h...@zytor.com wrote: > On July 24, 2019 4:15:28 PM PDT, john.hubb...@gmail.com wrote: > >From: John Hubbard > > > >Recent gcc compilers (gcc 9.1) generate warnings about an > >out of bounds memset, if you trying memset across several fields > >of a struct. This generated a

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

2019-07-25 Thread John Hubbard
On 7/24/19 7:12 PM, h...@zytor.com wrote: On July 24, 2019 4:15:28 PM PDT, john.hubb...@gmail.com wrote: From: John Hubbard ... + boot_params->ext_ramdisk_image = 0; + boot_params->ext_ramdisk_size = 0; + boot_params->ext_cmd_line_ptr = 0; + +

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

2019-07-24 Thread hpa
On July 24, 2019 4:15:28 PM PDT, john.hubb...@gmail.com wrote: >From: John Hubbard > >Recent gcc compilers (gcc 9.1) generate warnings about an >out of bounds memset, if you trying memset across several fields >of a struct. This generated a couple of warnings on x86_64 builds. > >Because struct

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

2019-07-24 Thread john . hubbard
From: John Hubbard Recent gcc compilers (gcc 9.1) generate warnings about an out of bounds memset, if you trying memset across several fields of a struct. This generated a couple of warnings on x86_64 builds. Because struct boot_params is __packed__, normal variable variable assignment will