From patchwork Fri Nov 10 15:37:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10053359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F1A1260631 for ; Fri, 10 Nov 2017 15:38:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E21F52B372 for ; Fri, 10 Nov 2017 15:38:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6C9D2B376; Fri, 10 Nov 2017 15:38:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 875202B372 for ; Fri, 10 Nov 2017 15:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821AbdKJPiL (ORCPT ); Fri, 10 Nov 2017 10:38:11 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51544 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753264AbdKJPhv (ORCPT ); Fri, 10 Nov 2017 10:37:51 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M8QKY-1f8jlc09FC-00vwmM; Fri, 10 Nov 2017 16:37:34 +0100 From: Arnd Bergmann To: Anil Gurumurthy , Sudarsana Kalluru , "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, y2038@lists.linaro.org, hch@lst.de, hare@suse.com, jthumshirn@suse.de, Arnd Bergmann Subject: [PATCH 7/7] scsi: bfa: use 64-bit times in bfa_aen_entry_s ABI Date: Fri, 10 Nov 2017 16:37:15 +0100 Message-Id: <20171110153715.1929456-8-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171110153715.1929456-1-arnd@arndb.de> References: <20171110153715.1929456-1-arnd@arndb.de> X-Provags-ID: V03:K0:y+SzW9+7XYzR58gEMw3EDfLoXUuHu1v9blqTHr44JvbDrvyky4m tn6ZgUljHtAZnMgilMB+fzlyYERCEeCWS5/w1076QDWg+7ihatRXTIPMxniOs9yZC7LgJIv s/s9OUAKrCk6aglVC9RHYsRkcAwm3qTaeqrUoet84OnUEjG7UJ+ENELNR7xdRYjVjAumzdw FIaW3CAI09XzpiJifc/Hg== X-UI-Out-Filterresults: notjunk:1; V01:K0:43dHnS8Dfx8=:3r407n5V5vvHerm+iIF6Ne PV4ktmoFF4K/D5p+OIfkB/cn8pKK6ZlKrk1NcmOHorIvsVEQBBSwp+636q9WSC6V3Y09Zi8tM bOUPlW2mVJPq3I4SbJHmXFQyXpn2Nkf0LZCFV2o+MgpB7N3/KSjpTetY9zx4xP8Pnv0rzn6TS GeMy+EqaKZaEXQU0axCB2HgdtdSJJs2JS+4eexiPEdX4G8pRtkBRaPxnkjBnG8PQU0AEUw0p2 pDkv+FclWKAEP6P3ODYsXu4Cetd/ljUE7wWAAJk4Gw4jc5VGrxCJWcpy9zf1IpgsM9BSBO0Tp N5WHXVnJ37JRtdQ2yTnGllme5btTGe3sYgO5aFWZNEcvj0yzIM4p0nhtJP1fuzm3j7WlOks3C gci/2n4kQcEdDo2ENQEkkAhpEAtUAe9ibvWs90vlNbTE57ANOl795gX+kbRFeDEBti89yt1so N4buuzP6ga4zbAhkBioM55QEOlDW+0aG1CpnbuSO6KPflxFi6L2k389Q4ZbacPP+4v0iTZI7y CeRecQp0WBAIGbimgNmAksNm8Ec7azDSRPWqtKGoqTMmsDfgE+6K1tXvFczwI3IjGKa+Mmxb9 dEtInpLOsKUrmmNSDFhCkvwC1QxssaIR15Fb2ExRN1CJLrcDnhFtIWaTsPLOvnW/yo6eyCaI2 WHsjO3pdGL/7BubZURMu8eRtgv/DKpfOlSbstOJ3AQILqGXMhQjyPEMzrFNbUhpO+RPHdO8RM bwbg8g7pV04JxmJcpXBmjmvtHjnJQ3zqIfdWXw== Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP bfa_aen_entry_s is passed through a netlink socket that can be read by either 32-bit or 64-bit processes, but the data format is different between the two on current implementations. Originally, this was using a 'struct timeval', which also suffers from getting redefined with a new libc implementation. With this patch, the layout gets fixed to having two 64-bit members for the time, making it the same on 32-bit kernels and 64-bit kernels running either compat or native user space including x32. Provided that the new header file gets used to recompile any 32-bit application binaries, this will fix running those on a 64-bit kernel (with or without this patch) e.g. in a container environment, and it will make binaries work that will be built against a future 32-bit glibc that uses a 64-bit time_t, and avoid the y2038 overflow there. However, this also breaks compatibility with any existing 32-bit binary running on a native 32-bit kernel, those must be recompiled against the new header, which in turn makes them incompatible with older kernels unless the same change gets applied there. Obviously this patch should only be applied when the benefits outweigh the possible breakage. I'm posting it under the assumption that there are no open-source tools using the netlink interface, and that users of the binaries provided by qlogic for SLES10/11 and RHEL5/6 are not actually being used on new future systems with 32-bit x86 kernels. Signed-off-by: Arnd Bergmann --- --- drivers/scsi/bfa/bfa_defs_svc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfa_defs_svc.h b/drivers/scsi/bfa/bfa_defs_svc.h index df1e874015c4..3d0c96a5c873 100644 --- a/drivers/scsi/bfa/bfa_defs_svc.h +++ b/drivers/scsi/bfa/bfa_defs_svc.h @@ -1455,8 +1455,8 @@ struct bfa_aen_entry_s { enum bfa_aen_category aen_category; u32 aen_type; union bfa_aen_data_u aen_data; - unsigned long aen_tv_sec; - unsigned long aen_tv_usec; + u64 aen_tv_sec; + u64 aen_tv_usec; u32 seq_num; u32 bfad_num; };