Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-08-17 Thread Neil Horman
On Fri, Aug 17, 2007 at 11:41:20AM -0400, John Blackwood wrote: > Hi Neil, > > We've been having problems with this select patch change. > > Specifically -- previously, when a ptrace attach was done to a task > blocked in a select() call and that task had a timeout value, > the task would

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-08-17 Thread John Blackwood
Hi Neil, We've been having problems with this select patch change. Specifically -- previously, when a ptrace attach was done to a task blocked in a select() call and that task had a timeout value, the task would restart the select() call with an updated timeout value. With this patch in place,

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-08-17 Thread John Blackwood
Hi Neil, We've been having problems with this select patch change. Specifically -- previously, when a ptrace attach was done to a task blocked in a select() call and that task had a timeout value, the task would restart the select() call with an updated timeout value. With this patch in place,

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-08-17 Thread Neil Horman
On Fri, Aug 17, 2007 at 11:41:20AM -0400, John Blackwood wrote: Hi Neil, We've been having problems with this select patch change. Specifically -- previously, when a ptrace attach was done to a task blocked in a select() call and that task had a timeout value, the task would restart the

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-24 Thread Neil Horman
On Tue, Jan 23, 2007 at 09:59:26PM -0800, David Miller wrote: > From: Neil Horman <[EMAIL PROTECTED]> > Date: Tue, 16 Jan 2007 15:13:32 -0500 > > > As it is currently written, sys_select checks its return code to convert > > ERESTARTNOHAND to EINTR. However, the check is within an if (tvp)

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-24 Thread Neil Horman
On Tue, Jan 23, 2007 at 09:59:26PM -0800, David Miller wrote: From: Neil Horman [EMAIL PROTECTED] Date: Tue, 16 Jan 2007 15:13:32 -0500 As it is currently written, sys_select checks its return code to convert ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-23 Thread David Miller
From: Neil Horman <[EMAIL PROTECTED]> Date: Tue, 16 Jan 2007 15:13:32 -0500 > As it is currently written, sys_select checks its return code to convert > ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and > so if select is called from userspace with a NULL timeval, then

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-23 Thread David Miller
From: Neil Horman [EMAIL PROTECTED] Date: Tue, 16 Jan 2007 15:13:32 -0500 As it is currently written, sys_select checks its return code to convert ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and so if select is called from userspace with a NULL timeval, then it

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread bert hubert
On Mon, Jan 22, 2007 at 11:24:06AM -0500, Neil Horman wrote: > The error was reported to me second hand. I'm expecting a reproducer > (although > to date, I'm still waiting for it, so I may have jumped the gun here). In > fact, I've asked for a repoducer weeks ago and nothing happened,

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Neil Horman
On Mon, Jan 22, 2007 at 08:03:53AM -0800, Linus Torvalds wrote: > > > On Mon, 22 Jan 2007, Neil Horman wrote: > > > On Mon, Jan 22, 2007 at 02:59:56PM +0100, Paolo Ornati wrote: > > > > > > the ERESTARTNOHAND thing is handled in arch specific signal code, > > > > In the signal handling path

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Linus Torvalds
On Mon, 22 Jan 2007, Neil Horman wrote: > On Mon, Jan 22, 2007 at 02:59:56PM +0100, Paolo Ornati wrote: > > > > the ERESTARTNOHAND thing is handled in arch specific signal code, > > In the signal handling path yes. Right. > Not always in the case of select, though. Check core_sys_select:

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Neil Horman
On Mon, Jan 22, 2007 at 02:59:56PM +0100, Paolo Ornati wrote: > On Tue, 16 Jan 2007 15:13:32 -0500 > Neil Horman <[EMAIL PROTECTED]> wrote: > > > As it is currently written, sys_select checks its return code to convert > > ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause,

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Paolo Ornati
On Tue, 16 Jan 2007 15:13:32 -0500 Neil Horman <[EMAIL PROTECTED]> wrote: > As it is currently written, sys_select checks its return code to convert > ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and > so if select is called from userspace with a NULL timeval, then

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Paolo Ornati
On Tue, 16 Jan 2007 15:13:32 -0500 Neil Horman [EMAIL PROTECTED] wrote: As it is currently written, sys_select checks its return code to convert ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and so if select is called from userspace with a NULL timeval, then it is

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Neil Horman
On Mon, Jan 22, 2007 at 02:59:56PM +0100, Paolo Ornati wrote: On Tue, 16 Jan 2007 15:13:32 -0500 Neil Horman [EMAIL PROTECTED] wrote: As it is currently written, sys_select checks its return code to convert ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Linus Torvalds
On Mon, 22 Jan 2007, Neil Horman wrote: On Mon, Jan 22, 2007 at 02:59:56PM +0100, Paolo Ornati wrote: the ERESTARTNOHAND thing is handled in arch specific signal code, In the signal handling path yes. Right. Not always in the case of select, though. Check core_sys_select: No, even

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread Neil Horman
On Mon, Jan 22, 2007 at 08:03:53AM -0800, Linus Torvalds wrote: On Mon, 22 Jan 2007, Neil Horman wrote: On Mon, Jan 22, 2007 at 02:59:56PM +0100, Paolo Ornati wrote: the ERESTARTNOHAND thing is handled in arch specific signal code, In the signal handling path yes. Right.

Re: [PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-22 Thread bert hubert
On Mon, Jan 22, 2007 at 11:24:06AM -0500, Neil Horman wrote: The error was reported to me second hand. I'm expecting a reproducer (although to date, I'm still waiting for it, so I may have jumped the gun here). In fact, I've asked for a repoducer weeks ago and nothing happened, nobody

[PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-16 Thread Neil Horman
As it is currently written, sys_select checks its return code to convert ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and so if select is called from userspace with a NULL timeval, then it is possible for the ERESTARTNOHAND errno to leak into userspace, which is

[PATCH] select: fix sys_select to not leak ERESTARTNOHAND to userspace

2007-01-16 Thread Neil Horman
As it is currently written, sys_select checks its return code to convert ERESTARTNOHAND to EINTR. However, the check is within an if (tvp) clause, and so if select is called from userspace with a NULL timeval, then it is possible for the ERESTARTNOHAND errno to leak into userspace, which is