ok: unsafe memmove() usage correctly detected with '__write_overflow' in lib/test_fortify/write_overflow-memmove.c
In file included from ./include/linux/string.h:396,
from ./include/linux/bitmap.h:13,
from ./include/linux/cpumask.h:11,
from ./arch/x86/include/asm/paravirt.h:19,
from ./arch/x86/include/asm/irqflags.h:100,
from ./include/linux/irqflags.h:18,
from ./include/linux/spinlock.h:59,
from ./include/linux/mmzone.h:8,
from ./include/linux/gfp.h:7,
from ./include/linux/slab.h:17,
from lib/test_fortify/test_fortify.h:4,
from lib/test_fortify/write_overflow-memmove.c:5:
In function ‘fortify_memcpy_chk’,
inlined from ‘do_fortify_tests’ at lib/test_fortify/test_fortify.h:34:2:
./include/linux/fortify-string.h:512:25: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object (1st parameter)
512 | __write_overflow();
| ^~~~~~~~~~~~~~~~~~
./include/linux/fortify-string.h:519:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
519 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors