From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: Lukas Wunner <lukas@wunner.de>,
Bjorn Helgaas <helgaas@kernel.org>,
linux-pci@vger.kernel.org, Sinan Kaya <okaya@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Scott Murray <scott@spiteful.org>,
linux-s390@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
acpi4asus-user@lists.sourceforge.net,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Gavin Shan <gwshan@linux.vnet.ibm.com>,
platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
Sebastian Ott <sebott@linux.vnet.ibm.com>,
Corentin Chary <corentin.chary@gmail.com>,
Darren Hart <dvhart@infradead.org>,
linuxppc-dev@lists.ozlabs.org,
Andy Shevchenko <andy@infradead.org>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 6/9] PCI: hotplug: Constify hotplug_slot_ops
Date: Mon, 20 Aug 2018 17:38:06 -0700 [thread overview]
Message-ID: <92f4ee2a-39b8-daa6-ea36-4214e4a438bd@linux.vnet.ibm.com> (raw)
In-Reply-To: <40b17d029c4fbf099535f989b1d6dd013f708a73.1534686485.git.lukas@wunner.de>
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 <lukas@wunner.de>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Scott Murray <scott@spiteful.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
> Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
> Cc: Corentin Chary <corentin.chary@gmail.com>
> Cc: Darren Hart <dvhart@infradead.org>
> Cc: Andy Shevchenko <andy@infradead.org>
> ---
With regards to drivers/pci/hotplug/rpa*
Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
next prev parent reply other threads:[~2018-08-21 0:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-19 14:29 [PATCH 0/9] PCI hotplug diet Lukas Wunner
2018-08-19 14:29 ` [PATCH 8/9] PCI: hotplug: Embed hotplug_slot Lukas Wunner
2018-08-20 8:17 ` Rafael J. Wysocki
2018-08-21 0:43 ` Tyrel Datwyler
2018-09-03 17:54 ` Sebastian Ott
2018-08-19 14:29 ` [PATCH 6/9] PCI: hotplug: Constify hotplug_slot_ops Lukas Wunner
2018-08-20 8:10 ` Rafael J. Wysocki
2018-08-21 0:38 ` Tyrel Datwyler [this message]
2018-08-19 14:29 ` [PATCH 7/9] PCI: hotplug: Drop hotplug_slot_info Lukas Wunner
2018-08-20 8:14 ` Rafael J. Wysocki
2018-08-21 0:41 ` Tyrel Datwyler
2018-09-03 17:52 ` Sebastian Ott
2018-08-30 8:50 ` [PATCH 0/9] PCI hotplug diet Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92f4ee2a-39b8-daa6-ea36-4214e4a438bd@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=andy@infradead.org \
--cc=corentin.chary@gmail.com \
--cc=dvhart@infradead.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=gwshan@linux.vnet.ibm.com \
--cc=helgaas@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=okaya@kernel.org \
--cc=paulus@samba.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=scott@spiteful.org \
--cc=sebott@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).