From patchwork Thu Jun 29 14:24:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9817179 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 AE75460365 for ; Thu, 29 Jun 2017 14:25:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 666F1285D9 for ; Thu, 29 Jun 2017 14:25:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 574042869B; Thu, 29 Jun 2017 14:25:20 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D38E5285D9 for ; Thu, 29 Jun 2017 14:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HSKsJMgveYXlZ1b600oXIiqvpTzQzwuG4cI7iqlmzfY=; b=pEBdPFZzvzTfHl g5BIZOXYTbOyXe2A0TdvhdiZFda7I3aEKEt2CMYtWfdQwSlFTPrT/YJGjJmsvFlLIYIudnfKouzN5 cc3OklbJE397LabGs3lBtDYAPCVgeSgOExHbF5eSKrdO4/hoZHy6p+GVin+nlS7ZIMbuo5++99pyK +kgpDbpmGy2Kf8KKOnEnbKUyAks4nu/FLMEaSJEoaY5yh2hzcpq/3ARlXgLfAdEr3N8DfScp0d12y 3hd12C3xWCFor/mIQVrRq4xHnihg4s1KYIFOAxKQF+wsUOmREOKmkIicYYKFRnU5NwkEuLPxYDu14 awKh1HMNDAyCfQlVQUGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQaNh-0006nG-F7; Thu, 29 Jun 2017 14:25:17 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQaNc-0005XH-Mg for linux-arm-kernel@lists.infradead.org; Thu, 29 Jun 2017 14:25:14 +0000 Received: by mail-wm0-x244.google.com with SMTP id y5so2882547wmh.3 for ; Thu, 29 Jun 2017 07:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Il905ldLJcaK/dDETxhkUkpowpr1PACzjT8om54ZR+A=; b=qgqqqQPPhAIsaqhaasi3QZH5ugHjZf8iGn9L79OiNUvB8l3JFfnX6bu9Lm6/LxqF6L qPRqS52MnmQfjJ2VPAnLAbtaiH9yR145/VjsTkK/hR2nV8BgyYwrhO6wBEPSGpt3SJWn X365wzl+Fc2xUvquYxzRScCiTHvmPrzaU6ltpJlUC9VSQwXWHpcexAfgQ5XGsB06Co2w GCuKhPiELKlYElVf8YnsbpYZYcXKbKaTKj23Jb+AR18yItKcLELW0+3jyJCSMlvJ7EpH b/8A7BfO0EOBPBz31cwIqHZXxZFxSt5QbhoV/5KFTrDeMvw5iwV8Aqklquh2BcgSkIrx g+gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Il905ldLJcaK/dDETxhkUkpowpr1PACzjT8om54ZR+A=; b=sFTiu/bpUhbBKXhwbD4U12vFPnnnDmUBOpHF9KdDCWmRSW+txfZow9oNJpuc/bk3Ya /WA4K+hJqcTajYoCNewynLMoqCBjn+Ikc5a3U+fXi5x/jXCVygxwI2yNY1thwTTdOK/E ryngMqe1/biTLXJz9SfmO1BffhS7E0tG7z7etnSJqJ/ZXR1Rn6Tf0lv7HXtbcHRhcnk+ lCEo9rbw/SJ8jZQvaZk7C1q52nTgRViv/WkqPtZoeO1ePxs7S0fwELKUHFT2YWZSpdZj dxa5iYkbVhxRqEZMQEc3LNaqkrrFEffby6MVn7Q0b7wst7tT34b3i0m7BjZJBe9ugUc2 VbKA== X-Gm-Message-State: AKS2vOwp6nKACbew7UNwUeXTxy3CzGZ9OOqQtHkQQTgdWpYSaPOhoK0K 8+NTW4B9+o1y4w== X-Received: by 10.80.181.165 with SMTP id a34mr1943459ede.167.1498746291055; Thu, 29 Jun 2017 07:24:51 -0700 (PDT) Received: from ltop.local ([2a02:a03f:837:f300:1816:df24:7b15:fb23]) by smtp.gmail.com with ESMTPSA id d13sm722448eda.3.2017.06.29.07.24.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 07:24:50 -0700 (PDT) Date: Thu, 29 Jun 2017 16:24:48 +0200 From: Luc Van Oostenryck To: Will Deacon Subject: [PATCH v2] arm64: fix missing __user in compat_vfp_set() Message-ID: <20170629142447.juiwwut4yhfsdbmo@ltop.local> References: <20170628145816.24807-1-luc.vanoostenryck@gmail.com> <20170629100418.GC14607@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170629100418.GC14607@arm.com> User-Agent: NeoMutt/20170428 (1.8.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170629_072512_921635_37F45C17 X-CRM114-Status: GOOD ( 13.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pratyush Anand , Catalin Marinas , Dave Martin , linux-arm-kernel@lists.infradead.org, "David A. Long" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP compat_vfp_set() is a helper writting some values via put_user() and put_user() need a pointer annotated with '__user'. The buffer used by the helper is correctly annotated with '__user' but need to be casted to a real type before being given to put_user(). The problem is that this cast lack a '__user' annotation. Fix this by adding the missing '__user'. Signed-off-by: Luc Van Oostenryck --- Change since v1: - rebase against arm64/for-next/core - drop the change for compat_vfp_get() which is no more needed --- arch/arm64/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 35846f155..3a323e2b9 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -946,7 +946,7 @@ static int compat_vfp_set(struct task_struct *target, VFP_STATE_SIZE - sizeof(compat_ulong_t)); if (count && !ret) { - ret = get_user(fpscr, (compat_ulong_t *)ubuf); + ret = get_user(fpscr, (compat_ulong_t __user *)ubuf); uregs->fpsr = fpscr & VFP_FPSCR_STAT_MASK; uregs->fpcr = fpscr & VFP_FPSCR_CTRL_MASK; }