Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10661700imu; Thu, 6 Dec 2018 04:56:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/UL29mmLX6L4lp/77cS44HKEpewafM3gjj67JFiWNdE4VUOtiKN3IMuAp+MQWlh9RcUkHJ5 X-Received: by 2002:aa7:81d0:: with SMTP id c16mr28130186pfn.153.1544101003098; Thu, 06 Dec 2018 04:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544101003; cv=none; d=google.com; s=arc-20160816; b=zRE2K/1sHzu1WYA7R/ld9Ju1i44v5lIuGksm1kq2qs30pDQ5XZPVGiWvQ6PZY5Ng1K gsGNljMDesk21aaAgHz5Jjf9Lpwru1DXKoUGF2W5ldSnQ/+53n6jMPs8pVRYBKxF+CgY WLd0mk5zkxYGi4TpQzVu/ywJqUpASK34gyDrBZ7/oCVvE7KGdWIOL+TJvXyYtAyPpPTs OFFWvMb/ZK+Tzgu8wqm2d/xZ6t4hwAUv4GMC6WPitFftNYm3mIC0ieFBaH4yMBPm11bb 7gNmNL4Qo4ThenuPyF8JYdaKhl7jKXcxv1a+njYCgJF5M1AQienWO5hH+FkhwFKq2uld jIGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jnhVml/Wvuu6M545Ryvy3sGsPX+FJeAhKdltS70izBQ=; b=kF1LjaUu1swq0gX6AiVVojTUmzWVipyFnM4gsBX18XB0rqY00mMlV/D6LsC7ZSOaB4 aradLpzhW5UeTp18ldGlEzgmqd/cPxTs0/hlnjXAVtvSHrP8xJH+w8XYMaKkN/WpFDEG J4AbwL57QdRhcxatkdTbZUMb0DHn/SrNQMIkoMVQMdE+ME27gq7Hu9LZR0g2cPko0Osq CLQp9bWOdsucJonsVzLhubn/IctmkoXAmXiOGbfdp4rd9pW35OpFqM7MAtj7+IbE0B+h T3YEBew9mM0TZ3WJHgaJ1Po96Wo5aGi1IEI6fUBeaTHDw1k3bCX+rHRMIIeVsafJQiiH i9uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=eBzhy34m; 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 p3si235032pgi.0.2018.12.06.04.56.27; Thu, 06 Dec 2018 04:56:43 -0800 (PST) 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=eBzhy34m; 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 S1729664AbeLFMyJ (ORCPT + 99 others); Thu, 6 Dec 2018 07:54:09 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:32984 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729069AbeLFMyI (ORCPT ); Thu, 6 Dec 2018 07:54:08 -0500 Received: by mail-pl1-f196.google.com with SMTP id z23so146590plo.0 for ; Thu, 06 Dec 2018 04:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jnhVml/Wvuu6M545Ryvy3sGsPX+FJeAhKdltS70izBQ=; b=eBzhy34mQsM0UzyLHWOwfy4NaAYo6VzG3DOazN86pVL6RkIZk9Sy95ZbL5gupBlip+ itgIc8ZAHlFgvdbn1boPxLMlmBCiAE6xessfW0I9Jr15eHZV0ggLAzKyD4e7eCyoDRzR SPRgmOKorMjtUvouprkzb/hneXbbAjKNlX1H/iMulJtrfKKoyv4kHC/Je60u2v5IeODZ IA3J2WLjDsEJb6S+nWqZVZOd26XYHAm0xd8mkcfTSnkRC3b49gQf0vSOX3QdILFX/T1L Ql8ZMK9VmTDzdsZZY9t+P1hC6WUNVfB6dxKWn8ue1dMcLVGsnVBuOrZyOcFTwCzr3sf8 8L8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jnhVml/Wvuu6M545Ryvy3sGsPX+FJeAhKdltS70izBQ=; b=m6FT9J0sqeRjv6siv+EWN5onfEKosoB0zamhUZJAamKcjsZyzz+ZP2BMkPj+5RaGBf GkFcrc2FkKfjRePvoqznDAAeO5iYkqYEuC2OUG/Uuynd0jezKOfZegzLM4/6DzGwNh+p vat3X0H/lBfcoDxmMnP1p3JvGSNb7wnYWCsZ6+kVW9b9DF2r71/tEZroPkHi1RMOxqAW jwS8t6pwShLGqEhhTqc/rCptiYRUOwDgHd9oD33ltKgCbxMibylBnaQdUliu6h2gZTVy XuF20s60mu6EDtaKufUMEZgiTuZqJOATyxlzJhlp/eVo8B5FBjdgbfbn1DDoFdH1nbyG A/6w== X-Gm-Message-State: AA+aEWZ+6qQek08gOpYHN5BcakU4848EWeIsFX6ilmGJNJ+8tT4r4wVm m8U7LdTu+b9VuJS+1Yqp15cybw== X-Received: by 2002:a17:902:1105:: with SMTP id d5mr27017811pla.47.1544100847528; Thu, 06 Dec 2018 04:54:07 -0800 (PST) Received: from brauner.io ([2404:4404:133a:4500:b824:a031:b50e:f401]) by smtp.gmail.com with ESMTPSA id l19sm1600297pfi.71.2018.12.06.04.54.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Dec 2018 04:54:06 -0800 (PST) Date: Thu, 6 Dec 2018 13:53:57 +0100 From: Christian Brauner To: Florian Weimer Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, luto@kernel.org, arnd@arndb.de, ebiederm@xmission.com, serge@hallyn.com, jannh@google.com, akpm@linux-foundation.org, oleg@redhat.com, cyphar@cyphar.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, dancol@google.com, timmurray@google.com, linux-man@vger.kernel.org, keescook@chromium.org, tglx@linutronix.de, x86@kernel.org Subject: Re: [PATCH v4] signal: add taskfd_send_signal() syscall Message-ID: <20181206125354.ef3zlg3o75w32ymx@brauner.io> References: <20181206121858.12215-1-christian@brauner.io> <87h8fq7s84.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87h8fq7s84.fsf@oldenburg2.str.redhat.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 06, 2018 at 01:30:19PM +0100, Florian Weimer wrote: > * Christian Brauner: > > > /* zombies */ > > Zombies can be signaled just as any other process. No special error will be > > reported since a zombie state is an unreliable state (cf. [3]). > > I still disagree with this analysis. If I know that the target process > is still alive, and it is not, this is a persistent error condition > which can be reliably reported. Given that someone might send SIGKILL > to the process behind my back, detecting this error condition could be > useful. Apart from my objection that this is not actually a reliable state because of timing issues between e.g. calling wait and a process exiting I have two more concerns and one helpful suggestion. First, this is hooking pretty deep into kernel internals. So far EXIT_ZOMBIE is only exposed in kernel/exit.c and I don't see enough value to drag all of this into kernel/signal.c Second, all other signal syscalls don't do report errors when signaling to zombies as well. It would be odd if this one suddenly did. Third, if this really becomes such a big issue for userspace in the future that we want to do that work then we can add a flag like TASKFD_DETECT_ZOMBIE (or some such name) that will allow userspace to get an error back when signaling a zombie. As far as I'm concerned, this is out of scope for an initial implementation. We are going to use fds for tasks that's enough excitement for one patchset! > > Rest looks good to me (with the usual caveats). I take it that's your way of saying Acked-by? :) Christian