Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-28 Thread Ingo Molnar
* Eric Paris wrote: > On Mon, 2014-10-27 at 10:02 -0700, H. Peter Anvin wrote: > > On 10/27/2014 06:55 AM, Eric Paris wrote: > > > My patch was already committed to the -tip urgent branch. I believe any > > > optimization should be based on that branch, Richard. If you are trying > > > to

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-28 Thread Ingo Molnar
* Eric Paris epa...@redhat.com wrote: On Mon, 2014-10-27 at 10:02 -0700, H. Peter Anvin wrote: On 10/27/2014 06:55 AM, Eric Paris wrote: My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Richard Guy Briggs
On 14/10/27, Thomas Gleixner wrote: > On Mon, 27 Oct 2014, Eric Paris wrote: > > My patch was already committed to the -tip urgent branch. I believe any > > optimization should be based on that branch, Richard. If you are trying > > to wrangle every bit of speed out of this, should you > > > >

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Thomas Gleixner
On Mon, 27 Oct 2014, Eric Paris wrote: > My patch was already committed to the -tip urgent branch. I believe any > optimization should be based on that branch, Richard. If you are trying > to wrangle every bit of speed out of this, should you > > push %esi; > push %edi; > CFI_ADJUST_CFA_OFFSET

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Eric Paris
On Mon, 2014-10-27 at 21:52 +0100, Thomas Gleixner wrote: > On Sun, 26 Oct 2014, Richard Guy Briggs wrote: > > diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S > > index b553ed8..344b63f 100644 > > --- a/arch/x86/kernel/entry_32.S > > +++ b/arch/x86/kernel/entry_32.S > > @@

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Thomas Gleixner
On Sun, 26 Oct 2014, Richard Guy Briggs wrote: > diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S > index b553ed8..344b63f 100644 > --- a/arch/x86/kernel/entry_32.S > +++ b/arch/x86/kernel/entry_32.S > @@ -447,15 +447,14 @@ sysenter_exit: > sysenter_audit: > testl

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Richard Guy Briggs
On 14/10/27, Eric Paris wrote: > My patch was already committed to the -tip urgent branch. I believe any > optimization should be based on that branch, Richard. If you are trying > to wrangle every bit of speed out of this, should you > > push %esi; > push %edi; > CFI_ADJUST_CFA_OFFSET 8 > call

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Eric Paris
On Mon, 2014-10-27 at 10:02 -0700, H. Peter Anvin wrote: > On 10/27/2014 06:55 AM, Eric Paris wrote: > > My patch was already committed to the -tip urgent branch. I believe any > > optimization should be based on that branch, Richard. If you are trying > > to wrangle every bit of speed out of

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread H. Peter Anvin
On 10/27/2014 06:55 AM, Eric Paris wrote: > My patch was already committed to the -tip urgent branch. I believe any > optimization should be based on that branch, Richard. If you are trying > to wrangle every bit of speed out of this, should you > > push %esi; > push %edi; >

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Eric Paris
My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying to wrangle every bit of speed out of this, should you push %esi; push %edi; CFI_ADJUST_CFA_OFFSET 8 call __audit_syscall_entry pop; pop;

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Eric Paris
My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying to wrangle every bit of speed out of this, should you push %esi; push %edi; CFI_ADJUST_CFA_OFFSET 8 call __audit_syscall_entry pop; pop;

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread H. Peter Anvin
On 10/27/2014 06:55 AM, Eric Paris wrote: My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying to wrangle every bit of speed out of this, should you push %esi; push %edi; CFI_ADJUST_CFA_OFFSET 8

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Eric Paris
On Mon, 2014-10-27 at 10:02 -0700, H. Peter Anvin wrote: On 10/27/2014 06:55 AM, Eric Paris wrote: My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying to wrangle every bit of speed out of this,

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Richard Guy Briggs
On 14/10/27, Eric Paris wrote: My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying to wrangle every bit of speed out of this, should you push %esi; push %edi; CFI_ADJUST_CFA_OFFSET 8 call

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Thomas Gleixner
On Sun, 26 Oct 2014, Richard Guy Briggs wrote: diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index b553ed8..344b63f 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -447,15 +447,14 @@ sysenter_exit: sysenter_audit: testl

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Eric Paris
On Mon, 2014-10-27 at 21:52 +0100, Thomas Gleixner wrote: On Sun, 26 Oct 2014, Richard Guy Briggs wrote: diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index b553ed8..344b63f 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -447,15

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Thomas Gleixner
On Mon, 27 Oct 2014, Eric Paris wrote: My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying to wrangle every bit of speed out of this, should you push %esi; push %edi; CFI_ADJUST_CFA_OFFSET 8

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-27 Thread Richard Guy Briggs
On 14/10/27, Thomas Gleixner wrote: On Mon, 27 Oct 2014, Eric Paris wrote: My patch was already committed to the -tip urgent branch. I believe any optimization should be based on that branch, Richard. If you are trying to wrangle every bit of speed out of this, should you push %esi;

