Yafang shao d9381508ea audit: workaround a GCC bug triggered by task comm changes
A build failure has been reported with the following details:

   In file included from include/linux/string.h:390,
                    from include/linux/bitmap.h:13,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    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:17:
   error: call to '__write_overflow' declared with attribute error:
   detected write beyond size of object (1st parameter)
     293 |                 __write_overflow();
         |                 ^~~~~~~~~~~~~~~~~~
   In function 'sized_strscpy',
       inlined from 'audit_signal_info_syscall' at kernel/auditsc.c:2759:3:
>> include/linux/fortify-string.h:293:17:
   error: call to '__write_overflow' declared with attribute error:
   detected write beyond size of object (1st parameter)
     293 |                 __write_overflow();
         |                 ^~~~~~~~~~~~~~~~~~

The issue appears to be a GCC bug, though the root cause remains
unclear at this time. For now, let's implement a workaround.

A bug report has also been filed with GCC [0].

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117912 [0]

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410171420.1V00ICVG-lkp@intel.com/
Reported-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Closes: https://lore.kernel.org/all/20241128182435.57a1ea6f@gandalf.local.home/
Reported-by: Zhuo, Qiuxu <qiuxu.zhuo@intel.com>
Closes: https://lore.kernel.org/all/CY8PR11MB71348E568DBDA576F17DAFF389362@CY8PR11MB7134.namprd11.prod.outlook.com/
Originally-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/linux-hardening/202410171059.C2C395030@keescook/
Signed-off-by: Yafang shao <laoar.shao@gmail.com>
Tested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Tested-by: Yafang Shao <laoar.shao@gmail.com>
[PM: subject tweak, description line wrapping]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2024-12-04 22:57:46 -05:00
..
2024-11-22 20:36:11 -08:00
2024-11-20 09:54:49 -08:00
2024-11-25 12:11:55 -08:00
2024-06-15 10:43:06 -07:00
2024-11-19 14:16:06 -08:00
2024-11-27 10:20:50 -08:00
2024-11-20 09:21:11 -08:00
2024-11-20 10:08:00 -08:00
2024-11-18 17:34:05 -08:00
2024-11-29 11:43:29 -08:00
2024-07-29 10:45:54 -07:00
2024-11-05 17:12:28 -08:00
2024-09-03 21:15:26 -07:00
2024-11-03 01:28:06 -05:00
2024-09-19 10:18:15 +02:00
2023-12-01 09:51:44 -08:00
2024-11-03 01:28:06 -05:00
2024-09-27 08:18:43 -07:00
2023-10-04 10:41:57 -07:00
2023-12-29 12:22:29 -08:00
2024-07-18 12:19:20 -07:00
2024-11-18 18:10:37 -08:00
2024-11-03 01:28:06 -05:00
2024-05-30 15:31:38 -07:00
2024-11-22 20:36:11 -08:00
2024-11-03 01:28:06 -05:00