[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2229115A-23F2-4B6B-800C-7182199DF79D@gmail.com>
Date: Thu, 27 Jul 2023 13:11:43 -0700
From: Nadav Amit <nadav.amit@...il.com>
To: Linus Torvalds <torvalds@...uxfoundation.org>
Cc: Will Deacon <will@...nel.org>, Jann Horn <jannh@...gle.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
Alan Stern <stern@...land.harvard.edu>,
Andrea Parri <parri.andrea@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Nicholas Piggin <npiggin@...il.com>,
David Howells <dhowells@...hat.com>,
Jade Alglave <j.alglave@....ac.uk>,
Luc Maranget <luc.maranget@...ia.fr>,
Akira Yokosawa <akiyks@...il.com>,
Daniel Lustig <dlustig@...dia.com>,
Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 0/2] fix vma->anon_vma check for per-VMA locking; fix
anon_vma memory ordering
> On Jul 27, 2023, at 12:39 PM, Linus Torvalds <torvalds@...uxfoundation.org> wrote:
>
> On Thu, 27 Jul 2023 at 12:10, Nadav Amit <nadav.amit@...il.com> 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.
Powered by blists - more mailing lists