Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934198AbbGVADf (ORCPT ); Tue, 21 Jul 2015 20:03:35 -0400 Received: from smtp105.biz.mail.bf1.yahoo.com ([98.139.221.43]:43681 "EHLO smtp105.biz.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934042AbbGVADc (ORCPT ); Tue, 21 Jul 2015 20:03:32 -0400 X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: GamxIowVM1kZ.Jpu6zjp_fysts7qADSPiKeOakhMVn2_HK4 gL.yflqPwn9N9nXi98kMKwn6rjBhxZ6hBFdJ33QtTTWp0W4gttpqRZ4ki.gQ kKcKUm3DMWddsUQSF.lMg6DDZ1dvBv9NmiC8V3fuYwc1j.oXosH4P4ffIB8a rwvFWLXyZR4hhBiJYdJ7fTNJ1fbv3UPZqmXyrCeYbBPiP1wTAjpuNguIF17z 9dAxMYdAqEFwbwaBsL6KySs6gW2bKF8b_CiUCLQTFsx3ttTjvmlktSuymvGI aEq3hRK96Pkj3wHpdRL6yxrEbAd9Nh85jrvB2cC1aU3G66tLJsARWtzoNhJA nrpp8bxodQ4u6nU93XAg2fujanUcN5xVXkBlpJT9rnOTwkOuUF0B4KRFb8x9 Z1vLfH2hnDX9uzKn8whc5E_OL9az7qjt8I40kPolcZKX9q67pGBEMXztTTse 5i.uOSmNcA9iu.R_2kwUNofofCfmNO_teHkHvpooB4zcJ1T4Dv6I8I6iyifP B3QnJxR6RG157g0x6GAtknLxjbLRnbFVtaNSi36s6yyLRpuJ0yQoXamW7op4 - X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Subject: Re: [PATCH] Yama: remove needless CONFIG_SECURITY_YAMA_STACKED To: Kees Cook References: <20150721190946.GA5127@www.outflux.net> <55AEA214.1010505@schaufler-ca.com> <55AEB1F5.9000300@schaufler-ca.com> Cc: Josh Boyer , linux-security-module , James Morris , "linux-doc@vger.kernel.org" , "Linux-Kernel@Vger. Kernel. Org" From: Casey Schaufler Message-ID: <55AEDDDE.6060809@schaufler-ca.com> Date: Tue, 21 Jul 2015 17:03:42 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2716 Lines: 49 On 7/21/2015 3:41 PM, Kees Cook wrote: > On Tue, Jul 21, 2015 at 1:56 PM, Casey Schaufler wrote: >> On 7/21/2015 1:09 PM, Josh Boyer wrote: >>> On Tue, Jul 21, 2015 at 3:48 PM, Casey Schaufler wrote: >>>> On 7/21/2015 12:09 PM, Kees Cook wrote: >>>>> Now that minor LSMs can cleanly stack with major LSMs, remove the unneeded >>>>> config for Yama to be made to explicitly stack. Just selecting the main >>>>> Yama CONFIG will allow it to work, regardless of the major LSM. Since >>>>> distros using Yama are already forcing it to stack, this is effectively >>>>> a no-op change. >>>> Today I can compile in all LSMs including Yama and pick the one I want. >>>> If we made your change it would be impossible to build in Yama and not >>>> use it. I suggest we hold off until after the security summit discussion >>> This is true, but it's also true regardless of stacking. If Yama had >>> a CONFIG_SECURITY_YAMA_ENABLED (or whatever bikeshed color), then you >>> could enable Yama and not use it, yes? It would also allow people to >>> default it as disabled, but then enable it at runtime via the >>> ptrace_scope sysctl. >> The way Kees proposed it you would *always* get Yama stacked with >> your other module if you compile Yama in. Thus, If I compile in >> SELinux and Yama I cannot run SELinux without Yama. Today, I can > Yama is entirely controllable from sysctl, so you could build it in > and set the ptrace_scope setting to 0 at boot. It's already being > built into distro kernels this way (via the STACKING config), so this > change is effectively no different. > >> compile SELinux and Yama in but run only SELinux. My suggestion is >> to wait until we can specify the modules to use before we remove >> the kconfig option that provides that facility today. > I'm happy to wait, but I'm still going to send my other 2 "minor" LSMs > before LSS. :) Neither of them would be built into a kernel without > wanting their functionality, so they'll have the stack "always on" > semantics if their CONFIG is selected. Fair enough then. I'll withdraw my objection. One question comes to mind, and that is how are you planning to order them? I put Yama ahead of the "major" modules because that was how it had been stacked previously. Let's assume that the capability module stays in the first position. Are you planning to put your new modules before Yama, before the "major" module(s) or at the end? > -Kees > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/