[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/4] x86/mm: drop redundant smp_wmb() from _put_final_page_type()



On 20.12.2019 15:51, Andrew Cooper wrote:
> On 20/12/2019 14:20, Jan Beulich wrote:
>> get_page_light()'s use of cmpxchg() is a full barrier already anyway.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> While true, is this actually a clever change to make?
> 
> The implementation of get_page_light() could plausibly change and no
> longer be a full barrier, introducing a vulnerability here.  OTOH,
> smp_wmb() is free.

It's free at the CPU level, but not at the compiler one (where
it still is a barrier). I also don't think get_page_light()
could change as drastically as losing its LOCK-ed operation,
or if it did the author (and reviewer) would be well advised
to at least briefly audit use sites (one of the reasons I'm
leaving a comment).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.