Re: [PATCH 0/2] fix vma->anon_vma check for per-VMA locking; fix anon_vma memory ordering

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

 




> On Jul 27, 2023, at 12:39 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> On Thu, 27 Jul 2023 at 12:10, Nadav Amit <nadav.amit@xxxxxxxxx> wrote:
>> 
>> Interesting. I wonder if you considered adding to READ_ONCE() something
>> like:
>> 
>>        asm volatile("" : "+g" (x) );
>> 
>> So later loads (such as baz = *ptr) would reload the updated value.
> 
> Not necessarily a bad idea.  Although I suspect you'd want to add
> *two* of them - on either side - to make sure any previous loads
> wouldn't be moved around it either.

You are right, two are needed.

I’ll give it a shot and see if I see changes to the binary.






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux