All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Jones <tonyj@suse.de>
To: linux-audit@redhat.com
Subject: [PATCH] audit:  add ppc64 mach support
Date: Fri, 29 Aug 2014 13:16:00 -0700	[thread overview]
Message-ID: <5400DF80.1080700@suse.de> (raw)

Add support for ppc64le.   

$ uname -a
Linux cabernet 3.12.26-3-default #1 SMP Mon Aug 18 15:07:30 UTC 2014 (d318f3a) ppc64le ppc64le ppc64le GNU/Linux

Without this,  perf trace and auditctl fail.   There is no 32 bit (ppcle).

Signed-off-by: Tony Jones <tonyj@suse.de>
---

Index: trunk/lib/libaudit.c
===================================================================
--- trunk/lib/libaudit.c	(revision 1011)
+++ trunk/lib/libaudit.c	(working copy)
@@ -1195,6 +1195,11 @@
 				return -6;
 			break;
 #endif
+		case MACH_PPC64LE:
+			if (bits != __AUDIT_ARCH_64BIT)
+				return -6;
+			break;
+
 		case MACH_86_64: /* fallthrough */
 		case MACH_PPC64: /* fallthrough */
 		case MACH_S390X: /* fallthrough */
Index: trunk/lib/libaudit.h
===================================================================
--- trunk/lib/libaudit.h	(revision 1011)
+++ trunk/lib/libaudit.h	(working copy)
@@ -356,6 +356,9 @@
 #define AUDIT_ARCH_AARCH64	(EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
 #endif
 
+#ifndef AUDIT_ARCH_PPC64LE
+#define AUDIT_ARCH_PPC64LE	(EM_PPC64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#endif
 
 //////////////////////////////////////////////////////
 // This is an external ABI. Any changes in here will
@@ -438,7 +441,8 @@
 	MACH_S390,
 	MACH_ALPHA,
 	MACH_ARM,
-	MACH_AARCH64
+	MACH_AARCH64,
+	MACH_PPC64LE
 } machine_t;
 
 /* These are the valid audit failure tunable enum values */
Index: trunk/lib/lookup_table.c
===================================================================
--- trunk/lib/lookup_table.c	(revision 1011)
+++ trunk/lib/lookup_table.c	(working copy)
@@ -70,6 +70,7 @@
     { MACH_86_64,   AUDIT_ARCH_X86_64 },
     { MACH_IA64,    AUDIT_ARCH_IA64   },
     { MACH_PPC64,   AUDIT_ARCH_PPC64  },
+    { MACH_PPC64LE, AUDIT_ARCH_PPC64LE},
     { MACH_PPC,     AUDIT_ARCH_PPC    },
     { MACH_S390X,   AUDIT_ARCH_S390X  },
     { MACH_S390,    AUDIT_ARCH_S390   },
@@ -123,6 +124,7 @@
 			found = ia64_syscall_s2i(sc, &res);
 			break;
 		case MACH_PPC64:
+		case MACH_PPC64LE:
 		case MACH_PPC:
 			found = ppc_syscall_s2i(sc, &res);
 			break;
@@ -169,6 +171,7 @@
 		case MACH_IA64:
 			return ia64_syscall_i2s(sc);
 		case MACH_PPC64:
+		case MACH_PPC64LE:
 		case MACH_PPC:
 			return ppc_syscall_i2s(sc);
 		case MACH_S390X:
Index: trunk/lib/machinetab.h
===================================================================
--- trunk/lib/machinetab.h	(revision 1011)
+++ trunk/lib/machinetab.h	(working copy)
@@ -27,6 +27,7 @@
 _S(MACH_86_64,   "x86_64" )
 _S(MACH_IA64,    "ia64"   )
 _S(MACH_PPC64,   "ppc64"  )
+_S(MACH_PPC64LE, "ppc64le")
 _S(MACH_PPC,     "ppc"    )
 _S(MACH_S390X,   "s390x"  )
 _S(MACH_S390,    "s390"   )

             reply	other threads:[~2014-08-29 20:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 20:16 Tony Jones [this message]
2014-08-29 20:24 ` [PATCH] audit: add ppc64 mach support Tony Jones
2014-09-02 15:20 ` Steve Grubb
2014-12-01 22:09 ` Steve Grubb
2014-12-01 23:58   ` Tony Jones
2014-12-02 20:18     ` Paul Moore
2014-12-02 20:29       ` Steve Grubb
2014-12-02 21:27         ` Tony Jones
2014-12-02 21:27       ` Richard Guy Briggs
2014-12-02 23:19         ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5400DF80.1080700@suse.de \
    --to=tonyj@suse.de \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.