Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2266337yba; Mon, 22 Apr 2019 03:41:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9rxleCYiOXfv2LRcR3hYy1rQsDu2TLo4gr1OqHCJcWoy6o5wN+dbta7joNvDd5Y05CtPz X-Received: by 2002:a63:cc0d:: with SMTP id x13mr18204778pgf.280.1555929685611; Mon, 22 Apr 2019 03:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555929685; cv=none; d=google.com; s=arc-20160816; b=rMB4s2UJV2JiXfXjTendahSUNNalvuJ+OoEvGhd1zHU+GVsM2v6D89uumvzhQp8smN Gqay3WgH3tppCiRW4woysYlmjTb8H+DEHbF8cJEeihtsswq3XWgHflIJ7K60xh4vdskH 3zB7Zl4wzXj9X5FIbZsMOIPl34ST0UIvxdnfHA79iw9smVYxxch0yU+ADD90tbv/Tzcb DEdprQAYrA0qwmoSO7Jr7orBYkWqYIb5XnAc4xXxDFywV8xL8SKVF8/Zvrmfv9GJgB5e KVEHWBZrevMrw42Vy9QuB4azdtQ/eVZe/nJRCLqpL+wsUFLctpJS+ILK1N6HEvsedgE6 BZyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4rWXg1dzH1/8yZZSlBOjiEiuiUUWVE78MmUlO9qZyjI=; b=SSeswqTtobhuz9Emh6U3lqOwjO2bBJFMhojjf+s667J6fKdhyUasuc1G7K4HIpuzGD 6zt7BknTSHgrcDJIa3PyOMGjrzPjVe9EahsLvDh6m8FpTU0wViAXUBTHc8dKOxkUDYry ps8F2h304BFo4nW+ZSYtqFH0Baahu/FXHMhn2Tmp6o/7qWx6vQ+9tEt1LkAhTS3C9zjF zwSeQSoOG7I91CKE7CipxCTaR8vuWkre60vjKyyYT5akYsZdIrO348XB8z5bKxGaiJuC nlLwYdHiR3Gjb3ifpZdQAUsyhOjZeaL0YZVEfptp4xUWflZVryuSbyRN/2e9bQWu8mMw SDIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=b8QPhj9V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si11686761pgq.293.2019.04.22.03.41.10; Mon, 22 Apr 2019 03:41:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=b8QPhj9V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727174AbfDVKhT (ORCPT + 99 others); Mon, 22 Apr 2019 06:37:19 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42576 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbfDVKhT (ORCPT ); Mon, 22 Apr 2019 06:37:19 -0400 Received: by mail-lf1-f66.google.com with SMTP id w23so8628887lfc.9 for ; Mon, 22 Apr 2019 03:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4rWXg1dzH1/8yZZSlBOjiEiuiUUWVE78MmUlO9qZyjI=; b=b8QPhj9V37Y8sqX927Pjrce6uTf08Mm1qygRByTBVuqZvrwZpQbNzOg/yl0ad0ao2f 7PoedmxAo/rx7fpdvTZbG6XNccEXGGhTDEVVgCP1Z23G7KR+npNE270+go4jqkDUDqC3 3LfK4HRCr9mUGNzDXbBIPb+3f3LE2P3my1upEvL7nXEgOQ/eRHMrhrg3Hbw5kOfh64Hm NwqgODk2Lgy1oJM2n/Iw9pEV26CzITwDwvzXNfPf8MExohKFUY3Pvnl+0ZPdlxxFWYKE DdBJ+H4QrXoRFWOgRACSbxoUORm+Q60WLejLFNSDagodsIiui96BzDk/sGuKSvp2NBT+ 5oiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4rWXg1dzH1/8yZZSlBOjiEiuiUUWVE78MmUlO9qZyjI=; b=AxAsHZwKUbNpCgSD462kBQuljER6JtywmQ8uer1RHsKZYIBJ94ejiphp7PySV5M0Vg /JaRN3BIO4+VLfRqw8KGgFA1KZde7eLw54ThHy956b0Z+e7KJwcF+ZljK5KMdmaLLUvz kb1HpA1QIkjG+YE8soF2olx3QW2JLxlIbjTvYmvZVbjNEB5YrB4DR9Vx4jcr4V1HGTd2 6gdGbUVxnKxwUDHJdBda1dQXZq3Re+OevyggkOJw5+8kVYLs3W+EaiczKzKQtKJgkD2L b1uuk3jMNlxFXsFuUH5P6BffhsX8GcRqBqhx3YKtseHDTWPrP/xgLLKa6fO15KQLZt0r xptA== X-Gm-Message-State: APjAAAX5g9PaHLnsmVYgdeH2+0QjhRxN04Aa0dSb8nyp4eBPZB8LJBcV bo1nh1jqPruk9und4XMT/Dp9oFl7Xf0Z2DrZmuroLQ== X-Received: by 2002:ac2:5307:: with SMTP id c7mr1040291lfh.58.1555929436962; Mon, 22 Apr 2019 03:37:16 -0700 (PDT) MIME-Version: 1.0 References: <20190422065623.49364-1-weizhenliang@huawei.com> In-Reply-To: <20190422065623.49364-1-weizhenliang@huawei.com> From: Christian Brauner Date: Mon, 22 Apr 2019 12:37:05 +0200 Message-ID: Subject: Re: [PATCH v2] signal: trace_signal_deliver when signal_group_exit To: Zhenliang Wei Cc: "Eric W. Biederman" , Oleg Nesterov , colona@arista.com, Andrew Morton , Arnd Bergmann , Thomas Gleixner , Deepa Dinamani , Greg Kroah-Hartman , linux-kernel , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 22, 2019 at 8:57 AM Zhenliang Wei wrote: > > In the following commit, removing SIGKILL from each thread signal mask > and executing "goto fatal" directly will skip the call to > "trace_signal_deliver". At this point, the delivery tracking of the SIGKILL > signal will be inaccurate. > > commit cf43a757fd4944 ("signal: Restore the stop PTRACE_EVENT_EXIT") > > Therefore, we need to add trace_signal_deliver before "goto fatal" > after executing sigdelset. > > Note: The action[SIGKILL] must be SIG_DFL, and SEND_SIG_NOINFO matches > the fact that SIGKILL doesn't have any info. > > Signed-off-by: Zhenliang Wei Just a nit below otherwise Acked-by: Christian Brauner You should probably make the line: commit cf43a757fd4944 ("signal: Restore the stop PTRACE_EVENT_EXIT") a Fixes-line right above your commit: Fixes cf43a757fd4944 ("signal: Restore the stop PTRACE_EVENT_EXIT") > --- > kernel/signal.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/signal.c b/kernel/signal.c > index 227ba170298e..0f69ada376ef 100644 > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -2441,6 +2441,7 @@ bool get_signal(struct ksignal *ksig) > if (signal_group_exit(signal)) { > ksig->info.si_signo = signr = SIGKILL; > sigdelset(¤t->pending.signal, SIGKILL); > + trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO, SIG_DFL); > recalc_sigpending(); > goto fatal; > } > -- > 2.14.1.windows.1 > >