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 20:46:19 +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, 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.

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

> In order to define a "sigset_t ksigmask" member,

You do not need it. But the reason is not clear until the cleanup.

> +	if (sigmask) {
> +		ksigmask = *sigmask;
> +		sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
> +		sigprocmask(SIG_SETMASK, &ksigmask, &ksigsaved);

sigprocmask() should not be used. Again, we need cleanup.

> +	}
> +	else
> +	/*
> +	 * If we changed the signal mask, we need to restore the original one.
> +	 */
> +	if (sigmask) {
> +		sigprocmask(SIG_SETMASK, &ksigsaved, NULL);
> +	}

cough.. in this case you should also update Documentation/CodingStyle ;)

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