summaryrefslogtreecommitdiffstats
path: root/lib/ubsan.c
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2019-05-06 13:45:27 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-06 11:12:09 -0700
commit9a91ad929f9a719c0c734abe791a27ab9444cd61 (patch)
tree44d9144094eb22b18cf8bbcf597aee1a189aa108 /lib/ubsan.c
parentf0996bc2978e02d2ea898101462b960f6119b18f (diff)
downloadlinux-9a91ad929f9a719c0c734abe791a27ab9444cd61.tar.gz
linux-9a91ad929f9a719c0c734abe791a27ab9444cd61.tar.bz2
linux-9a91ad929f9a719c0c734abe791a27ab9444cd61.zip
ubsan: Remove vla bound checks.
The kernel the kernel is built with -Wvla for some time, so is not supposed to have any variable length arrays. Remove vla bounds checking from ubsan since it's useless now. Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/ubsan.c')
-rw-r--r--lib/ubsan.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/ubsan.c b/lib/ubsan.c
index 1e9e2ab25539..c4859c2d2f1b 100644
--- a/lib/ubsan.c
+++ b/lib/ubsan.c
@@ -349,24 +349,6 @@ void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data,
}
EXPORT_SYMBOL(__ubsan_handle_type_mismatch_v1);
-void __ubsan_handle_vla_bound_not_positive(struct vla_bound_data *data,
- void *bound)
-{
- unsigned long flags;
- char bound_str[VALUE_LENGTH];
-
- if (suppress_report(&data->location))
- return;
-
- ubsan_prologue(&data->location, &flags);
-
- val_to_string(bound_str, sizeof(bound_str), data->type, bound);
- pr_err("variable length array bound value %s <= 0\n", bound_str);
-
- ubsan_epilogue(&flags);
-}
-EXPORT_SYMBOL(__ubsan_handle_vla_bound_not_positive);
-
void __ubsan_handle_out_of_bounds(struct out_of_bounds_data *data, void *index)
{
unsigned long flags;