On 08/19/2018 07:29 AM, Lukas Wunner wrote:
> Hotplug drivers cannot declare their hotplug_slot_ops const, making them
> attractive targets for attackers, because upon registration of a hotplug
> slot, __pci_hp_initialize() writes to the "owner" and "mod_name" members
> in that struct.
> 
> Fix by moving these members to struct hotplug_slot and constify every
> driver's hotplug_slot_ops except for pciehp.
> 
> pciehp constructs its hotplug_slot_ops at runtime based on the PCIe
> port's capabilities, hence cannot declare them const.  It can be
> converted to __write_rarely once that's mainlined:
> http://www.openwall.com/lists/kernel-hardening/2016/11/16/3
> 
> Signed-off-by: Lukas Wunner <lu...@wunner.de>
> Cc: Rafael J. Wysocki <r...@rjwysocki.net>
> Cc: Len Brown <l...@kernel.org>
> Cc: Scott Murray <sc...@spiteful.org>
> Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
> Cc: Paul Mackerras <pau...@samba.org>
> Cc: Michael Ellerman <m...@ellerman.id.au>
> Cc: Gavin Shan <gws...@linux.vnet.ibm.com>
> Cc: Sebastian Ott <seb...@linux.vnet.ibm.com>
> Cc: Gerald Schaefer <gerald.schae...@de.ibm.com>
> Cc: Corentin Chary <corentin.ch...@gmail.com>
> Cc: Darren Hart <dvh...@infradead.org>
> Cc: Andy Shevchenko <a...@infradead.org>
> ---

With regards to drivers/pci/hotplug/rpa*

Acked-by: Tyrel Datwyler <tyr...@linux.vnet.ibm.com>

Reply via email to