summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-30 19:47:22 +0200
committerAnton Kling <anton@kling.gg>2024-06-30 19:47:37 +0200
commit492d1745f353ec2b48cda7774858ac76a03cb55e (patch)
tree84bd2580d76c20a49a21b74d55de1cdbf36bc332
parent46bb33a3f42d7b64af9bd56f6c086061f0ac14fc (diff)
UBSAN: Add more ubsan handlers
-rw-r--r--kernel/kubsan.c14
1 files changed, 14 insertions, 0 deletions
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);