Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3225026pxv; Mon, 12 Jul 2021 12:17:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqRveY8noi2DsBoCHg42+khLcyYhBDZ3EjZOvwmxoZtITKL+xNa2oSEborSUapCzJCsB4S X-Received: by 2002:a05:6638:1356:: with SMTP id u22mr480421jad.39.1626117440142; Mon, 12 Jul 2021 12:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626117440; cv=none; d=google.com; s=arc-20160816; b=vc6VnHj6cOcYeAGZZopS/5KMzlLGHmhRAYIe2qbESXXb8ohOSeNs1GSfVvEeTsqzou X59YtJrFdHMgwLcpjsfligJTff2pOc0KYFQgxCDfY1tvycLsNOksWdecjti3IuvBZpFg VFKz1jxpgvVSx7f4HcJ9TASkIDTw66JLxv8/XQ11oz+a4LhsZINvMWKdbI1EeSNcG/E/ ouvlsI6VzvC/WqTSqNjf0Ut7rXfruplx9UT245yL727xfzcNiSItrFvjr27Na9G24AbX VqBMPGHTjIiUalU+jIIzGnWGsb8UZnmDhF2X5zyGaz1JY+ndbYUstLHIBE7xy7BBUy// wMjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=34vjyh3EmR9yoC4PVBy3qk5VobmR1UirwnfGcoBIZDo=; b=fbpCoVB0+N5KAcvxuHNtZV2BcPGOaOt4/XRNolaH2RkKzLdzyT5ynCnk6F1M7VbsKZ Sm1zqnTF0z8hASzsdayXvVISMOy55MroUtyFD2ZuTQ6Enlswjn1ZfR0/OUWcLNyo0fVD icGPquTk6yXNJ6t6+Oj6VwlT2OQXzEiV0p4O7nApDVq0lLijxVvJYVoRyGobhIE3HJGS MO0JnphTrmKSBt1vE2N5XgkRYbYHr8K1ifziTH43p+Hzg4D/Vf1Po+j5KLs3glE1DILo u99cFvuiTb86OBrhRRR4bfecjCd206MMHq6rt+fq0PGiGQjoi6VUGu32EJN5gTNgP1xe G+AQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si20219681ils.18.2021.07.12.12.17.08; Mon, 12 Jul 2021 12:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236328AbhGLTTY (ORCPT + 99 others); Mon, 12 Jul 2021 15:19:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233183AbhGLTTX (ORCPT ); Mon, 12 Jul 2021 15:19:23 -0400 Received: from a3.inai.de (a3.inai.de [IPv6:2a01:4f8:10b:45d8::f5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE3D2C0613DD; Mon, 12 Jul 2021 12:16:34 -0700 (PDT) Received: by a3.inai.de (Postfix, from userid 25121) id 63C0659F3A1E9; Mon, 12 Jul 2021 21:16:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by a3.inai.de (Postfix) with ESMTP id 5F16460E710FD; Mon, 12 Jul 2021 21:16:33 +0200 (CEST) Date: Mon, 12 Jul 2021 21:16:33 +0200 (CEST) From: Jan Engelhardt To: Suren Baghdasaryan cc: Florian Weimer , Andrew Morton , Michal Hocko , Michal Hocko , David Rientjes , Matthew Wilcox , Johannes Weiner , Roman Gushchin , Rik van Riel , Minchan Kim , Christian Brauner , Christoph Hellwig , Oleg Nesterov , David Hildenbrand , Jann Horn , Shakeel Butt , Tim Murray , Linux API , linux-mm , LKML , kernel-team Subject: Re: [PATCH 1/1] mm: introduce process_reap system call In-Reply-To: Message-ID: References: <20210623192822.3072029-1-surenb@google.com> <87sg0qa22l.fsf@oldenburg.str.redhat.com> <87wnq1z7kl.fsf@oldenburg.str.redhat.com> User-Agent: Alpine 2.24 (LSU 510 2020-10-10) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 2021-07-12 20:39, Suren Baghdasaryan wrote: >> >> The way I understood the request is that a userspace program (or perhaps two, >> if so desired) should issue _two_ calls, one to deliver the signal, >> one to perform the reap portion: >> >> uinfo.si_code = SI_QUEUE; >> sigqueue(pid, SIGKILL, &uinfo); >> uinfo.si_code = SI_REAP; >> sigqueue(pid, SIGKILL, &uinfo); > >This approach would still lead to the same discussion: by design, >sigqueue/kill/pidfd_send_signal deliver the signal but do not wait for >the signal to be processed by the recipient. Oh, so the only reason not to do that is because there is some POSIX specification that says the sigqueue API should be non-waiting for all possible parameter values (with an implied "present and future values!"), not because there's some hurdle to actually add a wait inside within rt_sigqueueinfo if the REAP flag is set. Gotcha.