From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05B67C4363A for ; Tue, 27 Oct 2020 06:22:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F8D9207F7 for ; Tue, 27 Oct 2020 06:22:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WHPoAqPE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506316AbgJ0GOI (ORCPT ); Tue, 27 Oct 2020 02:14:08 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:37565 "EHLO mail-wm1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506314AbgJ0GOI (ORCPT ); Tue, 27 Oct 2020 02:14:08 -0400 Received: by mail-wm1-f41.google.com with SMTP id c16so219330wmd.2; Mon, 26 Oct 2020 23:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jfo31Pg0Y7mNoQfq9W2rm3LaBQTFU19PRMYhqK7FonA=; b=WHPoAqPE0Dd/RhKzTIxJwQH+MFeHpNXlvqU0h7kdlg1bE8i0aPbIeAZsk3hw1vgRip TQuBp4mC1gN35ZWzblEla1HJM8N6X7WKrWXST8kLDJqgH6QmT0N62BWUQc27l21rQZRq jVOKJjyoJdGIgtp4tJvmXDvChbS2xUqO8q3o+hpykn6hchir4SpuhRCH/uzoLfoqWsaG pd5iNEVN4FyK7ck56tlLqUQfijGNK6kBRDydA0jMzNA6pB0xG+y3qej+9mA6DVxDuJHR XaTtm5fjg8vmn1XStmo1KumJU/wBhVJ+ZDsH9Orr26Q+gTnUN4rpg5i67wjxI/966aDn lfoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jfo31Pg0Y7mNoQfq9W2rm3LaBQTFU19PRMYhqK7FonA=; b=UprbWufSixD7nRQ/upOurjOOHKWXM37g1N5SGjjc3J20n7hUi/4fAk3ndq9AQ7Ou2t Bg+vLkDaa/c+Yiu0J5HYi5GyrXy9ItUTQgTT0GBntHMObNijZm+bVFQieVPlglhWGpYl qjjqTH2UGJgCCdgmUeEeKIkHP3/GLgPourbUS4koRVlHQBFwOPBBXoNrtFEMdAI/gxng sp2qTwACV2dcgk+TfAbO2SXTQCodD0DzDeoWwN0Ewq0Aym7szeD4hhSe+ln3Wqwv/UCt zvUiJJfBWOP9gONONy8UuG4Ul8qp3ZHDdK1f1dT1/h5VeEViR3oaWhkpKv/tzXmHm/y9 sl9w== X-Gm-Message-State: AOAM530LvzEEIFDIMTyDBP8UOlf4ht0fusVWrucIclgEzbzi3Wo1AuM1 ExJ+symxDo4PusQVEwfjOds= X-Google-Smtp-Source: ABdhPJyeBBAzzf4v0qJDy0pr93s4VjEbFAKQ9XmS93oq+JSHL537pXNmrsKz2g4mKxXCEYsD92OKYw== X-Received: by 2002:a1c:b486:: with SMTP id d128mr813191wmf.164.1603779245705; Mon, 26 Oct 2020 23:14:05 -0700 (PDT) Received: from ?IPv6:2001:a61:245a:d801:2e74:88ad:ef9:5218? ([2001:a61:245a:d801:2e74:88ad:ef9:5218]) by smtp.gmail.com with ESMTPSA id v189sm622729wmg.14.2020.10.26.23.14.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Oct 2020 23:14:04 -0700 (PDT) Cc: mtk.manpages@gmail.com, Tycho Andersen , Sargun Dhillon , Kees Cook , Christian Brauner , linux-man , lkml , Aleksa Sarai , Alexei Starovoitov , Will Drewry , bpf , Song Liu , Daniel Borkmann , Andy Lutomirski , Linux Containers , Giuseppe Scrivano , Robert Sesek Subject: Re: For review: seccomp_user_notif(2) manual page To: Jann Horn References: <45f07f17-18b6-d187-0914-6f341fe90857@gmail.com> <20200930150330.GC284424@cisco> <8bcd956f-58d2-d2f0-ca7c-0a30f3fcd5b8@gmail.com> <20200930230327.GA1260245@cisco> <20200930232456.GB1260245@cisco> <656a37b5-75e3-0ded-6ba8-3bb57b537b24@gmail.com> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Tue, 27 Oct 2020 07:14:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 10/26/20 4:54 PM, Jann Horn wrote: > On Sun, Oct 25, 2020 at 5:32 PM Michael Kerrisk (man-pages) > wrote: [...] >> I tried applying the patch below to vanilla 5.9.0. >> (There's one typo: s/ENOTCON/ENOTCONN). >> >> It seems not to work though; when I send a signal to my test >> target process that is sleeping waiting for the notification >> response, the process enters the uninterruptible D state. >> Any thoughts? > > Ah, yeah, I think I was completely misusing the wait API. I'll go change that. > > (Btw, in general, for reports about hangs like that, it can be helpful > to have the contents of /proc/$pid/stack. And for cases where CPUs are > spinning, the relevant part from the output of the "L" sysrq, or > something like that.) Thanks for the tipcs! > Also, I guess we can probably break this part of UAPI after all, since > the only user of this interface seems to currently be completely > broken in this case anyway? So I think we want the other > implementation without the ->canceled_reqs logic after all. Okay. > I'm a bit on the fence now on whether non-blocking mode should use > ENOTCONN or not... I guess if we returned ENOENT even when there are > no more listeners, you'd have to disambiguate through the poll() > revents, which would be kinda ugly? I must confess, I'm not quite clear on which two cases you are trying to distinguish. Can you elaborate? > I'll try to turn this into a proper patch submission... Thank you!! Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/