Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1431648ybp; Fri, 11 Oct 2019 14:15:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1OD1RbgmKayJwd+pxc33ONlp0A6l14j0jC10BJ6tkF/qC5VahuUTEjsb5sgNsJLEIzxo0 X-Received: by 2002:a17:906:4cd2:: with SMTP id q18mr15549672ejt.319.1570828522368; Fri, 11 Oct 2019 14:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570828522; cv=none; d=google.com; s=arc-20160816; b=Y3yw/4GFemrOmQWnrJoGj3RR1ZIq52mr4GW8vHcej3ka66Za0JiJLcn6dh+w5OrHh9 f/h0Ad1cqnTplkaWv4mshH9S0OcxOnFFpc4+ZCvkgSGf43pVIlqjH3mUeOm7eupnTaSR +lam/xwCx6VljDVoLPoakb0Fc4xD5gjN5GUSoWrF1d5/wOBtdEt3WQxjLlW++RX0PdOs C29hdbwTIo77yjqm8N+pTtfZDZT4+JQsgoqAk7ykZRg1qEpiaESiwFIhNvM6QXHSGImJ i0DOuuvfKlKBNkjuF2yI8VvRGb5RPkMthDJjS56fYWxHSBNlNTHBU0CyFGJqjAOiuvmy nt5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=XMsu60B4kjfhmlq8qGo45Pd7ICIO6qEIIZOJKtpavYY=; b=clFO7Kp4yoGgoyyT8yTu6pS8LgRfVJ0n4kOiKUiNl9ng5XiPrpskB+qgQzPzEohQLI 6/9cJKOG/4M+ZUE1fEn+Geo3qBnUR+krTfO4qQdAKrfIzZZDWVsCsgctayIFhjsb2jgj GOihYDfKIUU+KiImU/iSGrqvc3x+T+cSgozAHPajeW3t2RDgmr/8ju1/cr6d5cHMZDmE DACXUSbDaaETBTk3TsYp+qZtKLBzLsYEmxbAqUuD75wm5ZDQ1ndhsn2ZU0hmrEVP9yrw dkV6RkEruGJn/AjTNdkkI2r4C0WCrSY1PbZoGw0DaqD8kZNMCfet+1WeqnXsXdt0Un/x tI5A== ARC-Authentication-Results: i=1; mx.google.com; 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 z5si7081026edk.157.2019.10.11.14.14.58; Fri, 11 Oct 2019 14:15:22 -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; 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 S1728808AbfJKVL4 (ORCPT + 99 others); Fri, 11 Oct 2019 17:11:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:54542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbfJKVL4 (ORCPT ); Fri, 11 Oct 2019 17:11:56 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E35B2190F; Fri, 11 Oct 2019 21:11:54 +0000 (UTC) Date: Fri, 11 Oct 2019 17:11:52 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Matthew Garrett , James Morris James Morris , LSM List , Linux API , Ben Hutchings , Al Viro Subject: Re: [PATCH] tracefs: Do not allocate and free proxy_ops for lockdown Message-ID: <20191011171152.0e6f4615@gandalf.local.home> In-Reply-To: References: <20191011135458.7399da44@gandalf.local.home> <20191011162518.2f8c99ca@gandalf.local.home> <20191011165455.32666d53@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Oct 2019 14:00:50 -0700 Linus Torvalds wrote: > On Fri, Oct 11, 2019 at 1:55 PM Steven Rostedt wrote: > > > > I guess I can keep it this way. Thoughts? > > That looks fine to me. I'm still not sure you actually need to do all > this, but it doesn't look _wrong_. Yep, I sent this before seeing your other email. > > That said, I still do think that if things are locked down from the > very get-go, tracefs_create_file() shouldn't even create the files. Agreed. I forgot to add in my last email: 4) Add the lockdown check to create_file() > > That's mostly an independent thing from the "what about if they exists > and things got locked down afterwards", though. Well, I'll be combining it with the tracing_disabled code, which was there originally to prevent corrupted buffers from causing harm by being read. > > I do wonder about the whole "well, if you started tracing before > locking things down, don't you want to see the end results"? > I don't think it hurts to disable it. Although, I don't think reading the trace event formats will be a issue. I'm not aware of any of them from giving too much info to the system. And if you really do care about that, do it at boot up, and with the create_file part, it wont have any files to read. -- Steve