summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Penkler <dpenkler@gmail.com>2025-06-03 20:43:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 17:32:32 +0200
commitb8394732ff0cc81551b0e3b442994622ebf389a7 (patch)
tree8699537f2060c239760bc257beefc2e619d55ff6
parenteaad2a4263c986c0adc2f81ab6e6199391ecc435 (diff)
staging: gpib: Add bit and byte padding to ioctl structs
Ensure that all structs have a size that is an integral mutliple of 32 bits. Change trailing single bit field to __u32 in gpib_open_dev_ioctl Add byte padding to gpib_serial_poll_ioctl and gpib_request_service2 Add bit padding to gpib_board_info_ioctl and gpib_ppoll_config_ioctl Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250603184320.30594-5-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/gpib/uapi/gpib_ioctl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 0da47e28caaa..55bf5e55507a 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -29,7 +29,7 @@ struct gpib_open_dev_ioctl {
__u32 handle;
__u32 pad;
__s32 sad;
- unsigned is_board : 1;
+ __u32 is_board;
};
struct gpib_close_dev_ioctl {
@@ -40,6 +40,7 @@ struct gpib_serial_poll_ioctl {
__u32 pad;
__s32 sad;
__u8 status_byte;
+ __u8 padding[3]; // align to 32 bit boundary
};
struct gpib_eos_ioctl {
@@ -79,6 +80,7 @@ struct gpib_board_info_ioctl {
__u32 t1_delay;
unsigned ist : 1;
unsigned no_7_bit_eos : 1;
+ unsigned padding :30; // align to 32 bit boundary
};
struct gpib_select_pci_ioctl {
@@ -90,6 +92,7 @@ struct gpib_ppoll_config_ioctl {
__u8 config;
unsigned set_ist : 1;
unsigned clear_ist : 1;
+ unsigned padding :22; // align to 32 bit boundary
};
struct gpib_pad_ioctl {
@@ -110,6 +113,7 @@ struct gpib_select_device_path_ioctl {
// update status byte and request service
struct gpib_request_service2 {
__u8 status_byte;
+ __u8 padding[3]; // align to 32 bit boundary
__s32 new_reason_for_service;
};