From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753063AbdKHXIu (ORCPT ); Wed, 8 Nov 2017 18:08:50 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:40884 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752827AbdKHXIt (ORCPT ); Wed, 8 Nov 2017 18:08:49 -0500 To: Arnd Bergmann Cc: Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" , David Carroll , Raghava Aditya Renukunta , Johannes Thumshirn , Hannes Reinecke , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] aacraid: use timespec64 instead of timeval From: "Martin K. Petersen" Organization: Oracle Corporation References: <20171107104613.3183755-1-arnd@arndb.de> Date: Wed, 08 Nov 2017 18:08:33 -0500 In-Reply-To: <20171107104613.3183755-1-arnd@arndb.de> (Arnd Bergmann's message of "Tue, 7 Nov 2017 11:46:05 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd, > aacraid passes the current time to the firmware in one of two ways, > either as year/month/day/... or as 32-bit unsigned seconds. > > The first one is broken on 32-bit architectures as it cannot go past > year 2038. Using timespec64 here makes it behave properly on both > 32-bit and 64-bit architectures, and avoids relying on signed integer > overflow to pass times into the second interface. > > The interface used in aac_send_hosttime() however is still problematic > in year 2106 when 32-bit seconds overflow. Hopefully we don't have to > worry about aacraid by that time. Applied to 4.15/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering