From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH 11/11] seccomp: Add tgid and tid into seccomp_data Date: Mon, 28 Jul 2014 14:18:04 -0700 Message-ID: <87vbqhp4hf.fsf@x220.int.ebiederm.org> References: <1406296033-32693-1-git-send-email-drysdale@google.com> <1406296033-32693-12-git-send-email-drysdale@google.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Andy Lutomirski's message of "Fri, 25 Jul 2014 10:18:05 -0700") Sender: linux-kernel-owner@vger.kernel.org To: Andy Lutomirski Cc: Kees Cook , Julien Tinnes , David Drysdale , Al Viro , Paolo Bonzini , LSM List , Greg Kroah-Hartman , Paul Moore , James Morris , Linux API , Meredydd Luff , Christoph Hellwig , "linux-kernel@vger.kernel.org" List-Id: linux-api@vger.kernel.org Andy Lutomirski writes: > [cc: Eric Biederman] > > Can we do one better and add a flag to prevent any non-self pid > lookups? This might actually be easy on top of the pid namespace work > (e.g. we could change the way that find_task_by_vpid works). > > It's far from just being signals. There's access_process_vm, ptrace, > all the signal functions, clock_gettime (see CPUCLOCK_PID -- yes, this > is ridiculous), and probably some others that I've forgotten about or > never noticed in the first place. So here is the practical question. Are these processes that only can send signals to their thread group allowed to call fork()? If fork is allowed and all pid lookups are restricted to their own thread group that wait, waitpid, and all of the rest of the wait family will never return the pids of their children, and zombies will accumulate. Aka the semantics are fundamentally broken. If fork is not allowed pid namespaces already solve this problem. Eric