@@ -189,31 +189,31 @@ static void handle_overflow(struct overflow_data *data, void *lhs,
189
189
ubsan_epilogue ();
190
190
}
191
191
192
- void __ubsan_handle_add_overflow (struct overflow_data * data ,
192
+ void __ubsan_handle_add_overflow (void * data ,
193
193
void * lhs , void * rhs )
194
194
{
195
195
196
196
handle_overflow (data , lhs , rhs , '+' );
197
197
}
198
198
EXPORT_SYMBOL (__ubsan_handle_add_overflow );
199
199
200
- void __ubsan_handle_sub_overflow (struct overflow_data * data ,
200
+ void __ubsan_handle_sub_overflow (void * data ,
201
201
void * lhs , void * rhs )
202
202
{
203
203
handle_overflow (data , lhs , rhs , '-' );
204
204
}
205
205
EXPORT_SYMBOL (__ubsan_handle_sub_overflow );
206
206
207
- void __ubsan_handle_mul_overflow (struct overflow_data * data ,
207
+ void __ubsan_handle_mul_overflow (void * data ,
208
208
void * lhs , void * rhs )
209
209
{
210
210
handle_overflow (data , lhs , rhs , '*' );
211
211
}
212
212
EXPORT_SYMBOL (__ubsan_handle_mul_overflow );
213
213
214
- void __ubsan_handle_negate_overflow (struct overflow_data * data ,
215
- void * old_val )
214
+ void __ubsan_handle_negate_overflow (void * _data , void * old_val )
216
215
{
216
+ struct overflow_data * data = _data ;
217
217
char old_val_str [VALUE_LENGTH ];
218
218
219
219
if (suppress_report (& data -> location ))
@@ -231,9 +231,9 @@ void __ubsan_handle_negate_overflow(struct overflow_data *data,
231
231
EXPORT_SYMBOL (__ubsan_handle_negate_overflow );
232
232
233
233
234
- void __ubsan_handle_divrem_overflow (struct overflow_data * data ,
235
- void * lhs , void * rhs )
234
+ void __ubsan_handle_divrem_overflow (void * _data , void * lhs , void * rhs )
236
235
{
236
+ struct overflow_data * data = _data ;
237
237
char rhs_val_str [VALUE_LENGTH ];
238
238
239
239
if (suppress_report (& data -> location ))
@@ -326,10 +326,9 @@ void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,
326
326
}
327
327
EXPORT_SYMBOL (__ubsan_handle_type_mismatch );
328
328
329
- void __ubsan_handle_type_mismatch_v1 (struct type_mismatch_data_v1 * data ,
330
- void * ptr )
329
+ void __ubsan_handle_type_mismatch_v1 (void * _data , void * ptr )
331
330
{
332
-
331
+ struct type_mismatch_data_v1 * data = _data ;
333
332
struct type_mismatch_data_common common_data = {
334
333
.location = & data -> location ,
335
334
.type = data -> type ,
@@ -341,8 +340,9 @@ void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data,
341
340
}
342
341
EXPORT_SYMBOL (__ubsan_handle_type_mismatch_v1 );
343
342
344
- void __ubsan_handle_out_of_bounds (struct out_of_bounds_data * data , void * index )
343
+ void __ubsan_handle_out_of_bounds (void * _data , void * index )
345
344
{
345
+ struct out_of_bounds_data * data = _data ;
346
346
char index_str [VALUE_LENGTH ];
347
347
348
348
if (suppress_report (& data -> location ))
@@ -357,9 +357,9 @@ void __ubsan_handle_out_of_bounds(struct out_of_bounds_data *data, void *index)
357
357
}
358
358
EXPORT_SYMBOL (__ubsan_handle_out_of_bounds );
359
359
360
- void __ubsan_handle_shift_out_of_bounds (struct shift_out_of_bounds_data * data ,
361
- void * lhs , void * rhs )
360
+ void __ubsan_handle_shift_out_of_bounds (void * _data , void * lhs , void * rhs )
362
361
{
362
+ struct shift_out_of_bounds_data * data = _data ;
363
363
struct type_descriptor * rhs_type = data -> rhs_type ;
364
364
struct type_descriptor * lhs_type = data -> lhs_type ;
365
365
char rhs_str [VALUE_LENGTH ];
@@ -399,18 +399,19 @@ void __ubsan_handle_shift_out_of_bounds(struct shift_out_of_bounds_data *data,
399
399
EXPORT_SYMBOL (__ubsan_handle_shift_out_of_bounds );
400
400
401
401
402
- void __ubsan_handle_builtin_unreachable (struct unreachable_data * data )
402
+ void __ubsan_handle_builtin_unreachable (void * _data )
403
403
{
404
+ struct unreachable_data * data = _data ;
404
405
ubsan_prologue (& data -> location , "unreachable" );
405
406
pr_err ("calling __builtin_unreachable()\n" );
406
407
ubsan_epilogue ();
407
408
panic ("can't return from __builtin_unreachable()" );
408
409
}
409
410
EXPORT_SYMBOL (__ubsan_handle_builtin_unreachable );
410
411
411
- void __ubsan_handle_load_invalid_value (struct invalid_value_data * data ,
412
- void * val )
412
+ void __ubsan_handle_load_invalid_value (void * _data , void * val )
413
413
{
414
+ struct invalid_value_data * data = _data ;
414
415
char val_str [VALUE_LENGTH ];
415
416
416
417
if (suppress_report (& data -> location ))
0 commit comments