Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965968AbcKXUUq (ORCPT ); Thu, 24 Nov 2016 15:20:46 -0500 Received: from isilmar-4.linta.de ([136.243.71.142]:58822 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757276AbcKXUUp (ORCPT ); Thu, 24 Nov 2016 15:20:45 -0500 Date: Thu, 24 Nov 2016 21:19:39 +0100 From: Dominik Brodowski To: David Howells Cc: keyrings@vger.kernel.org, matthew.garrett@nebula.com, linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk Subject: Re: [PATCH] Lock down drivers that can have io ports, io mem, irqs and dma changed Message-ID: <20161124201939.GA3782@isilmar-4.linta.de> References: <20161123192143.GA482@light.dominikbrodowski.net> <20161122061233.GA4762@light.dominikbrodowski.net> <20161116222731.563fb85e@lxorguk.ukuu.org.uk> <147933283664.19316.12454053022687659937.stgit@warthog.procyon.org.uk> <26173.1479769852@warthog.procyon.org.uk> <8342.1479905906@warthog.procyon.org.uk> <30473.1480008885@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30473.1480008885@warthog.procyon.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 22 On Thu, Nov 24, 2016 at 05:34:45PM +0000, David Howells wrote: > Dominik Brodowski wrote: > > > > > - Abort in drivers/pcmcia/cistpl.c::pccard_store_cis() or remove > > > > write access to the "cis" file in > > > > drivers/pcmcia/cistpl.c::pccard_cis_attr > > > > > > What is that doing? Allowing the device to be reconfigured? > > > > Exactly. It is a different interface for updating the firmware -- which > > includes ioports etc. In theory, any access should be limited to areas which > > are registered to the bridge devices. But you never know... > > Ah, I see. Should this be using request_firmware()? For most cases, request_firmware() is being used -- for some rare cases, however, this alternative interface is provided for. It should be pretty safe nowadays to make pccard_cis_attr read-only (and who uses PCMCIA nowadays anyway?). Best, Dominik