audit.h: remove the macro AUDIT_ARCH_ARMEB definition
Subsystems (4)
PATCH 1/1 audit.h: remove the macro AUDIT_ARCH_ARMEB definition
From: Li RongQing <[email protected]>
After 2f9783669 [ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness], no kernel user uses this macro;
Keeping this macro, only makes the compiling old version audit [before changeset 931 Improve ARM and AARCH64 support] success, but the audit program can not work with the kernel after 2f9783669 still, since no syscall entry is enabled for AUDIT_ARCH_ARMEB in kernel.
so remove it to force to use the latest audit program
---
other workaround is to define AUDIT_ARCH_ARMEB as AUDIT_ARCH_ARM, but it seems very strange
include/uapi/linux/audit.h | 1 - 1 file changed, 1 deletion(-)
include/uapi/linux/audit.h +0 -1
@@ -351,7 +351,6 @@ enum {#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)#define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) -#define AUDIT_ARCH_ARMEB (EM_ARM)#define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)#define AUDIT_ARCH_FRV (EM_FRV)#define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
Signature · 1 line
2.1.0
A message that is not in the archive (sent off-list or not yet received): 1426827329-27976-1-git-send-email-roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 12 lines · On Fri, Mar 20, 2015 at 12:55 AM, <[email protected]…
From: Li RongQing <[email protected]>
After
2f9783669[ARM: 7412/1: audit: use onlyAUDIT_ARCH_ARMregardless of endianness], no kernel user uses this macro;Keeping this macro, only makes the compiling old version audit [before changeset 931 Improve ARM and AARCH64 support] success, but the audit program can not work with the kernel after
2f9783669still, since no syscall entry is enabled forAUDIT_ARCH_ARMEBin kernel.so remove it to force to use the latest audit program
Quoted 7 lines
Signed-off-by Li RongQing <[email protected]>---
other workaround is to defineAUDIT_ARCH_ARMEBasAUDIT_ARCH_ARM, but it seems very strangeinclude/uapi/linux/audit.h | 1 - 1 file changed, 1 deletion(-)
Since this #define lives in the user visible headers I don't want to remove it and risk causing a userspace breakage. Leaving the #define in the header, even if it is unused by modern userspace, is harmless.
Quoted 15 lines
include/uapi/linux/audit.h +0
-2@@ -351,7 +351,6 @@ enum {#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)#define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) -#define AUDIT_ARCH_ARMEB (EM_ARM)#define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)#define AUDIT_ARCH_FRV (EM_FRV)#define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) --2.1.0
Signature · 2 lines
paul moore www.paul-moore.com
A message that is not in the archive (sent off-list or not yet received): CAHC9VhR5VcaCtLG9hdVS2gZRWxVmdnpbK+fJwm6wCA8qyLebUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 18 lines · Paul Moore
Quoted 17 lines · On Fri, Mar 20, 2015 at 12:55 AM, <[email protected]…
From: Li RongQing <[email protected]>
After
2f9783669[ARM: 7412/1: audit: use onlyAUDIT_ARCH_ARMregardless of endianness], no kernel user uses this macro;Keeping this macro, only makes the compiling old version audit [before changeset 931 Improve ARM and AARCH64 support] success, but the audit program can not work with the kernel after
2f9783669still, since no syscall entry is enabled forAUDIT_ARCH_ARMEBin kernel.so remove it to force to use the latest audit program
Signed-off-by Li RongQing <[email protected]>---
other workaround is to defineAUDIT_ARCH_ARMEBasAUDIT_ARCH_ARM, but it seems very strange
Quoted 7 lines
Quoted 2 lines
include/uapi/linux/audit.h | 1 - 1 file changed, 1 deletion(-)Since this #define lives in the user visible headers I don't want to remove it and risk causing a userspace breakage. Leaving the #define in the header, even if it is unused by modern userspace, is harmless.
it is harm, when I compile the audit-2.3.2 for a arm machine, whose linux kernel is 3.14; no compile error, but audit does not work; since the audit is
Quoted 5 lines
--
paul moore
www.paul-moore.com
A message that is not in the archive (sent off-list or not yet received): CAJFZqHxdPEhX+9z-FYUMvTF_6LVgK=gOetq0zT4UTZSgUGRqCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 19 lines · Li RongQing
Quoted 18 lines · Paul Moore
Quoted 17 lines · On Fri, Mar 20, 2015 at 12:55 AM, <[email protected]…
From: Li RongQing <[email protected]>
After
2f9783669[ARM: 7412/1: audit: use onlyAUDIT_ARCH_ARMregardless of endianness], no kernel user uses this macro;Keeping this macro, only makes the compiling old version audit [before changeset 931 Improve ARM and AARCH64 support] success, but the audit program can not work with the kernel after
2f9783669still, since no syscall entry is enabled forAUDIT_ARCH_ARMEBin kernel.so remove it to force to use the latest audit program
Signed-off-by Li RongQing <[email protected]>---
other workaround is to defineAUDIT_ARCH_ARMEBasAUDIT_ARCH_ARM, but it seems very strange
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
include/uapi/linux/audit.h | 1 - 1 file changed, 1 deletion(-)Since this #define lives in the user visible headers I don't want to remove it and risk causing a userspace breakage. Leaving the #define in the header, even if it is
it is harm, when I compile the audit-2.3.2 for a arm machine, whose linux kernel is 3.14; no compile error, but audit does not work; spend one day debug to find the root cause is the audit used MACH_ARMEB, but kernel replaced MACH_ARMEB
with MACH_ARM
grep WITH_ARMEB ./lib/machinetab.h -A10
#ifdef WITH_ARMEB
_S(MACH_ARMEB, "armeb" ) _S(MACH_ARMEB, "armv5tejl") _S(MACH_ARMEB, "armv5tel") _S(MACH_ARMEB, "armv6l") _S(MACH_ARMEB, "armv7l")
#endif
removal of MACH_ARMEB will let the user find this issue when compile, not run.
-Roy
A message that is not in the archive (sent off-list or not yet received): CAJFZqHxfq0DSjKn-uqhT+pAeJ9u8ym2Mr=wsqvPyX7sCicPGZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 40 lines · Li RongQing
Quoted 19 lines · Li RongQing
Quoted 18 lines · Paul Moore
Quoted 17 lines · On Fri, Mar 20, 2015 at 12:55 AM, <[email protected]…
From: Li RongQing <[email protected]>
After
2f9783669[ARM: 7412/1: audit: use onlyAUDIT_ARCH_ARMregardless of endianness], no kernel user uses this macro;Keeping this macro, only makes the compiling old version audit [before changeset 931 Improve ARM and AARCH64 support] success, but the audit program can not work with the kernel after
2f9783669still, since no syscall entry is enabled forAUDIT_ARCH_ARMEBin kernel.so remove it to force to use the latest audit program
Signed-off-by Li RongQing <[email protected]>---
other workaround is to defineAUDIT_ARCH_ARMEBasAUDIT_ARCH_ARM, but it seems very strangeQuoted 6 lines
Quoted 6 lines
Quoted 2 lines
include/uapi/linux/audit.h | 1 - 1 file changed, 1 deletion(-)Since this #define lives in the user visible headers I don't want to remove it and risk causing a userspace breakage. Leaving the #define in the header, even if it is
it is harm, when I compile the audit-2.3.2 for a arm machine, whose linux kernel is 3.14; no compile error, but audit does not work; spend one day debug to find the root cause is the audit used
MACH_ARMEB, but kernel replacedMACH_ARMEB
withMACH_ARMgrep
WITH_ARMEB./lib/machinetab.h-A10
#ifdefWITH_ARMEB_S(MACH_ARMEB, "armeb" ) _S(MACH_ARMEB, "armv5tejl") _S(MACH_ARMEB, "armv5tel") _S(MACH_ARMEB, "armv6l") _S(MACH_ARMEB, "armv7l")
Quoted 4 lines
#endif
removal of
MACH_ARMEBwill let the user find this issue when compile, not run.
[NOTE: Adding the linux-arm folks to this thread just in case they are interested.]
I'm not an ARM expert, but the kernel #define for AUDIT_ARCH_ARMEB (below) seems reasonable to me based on the other audit machine definitions. There is clearly a mismatch between the kernel and the audit userspace, but I wonder if the issue should be addressed in the userspace tools. Further, you mention kernel 3.14, what happens with kernel 3.19 and the most recent audit userspace tools?
Quoted 1 line
grep "
AUDIT_ARCH_ARMEB"include/uapi/linux/audit.h
#define AUDIT_ARCH_ARMEB (EM_ARM)
-Paul
Signature · 2 lines
paul moore www.paul-moore.com
A message that is not in the archive (sent off-list or not yet received): CAHC9VhTbxf_u2FXkcdqofkhywbgrrjjUo_W7yqWXFm=wSJBOAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 10 lines · Paul Moore
[NOTE: Adding the linux-arm folks to this thread just in case they are interested.]
I'm not an ARM expert, but the kernel #define for
AUDIT_ARCH_ARMEB(below) seems reasonable to me based on the other audit machine definitions. There is clearly a mismatch between the kernel and the audit userspace, but I wonder if the issue should be addressed in the userspace tools. Further, you mention kernel 3.14, what happens with kernel 3.19 and the most recent audit userspace tools?
Quoted 2 lines
Quoted 1 line
grep "
AUDIT_ARCH_ARMEB"include/uapi/linux/audit.h#define
AUDIT_ARCH_ARMEB(EM_ARM)
1.
if no the below commit, audit-2.3.2 is working; but after the below commit, audit-2.3.2 is not working.
commit 2f978366984a418f38fcf44137be1fbc5a89cfd9
Author: Will Deacon <[email protected]> Date: Fri May 4 17:53:52 2012 +0100
ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
The machine endianness has no direct correspondence to the syscall ABI, so use only AUDIT_ARCH_ARM when identifying the ABI to the audit tools in userspace.
arch/arm/kernel/ptrace.c +0 -6
@@ -906,12 +906,6 @@ long arch_ptrace(struct task_struct *child, long request,return ret; } -#ifdef __ARMEB__ -#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB -#else -#define AUDIT_ARCH_NR AUDIT_ARCH_ARM -#endif - asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) {unsigned long ip;
@@ -919,7 +913,7 @@ asmlinkage int syscall_trace(int why, struct
pt_regs *regs, int scno)
if (why)
audit_syscall_exit(regs);
else
- audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0,
+ audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
if (!test_thread_flag(TIF_SYSCALL_TRACE))2.
The latest audit has the changeset of 931 [Improve ARM and AARCH64 support], so audit can work again.
-Roy
A message that is not in the archive (sent off-list or not yet received): CAJFZqHzxXyuzi7Z9WawYKfFnTMfYfsRL0Qnt276p_t-AV9GB2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 11 lines · Li RongQing
Quoted 10 lines · Paul Moore
[NOTE: Adding the linux-arm folks to this thread just in case they are interested.]
I'm not an ARM expert, but the kernel #define for
AUDIT_ARCH_ARMEB(below) seems reasonable to me based on the other audit machine definitions. There is clearly a mismatch between the kernel and the audit userspace, but I wonder if the issue should be addressed in the userspace tools. Further, you mention kernel 3.14, what happens with kernel 3.19 and the most recent audit userspace tools?
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
grep "
AUDIT_ARCH_ARMEB"include/uapi/linux/audit.h#define
AUDIT_ARCH_ARMEB(EM_ARM)
ping...
-Roy
Quoted 18 lines · Paul Moore
Quoted 17 lines · On Fri, Mar 20, 2015 at 12:55 AM, <[email protected]> wrote:
From: Li RongQing <[email protected]>
After
2f9783669[ARM: 7412/1: audit: use onlyAUDIT_ARCH_ARMregardless of endianness], no kernel user uses this macro;Keeping this macro, only makes the compiling old version audit [before changeset 931 Improve ARM and AARCH64 support] success, but the audit program can not work with the kernel after
2f9783669still, since no syscall entry is enabled forAUDIT_ARCH_ARMEBin kernel.so remove it to force to use the latest audit program
Signed-off-by Li RongQing <[email protected]>---
other workaround is to defineAUDIT_ARCH_ARMEBasAUDIT_ARCH_ARM, but it seems very strange
Quoted 6 lines
Quoted 2 lines
include/uapi/linux/audit.h | 1 - 1 file changed, 1 deletion(-)Since this #define lives in the user visible headers I don't want to remove it and risk causing a userspace breakage. Leaving the #define in the header, even if it is unused by modern userspace, is harmless.
This macro doesn't appear to be in use by auditd.
-Steve
Quoted 19 lines
Quoted 19 lines
include/uapi/linux/audit.h +0
-1@@ -351,7 +351,6 @@ enum {#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #defineAUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) -#define AUDIT_ARCH_ARMEB (EM_ARM)#define
AUDIT_ARCH_CRIS(EM_CRIS|__AUDIT_ARCH_LE)
#defineAUDIT_ARCH_FRV(EM_FRV)
#defineAUDIT_ARCH_I386(EM_386|__AUDIT_ARCH_LE)--
2.1.0
Quoted 5 lines · Steve Grubb
Quoted 3 lines
Since this #define lives in the user visible headers I don't want to remove it and risk causing a userspace breakage. Leaving the #define in the header, even if it is unused by modern userspace, is harmless.
This macro doesn't appear to be in use by auditd.
ping ...