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-next>] [day] [month] [year] [list]
Message-ID: <201403201730.s2KHUVpf005157@farm-0039.internal.tilera.com>
Date:	Thu, 20 Mar 2014 11:31:55 -0400
From:	Chris Metcalf <cmetcalf@...era.com>
To:	<linux-kernel@...r.kernel.org>,
	AKASHI Takahiro <takahiro.akashi@...aro.org>,
	Eric Paris <eparis@...hat.com>
Subject: [PATCH] compat_audit: allow it to work without asm/unistd32.h

For architectures that use the asm-generic syscall table for both
32- and 64-bit, there should be no need to provide a separate
<asm/unistd32.h>; just using <linux/unistd.h> is sufficient.
Conditionalize use of <asm/unistd32.h> on the one platform that
currently requires it (arm64).  If another platform ends up needing
it we can create a suitable config flag at that point.

This change fixes the tilegx build failure seen in linux-next.

Signed-off-by: Chris Metcalf <cmetcalf@...era.com>
---
By the way - I also note that commit 223b24d807610 that introduced
this also put an "#ifdef COMPAT_xxx" in a UAPI header.  This seems
like a pretty clear signal that the added code should be in
linux/include/audit.h, not linux/uapi/include/audit.h.  But here
I'm just focussing on getting tilegx to continue to build...

 lib/compat_audit.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/compat_audit.c b/lib/compat_audit.c
index 873f75b640ab..e89a84b3fbe8 100644
--- a/lib/compat_audit.c
+++ b/lib/compat_audit.c
@@ -1,6 +1,11 @@
 #include <linux/init.h>
 #include <linux/types.h>
-#include <asm/unistd32.h>
+#ifdef COMPAT_ARM64
+/* 64-bit syscalls are generic, but 32-bit are not. */
+# include <asm/unistd32.h>
+#else
+# include <linux/unistd.h>
+#endif
 
 unsigned compat_dir_class[] = {
 #include <asm-generic/audit_dir_write.h>
-- 
1.8.3.1

--
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