[PATCH] i386/audit: stop scribbling on the stack frame

2014-10-26 Thread Richard Guy Briggs
git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on i686 with the expected "system can't boot" results. As noted in: https://bugs.freedesktop.org/show_bug.cgi?id=85277 This patch stops fscking with pt_regs. Instead it sets

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-26 Thread Richard Guy Briggs
On 14/10/24, Andy Lutomirski wrote: > On Fri, Oct 24, 2014 at 1:19 PM, H. Peter Anvin wrote: > > On 10/23/2014 12:38 PM, Eric Paris wrote: > >>> After the call __audit_syscall_entry aren't they already polluted? > >>> Isn't that the reason we need to reload EAX? > >> > >> Well, I guess EAX is

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-26 Thread Richard Guy Briggs
On 14/10/23, Eric Paris wrote: > On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: > > On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris wrote: > > > On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: > > >> On 10/22/2014 09:04 PM, Eric Paris wrote: > > >> > git commit

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-26 Thread Richard Guy Briggs
On 14/10/23, Eric Paris wrote: On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris epa...@redhat.com wrote: On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: On 10/22/2014 09:04 PM, Eric Paris wrote: git commit

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-26 Thread Richard Guy Briggs
On 14/10/24, Andy Lutomirski wrote: On Fri, Oct 24, 2014 at 1:19 PM, H. Peter Anvin h...@zytor.com wrote: On 10/23/2014 12:38 PM, Eric Paris wrote: After the call __audit_syscall_entry aren't they already polluted? Isn't that the reason we need to reload EAX? Well, I guess EAX is

[PATCH] i386/audit: stop scribbling on the stack frame

