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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 10 Aug 2018 07:15:28 -0500
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     <wen.yang99@....com.cn>
Cc:     <torvalds@...ux-foundation.org>, <oleg@...hat.com>,
        <akpm@...ux-foundation.org>, <linux-kernel@...r.kernel.org>,
        <ma.jiang@....com.cn>, <chen.shengyuan@....com.cn>,
        <zhong.weidong@....com.cn>
Subject: Re: [PATCH v6 6/6] signal: Don't restart fork when signals come in.

<wen.yang99@....com.cn> writes:

> ebiederm@...ssion.com <ebiederm@...ssion.com> writes
>> Subject: [PATCH v6 6/6] signal: Don't restart fork when signals come in.
>> 
>> Wen Yang <wen.yang99@....com.cn> and majiang <ma.jiang@....com.cn>
>> report that a periodic signal received during fork can cause fork to
>> continually restart preventing an application from making progress.
>> 
>> ...
>> diff --git a/kernel/signal.c b/kernel/signal.c
>> index 9f0eafb6d474..cfa9d10e731a 100644
>> --- a/kernel/signal.c
>> +++ b/kernel/signal.c
>> @@ -1121,6 +1121,21 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
>> out_set:
>> signalfd_notify(t, sig);
>> sigaddset(&pending->signal, sig);
>> +
>> + /* Let multiprocess signals appear after on-going forks */
>> + if (type > PIDTYPE_TGID) {
>> + struct multiprocess_signals *delayed;
>> + hlist_for_each_entry(delayed, &t->signal->multiprocess, node) {
>> + sigset_t *signal = &delayed->signal;
>> + /* Can't queue both a stop and a continue signal */
>> + if (sig == SIGCONT)
>> + sigdelsetmask(signal, SIG_KERNEL_STOP_MASK);
>> + else if (sig_kernel_stop(sig))
>> + sigdelset(signal, SIGCONT);
>> + sigaddset(signal, sig);
>> + }
>> + }
>> +
>> complete_signal(sig, t, type);
>> ret:
>> trace_signal_generate(sig, info, t, type != PIDTYPE_PID, result);
>
> I've migrated this patch and try to test it, but  I ran into a compile error:
>
> kernel/signal.c: In function '__send_signal':
> kernel/signal.c:1192:9: error: 'type' undeclared (first use in this function)
>      if (type > PIDTYPE_TGID) {
>          ^
> We may also need some patches, which pass pid type into
> __send_signal.

We most definitely need the the first 15 patches from my last series of
patches that push the pid type down.

I did not repeat them here because there is consensus that they
are fine working fine.

I have a branch with everything at:

https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git siginfo-testing

Eric

Powered by blists - more mailing lists