From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757949AbdDRWyq (ORCPT ); Tue, 18 Apr 2017 18:54:46 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:36756 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754893AbdDRWym (ORCPT ); Tue, 18 Apr 2017 18:54:42 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170328234650.19695-1-mic@digikod.net> <20170328234650.19695-7-mic@digikod.net> From: Kees Cook Date: Tue, 18 Apr 2017 15:54:41 -0700 X-Google-Sender-Auth: o_WMKbOqSEiKw5nkYtnKbxpf1YE Message-ID: Subject: Re: [kernel-hardening] [PATCH net-next v6 06/11] seccomp,landlock: Handle Landlock events per process hierarchy To: =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= Cc: Djalal Harouni , linux-kernel , Alexei Starovoitov , Andy Lutomirski , Arnaldo Carvalho de Melo , Casey Schaufler , Daniel Borkmann , David Drysdale , "David S . Miller" , "Eric W . Biederman" , James Morris , Jann Horn , Jonathan Corbet , Matthew Garrett , Michael Kerrisk , Paul Moore , Sargun Dhillon , "Serge E . Hallyn" , Shuah Khan , Tejun Heo , Thomas Graf , Will Drewry , "kernel-hardening@lists.openwall.com" , Linux API , LSM List , Network Development , Andrew Morton , Tetsuo Handa Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v3IMsvXK008780 On Fri, Mar 31, 2017 at 2:15 PM, Mickaël Salaün wrote: > > > On 29/03/2017 12:35, Djalal Harouni wrote: >> On Wed, Mar 29, 2017 at 1:46 AM, Mickaël Salaün wrote: > >>> @@ -25,6 +30,9 @@ struct seccomp_filter; >>> struct seccomp { >>> int mode; >>> struct seccomp_filter *filter; >>> +#if defined(CONFIG_SECCOMP_FILTER) && defined(CONFIG_SECURITY_LANDLOCK) >>> + struct landlock_events *landlock_events; >>> +#endif /* CONFIG_SECCOMP_FILTER && CONFIG_SECURITY_LANDLOCK */ >>> }; >> >> Sorry if this was discussed before, but since this is mean to be a >> stackable LSM, I'm wondering if later you could move the events from >> seccomp, and go with a security_task_alloc() model [1] ? >> >> Thanks! >> >> [1] http://kernsec.org/pipermail/linux-security-module-archive/2017-March/000184.html >> > > Landlock use the seccomp syscall to attach a rule to a process and using > struct seccomp to store this rule make sense. There is currently no way > to store multiple task->security, which is needed for a stackable LSM > like Landlock, but we could move the events there if needed in the future. It does stand out to me that the only thing landlock is using seccomp for is its syscall... :P -Kees -- Kees Cook Pixel Security