History

Fix SED-OPAL UAPI structs to prevent 32/64 bit size differences.

This patch is a quick fixup of the user structures that will prevent the structures from being different sizes on 32 and 64 bit archs. Taking this fix will allow us to *NOT* have to do compat ioctls for the sed code.

Scott Bauer committed 9 years ago

Commit 8c87fe71 parent a98e58e1 file · +18 −17Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/sed-opal.h+18−17
@@ -48,37 +48,38 @@ enum opal_lock_state { · 47 unmodified lines
48};48};
49 49
50struct opal_key {50struct opal_key {
51 uint8_t lr;51 __u8 lr;
52 uint8_t key_len;52 __u8 key_len;
53 char key[OPAL_KEY_MAX];53 __u8 __align[6];
54 __u8 key[OPAL_KEY_MAX];
54};55};
55 56
56struct opal_lr_act {57struct opal_lr_act {
57 int sum;
58 uint8_t num_lrs;
59 uint8_t lr[OPAL_MAX_LRS];
60 struct opal_key key;58 struct opal_key key;
59 __u32 sum;
60 __u8 num_lrs;
61 __u8 lr[OPAL_MAX_LRS];
62 __u8 align[2]; /* Align to 8 byte boundary */
61};63};
62 64
63struct opal_session_info {65struct opal_session_info {
64 int sum;66 __u32 sum;
65 enum opal_user who;67 __u32 who;
66 struct opal_key opal_key;68 struct opal_key opal_key;
67 uint8_t __align[2];
68};69};
69 70
70struct opal_user_lr_setup {71struct opal_user_lr_setup {
71 size_t range_start;72 __u64 range_start;
72 size_t range_length;73 __u64 range_length;
73 int RLE; /* Read Lock enabled */74 __u32 RLE; /* Read Lock enabled */
74 int WLE; /* Write Lock Enabled */75 __u32 WLE; /* Write Lock Enabled */
75 struct opal_session_info session;76 struct opal_session_info session;
76 uint8_t __align[4];
77};77};
78 78
79struct opal_lock_unlock {79struct opal_lock_unlock {
80 enum opal_lock_state l_state;
81 struct opal_session_info session;80 struct opal_session_info session;
81 __u32 l_state;
82 __u8 __align[4];
82};83};
83 84
84struct opal_new_pw {85struct opal_new_pw {
@@ -97,9 +98,9 @@ struct opal_new_pw { · 12 unmodified lines
97};98};
98 99
99struct opal_mbr_data {100struct opal_mbr_data {
100 u8 enable_disable;
101 struct opal_key key;101 struct opal_key key;
102 uint8_t __align[5];102 __u8 enable_disable;
103 __u8 __align[7];
103};104};
104 105
105#define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)106#define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t