v6.13-rc1 build errors from kernel/auditsc.c

From: Zhuo, Qiuxu
Date: Mon Dec 02 2024 - 22:23:15 EST


Hi,

I got the following build errors from kernel/auditsc.c file.

The GCC version : 7.5.0
Kernel version : v6.13-rc1
The bisect commit : 286d7a54c8a2 ("auditsc: replace memcpy() with strscpy()")

Build error logs:

from kernel/auditsc.c:37:
In function 'sized_strscpy',
inlined from '__audit_ptrace' at kernel/auditsc.c:2732:2:
./include/linux/fortify-string.h:293:3: error: call to '__write_overflow' declared with attribute error: detected write beyond size of object (1st parameter)
__write_overflow();
^~~~~~~~~~~~~~~~~~
In function 'sized_strscpy',
inlined from 'audit_signal_info_syscall' at kernel/auditsc.c:2759:3:
./include/linux/fortify-string.h:293:3: error: call to '__write_overflow' declared with attribute error: detected write beyond size of object (1st parameter)
__write_overflow();
^~~~~~~~~~~~~~~~~~

-Qiuxu