2014-10-26 Thread Richard Guy Briggs
git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on i686 with the expected system can't boot results. As noted in: https://bugs.freedesktop.org/show_bug.cgi?id=85277 This patch stops fscking with pt_regs. Instead it sets up

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-24 Thread Andy Lutomirski
On Fri, Oct 24, 2014 at 1:19 PM, H. Peter Anvin wrote: > On 10/23/2014 12:38 PM, Eric Paris wrote: >>> >>> After the call __audit_syscall_entry aren't they already polluted? >>> Isn't that the reason we need to reload EAX? >> >> Well, I guess EAX is special... >> > > Because system calls are

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-24 Thread H. Peter Anvin
On 10/23/2014 12:38 PM, Eric Paris wrote: >> >> After the call __audit_syscall_entry aren't they already polluted? >> Isn't that the reason we need to reload EAX? > > Well, I guess EAX is special... > Because system calls are "asmlinkage", all the parameters are on the stack, but %eax is used

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-24 Thread H. Peter Anvin
On 10/23/2014 12:38 PM, Eric Paris wrote: After the call __audit_syscall_entry aren't they already polluted? Isn't that the reason we need to reload EAX? Well, I guess EAX is special... Because system calls are asmlinkage, all the parameters are on the stack, but %eax is used as the index

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-24 Thread Andy Lutomirski
On Fri, Oct 24, 2014 at 1:19 PM, H. Peter Anvin h...@zytor.com wrote: On 10/23/2014 12:38 PM, Eric Paris wrote: After the call __audit_syscall_entry aren't they already polluted? Isn't that the reason we need to reload EAX? Well, I guess EAX is special... Because system calls are

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread H. Peter Anvin
Yes, I will look at this tomorrow. For the record, the calling convention is that eax, edx, ecx are clobbered, and used for the three first arguments in that order. eax, edx are used for the return value(s). The exception is for __asmlinkage functions where all arguments are passed on the

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Andy Lutomirski
On Thu, Oct 23, 2014 at 12:30 PM, Eric Paris wrote: > On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: >> On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris wrote: >> > On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: >> >> On 10/22/2014 09:04 PM, Eric Paris wrote: >> >> > git commit

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Eric Paris
On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: > On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris wrote: > > On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: > >> On 10/22/2014 09:04 PM, Eric Paris wrote: > >> > git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Eric Paris
On Thu, 2014-10-23 at 15:30 -0400, Eric Paris wrote: > On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: > > On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris wrote: > > > On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: > > >> On 10/22/2014 09:04 PM, Eric Paris wrote: > > >> > git

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Andy Lutomirski
On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris wrote: > On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: >> On 10/22/2014 09:04 PM, Eric Paris wrote: >> > git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. >> > It was writing over %esp/pt_regs semi-randomly on i686

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Eric Paris
On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: > On 10/22/2014 09:04 PM, Eric Paris wrote: > > git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. > > It was writing over %esp/pt_regs semi-randomly on i686 with the expected > > "system can't boot" results. As noted

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread H. Peter Anvin
Well, probably not something for stable/urgent... On October 23, 2014 11:39:48 AM PDT, Andy Lutomirski wrote: >On 10/22/2014 09:04 PM, Eric Paris wrote: >> git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very >dumb. >> It was writing over %esp/pt_regs semi-randomly on i686 with

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Andy Lutomirski
On 10/22/2014 09:04 PM, Eric Paris wrote: > git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. > It was writing over %esp/pt_regs semi-randomly on i686 with the expected > "system can't boot" results. As noted in: > > https://bugs.freedesktop.org/show_bug.cgi?id=85277 > >

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Andy Lutomirski
On 10/22/2014 09:04 PM, Eric Paris wrote: git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on i686 with the expected system can't boot results. As noted in: https://bugs.freedesktop.org/show_bug.cgi?id=85277 This

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread H. Peter Anvin
Well, probably not something for stable/urgent... On October 23, 2014 11:39:48 AM PDT, Andy Lutomirski l...@amacapital.net wrote: On 10/22/2014 09:04 PM, Eric Paris wrote: git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Eric Paris
On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: On 10/22/2014 09:04 PM, Eric Paris wrote: git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on i686 with the expected system can't boot results. As noted in:

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Andy Lutomirski
On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris epa...@redhat.com wrote: On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: On 10/22/2014 09:04 PM, Eric Paris wrote: git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Eric Paris
On Thu, 2014-10-23 at 15:30 -0400, Eric Paris wrote: On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris epa...@redhat.com wrote: On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: On 10/22/2014 09:04 PM, Eric Paris wrote: git

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Eric Paris
On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris epa...@redhat.com wrote: On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: On 10/22/2014 09:04 PM, Eric Paris wrote: git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread Andy Lutomirski
On Thu, Oct 23, 2014 at 12:30 PM, Eric Paris epa...@redhat.com wrote: On Thu, 2014-10-23 at 12:20 -0700, Andy Lutomirski wrote: On Thu, Oct 23, 2014 at 12:15 PM, Eric Paris epa...@redhat.com wrote: On Thu, 2014-10-23 at 11:39 -0700, Andy Lutomirski wrote: On 10/22/2014 09:04 PM, Eric Paris

Re: [PATCH] i386/audit: stop scribbling on the stack frame

2014-10-23 Thread H. Peter Anvin
Yes, I will look at this tomorrow. For the record, the calling convention is that eax, edx, ecx are clobbered, and used for the three first arguments in that order. eax, edx are used for the return value(s). The exception is for __asmlinkage functions where all arguments are passed on the

[PATCH] i386/audit: stop scribbling on the stack frame

2014-10-22 Thread Eric Paris
git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on i686 with the expected "system can't boot" results. As noted in: https://bugs.freedesktop.org/show_bug.cgi?id=85277 This patch stops fscking with pt_regs. Instead it sets

[PATCH] i386/audit: stop scribbling on the stack frame

2014-10-22 Thread Eric Paris
git commit b4f0d3755c5e9cc86292d5fd78261903b4f23d4a was very very dumb. It was writing over %esp/pt_regs semi-randomly on i686 with the expected system can't boot results. As noted in: https://bugs.freedesktop.org/show_bug.cgi?id=85277 This patch stops fscking with pt_regs. Instead it sets up