Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp298695pxx; Thu, 29 Oct 2020 02:59:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyobuvs1h0JbvX/MWYQqVA0GHUJg/1IHWax8njKYS7kEONIWSQc4z+3BrwkVAPOah9TUs87 X-Received: by 2002:a17:906:95c5:: with SMTP id n5mr3325829ejy.111.1603965585982; Thu, 29 Oct 2020 02:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603965585; cv=none; d=google.com; s=arc-20160816; b=Zdg5/1AR2rgSNXC+wJzIzwYvKBAQfX2JPiyDddrNK0p5oJjF8wZLerv5aVsTnTyEwv Q2QSvs4BAi3JudEQXc0FoGDCk4lCyjrZN5OhcsBXh9L6wQssEgBk2V2pEQYwaAPSpKvX IgOzODAhfZ8v+V5zXqe/+0ftDTrXPy9aLSkvqtRwI7hrRQ8jUTGEAlQJbT4sEuZOSlem r5NvW/5yHCDiXHEd7JcElcJbg2HTjK+8UnpImnUwCTJyTT8A6MSYtgI0duz26NfdUj/v BoYLjB2YARMiMNGphd7gUnNkhIdpDogILr5jd7IPT5mzmo9YfvWpi1udlYEe61W3IQ9R yeuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6zGOuhTIRZSvVyxx3m4aE8CgCO2YW8w7ueb9xYPds3c=; b=yf++KQBlWrOfOFLy75Vi8lW2m0F/okv6zvkpG73xu/VXiCzQGDY1KiaynWm1ogo1o8 EHgtNurtnwsoGXGNymraUWWutgetQj+QIREudd5TxGS/qbr6iQAglHquqflwWdq+ZrAx GRFc6nNj6Q7KtMFVImEHSpMitOJgT4Fzv4q0HVysBrwBQwD+aomOohIG9s3kNXHbAKKQ xMHTLljHQm5z610UylDpZdGeRZyOi+V1Cxz6xLZMzRarlwGtWPh1zF4VPE1p5+pyMubt 5w2FN1Qztg5uiJiAjRwPnP/d350jQ64dCbUYgtOpZHaMELkgkI3nI4JsapX9bXVjVyOl 9EJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SEdMz9fs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t6si1328461ejr.744.2020.10.29.02.59.23; Thu, 29 Oct 2020 02:59:45 -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; dkim=pass header.i=@chromium.org header.s=google header.b=SEdMz9fs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389865AbgJ1W6Y (ORCPT + 99 others); Wed, 28 Oct 2020 18:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389676AbgJ1W4J (ORCPT ); Wed, 28 Oct 2020 18:56:09 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C22C0613CF for ; Wed, 28 Oct 2020 15:56:08 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id r10so369040plx.3 for ; Wed, 28 Oct 2020 15:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6zGOuhTIRZSvVyxx3m4aE8CgCO2YW8w7ueb9xYPds3c=; b=SEdMz9fsLWNQgMVzf4o0RAPD/AcIAPbuNHJfefzMBnk/O9d9g6sgbDmqXfCec5Xzxj caBrjlmHD8fifIVTuqhHxUI5XhRh2T890Af5tLexqvSiZ266TQyAe+pQq/Xy1hRXF9YR +U+lTkSiEjRN3SU9Xq1u0+VGj18uqELgouFRA= 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; bh=6zGOuhTIRZSvVyxx3m4aE8CgCO2YW8w7ueb9xYPds3c=; b=WU9s12+jIybezqFJtmoCYSG/oolFupjnQ5RZT1FdfX65025bb7kRqnGL41KQG+/TMc CFYrdZQErGtdxiFGauQ6fDEdvZ1DERQ1OjU82Q+Q0miWvdZgMyweyg5t4jQY1XNsZVnq eQcyl5ZBk+82ZayHunM7DVKGogFNOxWbxuNMyjydeBYMviokR9FIYmPTygUz0qJT4k7I hnFRN972bjuWs4UDqFBv9pIV9MsLxLpw1bWss06tQs7KF0MAPclJrUBRzqRpcuMxedTV U4bgLLO0ANHV2mf0Gvt9gOdT2tMGcf4eEZBKfOEzxUDUZWWYKIfTB/XP/M2Lebx2iggX qexQ== X-Gm-Message-State: AOAM531syzXwQQmtXhTHGrNpOEtqn1gTOzWVY4KkpkVB7An6xxTVgR/Z yKHcLg8kVtvf2UsCktD9nKzUwQ== X-Received: by 2002:a17:902:b90c:b029:d6:868d:f566 with SMTP id bf12-20020a170902b90cb02900d6868df566mr913093plb.2.1603925768287; Wed, 28 Oct 2020 15:56:08 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id m129sm637972pfd.177.2020.10.28.15.56.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 15:56:07 -0700 (PDT) Date: Wed, 28 Oct 2020 15:56:06 -0700 From: Kees Cook To: Jann Horn 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 Subject: Re: For review: seccomp_user_notif(2) manual page Message-ID: <202010281553.A72E162A7@keescook> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Kees Cook