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=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 53C20C4363A for ; Thu, 29 Oct 2020 01:21:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E12EB20731 for ; Thu, 29 Oct 2020 01:21:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vciGCxCg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390961AbgJ2BMM (ORCPT ); Wed, 28 Oct 2020 21:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404299AbgJ2BMJ (ORCPT ); Wed, 28 Oct 2020 21:12:09 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4709AC0613CF for ; Wed, 28 Oct 2020 18:12:08 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id l28so1176177lfp.10 for ; Wed, 28 Oct 2020 18:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2+uYu86LDWGsnC4W37LGE2qpMcN2MpffcV3JWIw2MFQ=; b=vciGCxCgV8AP2QARHScqr2zKoGS/+nJtrToSziCQ8d8h1NRdDiev7b4FY2OwCqgP1d pQbxRv3nm4M5jbQFhB27QEFUsCLY1i6eh1m09u0GR/aIZBCnQqfxLzxjTF3jSSNq63Ix 7tc/61a9Eg7G4x1Q2ubkcaETyM84zF0DBSoX0Z35kXIp9RaUo5oEwdbRcGo1NCv5ThrS xv91Ll0nIZQR9E4a8eCFWpzRS93StI1OfrXVYHm3aQtiSQCjRfQnJM7yFQeATQ7e3KqK nI1O4QIZNutVL1kAoz9zNnzUTHY2AP0CtWCW2iHkQa6Wv2OlTNpHsTkIDscq6Ww8Qb6w b/Cw== 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=2+uYu86LDWGsnC4W37LGE2qpMcN2MpffcV3JWIw2MFQ=; b=KW9ULIEPyhTqo+1qnafCgYeAnKyMTJwJOUISH4WuedLeht4PRler37tC+yPDouZgFG S6tqg/Xc3X2Vp/TY92sjU4fXv3q6CT9mDhAKA6OPKYPRXleBRL6PjeQM5lWwg5asyBlR gZ+DwKdiSFJ/MgHbRYIl8s0RQmCbL3e55+LX5YV2WR4EWuhIEe0JOSO3tUkvhFzhpc9p J05x3RoCIHE0WEryNBHrUWEreAIxLF0oTbLraHSrpiCk5fuuk6utYE5RPE9Lmm2HomU3 QtmtYg0ozhnMg6LLkRrAAsR0hPpWC6C/d/mHD4a+40+0LpwfytyyRlYZO7PFGlk5umOy 4u7w== X-Gm-Message-State: AOAM5311maj4VTrqTDF0HHJTRz4jo3DEGBAr9nUgB2gQTOfus5Qjls0x oLG1XxSvm0WFAgt1Rk3RBVU+RJgoT612di5/jO2mXA== X-Google-Smtp-Source: ABdhPJzzc/J1JBJXAToRCeQHDdOVsoNE6U9yTJzDUPWdlDCEb1Uk4v5ySj0pBCeZjS4xxD+zSOrd96XH4omhzWIDEkE= X-Received: by 2002:a19:83c1:: with SMTP id f184mr559337lfd.97.1603933926604; Wed, 28 Oct 2020 18:12:06 -0700 (PDT) MIME-Version: 1.0 References: <45f07f17-18b6-d187-0914-6f341fe90857@gmail.com> <20200930150330.GC284424@cisco> <8bcd956f-58d2-d2f0-ca7c-0a30f3fcd5b8@gmail.com> <20200930230327.GA1260245@cisco> <20200930232456.GB1260245@cisco> <202010251725.2BD96926E3@keescook> <202010281553.A72E162A7@keescook> In-Reply-To: <202010281553.A72E162A7@keescook> From: Jann Horn Date: Thu, 29 Oct 2020 02:11:39 +0100 Message-ID: Subject: Re: For review: seccomp_user_notif(2) manual page To: Kees Cook Cc: Tycho Andersen , "Michael Kerrisk (man-pages)" , Sargun Dhillon , Christian Brauner , linux-man , lkml , Aleksa Sarai , Alexei Starovoitov , Will Drewry , bpf , Song Liu , Daniel Borkmann , Andy Lutomirski , Linux Containers , Giuseppe Scrivano , Robert Sesek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org On Wed, Oct 28, 2020 at 11:56 PM Kees Cook wrote: > On Mon, Oct 26, 2020 at 11:31:01AM +0100, Jann Horn wrote: > > Or I guess we could also just set O_NONBLOCK on the fd by default? > > Since the one existing user is eventloop-based... > > I thought about that initially, but it rubs me the wrong way: it > violates least-surprise for me. File descriptors are expected to be > default-blocking. It *is* a special fd, though, so maybe it could work. > The only case I can think of it would break would be ioctl-loop case > that is already buggy in that it didn't handle non-zero returns? We don't have any actual users that use the API that way outside of the kernel's selftest/sample code, right?