lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Jun 2013 22:06:23 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Denys Vlasenko <dvlasenk@...hat.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] epoll_[p]wait: fix spurious -EINTR on ptrace attach

On 06/25, Oleg Nesterov wrote:
>
> On 06/25, Denys Vlasenko wrote:
> >
> > Before this change, epoll_wait and epoll_pwait
> > spuriously return with -EINTR on ptrace attach.
> >
> > By analogy with poll syscall family, epoll_[p]wait should be interruptible
> > by signals regardless of SA_RESTART, therefore, this change
> > makes them return -ERESTARTNOHAND if timeout has expired.
>
> Denys, I am not even going to actuallu read this patch, but I think
> you should redo it in any case... And you need to cc maintainers.

Yes... but when I look at it again I think that "timeout" logic is
still wrong.

	restart_block->epoll.timeout = rem_msec;

this obviously means the remaining timeout, yes?

If yes, this is not right. Suppose that we return ERESTART_RESTARTBLOCK
due to SIGSTOP. The task can sleep in TASK_STOPPED "forever", we should
not restart with "timeout = rem_msec" after that.

You need the end_time logic like sys_poll() does.

> Because I believe we should cleanup fs/eventpoll.c first, I'll try
> to send the patch(es) soon.

Please see the patches I sent.

> > In order to define a "sigset_t ksigmask" member,
>
> You do not need it. But the reason is not clear until the cleanup.

I take this back, this is not as simple as I thought... and perhaps even
not right.

However. Probably you can replace has_ksigmask + ksigmask by
"sigset_t __user *sigmask" pointer?

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