[PATCH] lsm: add reserved flag in lsm_prop struct
Paul Moore
paul at paul-moore.com
Wed Dec 18 21:24:27 UTC 2024
On Fri, Dec 13, 2024 at 3:11 AM 李豪杰 <15074444048 at 163.com> wrote:
>
> it's the compile error that i met.
> 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,
> 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)
> 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:3: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object (1st parameter)
> 293 | __write_overflow();
>
> i see commit d9381508ea2b590aff46d28d432d20bfef1ba64c merged,
> but it's a workaround, so how about my thoughts below?
Before we get too far into a workaround, can you confirm that you are
not seeing the error above with what is currently in Linus' tree, e.g.
commit d9381508ea2b ("audit: workaround a GCC bug triggered by task
comm changes")? If that has resolved your problem, I think we can
leave things as they are for now, we have one workaround in Linus'
tree that should mask the compiler bug and I'm not excited about
adding another.
Like Casey, I'm not excited about adding a useless field to the lsm_prop struct.
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list