Received: by 10.223.185.116 with SMTP id b49csp2273364wrg; Thu, 15 Feb 2018 09:06:02 -0800 (PST) X-Google-Smtp-Source: AH8x225NW+4tA9Axnzw7VXlwBfOf61UdXz8mo/w6BVUMo6PnOWsDkqG5eN3x3+dMNZO/EWTpExUO X-Received: by 2002:a17:902:34e:: with SMTP id 72-v6mr3157983pld.277.1518714361894; Thu, 15 Feb 2018 09:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518714361; cv=none; d=google.com; s=arc-20160816; b=NdTjUGkFneb4DH8U+yltD7HAxjjeDM2NeW/ikWy5q1tAdPepW4KXX3Pe3yyGkq3YuD pJHi3pzLi9jNTAQnH8cwkt2Mc7N9rAGDIRKjtYoNNwHsgzFhD8hn6IUWdUM9KEVWotOY kwDNnUVD1WFSDLDb+cvcBW8CAJ911gRkW+c6FjPCPWF2ZPwobGtcA2daKspmF0I9g9KS 814P45h8zxzJSFBsd1dr9kDIg9HXxEXDd9+vj6hu81aXR2hS5KnfD5LCgCQGTrJn/SA8 N5oThnm+eh1h5rLq0tLTHV6rV5Nkjg9DekTFkzEFsM2tuu9KHE5FPRFBfft351JDdXvB 8jpQ== 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=9UYiwiJENYqwviVdNhXatg4UdkHuGQ/8hg+DGINCF3w=; b=vkmDG05aHV4aZ4c0uZWkzrhxSHMyrc/m615JYx+jVazXFPfndYQTzMok50iRXrdTH4 UJ2Y0S1GsjUXuJz4vbmgzyqKL8yGYGHv+bw2UK3EX2G9BvfrychNxeNWmdE5fXHx5PJs fhZDkwu096Kk9eRJmGyvFW7AwIrEuvxo9wbCqduFrIeBHn9aM57AI6szwISnQv22J+wm iLDzjIbTAPlcl0j5Od1VWAHX0VqcMQY4hvt2n7F+JEcbWXgW36nO3nA7K9PZQo36cT1I mSjwOUQ/FzOUwcj013FQyhhU1Vcv+/HjOADDnbVCF5pkcHSzCgzZL3LV+JjS/OiZLm2q ZXrw== 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 g23-v6si1729811plo.341.2018.02.15.09.05.42; Thu, 15 Feb 2018 09:06:01 -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 S1423400AbeBOPit (ORCPT + 99 others); Thu, 15 Feb 2018 10:38:49 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59530 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423369AbeBOPin (ORCPT ); Thu, 15 Feb 2018 10:38:43 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7804610FE; Thu, 15 Feb 2018 15:38:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Al Viro Subject: [PATCH 4.14 165/195] alpha: osf_sys.c: fix put_tv32 regression Date: Thu, 15 Feb 2018 16:17:36 +0100 Message-Id: <20180215151714.224277923@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151705.738773577@linuxfoundation.org> References: <20180215151705.738773577@linuxfoundation.org> User-Agent: quilt/0.65 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: Arnd Bergmann commit 47669fb6b5951d0e09fc99719653e0ac92b50b99 upstream. There was a typo in the new version of put_tv32() that caused an unguarded access of a user space pointer, and failed to return the correct result in gettimeofday(), wait4(), usleep_thread() and old_adjtimex(). This fixes it to give the correct behavior again. Fixes: 1cc6c4635e9f ("osf_sys.c: switch handling of timeval32/itimerval32 to copy_{to,from}_user()") Signed-off-by: Arnd Bergmann Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- arch/alpha/kernel/osf_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- 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)); }