From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753574AbdDJNQ5 (ORCPT ); Mon, 10 Apr 2017 09:16:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50914 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877AbdDJNQz (ORCPT ); Mon, 10 Apr 2017 09:16:55 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 64BCD7E9CD Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 64BCD7E9CD Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <149142326734.5101.4596394505987813763.stgit@warthog.procyon.org.uk> <149142340198.5101.8171352010918423590.stgit@warthog.procyon.org.uk> <31421.1491569449@warthog.procyon.org.uk> To: Andy Shevchenko Cc: dhowells@redhat.com, "linux-kernel@vger.kernel.org" , matthew.garrett@nebula.com, linux-efi@vger.kernel.org, One Thousand Gnomes , Greg Kroah-Hartman , acpi4asus-user , Platform Driver , linux-security-module , keyrings@vger.kernel.org Subject: Re: [PATCH 15/24] asus-wmi: Restrict debugfs interface when the kernel is locked down MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13614.1491830208.1@warthog.procyon.org.uk> Date: Mon, 10 Apr 2017 14:16:48 +0100 Message-ID: <13615.1491830208@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 10 Apr 2017 13:16:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andy Shevchenko wrote: > >> It looks a bit fragile when responsility of whatever reasons kernel > >> can't serve become a driver burden. > >> Can we fix this in debugfs framework instead? > > > > Fix it with debugfs how? We can't offload the decision to userspace. > > I mean to do at least similar like you have done for module > parameters. So, instead of putting above code to each attribute in > question make a special (marked) attribute instead and debugfs > framework will know how to deal with that. Hmmm... It's tricky in that debugfs doesn't have any of its own structures, but is entirely built on standard VFS ones, so finding somewhere to store the information is going to be awkward. One obvious solution is to entirely lock down debugfs in secure boot more, but that might be a bit drastic. Note that it's still going to be a driver burden to some extent anyway. The driver has to tell the core what needs to be restricted. Further, I guess configfs needs attention also. David