lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 20 Sep 2012 15:40:08 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Jonas Bonn <jonas@...thpole.se>, linux-kernel@...r.kernel.org,
	Al Viro <viro@...iv.linux.org.uk>,
	Eric Paris <eparis@...hat.com>, linux@...ts.openrisc.net,
	Linux-Next <linux-next@...r.kernel.org>
Subject: Re: [RE-RESEND][PATCH] audit: replace defines with C stubs

On Thu, Sep 13, 2012 at 12:43 PM, Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> On Tue, Aug 7, 2012 at 2:40 AM, Kees Cook <keescook@...omium.org> 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@...ux-foundation.org>
>> Signed-off-by: Kees Cook <keescook@...omium.org>
>
> 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/

Thanks for catching this! It looks like audit.h is missing
AUDIT_ARCH_OPENRISC entirely, and that openrisc doesn't need an
audit_arch() function at all. It could use AUDIT_ARCH_OPENRISC once
that existed, which would just be EM_OPENRISC. (It looks like little
endian mode isn't used.)

I'll send a patch...

-Kees

-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