Patchwork [Precise,1/1] UBUNTU: SAUCE: SECCOMP: audit: fix build on archs without CONFIG_AUDITSYSCALL

login
register
mail settings
Submitter Luis Henriques
Date Dec. 4, 2012, 2:33 p.m.
Message ID <1354631600-18227-1-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/203662/
State New
Headers show

Comments

Luis Henriques - Dec. 4, 2012, 2:33 p.m.
BugLink: http://bugs.launchpad.net/bugs/1079469

Build is broken for armel or armhf because they don't define
__audit_seccomp(), required by:

3479c36 seccomp: forcing auditing of kill condition

This fixes the builds defining an empty macro for this function.

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Cc: Kees Cook <kees@ubuntu.com>
---
 include/linux/audit.h |    1 +
 1 file changed, 1 insertion(+)
Tim Gardner - Dec. 4, 2012, 2:46 p.m.

Colin King - Dec. 4, 2012, 2:56 p.m.
On 04/12/12 14:33, Luis Henriques wrote:
> BugLink: http://bugs.launchpad.net/bugs/1079469
>
> Build is broken for armel or armhf because they don't define
> __audit_seccomp(), required by:
>
> 3479c36 seccomp: forcing auditing of kill condition
>
> This fixes the builds defining an empty macro for this function.
>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> Cc: Kees Cook <kees@ubuntu.com>
> ---
>   include/linux/audit.h |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index ab40f49..225b4e4 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -566,6 +566,7 @@ extern int audit_signals;
>   #define audit_inode_child(i,p) do { ; } while (0)
>   #define audit_core_dumps(i) do { ; } while (0)
>   #define audit_seccomp(i,s,c) do { ; } while (0)
> +#define __audit_seccomp(i,s,c) do { ; } while (0)
>   #define auditsc_get_stamp(c,t,s) (0)
>   #define audit_get_loginuid(t) (-1)
>   #define audit_get_sessionid(t) (-1)
>
Acked-by: Colin Ian King <colin.king@canonical.com>
Tim Gardner - Dec. 4, 2012, 3:06 p.m.

Kees Cook - Dec. 4, 2012, 6:56 p.m.
Ah, good catch. For backports, this seems fine. Going forward, I would
expect we'd want CONFIG_AUDITSYSCALL enabled for ARM.

-Kees

On Tue, Dec 04, 2012 at 02:33:20PM +0000, Luis Henriques wrote:
> BugLink: http://bugs.launchpad.net/bugs/1079469
> 
> Build is broken for armel or armhf because they don't define
> __audit_seccomp(), required by:
> 
> 3479c36 seccomp: forcing auditing of kill condition
> 
> This fixes the builds defining an empty macro for this function.
> 
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> Cc: Kees Cook <kees@ubuntu.com>
> ---
>  include/linux/audit.h |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index ab40f49..225b4e4 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -566,6 +566,7 @@ extern int audit_signals;
>  #define audit_inode_child(i,p) do { ; } while (0)
>  #define audit_core_dumps(i) do { ; } while (0)
>  #define audit_seccomp(i,s,c) do { ; } while (0)
> +#define __audit_seccomp(i,s,c) do { ; } while (0)
>  #define auditsc_get_stamp(c,t,s) (0)
>  #define audit_get_loginuid(t) (-1)
>  #define audit_get_sessionid(t) (-1)
> -- 
> 1.7.10.4
Luis Henriques - Dec. 4, 2012, 7:16 p.m.
Kees Cook <kees@ubuntu.com> writes:

> Ah, good catch. For backports, this seems fine. Going forward, I would
> expect we'd want CONFIG_AUDITSYSCALL enabled for ARM.

Yes, Quantal (v3.5) already has that config enabled.  The
problem is only on the Precise kernels (v3.2).

Cheers,

Patch

diff --git a/include/linux/audit.h b/include/linux/audit.h
index ab40f49..225b4e4 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -566,6 +566,7 @@  extern int audit_signals;
 #define audit_inode_child(i,p) do { ; } while (0)
 #define audit_core_dumps(i) do { ; } while (0)
 #define audit_seccomp(i,s,c) do { ; } while (0)
+#define __audit_seccomp(i,s,c) do { ; } while (0)
 #define auditsc_get_stamp(c,t,s) (0)
 #define audit_get_loginuid(t) (-1)
 #define audit_get_sessionid(t) (-1)