From patchwork Tue Oct 16 18:05:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Salisbury X-Patchwork-Id: 984922 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42ZNX21MLcz9s8T; Wed, 17 Oct 2018 05:05:38 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gCTih-00021e-Kr; Tue, 16 Oct 2018 18:05:27 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gCTif-000212-Hi for kernel-team@lists.ubuntu.com; Tue, 16 Oct 2018 18:05:25 +0000 Received: from 1.general.jsalisbury.us.vpn ([10.172.67.212] helo=salisbury) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1gCTif-0003EI-6x for kernel-team@lists.ubuntu.com; Tue, 16 Oct 2018 18:05:25 +0000 Received: by salisbury (Postfix, from userid 1000) id EF1237E0720; Tue, 16 Oct 2018 14:05:23 -0400 (EDT) From: Joseph Salisbury To: kernel-team@lists.ubuntu.com Subject: [SRU][Cosmic][v2][PATCH 0/2] Fixes for LP:1792195 Date: Tue, 16 Oct 2018 14:05:21 -0400 Message-Id: X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" == SRU Justification == IBM is requesting these commits in bionic and cosmic. This bug fix also depends 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 Acked-by: Stefan Bader