RE: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Linus Torvalds
> Sent: 05 June 2019 18:25
> On Wed, Jun 5, 2019 at 8:58 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> >
> > To simplify the review, please see the code with this patch applied.
> > I am using epoll_pwait() as an example because it looks very simple.
> 
> I like it.
> 
> However.
> 
> I think I'd like it even more if we just said "we don't need
> restore_saved_sigmask AT ALL".
> 
> Which would be fairly easy to do with something like the attached...

That would always call the signal handlers even when EINTR wasn't
being returned (which I think ought to happen ...).
The real purpose of restore_saved_sigmask() is to stop signal
handlers that are enabled by the temporary mask being called.

If a signal handler is called, I presume that the trampoline
calls back into the kernel to get further handlers called
and to finally restore the original signal mask?

What happens if a signal handler calls something that
would normally write to current->saved_sigmask?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux