Skip to contentSkip to conversation

arm64: audit: Fix build for audit changes

PATCH New Mark Brown 5 participants 14 messages Jul 17, 2014 – Aug 11, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +2 -2
index 70526cfda056..310842e3d477 100644
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);
 
 	return regs->syscallno;
 }
Signature · 1 line
2.0.1
maintainer
#1 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 18 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +0 -0
index 70526cfda056..310842e3d477 100644

arch/arm64/kernel/ptrace.c asmlinkage int syscall_trace_enter(struct pt_regs *regs) · line 1122

Quoted 10 lines
arch/arm64/kernel/ptrace.c +2 -2
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);
 
 	return regs->syscallno;
 }

Thanks. This will have to be applied after 3.17-rc1 since commit 3efe33f5d2 does not seem to be in mainline yet (nor the arm64 audit patches).

Signature · 1 line
Catalin
author
#2 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 8 lines · Catalin Marinas
Quoted 2 lines · Mark Brown

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and

Thanks. This will have to be applied after 3.17-rc1 since commit 3efe33f5d2 does not seem to be in mainline yet (nor the arm64 audit patches).

That's not great and is kind of missing the point of -next - the core idea is to find these inter-tree dependencies, ensure things work when they're merged together and avoid things like massive bisection breaks. Leaving things also causes problems for anyone trying to do integration testing on -next.

What would be better would be if we could get the two trees synced up,
in this case something like picking the audit change up in the ARMv8
tree (or vice versa) seems like it'd be quick and easy since it looks
like neither tree uses topic branches.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/eb7fde8e/attachment-0001.sig>

maintainer
#3 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 16 lines · Mark Brown
Quoted 8 lines · Catalin Marinas
Quoted 2 lines · Mark Brown

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and

Thanks. This will have to be applied after 3.17-rc1 since commit 3efe33f5d2 does not seem to be in mainline yet (nor the arm64 audit patches).

That's not great and is kind of missing the point of -next - the core idea is to find these inter-tree dependencies, ensure things work when they're merged together and avoid things like massive bisection breaks. Leaving things also causes problems for anyone trying to do integration testing on -next.

Quoted 4 lines

What would be better would be if we could get the two trees synced up, in this case something like picking the audit change up in the ARMv8 tree (or vice versa) seems like it'd be quick and easy since it looks like neither tree uses topic branches.

It's not ideal indeed but applying this patch on my tree would break it. So we need a common base where the audit API is changed, guaranteed not to be rebased so that I can merge it in the arm64 for-next/core branch.

Do you know which tree commit 3efe33f5d2 is in? I assume some tip branch?

Signature · 1 line
Catalin
author
#4 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 7 lines · Catalin Marinas
Quoted 4 lines · Mark Brown

What would be better would be if we could get the two trees synced up, in this case something like picking the audit change up in the ARMv8 tree (or vice versa) seems like it'd be quick and easy since it looks like neither tree uses topic branches.

Quoted 6 lines

It's not ideal indeed but applying this patch on my tree would break it. So we need a common base where the audit API is changed, guaranteed not to be rebased so that I can merge it in the arm64 for-next/core branch.

Do you know which tree commit 3efe33f5d2 is in? I assume some tip branch?

It's the head commit in Eric's audit tree.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/97456dab/attachment-0001.sig>

#5 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

In reply to Mark Brown
Quoted 9 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

I'm not sure the best way to propagate this patch, but it will be necessary.

Quoted 22 lines
---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +2 -2
index 70526cfda056..310842e3d477 100644
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);
 
 	return regs->syscallno;
 }
Signature · 1 line
2.0.1

- RGB

--
Richard Guy Briggs <[email protected]>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545

author
#6 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

In reply to Mark Brown
Quoted 7 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

This is still broken -next.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140724/e5e74e46/attachment.sig>

maintainer
#7 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 10 lines · Mark Brown
Quoted 7 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

This is still broken -next.

It should now be temporarily fixed for the defconfig (CONFIG_AUTIDSYSCALL disabled). I'm reluctant to merge the audit tree in the arm64 tree as (a) I haven't seen a confirmation that this branch is stable and will go upstream as is and (b) there are x86 changes without Acks from the x86 maintainers (whether needed or not, I can't say).

So my temporary patch is some #ifndef's around the offending code. It will be reverted and your patch applied once the audit tree meets the arm64 tree.

Signature · 1 line
Catalin
author
#8 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 9 lines · Catalin Marinas
Quoted 1 line · Mark Brown

This is still broken -next.

It should now be temporarily fixed for the defconfig (CONFIG_AUTIDSYSCALL disabled). I'm reluctant to merge the audit tree in the arm64 tree as (a) I haven't seen a confirmation that this branch is stable and will go upstream as is and (b) there are x86 changes without Acks from the x86 maintainers (whether needed or not, I can't say).

I'd not expect it to be essential, it's just a function prototype change.

Quoted 3 lines

So my temporary patch is some #ifndef's around the offending code. It will be reverted and your patch applied once the audit tree meets the arm64 tree.

That's good thanks, though it's still going to mean we have massive bisection breaks and anyone with an existing config will run into trouble - I'm going to be adding all*config builds to my daily tests soon too which will still trigger the issue).

I suspect the easiest thing would be to cherry pick the commit over (it
can always be reverted later on if there's an issue) if a shared branch
can't be arranged. It's a real shame Eric hasn't replied here...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140725/7967cc6d/attachment.sig>

#9 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

In reply to Mark Brown
Quoted 18 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +0 -0
index 70526cfda056..310842e3d477 100644

arch/arm64/kernel/ptrace.c asmlinkage int syscall_trace_enter(struct pt_regs *regs) · line 1119

Quoted 7 lines
arch/arm64/kernel/ptrace.c +2 -2
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);

Eric, Richard: when is 3efe33f5d2 ("audit: x86: drop arch from __audit_syscall_entry() interface") going to hit mainline? I've been holding off this fix until the offending commit is merged, but if that's not going to happen for 3.17, then we probably need to do something else to fix -next.

Will

#10 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 22 lines · Will Deacon
Quoted 21 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +0 -0
index 70526cfda056..310842e3d477 100644
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
Quoted 9 lines

arch/arm64/kernel/ptrace.c asmlinkage int syscall_trace_enter(struct pt_regs *regs) · line 1119

Quoted 4 lines
arch/arm64/kernel/ptrace.c +2 -2
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);

Eric, Richard: when is 3efe33f5d2 ("audit: x86: drop arch from __audit_syscall_entry() interface") going to hit mainline? I've been holding off this fix until the offending commit is merged, but if that's not going to happen for 3.17, then we probably need to do something else to fix -next.

I think I'm being lazy this window and not oging to send a pull. So I'll pick up this fix as soon as rc1 cuts in my tree.

#11 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 33 lines · Eric Paris
Quoted 22 lines · Will Deacon
Quoted 21 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +0 -0
index 70526cfda056..310842e3d477 100644
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
Quoted 9 lines

arch/arm64/kernel/ptrace.c asmlinkage int syscall_trace_enter(struct pt_regs *regs) · line 1119

Quoted 4 lines
arch/arm64/kernel/ptrace.c +2 -2
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);

