From patchwork Tue Nov 7 14:09:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 118171 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4025928qgn; Tue, 7 Nov 2017 06:10:56 -0800 (PST) X-Google-Smtp-Source: ABhQp+RWBVWzpmW9SV7dbia6Vlya+1WfaZRaWVkxt8oWVDNxTdE85H7hJNhTT+LMeqfyDrViN7tr X-Received: by 10.159.195.7 with SMTP id bd7mr18492071plb.366.1510063856603; Tue, 07 Nov 2017 06:10:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510063856; cv=none; d=google.com; s=arc-20160816; b=N/sO6QJ/FU/VdVXXTjALaCrND5EfRp1sB4o4XnTvXs/zWcQRrdc53Nodj+2RJMs6Rq +f1QYq7TQ7/GmucJFH6ABHXhwwc9EdRerWuoLspDXsEyB9kmPYu5waH0mvxUsdLYg4rw L3QK8QP1vFbmyChSI29Vb56mef9jXgPnx0uyEGDZqyf1DD0fr2EMg2zP+Vl3eFbPICMg 8QieE+v9b2K3R1oAgyrMffExF5cLESDPd1rCQ4xnMrfJFDWIWY4NtsoVVQdLsFbYxOt3 54675jbgy4EOL+hQsLLGtf6SWolPcobVKQyIoU4n3pVT0LZShOwaq+PYcOpyyh/bPmTS 66Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=efrOEZylTgkWkr8Nhq9xPVoCskRoIXm69Bp3YAQexwc=; b=u9jyn+E8VGyn3IE+/rvHll7B/lgsVt+a+qy3XKea/j+wxYfjDDBQOxmzM7o+2Uzf8k bKcm08HmYAxdUkSIaqbERIbHFxTE9NxrwDaRh9/GhDFB+M6QU4sDE7J6U+TBkAsl6dha Nh/hQFOeGyvLTps9c0/oL3fmhfxxoZys+mu1uJBU1CKZvDJFWSKZD2Oa9Bx0WZmZAE25 KIavIKj+OH+azwOvVjERQ9OceqQts57e1Xj0fqhb3HOP5LQ+/qM/9cO2sX2shIAg2E28 nmxtPQZBWWQlqskN3o+AKGmA1ab2XGeZf+vBJs9jWqYYsAlNXiMp2bMwc1t6i2ePCm5g Yu7w== 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 q5si1267075pgp.196.2017.11.07.06.10.56; Tue, 07 Nov 2017 06:10:56 -0800 (PST) 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 S934372AbdKGOKy (ORCPT + 26 others); Tue, 7 Nov 2017 09:10:54 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:64408 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932811AbdKGOKw (ORCPT ); Tue, 7 Nov 2017 09:10:52 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M89Tt-1f6uP33Kq1-00vfZs; Tue, 07 Nov 2017 15:10:40 +0100 From: Arnd Bergmann To: Richard Henderson Cc: Ivan Kokshaysky , Matt Turner , Alexander Viro , y2038@lists.linaro.org, Deepa Dinamani , Arnd Bergmann , stable@vger.kernel.org, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] alpha: osf_sys.c: fix put_tv32 regression Date: Tue, 7 Nov 2017 15:09:24 +0100 Message-Id: <20171107141029.3160278-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Zf6NKKHC+LRpX0JKvtMPcY+e/PDs60KJG/zT89bYzwb9NbHa1/W Sz6/k7TyXA0Qhl9C+PSaBL4PqK69HfnzY3L903H7RIMaJzr2gVE1YiTbySI/fWTPzKSauIL 9ln/kd7TSRo6w3dMB8TfZz06dSKaRLS76EDxH65PltVXqqCGuJs3zFvvDTUNKjDk0Z9eM/T Nq8+rcm5uxq8F6IG6OL3w== X-UI-Out-Filterresults: notjunk:1; V01:K0:d76qu0YXIvg=:rajfNhRo7N9u/Qjxmj8uRv 5yl96MXilfWFqU/DSaX1onSnqin2tsMQ15pf28oS71foJT9xgnIi8NkZAZSnt/3l/PMixCAHG 6EAyxY888fkA5w3IqaQsfeYDajt/9mQgZRiaX326MkvmF5jHd9/MIew47uuInpoRLZWd5utvd TbOr4o7FiS9fM4J1nYhPsntjYTyhc2GK75rN76FcSlzmcGBJwd5+KiC3DrOqfzs7ebyDHcxmN nHBnPRERdIrnmST60pHdcnKKjg5SSYehr9zFkOTomnzAOxaNulqIIUB/ONRTHE8w3WDZtFnTp 3egyNZjIpC7A/h8QkhF/BEmh9TV0fvI9nWHj/N7uGqTyN2R2VFxP5zkFsfNZZ2Yz989N8k5d4 21N/FzLVdwuDJxwdILhT2H730TVQ4k4nj5s5zeVwFy8ONBvJst4DUDWmt5LI+FnjIY110lS1J /TGyoMvgG9bEia/xx1tbouVJ8xvINKXC8KqGjU2BeeNygT1vnrBqaQLLr7niYk8mTTCr9RrnW dSv82tM9VXDLfKB9MIBJPnZiBeaosMGBfAXcgF/KOKEDZXAygC0r7C/aDkePHeX/c35DdfL1L BsiOAKGUUx3Q3qidOmTETsUiQp26HCVIcTK3fhYrefFWUYKa27LZ7yPDsIc22FtIagPrd0slB J0ha1hoiJGoxnzhbrqeOQsKaj8QZ3B3JzLbljsxCE8jnfFInhNJtnGdhFJISSX/2JomdOrHWy DK6S9hBtvtdZvP1M6xc0LUmxXAZZeDwm8H4HCA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There was a typo in the new version of put_tv32() that caused uninitialized stack data to be written back to user space, rather than writing the actual timeval for the emulation of gettimeofday(), wait4(), usleep_thread() and old_adjtimex(). This fixes it to write the correct data again. Cc: stable@vger.kernel.org Fixes: 1cc6c4635e9f ("osf_sys.c: switch handling of timeval32/itimerval32 to copy_{to,from}_user()") Signed-off-by: Arnd Bergmann --- arch/alpha/kernel/osf_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index ce3a675c0c4b..75a5c35a2067 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -964,8 +964,8 @@ static inline long put_tv32(struct timeval32 __user *o, struct timeval *i) { return copy_to_user(o, &(struct timeval32){ - .tv_sec = o->tv_sec, - .tv_usec = o->tv_usec}, + .tv_sec = i->tv_sec, + .tv_usec = i->tv_usec}, sizeof(struct timeval32)); }