Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-21 Thread Philipp Kohlbecher
H. Peter Anvin wrote: > Sticking kernel mode values in those fields would add no value, except > as a poison (since %ss == KERNEL_DS and would cause a #GP(0) if it ever > reached IRET.) If anything, those fields should be pushed as zero or > some other poison bits. That would be slightly better

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-21 Thread Philipp Kohlbecher
H. Peter Anvin wrote: Sticking kernel mode values in those fields would add no value, except as a poison (since %ss == KERNEL_DS and would cause a #GP(0) if it ever reached IRET.) If anything, those fields should be pushed as zero or some other poison bits. That would be slightly better than

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-18 Thread H. Peter Anvin
H. Peter Anvin wrote: Sticking kernel mode values in those fields would add no value, except as a poison (since %ss == KERNEL_DS and would cause a #GP(0) if it ever reached IRET.) #SS(0), rather, of course. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-18 Thread H. Peter Anvin
Philipp Kohlbecher wrote: >> >> In other words, your patch doesn't actually fix anything, it *masks* >> potential bugs which would also be triggered by interrupts in kernel >> mode. This is bad. > > I am not sure these potential bugs would also be triggered by interrupts > in kernel mode. After

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-18 Thread Philipp Kohlbecher
H. Peter Anvin wrote: > Philipp Kohlbecher wrote: >> (This may be superfluous, but I don't think it hurts and it might >> prevent future errors.) > > ... and it may *cause* future errors by making it harder to find bugs, too. > > In other words, your patch doesn't actually fix anything, it

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-18 Thread Philipp Kohlbecher
H. Peter Anvin wrote: Philipp Kohlbecher wrote: (This may be superfluous, but I don't think it hurts and it might prevent future errors.) ... and it may *cause* future errors by making it harder to find bugs, too. In other words, your patch doesn't actually fix anything, it *masks*

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-18 Thread H. Peter Anvin
Philipp Kohlbecher wrote: In other words, your patch doesn't actually fix anything, it *masks* potential bugs which would also be triggered by interrupts in kernel mode. This is bad. I am not sure these potential bugs would also be triggered by interrupts in kernel mode. After all,

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-18 Thread H. Peter Anvin
H. Peter Anvin wrote: Sticking kernel mode values in those fields would add no value, except as a poison (since %ss == KERNEL_DS and would cause a #GP(0) if it ever reached IRET.) #SS(0), rather, of course. -hpa - To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread H. Peter Anvin
Philipp Kohlbecher wrote: > > I don't know of any problems this causes. The kernel needs to be aware > of the fact that the xss and esp fields of the pt_regs struct may > contain wrong values anyway, as hardware interrupts arriving while the > CPU is in kernel mode would also lead to this

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread Philipp Kohlbecher
H. Peter Anvin wrote: > Philipp Kohlbecher wrote: >> From: Philipp Kohlbecher <[EMAIL PROTECTED]> >> >> The kernel_execve function issues a software interrupt (int 0x80) to make >> a system call to sys_execve. This function expects to find the stack segment >> and stack pointer of the function

[PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread Philipp Kohlbecher
From: Philipp Kohlbecher <[EMAIL PROTECTED]> The kernel_execve function issues a software interrupt (int 0x80) to make a system call to sys_execve. This function expects to find the stack segment and stack pointer of the function that issued the system call in the pt_regs struct. The syscall

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread H. Peter Anvin
Philipp Kohlbecher wrote: > From: Philipp Kohlbecher <[EMAIL PROTECTED]> > > The kernel_execve function issues a software interrupt (int 0x80) to make > a system call to sys_execve. This function expects to find the stack segment > and stack pointer of the function that issued the system call in

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread H. Peter Anvin
Philipp Kohlbecher wrote: From: Philipp Kohlbecher [EMAIL PROTECTED] The kernel_execve function issues a software interrupt (int 0x80) to make a system call to sys_execve. This function expects to find the stack segment and stack pointer of the function that issued the system call in the

[PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread Philipp Kohlbecher
From: Philipp Kohlbecher [EMAIL PROTECTED] The kernel_execve function issues a software interrupt (int 0x80) to make a system call to sys_execve. This function expects to find the stack segment and stack pointer of the function that issued the system call in the pt_regs struct. The syscall entry

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread Philipp Kohlbecher
H. Peter Anvin wrote: Philipp Kohlbecher wrote: From: Philipp Kohlbecher [EMAIL PROTECTED] The kernel_execve function issues a software interrupt (int 0x80) to make a system call to sys_execve. This function expects to find the stack segment and stack pointer of the function that issued the

Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege syscall

2007-05-17 Thread H. Peter Anvin
Philipp Kohlbecher wrote: I don't know of any problems this causes. The kernel needs to be aware of the fact that the xss and esp fields of the pt_regs struct may contain wrong values anyway, as hardware interrupts arriving while the CPU is in kernel mode would also lead to this condition.