Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-10-08 Thread Eugeniu Rosca
Hi Bin, On Tue, Sep 25, 2018 at 10:06:52AM +0800, Bin Meng wrote: > Hi Eugeniu, > > On Sun, Sep 23, 2018 at 7:10 AM Eugeniu Rosca wrote: > > > > Hi Bin, > > > > jFYI, I've created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87392 > > ("UBSAN behavior on left-shifting 1 into the sign bit is

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-24 Thread Bin Meng
Hi Eugeniu, On Sun, Sep 23, 2018 at 7:10 AM Eugeniu Rosca wrote: > > Hi Bin, > > jFYI, I've created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87392 > ("UBSAN behavior on left-shifting 1 into the sign bit is dependent on C > standard"), to get some recommendation from GCC guys how to handle >

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-22 Thread Eugeniu Rosca
Hi Bin, jFYI, I've created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87392 ("UBSAN behavior on left-shifting 1 into the sign bit is dependent on C standard"), to get some recommendation from GCC guys how to handle these warnings in U-Boot. Regards, Eugeniu.

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-16 Thread Eugeniu Rosca
Hi Bin, Apologize for the delay. I came back from vacation a few days ago. On Tue, Sep 04, 2018 at 12:00:14PM +0800, Bin Meng wrote: > Hi Eugeniu, > > On Sat, Sep 1, 2018 at 6:59 PM Eugeniu Rosca wrote: [..] > > Just wanted to let you know that coreboot folks are going through > > similar

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-03 Thread Bin Meng
Hi Eugeniu, On Sat, Sep 1, 2018 at 6:59 PM Eugeniu Rosca wrote: > > Hi there, > > On Tue, Aug 28, 2018 at 08:42:01AM +0200, Eugeniu Rosca wrote: > > Hi Bin, > > > > cc: Masahiro, Andrey > > > > On Tue, Aug 28, 2018 at 10:05:51AM +0800, Bin Meng wrote: > > > Hi Eugeniu, > > > > > > On Mon, Aug

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-09-01 Thread Eugeniu Rosca
Hi there, On Tue, Aug 28, 2018 at 08:42:01AM +0200, Eugeniu Rosca wrote: > Hi Bin, > > cc: Masahiro, Andrey > > On Tue, Aug 28, 2018 at 10:05:51AM +0800, Bin Meng wrote: > > Hi Eugeniu, > > > > On Mon, Aug 27, 2018 at 7:19 AM Eugeniu Rosca > > wrote: > > > > > > Fix the following UBSAN

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-08-28 Thread Andy Shevchenko
On Tue, Aug 28, 2018 at 5:06 AM Bin Meng wrote: > On Mon, Aug 27, 2018 at 7:19 AM Eugeniu Rosca wrote: > > -#define MSR_IA32_APICBASE_BASE (0xf<<12) > > +#define MSR_IA32_APICBASE_BASE (0xfUL << 12) > > I don't understand why such warnings is emitted: "left shift of >

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-08-28 Thread Eugeniu Rosca
Hi Bin, cc: Masahiro, Andrey On Tue, Aug 28, 2018 at 10:05:51AM +0800, Bin Meng wrote: > Hi Eugeniu, > > On Mon, Aug 27, 2018 at 7:19 AM Eugeniu Rosca wrote: > > > > Fix the following UBSAN report: > > == > > UBSAN:

Re: [U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-08-27 Thread Bin Meng
Hi Eugeniu, On Mon, Aug 27, 2018 at 7:19 AM Eugeniu Rosca wrote: > > Fix the following UBSAN report: > == > UBSAN: Undefined behaviour in arch/x86/cpu/lapic.c:73:14 > left shift of 1048575 by 12 places cannot be represented

[U-Boot] [PATCH v2 07/13] x86: Fix signed shift overflow in MSR_IA32_APICBASE_BASE

2018-08-26 Thread Eugeniu Rosca
Fix the following UBSAN report: == UBSAN: Undefined behaviour in arch/x86/cpu/lapic.c:73:14 left shift of 1048575 by 12 places cannot be represented in type 'int'