Re: [PATCH 2/4] x86, selftests, mpx: fix up weird arrays

2017-11-21 Thread Ingo Molnar
* Dave Hansen wrote: > > The MPX hardware data structurse are defined in a weird way: they define > their size in bytes and then union that with the type with which we want > to access them. > > Yes, this is weird, but it does work. But, new GCC's complain that

Re: [PATCH 2/4] x86, selftests, mpx: fix up weird arrays

2017-11-21 Thread Ingo Molnar
* Dave Hansen wrote: > > The MPX hardware data structurse are defined in a weird way: they define > their size in bytes and then union that with the type with which we want > to access them. > > Yes, this is weird, but it does work. But, new GCC's complain that we > are accessing the array

[PATCH 2/4] x86, selftests, mpx: fix up weird arrays

2017-11-10 Thread Dave Hansen
The MPX hardware data structurse are defined in a weird way: they define their size in bytes and then union that with the type with which we want to access them. Yes, this is weird, but it does work. But, new GCC's complain that we are accessing the array out of bounds. Just make it a

[PATCH 2/4] x86, selftests, mpx: fix up weird arrays

2017-11-10 Thread Dave Hansen
The MPX hardware data structurse are defined in a weird way: they define their size in bytes and then union that with the type with which we want to access them. Yes, this is weird, but it does work. But, new GCC's complain that we are accessing the array out of bounds. Just make it a