From 492d1745f353ec2b48cda7774858ac76a03cb55e Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Sun, 30 Jun 2024 19:47:22 +0200 Subject: UBSAN: Add more ubsan handlers --- kernel/kubsan.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'kernel/kubsan.c') diff --git a/kernel/kubsan.c b/kernel/kubsan.c index 2923268..e2d682c 100644 --- a/kernel/kubsan.c +++ b/kernel/kubsan.c @@ -39,6 +39,20 @@ void __ubsan_handle_mul_overflow(struct OverflowData *data, unsigned long lhs, ubsan_log("handle_mul_overflow", data->location); } +void __ubsan_handle_negate_overflow(struct OverflowData *data, + unsigned long lhs, unsigned long rhs) { + (void)lhs; + (void)rhs; + ubsan_log("handle_negate_overflow", data->location); +} + +void __ubsan_handle_divrem_overflow(struct OverflowData *data, + unsigned long lhs, unsigned long rhs) { + (void)lhs; + (void)rhs; + ubsan_log("handle_divrem_overflow", data->location); +} + void __ubsan_handle_out_of_bounds(struct OutOfBoundsData *data, void *index) { (void)index; ubsan_log("handle_out_of_bounds", data->location); -- cgit v1.2.3