From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752465AbdJLKJs (ORCPT ); Thu, 12 Oct 2017 06:09:48 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:47562 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751302AbdJLKJr (ORCPT ); Thu, 12 Oct 2017 06:09:47 -0400 Date: Thu, 12 Oct 2017 11:09:03 +0100 From: Alan Cox To: Mario Limonciello Cc: dvhart@infradead.org, Andy Shevchenko , LKML , platform-driver-x86@vger.kernel.org, Andy Lutomirski , quasisec@google.com, pali.rohar@gmail.com, rjw@rjwysocki.net, mjg59@google.com, hch@lst.de, Greg KH Subject: Re: [PATCH v7 10/15] platform/x86: dell-smbios: add filtering capability for requests Message-ID: <20171012110903.3ab4ed5e@alans-desktop> In-Reply-To: <83dc225624f1cde5ee1797aebc945732444ded91.1507733291.git.mario.limonciello@dell.com> References: <83dc225624f1cde5ee1797aebc945732444ded91.1507733291.git.mario.limonciello@dell.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Oct 2017 11:27:36 -0500 Mario Limonciello wrote: > There are some categories of tokens and SMBIOS calls that it makes > sense to protect userspace from accessing. These are calls that > may write to one time use fields or activate hardware debugging > capabilities. They are not intended for general purpose use. > > This same functionality may be be later extended to also intercept > calls that may cause kernel functionality to get out of sync if > the same functions are used by other drivers. This doesn't work. You are creating an API. If you then have to remove parts of the API because it messes stuff up you break your API guarantee. As I said before, this needs to be a whitelist of stuff that is safe, and it needs to have a security model. When you make a feature available you can't nicely take it away again as you'll break people's user space. Start with a whitelist of the ones you know people want to use, or that your existing tooling you want to enable uses. Add others as needed in future releases of the kernel. Alan