test_overflow: Add shift overflow tests
authorKees Cook <keescook@chromium.org>
Wed, 1 Aug 2018 21:25:40 +0000 (14:25 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 8 Aug 2018 15:47:26 +0000 (09:47 -0600)
commitd36b6ad27c7b95e3f6bfbf6ea33757c8e8accf01
treebb86d55ffb5560240772820cced96ee69fb23054
parent0c66847793d1982d1083dc6f7adad60fa265ce9c
test_overflow: Add shift overflow tests

This adds overflow tests for the new check_shift_overflow() helper to
validate overflow, signedness glitches, storage glitches, etc.

Co-developed-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
lib/test_overflow.c