Skip to contentSkip to conversation

x86/entry64: remove unused audit related macros

PATCH Superseded Alexander Kuleshov 2 participants 3 messages Oct 23, 2016

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 x86/entry64: remove unused audit related macros

These macro ocured in the 86a1c34a929f commit (x86_64 syscall audit fast-path by Roland McGrath <[email protected]>).

These defines were used in two-phase sycalls entry tracing, but this functionality was moved to the syscall_trace_enter() from arch/x86/entry/common.c in the 1f484aa69 commit (x86/entry: Move C entry and exit code to arch/x86/entry/common.c by Andy Lutomirski <[email protected]>).

The syscall_trace_enter() now uses same defines from <linux/audit.h>, so these defines are no longer used anywhere in entry_64.S and we may remove them.

---
ChangeLog:

v1 -> v2:
- Added more details in the commit message.

 arch/x86/entry/entry_64.S | 6 ------
 1 file changed, 6 deletions(-)
arch/x86/entry/entry_64.S +0 -6
index ef766a3..4362f1c 100644
@@ -38,12 +38,6 @@
 #include <asm/export.h>
 #include <linux/err.h>
 
-/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this.  */
-#include <linux/elf-em.h>
-#define AUDIT_ARCH_X86_64			(EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
-#define __AUDIT_ARCH_64BIT			0x80000000
-#define __AUDIT_ARCH_LE				0x40000000
-
 .code64
 .section .entry.text, "ax"
 
Signature · 1 line
2.8.0.rc3.1353.gea9bdc0
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Alexander Kuleshov

These macro ocured in the 86a1c34a929f commit (x86_64 syscall audit fast-path by Roland McGrath <[email protected]>).

These defines were used in two-phase sycalls entry tracing, but this functionality was moved to the syscall_trace_enter() from arch/x86/entry/common.c in the 1f484aa69 commit (x86/entry: Move C entry and exit code to arch/x86/entry/common.c by Andy Lutomirski <[email protected]>).

Quoted 3 lines

The syscall_trace_enter() now uses same defines from <linux/audit.h>, so these defines are no longer used anywhere in entry_64.S and we may remove them.

Good, it is getting there. Very close to what I had in mind, thanks!

Now, I went and made it a bit more readable and put the commit IDs and their names on separate lines, like we do in tip:

"These macros were added in commit

86a1c34a929f ("x86_64 syscall audit fast-path").

They were used for sycalls auditing, but this functionality was moved to the arch/x86/entry/common.c:syscall_trace_enter() in

1f484aa69046 ("x86/entry: Move C entry and exit code to arch/x86/entry/common.c")

syscall_trace_enter() now uses the same defines from <linux/audit.h>, so these defines are no longer used anywhere in entry_64.S and we may remove them."

Also, we abbreviate git commits to 12 chars. What you could do is add this to your .gitconfig:

[alias]

        one = show -s --pretty='format:%h (\"%s\")'

and then simply do

$ git one 1f484aa69

and it'll format it properly for ya.

Anyway, just a couple of things to pay attention to in the future.

With this, you can add

to your v3.

Thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
#2 lore raw
Quoted 7 lines · Borislav Petkov

Now, I went and made it a bit more readable and put the commit IDs and their names on separate lines, like we do in tip:

"These macros were added in commit

86a1c34a929f ("x86_64 syscall audit fast-path").

Quoted 9 lines

They were used for sycalls auditing, but this functionality was moved to the arch/x86/entry/common.c:syscall_trace_enter() in

1f484aa69046 ("x86/entry: Move C entry and exit code to arch/x86/entry/common.c")

syscall_trace_enter() now uses the same defines from <linux/audit.h>, so these defines are no longer used anywhere in entry_64.S and we may remove them."

Agree, this looks more readable. I will take into account this formatting.

Quoted 6 lines

Also, we abbreviate git commits to 12 chars. What you could do is add this to your .gitconfig:

[alias]

        one = show -s --pretty='format:%h (\"%s\")'
Quoted 7 lines

and then simply do

$ git one 1f484aa69

and it'll format it properly for ya.

Anyway, just a couple of things to pay attention to in the future.

Yes, thanks for this.

Quoted 5 lines

With this, you can add

to your v3.

Thank you.