From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominik Brodowski Subject: Re: [PATCH] Lock down drivers that can have io ports, io mem, irqs and dma changed Date: Thu, 24 Nov 2016 21:19:39 +0100 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 Return-path: Content-Disposition: inline In-Reply-To: <30473.1480008885@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-efi@vger.kernel.org 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