Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4862116ooa; Tue, 14 Aug 2018 11:35:15 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyzTRaMBO8mig3gVQawNb0HrmhmIepvkUjqb9i5JcNnsTLUrw73x7WUN8wq9C14TEnyBoad X-Received: by 2002:a63:89c7:: with SMTP id v190-v6mr21691440pgd.194.1534271715887; Tue, 14 Aug 2018 11:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534271715; cv=none; d=google.com; s=arc-20160816; b=USrIF49e0zg/y0me/AY/PuXoJLCwLApJnnc42hSE/JqG9b9tjeumAxfDYjpNQMFeiz MVLSgEtY0wPw7xgR35syVT2y9ejpPXXTFEzG1DtBSl2t/NliEjdWYY3pcgDom8cDWH+C lBQ5e52EijLua0hZqs1mNmDAS6D3uDUQnsPtxeoJAU5STDUmCMlxdhWK1swlXO/z7VQ6 2o4lY1P4PsmklXAhhvY+aq1KFp9i1MTrIrvInPWztH5mMZA16gZnYhJeGs4a6zcrFvYC 65VVF96focEah0z5eaFOvwR5XOEJjWJ/5pvlfFsa1JkPUc/NNMCYCuMy91Q1AR7c4a8B ykjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=nAQFJEYg3pOd5GKYynD43hOR1hcALYmaBmLSZpT9+xY=; b=nAyTjJ1i5Xxdx1FukI7kQ696fk/gT6Fcx5PgD/Wy5Os1VYOA+wEZKmwxAE84og1wgC iXN3/ap95pvuP/jX6Jz/kBVg0e/WLeLAg2yTBKR6Rq2wbxQvixQn+KYyibTw6BbMvjQi iUDHZrSd13WiTWFC5SSaXhoAi1GvGgFJR2l14+yimdlE9mqDZi9PmbJ0AeSidezVyV2+ iPhPyzKLlVztcn6T2ZxBf7P0UF65QdKqS7Rk6NA/7z8qAj3ghRYwD69MSdtyZL2kUz25 xlAstcPKVcW1OhbFNq6UE7TbuVX6n6+3Kg5CR5g3pQevWeCPbyUc/B8W4B8bQ3jqJjau iViQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=LCcpprw7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a24-v6si17421503pgv.527.2018.08.14.11.35.01; Tue, 14 Aug 2018 11:35:15 -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; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=LCcpprw7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728038AbeHNVQz (ORCPT + 99 others); Tue, 14 Aug 2018 17:16:55 -0400 Received: from sonic303-29.consmr.mail.gq1.yahoo.com ([98.137.64.210]:44054 "EHLO sonic303-29.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeHNVQz (ORCPT ); Tue, 14 Aug 2018 17:16:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1534271309; bh=nAQFJEYg3pOd5GKYynD43hOR1hcALYmaBmLSZpT9+xY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=LCcpprw75dOShCbg70hkSWOlKtdGQOrLUfKuDykBtfocYEWTqGq284eEbrbtE5uVyk4v2/ti/5eU6RG/+2hMt/V6e2MHJkpd2JYyw2uvnl1E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sOai.E5bw5k.f1CMC_hpHois1Ue.ZRQH5Lpvu.HBegNtULwC82QVYZ6_dhzaepW FBusGR9iK3an2KtQ1Lb6B.VDuWSpw6y16eacS7bE4nbMAz9tOdRL7991H0ALroo6rAxMf7JYZKH0 kpiTGkqszqcAbJv3NBOhCKHJGcLxBie13ssgIf0CzykW_Rv4MV0240jBTdr6X8oZMtfw6rtAWVNX zsRlIExXLUqHJ4oOnAHRwx_g4DwPJ Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Tue, 14 Aug 2018 18:28:29 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.102]) ([67.169.65.224]) by smtp415.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 3242b7d698ccb2dcebe46da1121efa9c; Tue, 14 Aug 2018 18:28:26 +0000 (UTC) Subject: Re: [PATCH v1 00/22] LSM: Full security module stacking To: Sargun Dhillon Cc: LSM , LKLM , Paul Moore , Stephen Smalley , SE Linux , "SMACK-discuss@lists.01.org" , John Johansen , Kees Cook , Tetsuo Handa , James Morris , "Schaufler, Casey" , Casey Schaufler References: <8a325db8-e7eb-9581-2b77-fc987a165df7@schaufler-ca.com> From: Casey Schaufler Message-ID: Date: Tue, 14 Aug 2018 11:28:22 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/14/2018 10:05 AM, Sargun Dhillon wrote: > On Mon, Jul 16, 2018 at 10:53 AM, Casey Schaufler > wrote: >> LSM: Full security module stacking >> >> I'm calling this v1 not because it's the first version >> I've put out but because it's the first version I'm getting >> serious external pressure to get upstream. > Awesome work, I'm glad that this is getting further. It's following the 90/90 rule pretty closely. The first 90% of the work took 90% of the time, and the last 10% is taking the other 90% of the time. >> The blob management part (through "LSM: Sharing of security blobs") >> is ready for prime-time. These changes move the management of >> security blobs out of the security modules and into the security >> module infrastructure. With this change the proposed S.A.R.A, >> LandLock and PTAGS security modules could co-exist with any of >> the existing "major" security modules. The changes reduce some >> code duplication. >> >> Beyond the blob management there's a bit of clean-up. >> Mounting filesystems had to be changed so that options >> a security module doesn't recognize won't be considered >> a fatal error. The mount infrastructure is somewhat >> more complex than one might assume. >> > Casey, > Do you think you can break out 1 into its own patch? It seems like > that'd be valuable to everyone. Yes, I think that is a good idea. Landlock, S.A.R.A. and a couple other security modules could be added upstream if this part of the work was available. It would not provide everything needed to stack all the existing modules. I believe there is concern that if this much went upstream the work on finishing what's required to make everything work might be abandoned. > What's your thought here if we ever introduce dynamic security > modules? It's nice that we now have a way around rolling back blobs if > one fails, but what if a new module was activated, would we just > resize the slab cache? Making the blob size dynamic at run time makes the blob management more complicated because you have to keep track of the modules in play when the blob was allocated, and pay attention to that when hooks are called. It's a lot simpler if you don't let blobs get smaller, but still requires more bookkeeping than if the size is static. It is completely doable. I have played with it a bit. There are performance implications.