[Intel-gfx] [PATCH 11/11] drm/i915: Fix undefined behavior due to shift overflowing the constant

Borislav Petkov bp at alien8.de
Wed May 18 07:44:52 UTC 2022


On Tue, May 17, 2022 at 04:05:46PM -0700, Randy Dunlap wrote:
> 
> 
> On 4/5/22 08:15, Borislav Petkov wrote:
> > From: Borislav Petkov <bp at suse.de>
> > 
> > Fix:
> > 
> >   In file included from <command-line>:0:0:
> >   drivers/gpu/drm/i915/gt/uc/intel_guc.c: In function ‘intel_guc_send_mmio’:
> >   ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_1047’ \
> >   declared with attribute error: FIELD_PREP: mask is not constant
> >     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> > 
> > and other build errors due to shift overflowing values.
> > 
> > See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
> > details as to why it triggers with older gccs only.
> > 
> 
> Acked-by: Randy Dunlap <rdunlap at infradead.org>
> Tested-by: Randy Dunlap <rdunlap at infradead.org>
> 
> Is this merged anywhere?

It's state is "new" in their patchwork:

https://patchwork.freedesktop.org/patch/480756/

so I guess not yet.

> It could/should at least be in linux-next so that other people
> don't waste time on it.

-ETOOMANYPATCHES I guess. :-\

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette


More information about the Intel-gfx mailing list