From patchwork Sun Oct 1 00:06:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobin Harding X-Patchwork-Id: 9979611 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 1F37F60327 for ; Sun, 1 Oct 2017 00:09:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F86D28CB7 for ; Sun, 1 Oct 2017 00:09:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0237428D00; Sun, 1 Oct 2017 00:09:56 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 10E7527E63 for ; Sun, 1 Oct 2017 00:09:55 +0000 (UTC) Received: (qmail 9959 invoked by uid 550); 1 Oct 2017 00:09:43 -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: Delivered-To: mailing list kernel-hardening@lists.openwall.com Delivered-To: moderator for kernel-hardening@lists.openwall.com Received: (qmail 1433 invoked from network); 1 Oct 2017 00:07:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobin.cc; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=EJLz3R oUAXosVTAQaRCLgSopQtbK8F4TpDaVEs5L8KE=; b=jwvW1caLr/a6ZLa/yydM/A D2bNHF6R6HmzPKEzGkcjpuDjctYmQEJBkE1GKBI8xKZA9vUWCl4oJIfoh6cpITvI qFGG1N64UbIs+7jTAyywDZR21FzWGkjEfUWA4fYNaOyuFOqGUz7cuhpav/d4F/uH hrkjZbfelMPHlhxaUxx/ls+iK28zhICR+amUZNluRbl95msV4PXn9p21a6OJKc5f 2Cf+rmAcJzOMFCwdyDOKgCw/jvExVN3prUIawZ8S/IlIHJzhSEpSv0SH7Xjc5A6b aIH3LMHa9vg5vwhi1EBHjjD7QCGQXDcw9cJwmM9fZ3mVf2+6QKJ8HIaD6H2APHTQ == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=EJLz3RoUAXosVTAQaRCLgSopQtbK8F4TpDaVEs5L8 KE=; b=ae9UbOEa080H5eAiVSKZmyKf7BmcDexyZ1xNcjvObz6z0SzHfFSsH5aBT uOC9DCkw5SHUyYzzd6kS4uC5DDyifJ9s+GEv4r+uZ+oifkMz1iNqMOWIfqeEMFen xtBHRMQ8nnOIMUfQqLvVc+3ZmJiAvDTGfaCgOmbbM2/KA8bM8Kp1mUBzqqpOhWsh xaNlwmhPK9o9d9wxZBK5GckvcnZkcHmqzW65dOZnURkTxeipRkTKgeL1VhDOTvqt yQVtFYUYBW2Eio8gxPGy7ZfgCMRbBe0Ipi4jpj9arK8NkcbONEuWJLzFWkYdhAXA ++RwbGn6qBgF9f0E79s4UCvK65c8g== X-ME-Sender: X-Sasl-enc: BQqRT4e0VU/a570Wuggd9ZiPnfHou8/wZSOgMgqPHDsM 1506816447 From: "Tobin C. Harding" To: Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky Cc: "Tobin C. Harding" , kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Steven Rostedt , William Roberts , Chris Fries , Dave Weinstein Date: Sun, 1 Oct 2017 11:06:50 +1100 Message-Id: <1506816410-10230-7-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506816410-10230-1-git-send-email-me@tobin.cc> References: <1506816410-10230-1-git-send-email-me@tobin.cc> Subject: [kernel-hardening] [RFC V2 6/6] drivers: uio: un-restrict sysfs pointers for UIO X-Virus-Scanned: ClamAV using ClamSMTP The address and size on the UIO devices are required by userspace to function properly. Let's un-restrict these by adding the 'P' modifier to %pa. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman --- drivers/uio/uio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index ff04b7f..728ec8f 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -56,12 +56,12 @@ static ssize_t map_name_show(struct uio_mem *mem, char *buf) static ssize_t map_addr_show(struct uio_mem *mem, char *buf) { - return sprintf(buf, "%pa\n", &mem->addr); + return sprintf(buf, "%paP\n", &mem->addr); } static ssize_t map_size_show(struct uio_mem *mem, char *buf) { - return sprintf(buf, "%pa\n", &mem->size); + return sprintf(buf, "%paP\n", &mem->size); } static ssize_t map_offset_show(struct uio_mem *mem, char *buf)