public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Brian Gerst <brgerst@gmail.com>
Cc: the arch/x86 maintainers <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	drysdale@google.com
Subject: Re: [PATCH 4/5] x86: Use generic compat audit code
Date: Wed, 4 Mar 2015 08:09:40 +0100	[thread overview]
Message-ID: <20150304070940.GB16479@gmail.com> (raw)
In-Reply-To: <CAMzpN2hsXwoUOGo9hmYygf2TO9mBCi+Ja0JsOL_d=gVsD8SeBw@mail.gmail.com>


* Brian Gerst <brgerst@gmail.com> wrote:

> On Wed, Mar 4, 2015 at 12:14 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Brian Gerst <brgerst@gmail.com> wrote:
> >
> >> Use the generic compat syscall audit code instead of an x86 specific
> >> implementation.
> >>
> >> Signed-off-by: Brian Gerst <brgerst@gmail.com>
> >> ---
> >>  arch/x86/Kconfig                |  5 +--
> >>  arch/x86/ia32/Makefile          |  3 --
> >>  arch/x86/ia32/audit.c           | 43 ---------------------
> >>  arch/x86/include/asm/unistd32.h |  2 +
> >>  arch/x86/kernel/Makefile        |  2 -
> >>  arch/x86/kernel/audit_64.c      | 82 -----------------------------------------
> >>  6 files changed, 3 insertions(+), 134 deletions(-)
> >>  delete mode 100644 arch/x86/ia32/audit.c
> >>  create mode 100644 arch/x86/include/asm/unistd32.h
> >>  delete mode 100644 arch/x86/kernel/audit_64.c
> >
> > Nice!
> >
> > Because there are many types of conversions it would be nice if the
> > changelog included a declaration of some sorts about what this means
> > precisely: 'the two implementations were 100% identical', or 'the x86
> > one was buggy and we now switch to the correct generic one', or 'the
> > only difference between the two is X, Y and Z, which is not a
> > problem'?
> >
> > Thanks,
> >
> >         Ingo
> 
> The generic compat version was added along with the arm64 support.  
> It is functionally equivalent to the x86-specific implementation.  
> The main difference is using audit_is_compat() instead of a 
> hardcoded check for AUDIT_ARCH_I386.
> 
> I just noticed a bug in lib/compat_audit.c though.  It is missing 
> __NR_execveat.

Another asymmetry is that lib/compat_audit.c covers __NR_socketcall, 
while arch/x86/kernel/audit.c does not.

But that's an improvement I think: for __NR_socketcall the old x86 
code would not do the socketcall permission check for SYS_BIND, which 
is an audit record generation bug AFAICS.

Thanks,

	Ingo

  reply	other threads:[~2015-03-04  7:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  3:31 [PATCH 0/5] x86: IA32 emulation cleanups Brian Gerst
2015-03-04  3:31 ` [PATCH 1/5] x86: Remove compat_ni_syscall() Brian Gerst
2015-03-04  5:27   ` [tip:x86/asm] x86/compat: " tip-bot for Brian Gerst
2015-03-04  3:31 ` [PATCH 2/5] x86: Merge native and compat 32-bit syscall tables Brian Gerst
2015-03-04  5:27   ` [tip:x86/asm] x86/compat: " tip-bot for Brian Gerst
2015-03-04  3:31 ` [PATCH 3/5] x86: Remove sys32_vm86_warning Brian Gerst
2015-03-04  5:28   ` [tip:x86/asm] x86/compat: " tip-bot for Brian Gerst
2015-03-04  3:31 ` [PATCH 4/5] x86: Use generic compat audit code Brian Gerst
2015-03-04  5:14   ` Ingo Molnar
2015-03-04  6:39     ` Brian Gerst
2015-03-04  7:09       ` Ingo Molnar [this message]
2015-03-04 14:52       ` David Drysdale
2015-03-04  3:31 ` [PATCH 5/5] x86: Clean up ia32/Makefile Brian Gerst
2015-03-04  5:24 ` [PATCH 0/5] x86: IA32 emulation cleanups Ingo Molnar
2015-03-04  6:22   ` Brian Gerst
2015-03-05 22:38     ` H. Peter Anvin

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=20150304070940.GB16479@gmail.com \
    --to=mingo@kernel.org \
    --cc=brgerst@gmail.com \
    --cc=drysdale@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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