public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: md@google.com (Michael Davidson)
To: mingo@redhat.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] x86: audit syscalls based on type of syscall not type of binary
Date: Thu,  7 Aug 2008 11:14:16 -0700 (PDT)	[thread overview]
Message-ID: <20080807181416.D239429627@localhost> (raw)


Fix syscall auditing to audit based on the actual type of system
call that was made, not the type of binary that made it.

Signed-off-by: Michael Davidson <md@google.com>

---

Index: linux-2.6.26.2/arch/x86/kernel/ptrace.c
===================================================================
--- linux-2.6.26.2.orig/arch/x86/kernel/ptrace.c	2008-08-06 09:19:01.000000000 -0700
+++ linux-2.6.26.2/arch/x86/kernel/ptrace.c	2008-08-07 11:01:25.976235000 -0700
@@ -1491,7 +1491,7 @@
 		syscall_trace(regs);
 
 	if (unlikely(current->audit_context)) {
-		if (test_thread_flag(TIF_IA32)) {
+		if (current_thread_info()->status & TS_COMPAT) {
 			audit_syscall_entry(AUDIT_ARCH_I386,
 					    regs->orig_ax,
 					    regs->bx, regs->cx,

                 reply	other threads:[~2008-08-07 18:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080807181416.D239429627@localhost \
    --to=md@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox