From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760596AbbIDU35 (ORCPT ); Fri, 4 Sep 2015 16:29:57 -0400 Received: from mail-yk0-f173.google.com ([209.85.160.173]:34173 "EHLO mail-yk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760063AbbIDU3z (ORCPT ); Fri, 4 Sep 2015 16:29:55 -0400 Date: Fri, 4 Sep 2015 13:29:49 -0700 From: Alexei Starovoitov To: Kees Cook Cc: Tycho Andersen , Alexei Starovoitov , Will Drewry , Oleg Nesterov , Andy Lutomirski , Pavel Emelyanov , "Serge E. Hallyn" , Daniel Borkmann , LKML , Network Development Subject: Re: [PATCH 4/6] seccomp: add a way to access filters via bpf fds Message-ID: <20150904202946.GC1842@Alexeis-MacBook-Pro-2.local> References: <1441382664-17437-1-git-send-email-tycho.andersen@canonical.com> <1441382664-17437-5-git-send-email-tycho.andersen@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 04, 2015 at 01:26:42PM -0700, Kees Cook wrote: > On Fri, Sep 4, 2015 at 9:04 AM, Tycho Andersen > wrote: > > This patch adds a way for a process that is "real root" to access the > > seccomp filters of another process. The process first does a > > PTRACE_SECCOMP_GET_FILTER_FD to get an fd with that process' seccomp filter > > attached, and then iterates on this with PTRACE_SECCOMP_NEXT_FILTER using > > bpf(BPF_PROG_DUMP) to dump the actual program at each step. > > Why is this a new ptrace interface instead of a new seccomp interface? > I would expect this to only be valid for "current", otherwise we could > run into races as the ptracee adds filters. i.e. it is not safe to > examine seccomp filters from tasks other than current. same question. I thought we discussed to add a command to seccomp() syscall for that?