From patchwork Wed Sep 14 07:19:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 9330513 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25CFC6089F for ; Wed, 14 Sep 2016 07:19:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 111AB29A58 for ; Wed, 14 Sep 2016 07:19:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05E0A29A61; Wed, 14 Sep 2016 07:19:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id E9C9729A58 for ; Wed, 14 Sep 2016 07:19:48 +0000 (UTC) Received: (qmail 7655 invoked by uid 550); 14 Sep 2016 07:19:46 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: kernel-hardening@lists.openwall.com Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 7348 invoked from network); 14 Sep 2016 07:19:42 -0000 From: Juerg Haefliger To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, linux-x86_64@vger.kernel.org Cc: juerg.haefliger@hpe.com, vpk@cs.columbia.edu Date: Wed, 14 Sep 2016 09:19:01 +0200 Message-Id: <20160914071901.8127-4-juerg.haefliger@hpe.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160914071901.8127-1-juerg.haefliger@hpe.com> References: <20160902113909.32631-1-juerg.haefliger@hpe.com> <20160914071901.8127-1-juerg.haefliger@hpe.com> Subject: [kernel-hardening] [RFC PATCH v2 3/3] block: Always use a bounce buffer when XPFO is enabled X-Virus-Scanned: ClamAV using ClamSMTP This is a temporary hack to prevent the use of bio_map_user_iov() which causes XPFO page faults. Signed-off-by: Juerg Haefliger --- block/blk-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-map.c b/block/blk-map.c index b8657fa8dc9a..e889dbfee6fb 100644 --- a/block/blk-map.c +++ b/block/blk-map.c @@ -52,7 +52,7 @@ static int __blk_rq_map_user_iov(struct request *rq, struct bio *bio, *orig_bio; int ret; - if (copy) + if (copy || IS_ENABLED(CONFIG_XPFO)) bio = bio_copy_user_iov(q, map_data, iter, gfp_mask); else bio = bio_map_user_iov(q, iter, gfp_mask);