From patchwork Fri Nov 8 21:12:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 178975 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3289397ilf; Fri, 8 Nov 2019 13:15:35 -0800 (PST) X-Google-Smtp-Source: APXvYqwyk2t6IkkSHvIXN37UKsl5JPcxfvrhghRYky3nWd7x1HwNiVWS9SKVzcvUZ+5Ea2w9bT/D X-Received: by 2002:a50:8264:: with SMTP id 91mr12671515edf.69.1573247735502; Fri, 08 Nov 2019 13:15:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573247735; cv=none; d=google.com; s=arc-20160816; b=hEBJTQryUzw2dkqRkxcW0LwA+2GGz6xixHLGML1F8JYURUisXUbR0HUouD3KLSUFKf Ge6ZGwt5hb0T9VheJDbuMTfyQkblo7SSc29syXdg0JaKIzZ5LlCK4vcBBfDtaDxlmrvh iAk7t9ZwiWRIJJoo4B4IxwSmo9PH375ACzqItGaCLZdS5txAZirFz4wmWcSRsSaRyao8 +CikOmOauSB1BZkt0Ve7wGj525je4XWQVbvjHBa9johTWXldNtzSQy8KvCS6njnb59D4 hAacvUeKfKEUJ3zSYs0Q9FPkzBw2do3OhvzTuEXYDeRdHcJoSXWNi57kJzw+kWS6bAtX 4UxQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BhYVVh+mekxV9wZb0Cqw+E9oNUJt6mVwCfjxrra34AY=; b=PY1CBXSvqsnrSCjZ7r04C1JzycGIc27o4LqoQ7sCkQqD7++xk9ESoeryxDQ5eH3lCh +Dw1I9W+jYNjrFKP8FUXykJ/yJClb9WPWo9jGjwPStFdlxq6lSGdEWDdSN6uAycFsWnr mkwauvOa2sjgcPD+ht72u1l/1HEeXGySaF4DotgHii8UXhOMJpJE9V991D6h5VdjjxZU v5GnxKU9V416hqG7YHQXMgfT8zlOQZrGoAxl+0tLx7TUPk9L1O46F27X3ySEm2djtciR O84beHYtImNWwB0O5g5Rs4n5oht6AnDvXhtN5/7iKF3GICUW8WqVeb0v4vbF+5+Kp1rZ 6dAA== 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 b27si5291428ede.48.2019.11.08.13.15.35; Fri, 08 Nov 2019 13:15:35 -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 S1732914AbfKHVPd (ORCPT + 26 others); Fri, 8 Nov 2019 16:15:33 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:33779 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732101AbfKHVPc (ORCPT ); Fri, 8 Nov 2019 16:15:32 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1N3bCH-1hlI2n3QdX-010fBS; Fri, 08 Nov 2019 22:15:26 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Deepa Dinamani , Catalin Marinas , Andrew Morton , Oleg Nesterov Subject: [PATCH 14/23] y2038: make ns_to_compat_timeval use __kernel_old_timeval Date: Fri, 8 Nov 2019 22:12:13 +0100 Message-Id: <20191108211323.1806194-5-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191108210236.1296047-1-arnd@arndb.de> References: <20191108210236.1296047-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Pfme16M9JKU/1lQYMjSUnUlUlunFko9yGD1/qMR1+QbuE78z4pf ZHI88gH+wz2J6OBPQID1DtDxbizptVLZT1jhAxDXEzsVfN7ghgDqvT96Hx+hRxj+0iznIqt /PVpStGxYFsdM5EoOazNF0V9hzc3ECTCD9sJDscIIwFm3LzbpdHtOT9CepwMwhnnRp1dkgh bgsEBYh4LC7QcFloIaBXw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:BXLkiyXx/ek=:6ux6MXiobQDoYSdUr8teJu Qdu+4y/M2l60Hz+zNN940bfImgo3biC7NDpp6eKqPDDRzYbC71KWA7Hofa/py/3EpjDnbZTVL hyl8IuisupTzJvHQ9dtiFcGhn7gNrAduwMr24dNU/3NYUpiqpaiFN2oamfbtvbXkQstLty5ev DVKLexf7lAzU24EiE9thHI8iU54ku+p4C2kHt0ocPp9mHDm/zCvb34TrqLDnC8cCcbsVZ/NbF lVyLegS3fhlsHkVaAUUuYjFsGpg0hl9MfmfdcGh4QtJ1q0SlOwFny8quFBhuy9anyyiLd7Tyy 1RP/STEVAqsEXCOr9O0frVj38AbbWYAJ6ynQ002lStuq1uq03mzUq4faqi8nm7lRB2LYj8975 3qPOLAL2Gk/kh3ZulEQNHXtaGefQ9j09PYYI9rENTnMIAsLn5IjymW4cR73UBWw7sdtWDpaP/ hg47QQSK8cXXbl/jKBPiPCy3TpgOo7T1L9DAALv71cYgRk2mUhR9sc0On1enZS5IcJwKpwM4f aXGKhyE5IUPWFeEKn72L3yQs83CdLkqF2pG9gOxbGP7gdYKk032Nme0eKNZKue4Xi3Lzt76J5 8pUhtsrOmdPBrXgi1EjrQ1T+Qy431V6ptjBBYO9iAgxK+epkMXJaOdlHUsrNkksM7g/qQyDIK Xrcil36hElxlcsPhlGe2PP1vWGDp0FKgWVMI6jo3eciulj4QUes7ERrPc81OkzB/fpWzXIxOn WveEHEHcg2Q+e+gGmHwxeVHyM6h4SaOLX4KBA9AxaZ1TU0tHIjL1CZeW7P6c8Jez3+o7w78A/ 81zzirRiIYllZL+9/ABM92Za7yx/GU5Ywl5mpUSpDbRjlkPNcpQmX7To9iWb0A+L+6hwrWSzM KCrNO2bIVQpTWZ2nGtHw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This gets us one step closer to removing 'struct timeval' from the kernel. We still keep __kernel_old_timeval for interfaces that we cannot fix otherwise, and ns_to_compat_timeval() is provably safe for interfaces that are legitimate users of __kernel_old_timeval on native kernels, so this is an obvious change. Signed-off-by: Arnd Bergmann --- include/linux/compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/include/linux/compat.h b/include/linux/compat.h index 16dafd9f4b86..3735a22bfbc0 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -937,10 +937,10 @@ static inline bool in_compat_syscall(void) { return is_compat_task(); } */ static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec) { - struct timeval tv; + struct __kernel_old_timeval tv; struct old_timeval32 ctv; - tv = ns_to_timeval(nsec); + tv = ns_to_kernel_old_timeval(nsec); ctv.tv_sec = tv.tv_sec; ctv.tv_usec = tv.tv_usec;