[Intel-gfx] [PATCH] drm/i915: Disable kmem_caches when KASAN is enabled

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 15 11:21:40 UTC 2017


On Wed, Mar 15, 2017 at 01:14:50PM +0200, Mika Kuoppala wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> 
> > On Wed, Mar 15, 2017 at 11:46:24AM +0200, Mika Kuoppala wrote:
> >> Chris Wilson <chris at chris-wilson.co.uk> writes:
> >> 
> >> > kasan is very good at detecting use-after-free. However, our requests
> >> > are allocated from a rcu-typesafe slab that is important for performance
> >> > but makes kasan less effective. When enabling kasan we are intentionally
> >> > looking for memory errors, disable the use of our caches to improve the
> >> > likelihood of kasan spotting a bug.
> >> >
> 
> I didn't notice anything except the typo in the desc. Until
> someone makes a kmem_cache kasan aware, this patch would
> be useful if and when someone does kasan runs with our driver.
> 
> The name could be DEBUG_KMEM_CACHE_DISABLE. It is more logical
> wrt to content of the patch. However perhaps the current name
> is more practical.

I was contemplating the possibility of sticking other tests under here
if kasan (or memdebug in general) has some more debugging aides.
 
> Reviewed-by: Mika Kuoppala <mika.kuoppala at intel.com>

I'm sitting on the fence for this atm, until kasan is enabled in the CI
farm and then we can decide what is the best approach.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list