Received: by 10.213.65.68 with SMTP id h4csp495736imn; Fri, 16 Mar 2018 09:29:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELvkinrjUvrXoKP7zWvWCB4B0upnlUNaTGOYiziUcaXS3NsWaOU76sa1I2kai9XYWfkvlevY X-Received: by 10.99.130.199 with SMTP id w190mr1935722pgd.15.1521217755122; Fri, 16 Mar 2018 09:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521217755; cv=none; d=google.com; s=arc-20160816; b=hsg8XnM+sbgsLQWJVx0UF+w6+bw5Q0URkmXb0weQQdo4Kbl5gSVswwIrdzALcDl2tu A8tw7+SR5FEHAxah1INCn7EpuDnBVDNHyxeC4vOktk+7udgd/YSg2otpsFH0n8ZkLYae jEzNLWESRmCQDRjrUdRVvej8PyG7yMbB8jKJo0vA53DAXPsIXGXhaAJcGk6Q0N48B3c9 fpDNt8PAcupXkT+pnUhRk0lPK/RgZy3jhubIus4qcSD0qdPL4XifH57bLzXEDlZVVYKc tYhhDSF5oARhezoVdbfNHHg2rNVqT+hwzKwYhahi990iscpjcvS5QMVfjQlJmNWbxRhR uLfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=IBWkPAxDEeA9FKDJBbDfLlooxiH5o1YcFzzCX6vvJqE=; b=FEKT/uYDBK33e8C6ZlIla8rg/VYEOO2F1iqz/QPrt1cNtpbUpHWxhqTHSOZ6Zfza7l RO0NPO8iTvwRIq+JY/J7Cxn198i+wxQ9WTSGNhmTmLDxRY6joC0T2Zkoi7xZxY1K5bRw pP2c7BjBrDU5l2haiZq5/lfYXHeV0BIFBKLQH1Ysfvx+iinsSWrnCS4pWSc0nPzs9njY hJem9+qGyE201WZVaYuM16gpCn+vw93LSaiAVPxN4+LiX+zR0SasBJMJnPmK5J27+kHx 4yTXymWQWEr/yYYHNeKpo8lOp8rwvXN7Gd4unynKlGxcbgE8g5qU8eybA6y96g2AgM8C DAJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q90si4699242pfi.163.2018.03.16.09.29.01; Fri, 16 Mar 2018 09:29:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752769AbeCPQ11 (ORCPT + 99 others); Fri, 16 Mar 2018 12:27:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43196 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964901AbeCPPjP (ORCPT ); Fri, 16 Mar 2018 11:39:15 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 78A2DCD8; Fri, 16 Mar 2018 15:39:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Al Viro , Sasha Levin Subject: [PATCH 4.14 102/109] Fix misannotated out-of-line _copy_to_user() Date: Fri, 16 Mar 2018 16:24:11 +0100 Message-Id: <20180316152335.401619923@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe Leroy [ Upstream commit a0e94598e6b6c0d1df6a5fa14eb7c767ca817a20 ] Destination is a kernel pointer and source - a userland one in _copy_from_user(); _copy_to_user() is the other way round. Fixes: d597580d37377 ("generic ...copy_..._user primitives") Signed-off-by: Christophe Leroy Signed-off-by: Al Viro Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- lib/usercopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/usercopy.c +++ b/lib/usercopy.c @@ -20,7 +20,7 @@ EXPORT_SYMBOL(_copy_from_user); #endif #ifndef INLINE_COPY_TO_USER -unsigned long _copy_to_user(void *to, const void __user *from, unsigned long n) +unsigned long _copy_to_user(void __user *to, const void *from, unsigned long n) { might_fault(); if (likely(access_ok(VERIFY_WRITE, to, n))) {