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

2014-10-27 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 wran

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 > > > > p

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 > > @@ -447

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 $(_TIF_

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 thi

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_OFFSE

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; CFI_ADJUST_CFA_

[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-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 spec

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 b4f0d3755c5e9cc862

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 "asml

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

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 stac

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 dumb

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 com

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 wit

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 the

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 > > T

[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 u