Received: by 10.213.65.68 with SMTP id h4csp49173imn; Thu, 15 Mar 2018 09:11:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELuCeVEUamvWCgWxpnFRr5s1F6tfjUj6D4TdexHGTttdbXAOytQW1kJq0fEzqubyAWOSZ4dI X-Received: by 10.101.96.212 with SMTP id r20mr7129687pgv.139.1521130263052; Thu, 15 Mar 2018 09:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521130263; cv=none; d=google.com; s=arc-20160816; b=KzC+ZgWAVpxJk4EoG4ISbFpakPWnqb4DQSYHO78sus4olOP9+2ZAsrkOWn7QPQ3l+C /SYxUGAuYOn3SWPKoMjjkNd2anCxRXdc9TC213HaMXmBwbxmKftEFTIPOi/KpJRDpNtM iIeBxXxoKrKPhKlQQKNU96LMfhMyhpBqZyHg50SOx0clggI0GO0NOk0+bU9eEupMAHmN t5ATCuL+pLh07xnhrenpuLi5bU3NsBazI9p6aQo8O2IYP2tq+hBv9dhgKc8Jj6c/jtIQ 4P5D4Frg2hc+GnNnRPCVIpHKodoIZ1kifmOSUHyoLlGZfNCfezBTuwvFo/YpPdO1Q834 Rdrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=sp3nzVfCkYBO2ZEA5KaETVhvZqc9ECRQ+GwwQyb8S28=; b=zbeoGJbqzAj60EYbXmRs67pCsy3J1zFbyHFRnNkYe4IYTzG9HRFslsOuENP/U6ajMU MzJYPu02Pfx8mw8xTXv+6x7wCDeNuPJ4bN4QZtve54tFGhGQD/foNSTCXZY4cyvn+4r9 0zZSqmwJQOZV0oUysB8c5lvASrCAaYYlxR7Q0aoiMEBoJXBMzwccXExSMj5IBGy1J8bk ujS8oGuqQf89UDgezAzIatugD7+g/Jn1nGhW+f/jQpRr/5ozMXik/ItnB0ShcXJseDL/ ipKcFYfuG90B3e4wz1jeYpGhi6bftw2TszQruaAuQU0mQ0vxx/ZhiqbO9l7BvG/K1nNj cN/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16si3368411pgv.165.2018.03.15.09.10.48; Thu, 15 Mar 2018 09:11:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932101AbeCOQJf (ORCPT + 99 others); Thu, 15 Mar 2018 12:09:35 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:51919 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbeCOQJd (ORCPT ); Thu, 15 Mar 2018 12:09:33 -0400 Received: from mail-wm0-f71.google.com ([74.125.82.71]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ewVRc-0007Q7-P5 for linux-kernel@vger.kernel.org; Thu, 15 Mar 2018 16:09:32 +0000 Received: by mail-wm0-f71.google.com with SMTP id r78so2718119wmd.0 for ; Thu, 15 Mar 2018 09:09:32 -0700 (PDT) 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:user-agent; bh=sp3nzVfCkYBO2ZEA5KaETVhvZqc9ECRQ+GwwQyb8S28=; b=fU0DPqGlmvNfpJm0Zw56mnhw8j7KkJbvfpvrR2yb5mgx/1l+KcNWYIBrnKSDtV/+bY RYakrHxjMSLy6RxlTc/1Wo6kqTapXgSkBlq2hAEgmEi5ytgfyB8hbdz9Q9aIkSVFSVVT lrlxAl+2Ry0g87ZYNc+BHICSmT4N3RwsXE20LW4nwu0unB+iFYm52PKbc0BDtKjOYnFA eLKFp5H06g1mYkeG7+H4lfA1RESdvLwSgq+u/6u5PnI9LR89k0wNbZ/pVBMfCfErLDmv LMz0+MN2ePGwtxAMnouFFipFUGXqVUYUVXvrTkQ6hog94wyDbO7cFcFZyMc8mluVLPzX K56w== X-Gm-Message-State: AElRT7EwR7NCiBrPJHVlgBYwuJ8FGp6DgjgNOrhAQiCBso+RAWYEIHp8 buiipSkPKJWM55rRDipqkTD5UCLPCzITwTovPHopbyTw2Six6/NkuDQwvxrOfmCxMU12+F7yFZq FGKR7d4F9PH8F3TGayJwT0eWppiVdKm7E0EGXklIkKw== X-Received: by 10.223.155.219 with SMTP id e27mr5260466wrc.159.1521130172258; Thu, 15 Mar 2018 09:09:32 -0700 (PDT) X-Received: by 10.223.155.219 with SMTP id e27mr5260192wrc.159.1521130166627; Thu, 15 Mar 2018 09:09:26 -0700 (PDT) Received: from gmail.com (u-084-c101.eap.uni-tuebingen.de. [134.2.84.101]) by smtp.gmail.com with ESMTPSA id 69sm4541269wmp.36.2018.03.15.09.09.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Mar 2018 09:09:25 -0700 (PDT) Date: Thu, 15 Mar 2018 17:09:25 +0100 From: Christian Brauner To: Tycho Andersen Cc: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, Kees Cook , Andy Lutomirski , Oleg Nesterov , "Eric W . Biederman" , "Serge E . Hallyn" , Christian Brauner , Tyler Hicks , Akihiro Suda Subject: Re: [RFC 0/3] seccomp trap to userspace Message-ID: <20180315160924.GA12744@gmail.com> References: <20180204104946.25559-1-tycho@tycho.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180204104946.25559-1-tycho@tycho.ws> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 04, 2018 at 11:49:43AM +0100, Tycho Andersen wrote: > Several months ago at Linux Plumber's, we had a discussion about adding a > feature to seccomp which would allow seccomp to trigger a notification for some > other process. Here's a draft of that feature. > > Patch 1 contains the bulk of it, patches 2 & 3 offer an alternative way to > acquire the fd that receives notifications via ptrace (the method in patch 1 > poses some problems). Other suggestions for how to acquire one of these fds > would be welcome. > > Take a close look at the synchronization. I think I've got it right, but I > probably don't :) > > Thanks! > > Tycho Andersen (3): > seccomp: add a return code to trap to userspace > seccomp: hoist out filter resolving logic > seccomp: add a way to get a listener fd from ptrace > > arch/Kconfig | 7 + > include/linux/seccomp.h | 14 +- > include/uapi/linux/ptrace.h | 1 + > include/uapi/linux/seccomp.h | 18 +- > kernel/ptrace.c | 4 + > kernel/seccomp.c | 467 ++++++++++++++++++++++++-- > tools/testing/selftests/seccomp/seccomp_bpf.c | 180 +++++++++- > 7 files changed, 653 insertions(+), 38 deletions(-) Hey, So, I've been following the discussion silently in the background and I see that it got sidetracked into seccomp + ebpf. While I can see that there is value in adding epbf support to seccomp I'd really like to see this decoupled from this patchset. Afaict, this patchset would just work fine without the ebpf portion (but I might be just have missed the point). So if possible I would like to see a second version of this with the comments accounted for and - if possible - have this up for merging independent of the ebpf patchset that's floating around. Christian