Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3762025ybx; Sat, 9 Nov 2019 03:23:18 -0800 (PST) X-Google-Smtp-Source: APXvYqw87zbpRibMYVlgGAj0WdAC64rnsWChfpa9hGM3H+Vei1/+K8gi7j5jKUMkVu3QJ7RpwWbN X-Received: by 2002:a17:906:394c:: with SMTP id g12mr13072403eje.233.1573298598192; Sat, 09 Nov 2019 03:23:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573298598; cv=none; d=google.com; s=arc-20160816; b=plPgbncUR2PWy3VK9YIosFN7+cZUpEpnNHp7v1oCTpyUJV26OoAQD0CQDQQPQ2nhR0 YDyt06ooHVpbqePO76WySvEg7zQOX/4FF/OtOZWNhdi4EJxPoRE/clNJtAN/ftiXONuS R5GkSWkMOvmfRrVdeGTKL8slfKXMcjFbZ024B6+RFh+CE0LOphFovkWYd0uKly/gCVl7 Et6rq9GS5rMhNwfG2wIAz54CTDQvjg0Vq4crUN1ZzON1k/AWCeRqMxN+3AyMV4EHSCj8 U1lMape4diOod3r5ODIp9LnmQnV95Rr74EpBa2yLtIwS9shz35Sh1vNHegMDer0BtZsl clQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=BCsrDyRpXRPpHGyQBdy1Kz+nqZt7EYglg8Blmq5i2q8=; b=ZGV+agA9xd/u9GmKgtpR5wTzs7pPsYmdbwPbD53xpTOYJUUE9i5rUp5xmx/KkPG9VF gVQt1F5Lm3+bSBfA+yUWqGq9Mgg1UI9+dvevgBuvBjp7nTz606ZOnIEIRHk869rWBdKO dVeXJmWhtr1LPdwvowDVivYn5ZxGpLbIFfXkvjoiqLaiLhhg1f7rY12VleXC6hIUTWSi xA+cM9o9xN95YLg5Z5RHk9b4En4cIn210+ubN9GgdA23mTqdyo1Q+IWJF8emzVHOKkSr GiRn1WpGt5bSkB+H8jDu7w7ZTe+jZE0tOHnMbgyhM5t6zz6ZvrOH+LYfVL3AXGofm8po 0QBg== 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 c36si6406034edb.58.2019.11.09.03.22.55; Sat, 09 Nov 2019 03:23:18 -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 S1726587AbfKILUW (ORCPT + 99 others); Sat, 9 Nov 2019 06:20:22 -0500 Received: from orbyte.nwl.cc ([151.80.46.58]:40590 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbfKILUV (ORCPT ); Sat, 9 Nov 2019 06:20:21 -0500 Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.91) (envelope-from ) id 1iTOmo-0003te-Kn; Sat, 09 Nov 2019 12:20:10 +0100 Date: Sat, 9 Nov 2019 12:20:10 +0100 From: Phil Sutter To: Arnd Bergmann Cc: y2038@lists.linaro.org, Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , linux-kernel@vger.kernel.org, Ander Juaristi , wenxu , Thomas Gleixner , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org Subject: Re: [PATCH 09/16] netfilter: nft_meta: use 64-bit time arithmetic Message-ID: <20191109112010.GC15063@orbyte.nwl.cc> Mail-Followup-To: Phil Sutter , Arnd Bergmann , y2038@lists.linaro.org, Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , linux-kernel@vger.kernel.org, Ander Juaristi , wenxu , Thomas Gleixner , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org References: <20191108213257.3097633-1-arnd@arndb.de> <20191108213257.3097633-10-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191108213257.3097633-10-arnd@arndb.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 08, 2019 at 10:32:47PM +0100, Arnd Bergmann wrote: > On 32-bit architectures, get_seconds() returns an unsigned 32-bit > time value, which also matches the type used in the nft_meta > code. This will not overflow in year 2038 as a time_t would, but > it still suffers from the overflow problem later on in year 2106. I wonder if the assumption that people will still use nft_meta 80 years from now is an optimistic or pessimistic one. :) > Change this instance to use the time64_t type consistently > and avoid the deprecated get_seconds(). > > The nft_meta_weekday() calculation potentially gets a little slower > on 32-bit architectures, but now it has the same behavior as on > 64-bit architectures and does not overflow. > > Fixes: 63d10e12b00d ("netfilter: nft_meta: support for time matching") > Signed-off-by: Arnd Bergmann Acked-by: Phil Sutter