scsi: bfa: try to sanitize vendor netlink events
bfa_aen_entry_s is passed to user space in a netlink message, but is
defined using a 'struct timeval' and an 'enum' that are not only
different between architectures, but also between 32-bit user space and
64-bit kernels they may run on, as well as depending on the particular C
library that defines timeval.
This changes the in-kernel definition to no longer use the timeval type
directly but instead use two open-coded 'unsigned long' members. This
keeps the existing ABI, but making the variable unsigned also helps make
it work after y2038, until it overflows in 2106.
Since the macro becomes overly complex at this point, I'm changing it to
an inline function for readability.
I'm not changing the 32-bit user-space ABI at this point, to keep the
changes separate, I deally this would be defined using the same binary
layout for all architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Anil Gurumurthy <Anil.Gurumurthy@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>