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=-5.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,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 3D1DBC433DF for ; Thu, 15 Oct 2020 11:24:10 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 9EA1C2080A for ; Thu, 15 Oct 2020 11:24:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GA8BbyLO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EA1C2080A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=containers-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2178587F89; Thu, 15 Oct 2020 11:24:09 +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 TteppgRmCjBO; Thu, 15 Oct 2020 11:24:08 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id AD94587F6D; Thu, 15 Oct 2020 11:24:08 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 982D5C0052; Thu, 15 Oct 2020 11:24:08 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 36A82C0051 for ; Thu, 15 Oct 2020 11:24:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 25D4C885CF for ; Thu, 15 Oct 2020 11:24:07 +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 BotjXa5zrzvz for ; Thu, 15 Oct 2020 11:24:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 434D0885A9 for ; Thu, 15 Oct 2020 11:24:06 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id n6so2937299wrm.13 for ; Thu, 15 Oct 2020 04:24: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=3I0P08vNaQzgXoL9rCvvnpgGw7KyV9D8ViZvp/Lcn6s=; b=GA8BbyLOTTUBvhKPL+heprvfYzsNBiCMAxJMYy0/AJJtI0lP01IeXgRR8yWgnVEDLc 8ldtbGqRI9P2uAUoL03HFwi5dWLVFJnZ3Aetj62avK/6Mo5xxpfsMHQy2BrvzpkyQgaR uYAskzZaFS+t+kkUVZJBnOeWGt4EqF/javGOQVJ2uEApe97rh5U5Zk16xL7XRhfYKPLE gtlsZvRXR0yfy9w9K8KFZp2zpixzNvKFfpTMhfHa/BcFgiuoc/POCluJybykDFIyfpXd gzaDaIDqZS7MuqVxMLrzVTye//Cs00bcFZpKDMZ/jlpPKK2iL+Hn5ImKPj5RW+deFPMY 1PvQ== 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=3I0P08vNaQzgXoL9rCvvnpgGw7KyV9D8ViZvp/Lcn6s=; b=LOrKSplofhwRMtM1B6nGBrii0wq3ObC3EnKrgl1JJZmNG7YMY4fVv4CgX9mfRrEskd EkgnTsik6hlSFOpORnTVIkecBZZ7706MzUv/3h5K1zEr9DLf8yp8tp3qcdMgLEH71j4q kbMJ36kwsmxYYoLJeUxwWg5kDQoKXa3sI6f0shZ0KKTc26O4MjQi4r7muBOKB9r1TUxE Edzk8vXtyU5UQxCVfnKiZv9B/mehR0rcunGUiUwsN6wcLyxwUsw9Fd10XBBjpob12FhW D7uxFR7kw+5CetXXYhikU6ztdLj2jFcXEYlnI1E2yjfrG9R+VJqmjuqZua4Mdzwd819r df2g== X-Gm-Message-State: AOAM533ASaz4DRMmu81Njv3VWBw8DK9lLnEuYReGJmvzWBwdiD/qldse OZ+/2SOeY7fGReZt848YA3g= X-Google-Smtp-Source: ABdhPJzb6M1OrC9nHpzbrwyV+nSGdr5lyNygxRFdgLbzIwScpgFYrjGw7EHJFCs1NG0j4AIYHz91Hw== X-Received: by 2002:a05:6000:18d:: with SMTP id p13mr3770081wrx.248.1602761044681; Thu, 15 Oct 2020 04:24:04 -0700 (PDT) Received: from [192.168.1.10] (static-176-175-73-29.ftth.abo.bbox.fr. [176.175.73.29]) by smtp.gmail.com with ESMTPSA id t83sm4373249wmf.39.2020.10.15.04.24.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Oct 2020 04:24:03 -0700 (PDT) Subject: Re: For review: seccomp_user_notif(2) manual page To: Kees Cook References: <45f07f17-18b6-d187-0914-6f341fe90857@gmail.com> <202009301632.9C6A850272@keescook> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Thu, 15 Oct 2020 13:24:03 +0200 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: <202009301632.9C6A850272@keescook> Content-Language: en-US Cc: linux-man , Song Liu , wad@chromium.org, Robert Sesek , Daniel Borkmann , Jann Horn , Linux Containers , lkml , Alexei Starovoitov , mtk.manpages@gmail.com, Giuseppe Scrivano , bpf@vger.kernel.org, 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: containers-bounces@lists.linux-foundation.org Sender: "Containers" SGVsbG8gS2VlcywKCk9uIDEwLzEvMjAgMTozOSBBTSwgS2VlcyBDb29rIHdyb3RlOgo+IE9uIFdl ZCwgU2VwIDMwLCAyMDIwIGF0IDAxOjA3OjM4UE0gKzAyMDAsIE1pY2hhZWwgS2VycmlzayAobWFu LXBhZ2VzKSB3cm90ZToKPj4gWy4uLl0gSSBkaWQgOi0pCj4gCj4gWWF5ISBUaGFuayB5b3UhCgpZ b3UncmUgd2VsY29tZSA6LSkKCj4+IFsuLi5dCj4+ICAgIE92ZXJ2aWV3Cj4+ICAgICAgICBJbiBj b252ZW50aW9uYWwgdXNhZ2Ugb2YgYSBzZWNjb21wIGZpbHRlciwgdGhlIGRlY2lzaW9uIGFib3V0 IGhvdwo+PiAgICAgICAgdG8gIHRyZWF0ICBhIHBhcnRpY3VsYXIgc3lzdGVtIGNhbGwgaXMgbWFk ZSBieSB0aGUgZmlsdG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I7IGh0dHA6Ly93d3cua2VybmVsLm9yZy9kb2MvbWFuLXBhZ2VzLwpMaW51eC9VTklY IFN5c3RlbSBQcm9ncmFtbWluZyBUcmFpbmluZzogaHR0cDovL21hbjcub3JnL3RyYWluaW5nLwpf X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpDb250YWluZXJz IG1haWxpbmcgbGlzdApDb250YWluZXJzQGxpc3RzLmxpbnV4LWZvdW5kYXRpb24ub3JnCmh0dHBz Oi8vbGlzdHMubGludXhmb3VuZGF0aW9uLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2NvbnRhaW5lcnM= 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=-6.1 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 959B0C433E7 for ; Thu, 15 Oct 2020 11:25:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 235DD2080A for ; Thu, 15 Oct 2020 11:25:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GA8BbyLO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728283AbgJOLYn (ORCPT ); Thu, 15 Oct 2020 07:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727736AbgJOLYG (ORCPT ); Thu, 15 Oct 2020 07:24:06 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4559C061755; Thu, 15 Oct 2020 04:24:05 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id n15so3011677wrq.2; Thu, 15 Oct 2020 04:24:05 -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=3I0P08vNaQzgXoL9rCvvnpgGw7KyV9D8ViZvp/Lcn6s=; b=GA8BbyLOTTUBvhKPL+heprvfYzsNBiCMAxJMYy0/AJJtI0lP01IeXgRR8yWgnVEDLc 8ldtbGqRI9P2uAUoL03HFwi5dWLVFJnZ3Aetj62avK/6Mo5xxpfsMHQy2BrvzpkyQgaR uYAskzZaFS+t+kkUVZJBnOeWGt4EqF/javGOQVJ2uEApe97rh5U5Zk16xL7XRhfYKPLE gtlsZvRXR0yfy9w9K8KFZp2zpixzNvKFfpTMhfHa/BcFgiuoc/POCluJybykDFIyfpXd gzaDaIDqZS7MuqVxMLrzVTye//Cs00bcFZpKDMZ/jlpPKK2iL+Hn5ImKPj5RW+deFPMY 1PvQ== 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=3I0P08vNaQzgXoL9rCvvnpgGw7KyV9D8ViZvp/Lcn6s=; b=BlA7mMVWPOwbuSgWiCVcztegh0VxCm8CVl+pPOlBIvi4mL7sK/wWN6oMnf5qPTx0FK F+E0Hg3z42oDJiCBJBrHckoN3F7CjU/2st2EP1rX88mU+h9eiYvYU0tMynhPtkd7Lytc C7y1gBLWsAlhIrKVrt5vM9bD2P/sxLonnupqt86ytVixNY1bBHDAVXfAiyjsHUpdeYdv 9h+wMHKOUoCHE/9h9f9T1Kph6Hv7lnNLguRSkAxv/ub7ftEEp0ocVNB1YfpNKyA0T50Z ROviLHwNeF82cuy6GZ+AbUMI2Qo1GuA/SUiufImcI3BmPYpYBmu27ipm5pms3bV9LLeU ncrA== X-Gm-Message-State: AOAM530oO6nLdW7qXeeNE8yJwgUHk/CddyfxVmAAw89Ve1DB4ZGgaHxf nrHaP764DyhuV4F4zpBN4k4= X-Google-Smtp-Source: ABdhPJzb6M1OrC9nHpzbrwyV+nSGdr5lyNygxRFdgLbzIwScpgFYrjGw7EHJFCs1NG0j4AIYHz91Hw== X-Received: by 2002:a05:6000:18d:: with SMTP id p13mr3770081wrx.248.1602761044681; Thu, 15 Oct 2020 04:24:04 -0700 (PDT) Received: from [192.168.1.10] (static-176-175-73-29.ftth.abo.bbox.fr. [176.175.73.29]) by smtp.gmail.com with ESMTPSA id t83sm4373249wmf.39.2020.10.15.04.24.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Oct 2020 04:24:03 -0700 (PDT) Cc: mtk.manpages@gmail.com, Tycho Andersen , Sargun Dhillon , Christian Brauner , linux-man , lkml , Aleksa Sarai , Jann Horn , Alexei Starovoitov , wad@chromium.org, bpf@vger.kernel.org, Song Liu , Daniel Borkmann , Andy Lutomirski , Linux Containers , Giuseppe Scrivano , Robert Sesek Subject: Re: For review: seccomp_user_notif(2) manual page To: Kees Cook References: <45f07f17-18b6-d187-0914-6f341fe90857@gmail.com> <202009301632.9C6A850272@keescook> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Thu, 15 Oct 2020 13:24:03 +0200 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: <202009301632.9C6A850272@keescook> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Kees, On 10/1/20 1:39 AM, Kees Cook wrote: > On Wed, Sep 30, 2020 at 01:07:38PM +0200, Michael Kerrisk (man-pages) wrote: >> [...] I did :-) > > Yay! Thank you! You're welcome :-) >> [...] >> Overview >> In conventional usage of a seccomp filter, the decision about how >> to treat a particular system call is made by the filter itself. >> The user-space notification mechanism allows the handling of the >> system call to instead be handed off to a user-space process. >> The advantages of doing this are that, by contrast with the sec‐ >> comp filter, which is running on a virtual machine inside the >> kernel, the user-space process has access to information that is >> unavailable to the seccomp filter and it can perform actions that >> can't be performed from the seccomp filter. > > I might clarify a bit with something like (though maybe the > target/supervisor paragraph needs to be moved to the start): > > This is used for performing syscalls on behalf of the target, > rather than having the supervisor make security policy decisions > about the syscall, which would be inherently race-prone. The > target's syscall should either be handled by the supervisor or > allowed to continue normally in the kernel (where standard security > policies will be applied). You, Christian, and Jann all pulled me up on this point. And thanks; I'm going to use some of your words above. See my reply to Jann, sent at about the same time as this reply. Please take a look at the text in my reply to Jann, and let me know what you think. > I'll comment more later, but I've run out of time today and I didn't see > anyone mention this detail yet in the existing threads... :) Later never came :-). But, I hope you may have comments for the next draft, which I will send out soon. Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/