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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 BE6B6C4363A for ; Thu, 29 Oct 2020 01:12:14 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 366C920725 for ; Thu, 29 Oct 2020 01:12:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="vciGCxCg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 366C920725 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lists.linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=containers-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B644686130; Thu, 29 Oct 2020 01:12:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8hFef-agLHNc; Thu, 29 Oct 2020 01:12:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 0080686499; Thu, 29 Oct 2020 01:12:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E33C1C0859; Thu, 29 Oct 2020 01:12:10 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4DD77C0051 for ; Thu, 29 Oct 2020 01:12:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 47C7487371 for ; Thu, 29 Oct 2020 01:12:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sSq1zfGXPyFh for ; Thu, 29 Oct 2020 01:12:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by hemlock.osuosl.org (Postfix) with ESMTPS id AE4CD8736F for ; Thu, 29 Oct 2020 01:12:08 +0000 (UTC) Received: by mail-lf1-f50.google.com with SMTP id i6so1238609lfd.1 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=LUIGTbPcS1Xby1fpcSO2zg9nyf2x+CA5VILQTlyVyzzw3kYURVW5J6KF2zlkHo0Xnd VbWb46dzny5/b83D8VjrWlr1fHW8usftgfDb5qCNIqqCiaq7CCbnXfISmV7sNIbYKhMy qbeHrT6NvWgZ4gg8mMOYMLDixHs/3WLPhlLPysfjl9YKs4FVxh31hdyWUc/x5AxjlJzX eRwV499aeUDcQMCT7Ul0dzSeH7uCt/5agfwkf2oj/avFVC00TN5f0hh9PcXVa8zWeG4x QLoYs3A6Si9mQVdHVgByR0UDn5Cnut+J1XNc8Acyyq5ZWRkOR633gg/a5yH9HSB4L4kj ZWfw== X-Gm-Message-State: AOAM533IHa1RhjACfS07a2j0zAyuFb3p8qwuvhHFFBfc689sD/bW56L/ IwxzGJBjRWHcvY8bBIb92fBwRdFN6FxX2FAZf9N4nA== 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> 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: linux-man , Song Liu , Will Drewry , Robert Sesek , Daniel Borkmann , Giuseppe Scrivano , Linux Containers , lkml , Alexei Starovoitov , "Michael Kerrisk \(man-pages\)" , bpf , Andy Lutomirski , Christian Brauner X-BeenThere: containers@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux Containers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jann Horn via Containers Reply-To: Jann Horn Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: containers-bounces@lists.linux-foundation.org Sender: "Containers" 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? _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/containers 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 8D758C4363A for ; Thu, 29 Oct 2020 01:15:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27F932072E for ; Thu, 29 Oct 2020 01:15:48 +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 S2391026AbgJ2BMM (ORCPT ); Wed, 28 Oct 2020 21:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404300AbgJ2BMJ (ORCPT ); Wed, 28 Oct 2020 21:12:09 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61FF6C0613D2 for ; Wed, 28 Oct 2020 18:12:08 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id h6so1227623lfj.3 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=dQgWCquPiUTQ4tc7LhlBBwiA8LIUwt16aX2o39rp5L+wRDMW0MUFJlUdEd0D4Cs0U6 2USEjOsVfFYECeVeL6p8J6g3WPnjlCTAqyOj8tKyb0ICTpChFZ/77aqeNy07XP631Sni zU0lOqiqH5kizHATI+vLSVxa147elu8CwY6w52SvFN/fztuKi3KJunH9mFgY+EMyN5vB q9coWSefWHCSVEwWZsmPbx36zC6LXukezltOx60GOvg+3CCl8GaOpFGhpdWHC+iDLAIX SGezpK7LahvRoWbui3F2ZuU4WlctEv5uee6Bh+FXTYWYvVc6TsA+Wr+ZRoCzHz0zTj4h qoMA== X-Gm-Message-State: AOAM531phJeBPmOqIREBiJwU8GhZBX4tPLXtXEdulLiSHQh4tf36Ir2r Mxt8Cx5La9PskVIdH460IepWkaW7nnq1qeQifYYHpw== 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-kernel@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?