Eric, Richard: when is 3efe33f5d2 ("audit: x86: drop arch from __audit_syscall_entry() interface") going to hit mainline? I've been holding off this fix until the offending commit is merged, but if that's not going to happen for 3.17, then we probably need to do something else to fix -next.

Quoted 2 lines

I think I'm being lazy this window and not oging to send a pull. So I'll pick up this fix as soon as rc1 cuts in my tree.

Oh, alright then. If you're not going to send the code for mainline, you could also just drop it from -next ;)

Anyway, if you do fix it, please let me know so that I can remove our #ifdef CONFIG_AUDITSYSCALL guards (which only exist to stop build breakage in -next with defconfig).

Will

maintainer
#12 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 37 lines · Will Deacon
Quoted 33 lines · Eric Paris
Quoted 22 lines · Will Deacon
Quoted 21 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +0 -0
index 70526cfda056..310842e3d477 100644
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
Quoted 9 lines

arch/arm64/kernel/ptrace.c asmlinkage int syscall_trace_enter(struct pt_regs *regs) · line 1119

Quoted 4 lines
arch/arm64/kernel/ptrace.c +2 -2
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);

Eric, Richard: when is 3efe33f5d2 ("audit: x86: drop arch from __audit_syscall_entry() interface") going to hit mainline? I've been holding off this fix until the offending commit is merged, but if that's not going to happen for 3.17, then we probably need to do something else to fix -next.

Quoted 2 lines

I think I'm being lazy this window and not oging to send a pull. So I'll pick up this fix as soon as rc1 cuts in my tree.

Quoted 6 lines

Oh, alright then. If you're not going to send the code for mainline, you could also just drop it from -next ;)

Anyway, if you do fix it, please let me know so that I can remove our #ifdef CONFIG_AUDITSYSCALL guards (which only exist to stop build breakage in -next with defconfig).

Actually, Eric could carry the arm64 change from Mark into -next as well and we can drop the arm64 #ifdef before the API change hits mainline.

Signature · 1 line
Catalin
#13 lore raw

PATCH 1/1 arm64: audit: Fix build for audit changes

Quoted 41 lines · Catalin Marinas
Quoted 40 lines · Will Deacon
Quoted 33 lines · Eric Paris
Quoted 22 lines · Will Deacon
Quoted 21 lines · Mark Brown

From: Mark Brown <[email protected]>

Commit 3efe33f5d2 (audit: x86: drop arch from __audit_syscall_entry() interface) removed the arch parameter from __audit_syscall_entry() and updated the only current user in mainline but this breaks the ARMv8 audit code that has been added in -next. Fix this by making the equivalent update to ARMv8.

---
 arch/arm64/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/ptrace.c +0 -0
index 70526cfda056..310842e3d477 100644
@@ -1115,8 +1115,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
 		trace_sys_enter(regs, regs->syscallno);
 
Quoted 9 lines

arch/arm64/kernel/ptrace.c asmlinkage int syscall_trace_enter(struct pt_regs *regs) · line 1119

Quoted 4 lines
arch/arm64/kernel/ptrace.c +2 -2
-	audit_syscall_entry(syscall_get_arch(), regs->syscallno,
-		regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]);
+	audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
+			    regs->regs[2], regs->regs[3]);

Eric, Richard: when is 3efe33f5d2 ("audit: x86: drop arch from __audit_syscall_entry() interface") going to hit mainline? I've been holding off this fix until the offending commit is merged, but if that's not going to happen for 3.17, then we probably need to do something else to fix -next.

Quoted 2 lines

I think I'm being lazy this window and not oging to send a pull. So I'll pick up this fix as soon as rc1 cuts in my tree.

Oh, alright then. If you're not going to send the code for mainline, you could also just drop it from -next ;)

Quoted 6 lines
Quoted 3 lines

Anyway, if you do fix it, please let me know so that I can remove our #ifdef CONFIG_AUDITSYSCALL guards (which only exist to stop build breakage in -next with defconfig).

Actually, Eric could carry the arm64 change from Mark into -next as well and we can drop the arm64 #ifdef before the API change hits mainline.

Indeed -- I think that's what we'd agreed, right?

Will