summaryrefslogtreecommitdiffstats
path: root/lib/kasan/test_kasan.c
Commit message (Collapse)AuthorAgeFilesLines
* KASan: test_kasan: hide buggy accesses from compilerAhmad Fatoum2023-11-101-0/+11
| | | | | | | | | | | | | | | Once we add __alloc_size attributes to allocations, GCC will complain about violation of memory safety in test_kasan.c. That memory violation is intended though as test_kasan is meant to trigger kasan at runtime to verify correct operation. Silence the warnings by hiding the origin of ptr, so the compiler loses context about the size of the allocation. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20231109113807.1193935-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* KASan: test_kasan: silence warning with newer GCCAhmad Fatoum2022-12-131-0/+2
| | | | | | | | | | | | Newer GCC will rightly complain about this being an out-of-bounds access. This is intended as the kasan command is meant to cause out-of-bounds accesses to test proper operation of KASan. Thus silence the warning for this specific instance. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221212163907.2356192-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: add missing command groupsAhmad Fatoum2022-01-261-0/+1
| | | | | | | | | CMD_GRP_MISC is assumed in absence of an explicit group. Let's be explicit instead to silence the warnings during documentation build. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220124151827.3313412-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* KASan: Add missing test codeSascha Hauer2020-09-281-0/+478
Add missing test code. Fixes: 6cd9d2d600 ("Add KASan support") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>