Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3476840ybc; Thu, 21 Nov 2019 08:54:10 -0800 (PST) X-Google-Smtp-Source: APXvYqw2kZiJ2AafECog5os25sYtpzOEi7PHfXvAQKuOV/i/J86sOTOnD1fuVx73KB/60gP5QZCy X-Received: by 2002:a17:906:4e48:: with SMTP id g8mr14769741ejw.67.1574355250264; Thu, 21 Nov 2019 08:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574355250; cv=none; d=google.com; s=arc-20160816; b=Q3LDbk8chdMfl+DsEEoTFxmAVDe0GDdwfayJXbmT3jHUoxxm+59zNXQZwhGZCUijVP IQybkF6TDTXkhv3gIIVHfootMl0dLzYiBN8eycbK/2r0kYJufKd/6CGq/8j9j7qvwSGi ryqrKyUho2tx+NiEc8QhrxNkV5fNF8F3lrnHtStu+70GQSPD2FiIO+S0h42Oz7ZWqr45 0eqm5zg6xIeRGJ/FDMnxGy6mV+PbIu9vd0Ti/NEmf+XtRgslU2sEVZg1J5RXl6vZARSs tQv3jYWN7V545gxKyYzMP99RR5o2LoPEDxPYv6FeqUNeV3ZHKSlzvPJbDQ690rECAUqt WhxQ== 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:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=0IPysGgwDksPFyQUOLm+XWETihaIlsmUbrLx5nWEzNc=; b=WXZ8DwvSCzyBTbrJLPdkvZ9JUh5foqhO1gZxZjgR/NdVKK/90gtCVi0tTQdmdeKkIz /3pf5VKTCiFJ5RXERKt23HZOEScCxf8+JzyL4/OVVu787KeHR0pGK29Jk3/NCWi+JVpT K+WNW+hoDmHVPcOG3JxZ9yUh68hNh82opLk2BMy4UkynETgWINgnxs6BTaI4FPEeNKOZ Xa76qixOwX9Ts5X6NKz3QpFcKsvIcV+oRDGerH9wiTswv+OkFpXjlsSi5azm0BNRVNr9 5v0/5CIq+0Azy0eUML0Hqv07yGviKx4QTQcCpFQPD4K+Jt58i1AuGs35imx4jWskJjxy QmfA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gg16si2053258ejb.256.2019.11.21.08.53.46; Thu, 21 Nov 2019 08:54:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbfKUQws (ORCPT + 99 others); Thu, 21 Nov 2019 11:52:48 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:56845 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbfKUQws (ORCPT ); Thu, 21 Nov 2019 11:52:48 -0500 Received: from [167.98.27.226] (helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iXpgx-0004CD-G1; Thu, 21 Nov 2019 16:52:27 +0000 Message-ID: <1634aafd2a99cedceb63efe57e4c7e0a7317917b.camel@codethink.co.uk> Subject: Re: [Y2038] [PATCH 21/23] y2038: itimer: change implementation to timespec64 From: Ben Hutchings To: Arnd Bergmann , y2038@lists.linaro.org, Steven Rostedt , Ingo Molnar , Thomas Gleixner Cc: Kees Cook , "Peter Zijlstra (Intel)" , Frederic Weisbecker , linux-kernel@vger.kernel.org, Anna-Maria Gleixner Date: Thu, 21 Nov 2019 16:52:26 +0000 In-Reply-To: <20191108211323.1806194-12-arnd@arndb.de> References: <20191108210236.1296047-1-arnd@arndb.de> <20191108211323.1806194-12-arnd@arndb.de> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-11-08 at 22:12 +0100, Arnd Bergmann wrote: [...] > @@ -292,8 +296,8 @@ static unsigned int alarm_setitimer(unsigned int seconds) > * We can't return 0 if we have an alarm pending ... And we'd > * better return too much than too little anyway > */ > - if ((!it_old.it_value.tv_sec && it_old.it_value.tv_usec) || > - it_old.it_value.tv_usec >= 500000) > + if ((!it_old.it_value.tv_sec && it_old.it_value.tv_nsec) || > + it_old.it_value.tv_nsec >= 500000) [...] This is now off by a factor of 1000. It might be helpful to use NSEC_PER_SEC / 2 here so no-one has to count the 0 digits. Ben. -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom