Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741997

Re: [RFC PATCH 0/2] Missing READ_ONCE in core and arch-specific pgtable code leading to crashes

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 0/2] Missing READ_ONCE in core and arch-specific pgtable code leading to crashes
Date 2017-09-29 11:00 +0200
Message-ID <uuZjk-3U6-9@gated-at.bofh.it> (permalink)
References <uumUG-557-25@gated-at.bofh.it> <uuMP8-4CX-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[+ Timur]

On Thu, Sep 28, 2017 at 03:38:00PM -0400, Jon Masters wrote:
> On 09/27/2017 11:49 AM, Will Deacon wrote:
> 
> > The moral of the story is that read-after-read (same address) ordering *only*
> > applies if READ_ONCE is used consistently. This means we need to fix page
> > table dereferences in the core code as well as the arch code to avoid this
> > problem. The two RFC patches in this series fix arm64 (which is a bigger fix
> > that necessary since I clean things up too) and page_vma_mapped_walk.
> > 
> > Comments welcome.
> 
> Thanks for this Will. I'll echo Timur's comment that it would be ideal
> to split this up into the critical piece needed for ordering
> access/update to the PMD in the face of a THP split and separately have
> the cosmetic cleanups. Needless to say, we've got a bunch of people who
> are tracking this one and tracking it ready for backport. We just got
> THP re-enabled so I'm pretty keen that we not have to disable again.

Yeah, of course. I already posted a point diff to Yury in the original
thread:

http://lists.infradead.org/pipermail/linux-arm-kernel/2017-September/533299.html

so I'd like to queue that as an arm64 fix after we've worked out the general
direction of the full fix. I also don't see why other architectures
(including x86) can't be hit by this, so an alternative (completely
untested) approach would just be to take patch 2 of this series.

The full fix isn't just cosmetic; it's also addressing the wider problem
of unannotated racing page table accesses outside of the specific failure
case we've run into.

Will

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/2] Missing READ_ONCE in core and arch-specific pgtable code leading to crashes Will Deacon <will.deacon@arm.com> - 2017-09-27 18:00 +0200
  Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables Peter Zijlstra <peterz@infradead.org> - 2017-09-28 10:40 +0200
    Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables Will Deacon <will.deacon@arm.com> - 2017-09-28 10:50 +0200
      Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-28 17:50 +0200
        Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables Will Deacon <will.deacon@arm.com> - 2017-09-28 17:50 +0200
          Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-28 18:10 +0200
        Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables Michael Cree <mcree@orcon.net.nz> - 2017-09-28 21:40 +0200
          Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-29 03:00 +0200
            Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables Will Deacon <will.deacon@arm.com> - 2017-09-29 11:10 +0200
              Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables Will Deacon <will.deacon@arm.com> - 2017-09-29 18:40 +0200
              Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-29 18:40 +0200
  Re: [RFC PATCH 0/2] Missing READ_ONCE in core and arch-specific  pgtable code leading to crashes Richard Ruigrok <rruigrok@codeaurora.org> - 2017-09-28 19:40 +0200
  Re: [RFC PATCH 1/2] arm64: mm: Use READ_ONCE/WRITE_ONCE when  accessing page tables Timur Tabi <timur@codeaurora.org> - 2017-09-28 21:20 +0200
  Re: [RFC PATCH 0/2] Missing READ_ONCE in core and arch-specific  pgtable code leading to crashes Jon Masters <jcm@redhat.com> - 2017-09-28 21:40 +0200
    Re: [RFC PATCH 0/2] Missing READ_ONCE in core and arch-specific  pgtable code leading to crashes Will Deacon <will.deacon@arm.com> - 2017-09-29 11:00 +0200

csiph-web