|
@@ -156,13 +156,17 @@ static struct aes_table aes_invmixcolumns;
|
156
|
156
|
*/
|
157
|
157
|
static inline __attribute__ (( always_inline )) uint32_t
|
158
|
158
|
aes_entry_column ( const union aes_table_entry *entry, unsigned int column ) {
|
159
|
|
- const uint8_t *first __attribute__ (( may_alias ));
|
|
159
|
+ const union {
|
|
160
|
+ uint8_t byte;
|
|
161
|
+ uint32_t column;
|
|
162
|
+ } __attribute__ (( may_alias )) *product;
|
160
|
163
|
|
161
|
|
- /* Locate start of relevant four-byte subset */
|
162
|
|
- first = &entry->byte[ 4 - column ];
|
|
164
|
+ /* Locate relevant four-byte subset */
|
|
165
|
+ product = container_of ( &entry->byte[ 4 - column ],
|
|
166
|
+ typeof ( *product ), byte );
|
163
|
167
|
|
164
|
168
|
/* Extract this four-byte subset */
|
165
|
|
- return ( *( ( uint32_t * ) first ) );
|
|
169
|
+ return product->column;
|
166
|
170
|
}
|
167
|
171
|
|
168
|
172
|
/**
|