Re: [RE-RESEND][PATCH] audit: replace defines with C stubs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 7, 2012 at 2:40 AM, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> This replaces the #defines used when CONFIG_AUDIT or CONFIG_AUDIT_SYSCALLS
> are disabled so we get type checking during those builds.
>
> Suggested-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>

JFYI, the change

-#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
+static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
+                                      unsigned long a1, unsigned long a2,
+                                      unsigned long a3)
+{ }

uncovers a bug on OpenRISC.

Before,

        audit_syscall_entry(audit_arch(), regs->gpr[11],
                            regs->gpr[3], regs->gpr[4],
                            regs->gpr[5], regs->gpr[6]);

just expanded to nothing if CONFIG_AUDITSYSCALL was not set.
Now, it fails to compile with:

arch/openrisc/kernel/ptrace.c:190:2: error: implicit declaration of
function 'audit_arch'
http://kisskb.ellerman.id.au/kisskb/buildresult/7191698/

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux