From patchwork Mon Jun 18 15:22:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138999 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4081789lji; Mon, 18 Jun 2018 08:23:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL4z57QH889CqOL2uA84nfqivUGBL7gJuURvGs+adOEyl7D/x4c2fH1di5Zt4Wr5yTQXiRt X-Received: by 2002:a62:ea14:: with SMTP id t20-v6mr14114927pfh.117.1529335415267; Mon, 18 Jun 2018 08:23:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335415; cv=none; d=google.com; s=arc-20160816; b=NSTimAsymgF1Z4iIupigN7w3FAqHUEF5hso23ZlJjaxqQDt+R/PkqTl4f7E9pe0n4P nj6Y5QcpkOC05Nt+bO1T6ch6v+cojktfz1r94vATt1bpnuTY+4ZRlzYrzi+ygUas5Gn4 hFAGOf4Er9OJwsPR7Z/FO9kVDOmocnsrdIoQ5cA7bXa+rp5qs5AXKTassJJQgyi8FaeO pY0Hi4/CZ3jj69/clS/GnGzmvvQFPNEZR5+AHFSkdEqjEhDigcGRGNuWvnHHrFKb3RYa sFhdvjXPwFU9K3HYpAaRw+8x5N5rpKXb4l8sue6EGjhKq0/NTWZskVzdGIGrqxXCsm7q t8dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=sFAGZ5hkhV9gkcvGYzmgUuFXo55I77Vht2VvpdPlOvo=; b=I313a+1C2jxy2ozMZVgGIzz+q7/9QLOyyuRBeRslPjn378obTe63DHdMSfpmyNhVXt GlsAHhXSMAmo0s5SP4kuKwup3M2PwvxxaB4lcb//yIXwYS4X4I1OGPdJ/M5WaMAqnS/j ++7PLYaBJk9y2QgmQ+zDW7oJ5vb+Nl7nKM59QluXOizzn9E9vl6rAj+PcBMtEUEc2+uv ML1HoEgiWMVR35zpwUlHCVkzmYhNJdO7VN5Lx/M3w4z/Kj+9fud8NxYbrmdKp46O2fUi 0UzN2o/pIMGi0eDGaXzE+SUf4MAEBlzORjeRjdbKrZF1y2kAPemgKixUnkbfGspDL6bO 5Afg== 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 61-v6si15158608pla.92.2018.06.18.08.23.34; Mon, 18 Jun 2018 08:23:35 -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 S1755150AbeFRPXd (ORCPT + 30 others); Mon, 18 Jun 2018 11:23:33 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:56387 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754110AbeFRPXb (ORCPT ); Mon, 18 Jun 2018 11:23:31 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lpvbr-1g6Tvv3fKp-00fjAT; Mon, 18 Jun 2018 17:23:09 +0200 From: Arnd Bergmann To: Steffen Klassert , Herbert Xu , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI Cc: y2038@lists.linaro.org, Arnd Bergmann , Alexey Dobriyan , Hans Liljestrand , Kees Cook , "Reshetova, Elena" , Florian Westphal , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/3] ipv6: xfrm: use 64-bit timestamps Date: Mon, 18 Jun 2018 17:22:14 +0200 Message-Id: <20180618152242.1566661-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180618152242.1566661-1-arnd@arndb.de> References: <20180618152242.1566661-1-arnd@arndb.de> X-Provags-ID: V03:K1:MumUtdStB+H7OHowHs5Dcrf+8C5zawBp39altZ0CBRX/P/rSezf /ZYMxO1hj5Enwdvff3psaUnnoPR22wB/9MSlojFjgpihmzsfq3njgQE57C3mWhAUqw6SZXi GTKN4qGBZYyBgk6tFvw94pEsjkHWCNQC0XaVKJD6NMWbqn7cQSR9gd34y3d9SxW9oMh4vb4 hLBQ112szslLAyYfBuAIA== X-UI-Out-Filterresults: notjunk:1; V01:K0:DdqbT/qtOlo=:Jz7ILWoAsbYd7qjuavkI0B wvTMNERisN6+ye9w1Eq0bbuy3wxgXpiErRcoLY1UcF3CG4N7aJefPWLeVnhXacAdH8aQZUss6 5Q1kQ+emx+SX0q+xz+fGmyiRZZvUrQfGnDxPc0yhGmBVVAHWG94QzIZ1r8KBHoEHsdBJXb2rL wTFCp/7YAkR13cOQx1l1Nd7yUuvkH8rshBvNCFA/0uOtxnKgLw+9R4jDgnz9AebeDsgj5Y0IS YOoZO/aJLjTYqU2s90F6jYpjhNhUjy48ILtg63fYCqYmrws/4L6ehEKaerA0p57ofUmnuYFk+ PrUS/7dulARJr26ozgyUpWzSa5snlENtEW7+5cm3LhHQCRsvXIO+o9uD8un6HnsODuCLv+zvc xhpIQzO1dqm1y/PyOaieVomrQe43SlYW8zObFJsow2z2XpQUiYxrXHuBRgyYFpbI3mbpY1ijs WpvGApiUY4e3zrXe8P+e01qZvDrmjRUGZqwGXdEpD97cY6/EH5/rXdsThosxj+TMUMCKp2XlK vra4mLcl0dmdnGZdWzw2WQ4OZn5jnymJ0Eb0lN0wPECHGtPGyqypWE4Pm0cS/AIQNA0CxFct4 m2PviToQL+OI+CA2Y8jxJE07uvgkC8t+lZoVUe45IyCP/pwBUSEFpEWKT76KdRoTHzYgVltYm ekNuyQZ+/j6rWlBHXfxE5RC75CGcp/LVitkeC6h8bmjmjaTi4quc9b3boc0UNFskVijE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org get_seconds() is deprecated because it can overflow on 32-bit architectures. For the xfrm_state->lastused member, we treat the data as a 64-bit number already, so we just need to use the right accessor that works on both 32-bit and 64-bit machines. Signed-off-by: Arnd Bergmann --- include/net/xfrm.h | 2 +- net/ipv6/xfrm6_mode_ro.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 557122846e0e..d9031415402f 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -225,7 +225,7 @@ struct xfrm_state { long saved_tmo; /* Last used time */ - unsigned long lastused; + time64_t lastused; struct page_frag xfrag; diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c index 07d36573f50b..da28e4407b8f 100644 --- a/net/ipv6/xfrm6_mode_ro.c +++ b/net/ipv6/xfrm6_mode_ro.c @@ -55,7 +55,7 @@ static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb) __skb_pull(skb, hdr_len); memmove(ipv6_hdr(skb), iph, hdr_len); - x->lastused = get_seconds(); + x->lastused = ktime_get_real_seconds(); return 0; }