From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [PATCH] tracefs: Do not allocate and free proxy_ops for lockdown Date: Fri, 11 Oct 2019 14:36:10 -0400 Message-ID: <20191011143610.21bcd9c0@gandalf.local.home> References: <20191011135458.7399da44@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: LKML , Matthew Garrett , James Morris James Morris , LSM List , Linux API , Ben Hutchings , Al Viro List-Id: linux-api@vger.kernel.org On Fri, 11 Oct 2019 11:20:30 -0700 Linus Torvalds wrote: > Willing to do that instead? Honestly, what you described was my preferred solution ;-) I just didn't want to upset the lockdown crowd if a new tracefs file was opened without doing this. Once locked down is set, can it ever be undone without rebooting? If not, a lockdown call could also trigger setting tracing_disabled to 1. Which is much stronger, as that was the code we added to kill tracing if anything abnormal was detected (and it does a hard shutdown of all the tracing utilities). It's set to one on bootup and cleared, after tracing is initialized. But it is never cleared again. If lockdown can be enabled at bootup, we could simply not clear it, and we can have something to allow lockdown to set it as well. Currently, the only places tracing_disabled gets set is in the self tests and if the ring buffer gets corrupted. -- Steve