linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* x32 + audit status?
@ 2015-03-05 18:32 David Drysdale
  2015-03-05 23:07 ` Andy Lutomirski
  0 siblings, 1 reply; 4+ messages in thread
From: David Drysdale @ 2015-03-05 18:32 UTC (permalink / raw)
  To: Paul Moore, Eric Paris
  Cc: Kees Cook, Andy Lutomirski, linux-kernel, linux-audit

Hi,

Do we currently expect the audit system to work with x32 syscalls?

I was playing with the audit system for the first time today (on
v4.0-rc2, due to [1]), and it didn't seem to work for me.  (Tweaking
ptrace.c like the patch below seemed to help, but I may just have
configured something wrong.)

I know there was a bunch of activity around this area in mid-2014,
but I'm not sure what the final position was...

Thanks,
David

[1]: https://lkml.org/lkml/2015/3/4/879

diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index e510618b2e91..443932afd9e8 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1445,7 +1445,7 @@ static void do_audit_syscall_entry(struct
pt_regs *regs, u32 arch)
 {
 #ifdef CONFIG_X86_64
        if (arch == AUDIT_ARCH_X86_64) {
-               audit_syscall_entry(regs->orig_ax, regs->di,
+               audit_syscall_entry(regs->orig_ax & __SYSCALL_MASK, regs->di,
                                    regs->si, regs->dx, regs->r10);
        } else
 #endif

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: x32 + audit status?
  2015-03-05 18:32 x32 + audit status? David Drysdale
@ 2015-03-05 23:07 ` Andy Lutomirski
  2015-03-06  7:28   ` Paul Moore
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Lutomirski @ 2015-03-05 23:07 UTC (permalink / raw)
  To: David Drysdale
  Cc: linux-kernel, Paul Moore, linux-audit, Kees Cook, Eric Paris

On Mar 5, 2015 10:32 AM, "David Drysdale" <drysdale@google.com> wrote:
>
> Hi,
>
> Do we currently expect the audit system to work with x32 syscalls?
>
> I was playing with the audit system for the first time today (on
> v4.0-rc2, due to [1]), and it didn't seem to work for me.  (Tweaking
> ptrace.c like the patch below seemed to help, but I may just have
> configured something wrong.)
>
> I know there was a bunch of activity around this area in mid-2014,
> but I'm not sure what the final position was...

It's totally broken, and it needs ABI work.  I think it should keep
the high syscall numbers, which means that both userspace and the
audit core need to learn how to deal with it.

--Andy

>
> Thanks,
> David
>
> [1]: https://lkml.org/lkml/2015/3/4/879
>
> diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
> index e510618b2e91..443932afd9e8 100644
> --- a/arch/x86/kernel/ptrace.c
> +++ b/arch/x86/kernel/ptrace.c
> @@ -1445,7 +1445,7 @@ static void do_audit_syscall_entry(struct
> pt_regs *regs, u32 arch)
>  {
>  #ifdef CONFIG_X86_64
>         if (arch == AUDIT_ARCH_X86_64) {
> -               audit_syscall_entry(regs->orig_ax, regs->di,
> +               audit_syscall_entry(regs->orig_ax & __SYSCALL_MASK, regs->di,
>                                     regs->si, regs->dx, regs->r10);
>         } else
>  #endif

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: x32 + audit status?
  2015-03-05 23:07 ` Andy Lutomirski
@ 2015-03-06  7:28   ` Paul Moore
  2015-03-06  9:52     ` David Drysdale
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Moore @ 2015-03-06  7:28 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: David Drysdale, linux-kernel, linux-audit, Kees Cook, Eric Paris

On Thu, Mar 5, 2015 at 6:07 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> On Mar 5, 2015 10:32 AM, "David Drysdale" <drysdale@google.com> wrote:
>>
>> Hi,
>>
>> Do we currently expect the audit system to work with x32 syscalls?
>>
>> I was playing with the audit system for the first time today (on
>> v4.0-rc2, due to [1]), and it didn't seem to work for me.  (Tweaking
>> ptrace.c like the patch below seemed to help, but I may just have
>> configured something wrong.)
>>
>> I know there was a bunch of activity around this area in mid-2014,
>> but I'm not sure what the final position was...
>
> It's totally broken, and it needs ABI work.  I think it should keep
> the high syscall numbers, which means that both userspace and the
> audit core need to learn how to deal with it.

What Andy said.  It's on the list of things to fix, but to be brutally
honest, it's not very high on the list due to lack of interest from
people asking for audit/x32 support.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: x32 + audit status?
  2015-03-06  7:28   ` Paul Moore
@ 2015-03-06  9:52     ` David Drysdale
  0 siblings, 0 replies; 4+ messages in thread
From: David Drysdale @ 2015-03-06  9:52 UTC (permalink / raw)
  To: Paul Moore
  Cc: Andy Lutomirski, linux-kernel, linux-audit, Kees Cook, Eric Paris

On Fri, Mar 6, 2015 at 7:28 AM, Paul Moore <paul@paul-moore.com> wrote:
> On Thu, Mar 5, 2015 at 6:07 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>> On Mar 5, 2015 10:32 AM, "David Drysdale" <drysdale@google.com> wrote:
>>>
>>> Hi,
>>>
>>> Do we currently expect the audit system to work with x32 syscalls?
>>>
>>> I was playing with the audit system for the first time today (on
>>> v4.0-rc2, due to [1]), and it didn't seem to work for me.  (Tweaking
>>> ptrace.c like the patch below seemed to help, but I may just have
>>> configured something wrong.)
>>>
>>> I know there was a bunch of activity around this area in mid-2014,
>>> but I'm not sure what the final position was...
>>
>> It's totally broken, and it needs ABI work.  I think it should keep
>> the high syscall numbers, which means that both userspace and the
>> audit core need to learn how to deal with it.
>
> What Andy said.  It's on the list of things to fix, but to be brutally
> honest, it's not very high on the list due to lack of interest from
> people asking for audit/x32 support.

Fair enough -- thanks for letting me know.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-06  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-05 18:32 x32 + audit status? David Drysdale
2015-03-05 23:07 ` Andy Lutomirski
2015-03-06  7:28   ` Paul Moore
2015-03-06  9:52     ` David Drysdale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).