Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp767935ybl; Wed, 11 Dec 2019 07:14:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzE6Ck21JPJmMXuThZ81GrJ1FetayVMWFa+WI0RTL1EuGabjU0sxDms0mdwf7UYx+eaEcn/ X-Received: by 2002:a9d:32a2:: with SMTP id u31mr2449276otb.249.1576077253965; Wed, 11 Dec 2019 07:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077253; cv=none; d=google.com; s=arc-20160816; b=I9Wbn2UGxDEZlTvUHe8Kfcz9DMA1DmN9Y5G56Q8kmrH31XLwzdERxw6muxnmKoC7XZ X8A+Zq//3UIy2z/TnSjg2VNdxjvCaglD5AecY7nYRrX5KbMD+QcpfgnG5nU4pfFcws1J SrufmmoWDAjxaJUiWTIX/zO6Ew7cuL+UeoJygoIQCAqHfyAbEPgO0MznuUWmuAsTVV3A LtbUx3yS8OHaI+nwOJbCdU/5PtG9IqFGlDRRSJgQfk7dkY+4MXgpnukl45BRcYlp0HxK RcQz/nD6xfNs3C8nTuHTpoWWxjCHlan0NON3g08ybSbSZdhJzjN55M6s0dch2rcim8dl qx7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ahFPof/eP5/Mbydk7UDpCMp1ABtv2fEMHVgLmyBl6KI=; b=vQuUJ6K8FZgKca9qaee9iZQ5XH72nJ+xzrddHeR5jmFAebG6sThVtUvL1UOT7IrChz Qn3ATS/GD9Sb72hIGa4bOymnYD7CHxhVZlCacXr4wiQRHUgKuG9PJOAvvxouAFrTQqhC Kv5wVQ/4ZQuXx4YeSQxyXTV0WgV4OxXKA+ENQDnv0+72oDJlS1GG6RV6FukdDfNBPD7J vsmjK2j1LoRUIdtk3+qqfbvmXMFDEnS9hzDWHiiiEN2nuZcSjyI/PsswJv6uGdtI86E4 p4bZWl/KRK7/Teli7l/81a3Eo18VjXvbTHg6+9W66krgaT9jN0PaNilxCw/hK+cKvU64 +FFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sBwBWzoH; 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 d26si1228855ote.285.2019.12.11.07.14.01; Wed, 11 Dec 2019 07:14:13 -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; dkim=pass header.i=@kernel.org header.s=default header.b=sBwBWzoH; 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 S1730948AbfLKPLc (ORCPT + 99 others); Wed, 11 Dec 2019 10:11:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:60100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730938AbfLKPLa (ORCPT ); Wed, 11 Dec 2019 10:11:30 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DB38222C4; Wed, 11 Dec 2019 15:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077089; bh=cRi5G9C0XWPPCnV+02MMDB3bXkRsVGf0Rh3K1z24W0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sBwBWzoH9HnRyItramGwexQoNaqYoeDO+57KUGWDv6Tae04H4g5QOBYm5aZaciATB +tefbQRKspJVbAB2arhrsB3z2tTNnB8LlEEnTmZTtoD7Na/o+2zjW0grl/uY9fsBCZ 2XKAGWMLnRHet6uUC5p71EDxzUt8RJMkbL0sSQCo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann Subject: [PATCH 5.3 005/105] lp: fix sparc64 LPSETTIMEOUT ioctl Date: Wed, 11 Dec 2019 16:04:54 +0100 Message-Id: <20191211150222.701178959@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150221.153659747@linuxfoundation.org> References: <20191211150221.153659747@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit 45a2d64696b11913bcf1087b041740edbade3e21 upstream. The layout of struct timeval is different on sparc64 from anything else, and the patch I did long ago failed to take this into account. Change it now to handle sparc64 user space correctly again. Quite likely nobody cares about parallel ports on sparc64, but there is no reason not to fix it. Cc: stable@vger.kernel.org Fixes: 9a450484089d ("lp: support 64-bit time_t user space") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191108203435.112759-7-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman --- drivers/char/lp.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -713,6 +713,10 @@ static int lp_set_timeout64(unsigned int if (copy_from_user(karg, arg, sizeof(karg))) return -EFAULT; + /* sparc64 suseconds_t is 32-bit only */ + if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall()) + karg[1] >>= 32; + return lp_set_timeout(minor, karg[0], karg[1]); }