Re: [PATCH -next] x86/mm/pat: silence a data race in cpa_4k_install

From: Qian Cai
Date: Tue Jan 21 2020 - 10:51:02 EST




> On Jan 21, 2020, at 10:45 AM, Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> Perhaps because you've been dealing with KCSAN for so long. :-)
>
> The main angle here, IMO, is that this "fix" is being done solely for
> KCSAN. Or is there another reason to "fix" intentional data races? At
> least I don't see one. And the text says
>
> "This will generate a lot of noise on a debug kernel with
> debug_pagealloc with KCSAN enabled which could render the system
> unusable."
>
> So yes, I think it should say something about making KCSAN happy.
>
> Oh, and while at it I'd prefer it if it did the __no_kcsan function
> annotation instead of the data_race() thing.

Or the patch title could be âplay KCSAN well with debug_pageallocâ?

I am fine with __no_kcsan as well. I just need to retest the whole thing first.