Re: [PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-02-11 Thread Andy Lutomirski
On Wed, Feb 11, 2015 at 1:55 PM, Denys Vlasenko wrote: > On 02/11/2015 09:30 PM, Andy Lutomirski wrote: >> On Wed, Jan 14, 2015 at 1:48 PM, Denys Vlasenko wrote: >>> 64-bit code was using six stack slots less by not saving/restoring >>> registers which are callee-preserved according to C ABI, >>>

Re: [PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-02-11 Thread Denys Vlasenko
On 02/11/2015 09:30 PM, Andy Lutomirski wrote: > On Wed, Jan 14, 2015 at 1:48 PM, Denys Vlasenko wrote: >> 64-bit code was using six stack slots less by not saving/restoring >> registers which are callee-preserved according to C ABI, >> and not allocating space for them. >> Only when syscall neede

Re: [PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-02-11 Thread Andy Lutomirski
On Wed, Jan 14, 2015 at 1:48 PM, Denys Vlasenko wrote: > 64-bit code was using six stack slots less by not saving/restoring > registers which are callee-preserved according to C ABI, > and not allocating space for them. > Only when syscall needed a complete "struct pt_regs", > the complete area wa

Re: [PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-01-14 Thread Denys Vlasenko
On Wed, Jan 14, 2015 at 11:41 PM, Borislav Petkov wrote: > On Wed, Jan 14, 2015 at 02:29:39PM -0800, Andy Lutomirski wrote: >> I need to go through Linus' and everyone else's comments on that to >> figure out what to do first. > > Right, we want to take it slow and be conservative here - entry_XX.

Re: [PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-01-14 Thread Borislav Petkov
On Wed, Jan 14, 2015 at 02:29:39PM -0800, Andy Lutomirski wrote: > I need to go through Linus' and everyone else's comments on that to > figure out what to do first. Right, we want to take it slow and be conservative here - entry_XX.S is not a joke. -- Regards/Gruss, Boris. Sent from a fat

Re: [PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-01-14 Thread Andy Lutomirski
On Wed, Jan 14, 2015 at 2:17 PM, Denys Vlasenko wrote: > On Wed, Jan 14, 2015 at 10:48 PM, Denys Vlasenko wrote: >> Macros which manipulate "struct pt_regs" on stack are reworked: >> ALLOC_PT_GPREGS_ON_STACK allocates the structure. >> SAVE_C_REGS saves to it those registers which are clobbered b

Re: [PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-01-14 Thread Denys Vlasenko
On Wed, Jan 14, 2015 at 10:48 PM, Denys Vlasenko wrote: > Macros which manipulate "struct pt_regs" on stack are reworked: > ALLOC_PT_GPREGS_ON_STACK allocates the structure. > SAVE_C_REGS saves to it those registers which are clobbered by C code. > SAVE_EXTRA_REGS saves to it all other registers.

[PATCH 01/11] x86: entry_64.S: always allocate complete "struct pt_regs"

2015-01-14 Thread Denys Vlasenko
64-bit code was using six stack slots less by not saving/restoring registers which are callee-preserved according to C ABI, and not allocating space for them. Only when syscall needed a complete "struct pt_regs", the complete area was allocated and filled in. As an additional twist, on interrupt en