lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171110153715.1929456-8-arnd@arndb.de>
Date:   Fri, 10 Nov 2017 16:37:15 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Anil Gurumurthy <anil.gurumurthy@...gic.com>,
        Sudarsana Kalluru <sudarsana.kalluru@...gic.com>,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        y2038@...ts.linaro.org, hch@....de, hare@...e.com,
        jthumshirn@...e.de, Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 7/7] scsi: bfa: use 64-bit times in bfa_aen_entry_s ABI

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 <arnd@...db.de>
---
---
 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;
 };
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