]> www.infradead.org Git - users/jedix/linux-maple.git/commit
userfaultfd: propagate the full address in THP faults
authorAndrea Arcangeli <aarcange@redhat.com>
Fri, 4 Sep 2015 22:47:20 +0000 (15:47 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 18:53:13 +0000 (13:53 -0500)
commit0c715ef099a7d86f5fa7721189495aace8379263
treedcbe6972286ce4eaab01b03ec11de4b0ae8065d6
parent5d989ca0b560d4db11a5c2c6ed8c3b35ab223226
userfaultfd: propagate the full address in THP faults

Orabug: 21685254

The THP faults were not propagating the original fault address.  The
latest version of the API with uffd.arg.pagefault.address is supposed to
propagate the full address through THP faults.

This was not a kernel crashing bug and it wouldn't risk to corrupt user
memory, but it would cause a SIGBUS failure because the wrong page was
being copied.

For various reasons this wasn't easily reproducible in the qemu workload,
but the strestest exposed the problem immediately.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 230c92a8797e0e717c6732de0fffdd5726c0f48f)
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
mm/huge_memory.c