Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp67938pxk; Wed, 30 Sep 2020 18:09:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4jd4qQtD/K+Fi0Amva09opgkjCPPCl7H4jER9EEyZH7fSsz6+lPomFQUZa7YXxsb/qC9m X-Received: by 2002:a17:906:3e90:: with SMTP id a16mr5260935ejj.363.1601514563396; Wed, 30 Sep 2020 18:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601514563; cv=none; d=google.com; s=arc-20160816; b=bz6vmKnAh2WJeRUSxtP5WSaE9nQHz1syWf0bOABR55opG/iA59/u4naw6bFYVBjZPb 8fkk6eeNNVvQLrlz1uQPwLnwIdYkXEGAnxjVYM3pxEmnfYfzQM4lKf+TrbZ/ABOLXrIW BoQhPZexYKzNMs4eKKREa76ToF0f8Blt92PbMi8D8FJ5YbBiK45gZhrnzgYrlM89Z4qr yz4noSJGUNjeamZmaF4ukRGQ11n0F3K0eI8wJ0rSlW4yyNdXIDiEhuenKxih4H4ZRZse 1R9bYd2luNURYJAiwXlsd+UOQw/MBaWboozWgzzBsDeZ8oZHm7tQhxN/G6RUN4yJfQtF aHsA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2SYnU6v3oYukgTaFaNXeSl70n5vT6dh4JdPhOcC+8tg=; b=UmdWPZObqFoNHjnOKuUWbz/6mxoQ+3k8ihgfFn4RSmazeHyqITnEyWxqe9nX6fq+jK 0EwMlEwGs3e0XxDYro69gLwnLsgXWEA/RVmz6ZKLEjRLi8ZHrmKbsbTBSp2UoPhSUaYZ IHyBXjVEpXuU/fCuNyuQWOtQVvYIhDlM4uTbOl1q2zXL3Z1h+sFZ5sWYSWiKq0kn1Lh0 dAbwdCWPKlfVS4pdORhVpNbzNqwHC6Eg5NQy3neE+lAlBYiyLwgMmHBLcKUqU1wm1bot hm0LupbTHViOle2C/6Bl+74Pod5Q4I3P23+m5XOuSHuvIFMN0uuFFaKLJqt1UgywekyL HqXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VcrLyK8w; 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 o3si2339649eda.116.2020.09.30.18.09.01; Wed, 30 Sep 2020 18:09:23 -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=VcrLyK8w; 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 S1731839AbgI3Xj6 (ORCPT + 99 others); Wed, 30 Sep 2020 19:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731302AbgI3Xj6 (ORCPT ); Wed, 30 Sep 2020 19:39:58 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49441C0613D1 for ; Wed, 30 Sep 2020 16:39:58 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 34so2306630pgo.13 for ; Wed, 30 Sep 2020 16:39:58 -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:content-transfer-encoding:in-reply-to; bh=2SYnU6v3oYukgTaFaNXeSl70n5vT6dh4JdPhOcC+8tg=; b=VcrLyK8wd1YNEoEWQO1ETxp/ZpFdndf0Wn9IS/g8DF0Ee8PrUlTweuExL+J+4UveTt w/fw16Rtl+RQJ2aZZix8mnKbuiNc2DhbHWyKMUF6TR7KSyq1pOWNX40rF0hOESH412SO 3stnOYszARI3yHzCOhIuv8Z4vSibAzlmf2acY= 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:content-transfer-encoding :in-reply-to; bh=2SYnU6v3oYukgTaFaNXeSl70n5vT6dh4JdPhOcC+8tg=; b=O0+dgzpq9+kcx0mr94ddbFNXSLM9wIzWvuhJYVu4k8JdTr3pWezwbP66MofSldtBsR /TuSVyd4FbICUXKV9JmKfohIHAYXAMkQ60Je5M/L16tJzAPeJ4BjBc1LK3BkvlSHNGNl 0772Sa/U0PO6PMZ8ny39mxU1hSIRA2wo048mAtegGATFqLHXT8ZAgQu4rgfa6IeTa6Xh rZ4LzOvy0sAlV67SK15F7vJrcxoWGyHMmmdItYe+riRfhhpit+w7VhsO77Nxc5AplaCx 16Ezlw9u53bdo4wzsHxpK8O0DJLRHmC7/Gnp5uyMUQu774zhtvtBUjVWiNBFrs172KFi hmng== X-Gm-Message-State: AOAM531PvbkokpDhwQNM1nOAWzTkiQm12zpmBJPgXFxY/S94LRd6O8FK OjtMgbW8OnHBneEzhGt1k6VR+g== X-Received: by 2002:a17:902:8c8b:b029:d2:6356:8b43 with SMTP id t11-20020a1709028c8bb02900d263568b43mr4617767plo.34.1601509197774; Wed, 30 Sep 2020 16:39:57 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j9sm3322670pfc.175.2020.09.30.16.39.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 16:39:56 -0700 (PDT) Date: Wed, 30 Sep 2020 16:39:55 -0700 From: Kees Cook To: "Michael Kerrisk (man-pages)" Cc: 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 Message-ID: <202009301632.9C6A850272@keescook> References: <45f07f17-18b6-d187-0914-6f341fe90857@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <45f07f17-18b6-d187-0914-6f341fe90857@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 01:07:38PM +0200, Michael Kerrisk (man-pages) wrote: > [...] I did :-) Yay! Thank you! > [...] > 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). 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... :) -- Kees Cook