https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117912

--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
Created attachment 59788
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59788&action=edit
auditsc.i.xz

```
$ gcc -c kernel/auditsc.i -std=gnu17 -Os
In file included from ./arch/x86/include/asm/linkage.h:6,
                 from ./include/linux/linkage.h:8,
                 from ./include/linux/fs.h:5,
                 from kernel/auditsc.c:37:
./arch/x86/include/asm/ibt.h:77:1: warning: ‘nocf_check’ attribute ignored. Use
‘-fcf-protection’ option to enable it [-Wattributes]
   77 | extern __noendbr u64 ibt_save(bool disable);
      | ^~~~~~
./arch/x86/include/asm/ibt.h:78:1: warning: ‘nocf_check’ attribute ignored. Use
‘-fcf-protection’ option to enable it [-Wattributes]
   78 | extern __noendbr void ibt_restore(u64 save);
      | ^~~~~~
In file included from ./include/linux/string.h:389,
                 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:
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();
      |                 ^~~~~~~~~~~~~~~~~~
```

Reply via email to