mbox series

[SRU,Bionic,v2,0/2] Fixes for LP:1792195

Message ID cover.1539702969.git.joseph.salisbury@canonical.com
Headers show
Series Fixes for LP:1792195 | expand

Message

Joseph Salisbury Oct. 16, 2018, 4:11 p.m. UTC
== SRU Justification ==
IBM is requesting these commits in bionic and cosmic.  These commits
also rely on commit 7acf50e4efa6, which was SRU'd in bug 1792102.

Description of bug:
GPFS mmfsd daemon is mapping shared tracing buffer(allocated from kernel
driver using vmalloc) and then writing trace records from user space threads
in parallel. While the SIGBUS happened, the access virtual memory address
is in the mapped range, no overflow on access.

The root cause is that for PTEs created by a driver at mmap time (ie, that
aren't created dynamically at fault time), it's not legit for ptep_set_access_flags()
to make them invalid even temporarily. A concurrent access while they are
invalid will be unable to service the page fault and will cause as SIGBUS.


== Fixes ==
bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.")
f08d08f3db55 ("powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW transition")

== Regression Potential ==
Low.  Limited to powerpc.

== Test Case ==
A test kernel was built with these patches and tested by IBM.
IBM states the test kernel resolved the bug.

Aneesh Kumar K.V (2):
  powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.
  powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW
    transition

 arch/powerpc/include/asm/book3s/64/pgtable.h | 18 +++++++++++++++++-
 arch/powerpc/mm/pgtable-radix.c              |  8 +++++---
 2 files changed, 22 insertions(+), 4 deletions(-)

Comments

Khalid Elmously Oct. 16, 2018, 10:42 p.m. UTC | #1
On 2018-10-16 12:11:07 , Joseph Salisbury wrote:
> == SRU Justification ==
> IBM is requesting these commits in bionic and cosmic.  These commits
> also rely on commit 7acf50e4efa6, which was SRU'd in bug 1792102.
> 
> Description of bug:
> GPFS mmfsd daemon is mapping shared tracing buffer(allocated from kernel
> driver using vmalloc) and then writing trace records from user space threads
> in parallel. While the SIGBUS happened, the access virtual memory address
> is in the mapped range, no overflow on access.
> 
> The root cause is that for PTEs created by a driver at mmap time (ie, that
> aren't created dynamically at fault time), it's not legit for ptep_set_access_flags()
> to make them invalid even temporarily. A concurrent access while they are
> invalid will be unable to service the page fault and will cause as SIGBUS.
> 
> 
> == Fixes ==
> bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.")
> f08d08f3db55 ("powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW transition")
> 
> == Regression Potential ==
> Low.  Limited to powerpc.
> 
> == Test Case ==
> A test kernel was built with these patches and tested by IBM.
> IBM states the test kernel resolved the bug.
> 
> Aneesh Kumar K.V (2):
>   powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.
>   powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW
>     transition
> 
>  arch/powerpc/include/asm/book3s/64/pgtable.h | 18 +++++++++++++++++-
>  arch/powerpc/mm/pgtable-radix.c              |  8 +++++---
>  2 files changed, 22 insertions(+), 4 deletions(-)
>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Stefan Bader Oct. 17, 2018, 8:33 a.m. UTC | #2
On 16.10.18 18:11, Joseph Salisbury wrote:
> == SRU Justification ==
> IBM is requesting these commits in bionic and cosmic.  These commits
> also rely on commit 7acf50e4efa6, which was SRU'd in bug 1792102.
> 
> Description of bug:
> GPFS mmfsd daemon is mapping shared tracing buffer(allocated from kernel
> driver using vmalloc) and then writing trace records from user space threads
> in parallel. While the SIGBUS happened, the access virtual memory address
> is in the mapped range, no overflow on access.
> 
> The root cause is that for PTEs created by a driver at mmap time (ie, that
> aren't created dynamically at fault time), it's not legit for ptep_set_access_flags()
> to make them invalid even temporarily. A concurrent access while they are
> invalid will be unable to service the page fault and will cause as SIGBUS.
> 
> 
> == Fixes ==
> bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.")
> f08d08f3db55 ("powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW transition")
> 
> == Regression Potential ==
> Low.  Limited to powerpc.
> 
> == Test Case ==
> A test kernel was built with these patches and tested by IBM.
> IBM states the test kernel resolved the bug.
> 
> Aneesh Kumar K.V (2):
>   powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.
>   powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW
>     transition
> 
>  arch/powerpc/include/asm/book3s/64/pgtable.h | 18 +++++++++++++++++-
>  arch/powerpc/mm/pgtable-radix.c              |  8 +++++---
>  2 files changed, 22 insertions(+), 4 deletions(-)
> 
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Khalid Elmously Oct. 22, 2018, 7:19 a.m. UTC | #3
On 2018-10-16 12:11:07 , Joseph Salisbury wrote:
> == SRU Justification ==
> IBM is requesting these commits in bionic and cosmic.  These commits
> also rely on commit 7acf50e4efa6, which was SRU'd in bug 1792102.
> 
> Description of bug:
> GPFS mmfsd daemon is mapping shared tracing buffer(allocated from kernel
> driver using vmalloc) and then writing trace records from user space threads
> in parallel. While the SIGBUS happened, the access virtual memory address
> is in the mapped range, no overflow on access.
> 
> The root cause is that for PTEs created by a driver at mmap time (ie, that
> aren't created dynamically at fault time), it's not legit for ptep_set_access_flags()
> to make them invalid even temporarily. A concurrent access while they are
> invalid will be unable to service the page fault and will cause as SIGBUS.
> 
> 
> == Fixes ==
> bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.")
> f08d08f3db55 ("powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW transition")
> 
> == Regression Potential ==
> Low.  Limited to powerpc.
> 
> == Test Case ==
> A test kernel was built with these patches and tested by IBM.
> IBM states the test kernel resolved the bug.
> 
> Aneesh Kumar K.V (2):
>   powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.
>   powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW
>     transition
> 
>  arch/powerpc/include/asm/book3s/64/pgtable.h | 18 +++++++++++++++++-
>  arch/powerpc/mm/pgtable-radix.c              |  8 +++++---
>  2 files changed, 22 insertions(+), 4 deletions(-)
> 
> -- 
> 2.7.4
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team