]> www.infradead.org Git - users/sagi/libnvme.git/commit
ioctl: Rearrange members in nvme_security_send_args
authorDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 14:16:54 +0000 (15:16 +0100)
committerDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 17:43:19 +0000 (18:43 +0100)
commitbd6f91937f29065ff7916c7109ba1e675a5498a4
tree9a54b3f5edb6fddfc3beb640cf94e68f03bb9b1f
parentb289574e2e8a2ff4fb87f93ef06622edbf34a3f2
ioctl: Rearrange members in nvme_security_send_args

Avoid any holes in the struct by rearranging the members. Also add the
attribute packed to struct definition to reduce ABI breakage.

struct nvme_security_send_args {
        int                        args_size;            /*     0     4 */
        int                        fd;                   /*     4     4 */
        __u32 *                    result;               /*     8     8 */
        __u32                      timeout;              /*    16     4 */
        __u32                      nsid;                 /*    20     4 */
        __u8                       nssf;                 /*    24     1 */
        __u8                       spsp0;                /*    25     1 */
        __u8                       spsp1;                /*    26     1 */
        __u8                       secp;                 /*    27     1 */
        __u32                      tl;                   /*    28     4 */
        void *                     data;                 /*    32     8 */
        __u32                      data_len;             /*    40     4 */

        /* size: 48, cachelines: 1, members: 12 */
        /* padding: 4 */
        /* last cacheline: 48 bytes */
} __attribute__((__aligned__(8)));

Signed-off-by: Daniel Wagner <dwagner@suse.de>
src/nvme/ioctl.h