[Intel-gfx] [PATCH] drm/i915/pmu: Hide the (unsigned long)ptr cast
Chris Wilson
chris at chris-wilson.co.uk
Fri Nov 24 08:59:10 UTC 2017
Quoting Tvrtko Ursulin (2017-11-24 08:04:28)
>
> On 23/11/2017 17:42, Chris Wilson wrote:
> > We pretend the PMU config id is a pointer value when encoding it into
> > the device parameters for presentation via sysfs. This requires casting
> > of an unsigned long into and out of the pointer member, which annoys
> > smatch:
> >
> > drivers/gpu/drm/i915/i915_pmu.c:684 i915_pmu_event_show() warn: argument 3 to %lx specifier is cast from pointer
>
> Why is it even complaining about this? Maybe it is early but I don't see
> a problem.
I believe it is to catch %lx being used to bypass the security around
%p.
-Chris
More information about the Intel-gfx
mailing list