Skip to content

Commit 84e6da5

Browse files
committed
Merge tag 'driver-core-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core / documentation fixes from Greg KH: "Here are some small fixes, and some documentation updates for 6.11-rc3. Included in here are: - embargoed hardware documenation updates based on a lot of review by legal-types in lots of companies to try to make the process a _bit_ easier for us to manage over time. - rust firmware documentation fix - driver detach race fix for the fix that went into 6.11-rc1 All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Fix uevent_show() vs driver detach race Documentation: embargoed-hardware-issues.rst: add a section documenting the "early access" process Documentation: embargoed-hardware-issues.rst: minor cleanups and fixes rust: firmware: fix invalid rustdoc link
2 parents 9221afb + 15fffc6 commit 84e6da5

File tree

4 files changed

+109
-63
lines changed

4 files changed

+109
-63
lines changed

Documentation/process/embargoed-hardware-issues.rst

Lines changed: 96 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ kernel.
1313
Hardware issues like Meltdown, Spectre, L1TF etc. must be treated
1414
differently because they usually affect all Operating Systems ("OS") and
1515
therefore need coordination across different OS vendors, distributions,
16-
hardware vendors and other parties. For some of the issues, software
17-
mitigations can depend on microcode or firmware updates, which need further
18-
coordination.
16+
silicon vendors, hardware integrators, and other parties. For some of the
17+
issues, software mitigations can depend on microcode or firmware updates,
18+
which need further coordination.
1919

2020
.. _Contact:
2121

@@ -32,8 +32,8 @@ Linux kernel security team (:ref:`Documentation/admin-guide/
3232
<securitybugs>`) instead.
3333

3434
The team can be contacted by email at <[email protected]>. This
35-
is a private list of security officers who will help you to coordinate a
36-
fix according to our documented process.
35+
is a private list of security officers who will help you coordinate a fix
36+
according to our documented process.
3737

3838
The list is encrypted and email to the list can be sent by either PGP or
3939
S/MIME encrypted and must be signed with the reporter's PGP key or S/MIME
@@ -43,7 +43,7 @@ the following URLs:
4343
- PGP: https://www.kernel.org/static/files/hardware-security.asc
4444
- S/MIME: https://www.kernel.org/static/files/hardware-security.crt
4545

46-
While hardware security issues are often handled by the affected hardware
46+
While hardware security issues are often handled by the affected silicon
4747
vendor, we welcome contact from researchers or individuals who have
4848
identified a potential hardware flaw.
4949

@@ -65,7 +65,7 @@ of Linux Foundation's IT operations personnel technically have the
6565
ability to access the embargoed information, but are obliged to
6666
confidentiality by their employment contract. Linux Foundation IT
6767
personnel are also responsible for operating and managing the rest of
68-
kernel.org infrastructure.
68+
kernel.org's infrastructure.
6969

7070
The Linux Foundation's current director of IT Project infrastructure is
7171
Konstantin Ryabitsev.
@@ -85,7 +85,7 @@ Memorandum of Understanding
8585

8686
The Linux kernel community has a deep understanding of the requirement to
8787
keep hardware security issues under embargo for coordination between
88-
different OS vendors, distributors, hardware vendors and other parties.
88+
different OS vendors, distributors, silicon vendors, and other parties.
8989

9090
The Linux kernel community has successfully handled hardware security
9191
issues in the past and has the necessary mechanisms in place to allow
@@ -103,11 +103,11 @@ the issue in the best technical way.
103103
All involved developers pledge to adhere to the embargo rules and to keep
104104
the received information confidential. Violation of the pledge will lead to
105105
immediate exclusion from the current issue and removal from all related
106-
mailing-lists. In addition, the hardware security team will also exclude
106+
mailing lists. In addition, the hardware security team will also exclude
107107
the offender from future issues. The impact of this consequence is a highly
108108
effective deterrent in our community. In case a violation happens the
109109
hardware security team will inform the involved parties immediately. If you
110-
or anyone becomes aware of a potential violation, please report it
110+
or anyone else becomes aware of a potential violation, please report it
111111
immediately to the Hardware security officers.
112112

113113

@@ -124,14 +124,16 @@ method for these types of issues.
124124
Start of Disclosure
125125
"""""""""""""""""""
126126

127-
Disclosure starts by contacting the Linux kernel hardware security team by
128-
email. This initial contact should contain a description of the problem and
129-
a list of any known affected hardware. If your organization builds or
130-
distributes the affected hardware, we encourage you to also consider what
131-
other hardware could be affected.
127+
Disclosure starts by emailing the Linux kernel hardware security team per
128+
the Contact section above. This initial contact should contain a
129+
description of the problem and a list of any known affected silicon. If
130+
your organization builds or distributes the affected hardware, we encourage
131+
you to also consider what other hardware could be affected. The disclosing
132+
party is responsible for contacting the affected silicon vendors in a
133+
timely manner.
132134

133135
The hardware security team will provide an incident-specific encrypted
134-
mailing-list which will be used for initial discussion with the reporter,
136+
mailing list which will be used for initial discussion with the reporter,
135137
further disclosure, and coordination of fixes.
136138

137139
The hardware security team will provide the disclosing party a list of
@@ -158,8 +160,8 @@ This serves several purposes:
158160
- The disclosed entities can be contacted to name experts who should
159161
participate in the mitigation development.
160162

161-
- If an expert which is required to handle an issue is employed by an
162-
listed entity or member of an listed entity, then the response teams can
163+
- If an expert who is required to handle an issue is employed by a listed
164+
entity or member of an listed entity, then the response teams can
163165
request the disclosure of that expert from that entity. This ensures
164166
that the expert is also part of the entity's response team.
165167

@@ -169,8 +171,8 @@ Disclosure
169171
The disclosing party provides detailed information to the initial response
170172
team via the specific encrypted mailing-list.
171173

172-
From our experience the technical documentation of these issues is usually
173-
a sufficient starting point and further technical clarification is best
174+
From our experience, the technical documentation of these issues is usually
175+
a sufficient starting point, and further technical clarification is best
174176
done via email.
175177

176178
Mitigation development
@@ -179,57 +181,93 @@ Mitigation development
179181
The initial response team sets up an encrypted mailing-list or repurposes
180182
an existing one if appropriate.
181183

182-
Using a mailing-list is close to the normal Linux development process and
183-
has been successfully used in developing mitigations for various hardware
184+
Using a mailing list is close to the normal Linux development process and
185+
has been successfully used to develop mitigations for various hardware
184186
security issues in the past.
185187

186-
The mailing-list operates in the same way as normal Linux development.
187-
Patches are posted, discussed and reviewed and if agreed on applied to a
188-
non-public git repository which is only accessible to the participating
188+
The mailing list operates in the same way as normal Linux development.
189+
Patches are posted, discussed, and reviewed and if agreed upon, applied to
190+
a non-public git repository which is only accessible to the participating
189191
developers via a secure connection. The repository contains the main
190192
development branch against the mainline kernel and backport branches for
191193
stable kernel versions as necessary.
192194

193195
The initial response team will identify further experts from the Linux
194-
kernel developer community as needed. Bringing in experts can happen at any
195-
time of the development process and needs to be handled in a timely manner.
196+
kernel developer community as needed. Any involved party can suggest
197+
further experts to be included, each of which will be subject to the same
198+
requirements outlined above.
196199

197-
If an expert is employed by or member of an entity on the disclosure list
200+
Bringing in experts can happen at any time in the development process and
201+
needs to be handled in a timely manner.
202+
203+
If an expert is employed by or a member of an entity on the disclosure list
198204
provided by the disclosing party, then participation will be requested from
199205
the relevant entity.
200206

201-
If not, then the disclosing party will be informed about the experts
207+
If not, then the disclosing party will be informed about the experts'
202208
participation. The experts are covered by the Memorandum of Understanding
203-
and the disclosing party is requested to acknowledge the participation. In
204-
case that the disclosing party has a compelling reason to object, then this
205-
objection has to be raised within five work days and resolved with the
206-
incident team immediately. If the disclosing party does not react within
207-
five work days this is taken as silent acknowledgement.
209+
and the disclosing party is requested to acknowledge their participation.
210+
In the case where the disclosing party has a compelling reason to object,
211+
any objection must to be raised within five working days and resolved with
212+
the incident team immediately. If the disclosing party does not react
213+
within five working days this is taken as silent acknowledgment.
208214

209-
After acknowledgement or resolution of an objection the expert is disclosed
210-
by the incident team and brought into the development process.
215+
After the incident team acknowledges or resolves an objection, the expert
216+
is disclosed and brought into the development process.
211217

212218
List participants may not communicate about the issue outside of the
213219
private mailing list. List participants may not use any shared resources
214220
(e.g. employer build farms, CI systems, etc) when working on patches.
215221

222+
Early access
223+
""""""""""""
224+
225+
The patches discussed and developed on the list can neither be distributed
226+
to any individual who is not a member of the response team nor to any other
227+
organization.
228+
229+
To allow the affected silicon vendors to work with their internal teams and
230+
industry partners on testing, validation, and logistics, the following
231+
exception is provided:
232+
233+
Designated representatives of the affected silicon vendors are
234+
allowed to hand over the patches at any time to the silicon
235+
vendor’s response team. The representative must notify the kernel
236+
response team about the handover. The affected silicon vendor must
237+
have and maintain their own documented security process for any
238+
patches shared with their response team that is consistent with
239+
this policy.
240+
241+
The silicon vendor’s response team can distribute these patches to
242+
their industry partners and to their internal teams under the
243+
silicon vendor’s documented security process. Feedback from the
244+
industry partners goes back to the silicon vendor and is
245+
communicated by the silicon vendor to the kernel response team.
246+
247+
The handover to the silicon vendor’s response team removes any
248+
responsibility or liability from the kernel response team regarding
249+
premature disclosure, which happens due to the involvement of the
250+
silicon vendor’s internal teams or industry partners. The silicon
251+
vendor guarantees this release of liability by agreeing to this
252+
process.
216253

217254
Coordinated release
218255
"""""""""""""""""""
219256

220-
The involved parties will negotiate the date and time where the embargo
221-
ends. At that point the prepared mitigations are integrated into the
222-
relevant kernel trees and published. There is no pre-notification process:
223-
fixes are published in public and available to everyone at the same time.
257+
The involved parties will negotiate the date and time when the embargo
258+
ends. At that point, the prepared mitigations are published into the
259+
relevant kernel trees. There is no pre-notification process: the
260+
mitigations are published in public and available to everyone at the same
261+
time.
224262

225263
While we understand that hardware security issues need coordinated embargo
226-
time, the embargo time should be constrained to the minimum time which is
227-
required for all involved parties to develop, test and prepare the
264+
time, the embargo time should be constrained to the minimum time that is
265+
required for all involved parties to develop, test, and prepare their
228266
mitigations. Extending embargo time artificially to meet conference talk
229-
dates or other non-technical reasons is creating more work and burden for
230-
the involved developers and response teams as the patches need to be kept
231-
up to date in order to follow the ongoing upstream kernel development,
232-
which might create conflicting changes.
267+
dates or other non-technical reasons creates more work and burden for the
268+
involved developers and response teams as the patches need to be kept up to
269+
date in order to follow the ongoing upstream kernel development, which
270+
might create conflicting changes.
233271

234272
CVE assignment
235273
""""""""""""""
@@ -275,34 +313,35 @@ an involved disclosed party. The current ambassadors list:
275313

276314
If you want your organization to be added to the ambassadors list, please
277315
contact the hardware security team. The nominated ambassador has to
278-
understand and support our process fully and is ideally well connected in
316+
understand and support our process fully and is ideally well-connected in
279317
the Linux kernel community.
280318

281319
Encrypted mailing-lists
282320
-----------------------
283321

284-
We use encrypted mailing-lists for communication. The operating principle
322+
We use encrypted mailing lists for communication. The operating principle
285323
of these lists is that email sent to the list is encrypted either with the
286-
list's PGP key or with the list's S/MIME certificate. The mailing-list
324+
list's PGP key or with the list's S/MIME certificate. The mailing list
287325
software decrypts the email and re-encrypts it individually for each
288326
subscriber with the subscriber's PGP key or S/MIME certificate. Details
289-
about the mailing-list software and the setup which is used to ensure the
327+
about the mailing list software and the setup that is used to ensure the
290328
security of the lists and protection of the data can be found here:
291329
https://korg.wiki.kernel.org/userdoc/remail.
292330

293331
List keys
294332
^^^^^^^^^
295333

296-
For initial contact see :ref:`Contact`. For incident specific mailing-lists
297-
the key and S/MIME certificate are conveyed to the subscribers by email
298-
sent from the specific list.
334+
For initial contact see the :ref:`Contact` section above. For incident
335+
specific mailing lists, the key and S/MIME certificate are conveyed to the
336+
subscribers by email sent from the specific list.
299337

300-
Subscription to incident specific lists
338+
Subscription to incident-specific lists
301339
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
302340

303-
Subscription is handled by the response teams. Disclosed parties who want
304-
to participate in the communication send a list of potential subscribers to
305-
the response team so the response team can validate subscription requests.
341+
Subscription to incident-specific lists is handled by the response teams.
342+
Disclosed parties who want to participate in the communication send a list
343+
of potential experts to the response team so the response team can validate
344+
subscription requests.
306345

307346
Each subscriber needs to send a subscription request to the response team
308347
by email. The email must be signed with the subscriber's PGP key or S/MIME

drivers/base/core.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/mutex.h>
2626
#include <linux/pm_runtime.h>
2727
#include <linux/netdevice.h>
28+
#include <linux/rcupdate.h>
2829
#include <linux/sched/signal.h>
2930
#include <linux/sched/mm.h>
3031
#include <linux/string_helpers.h>
@@ -2640,6 +2641,7 @@ static const char *dev_uevent_name(const struct kobject *kobj)
26402641
static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env)
26412642
{
26422643
const struct device *dev = kobj_to_dev(kobj);
2644+
struct device_driver *driver;
26432645
int retval = 0;
26442646

26452647
/* add device node properties if present */
@@ -2668,8 +2670,12 @@ static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env)
26682670
if (dev->type && dev->type->name)
26692671
add_uevent_var(env, "DEVTYPE=%s", dev->type->name);
26702672

2671-
if (dev->driver)
2672-
add_uevent_var(env, "DRIVER=%s", dev->driver->name);
2673+
/* Synchronize with module_remove_driver() */
2674+
rcu_read_lock();
2675+
driver = READ_ONCE(dev->driver);
2676+
if (driver)
2677+
add_uevent_var(env, "DRIVER=%s", driver->name);
2678+
rcu_read_unlock();
26732679

26742680
/* Add common DT information about the device */
26752681
of_device_uevent(dev, env);
@@ -2739,11 +2745,8 @@ static ssize_t uevent_show(struct device *dev, struct device_attribute *attr,
27392745
if (!env)
27402746
return -ENOMEM;
27412747

2742-
/* Synchronize with really_probe() */
2743-
device_lock(dev);
27442748
/* let the kset specific function add its keys */
27452749
retval = kset->uevent_ops->uevent(&dev->kobj, env);
2746-
device_unlock(dev);
27472750
if (retval)
27482751
goto out;
27492752

drivers/base/module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/errno.h>
88
#include <linux/slab.h>
99
#include <linux/string.h>
10+
#include <linux/rcupdate.h>
1011
#include "base.h"
1112

1213
static char *make_driver_name(const struct device_driver *drv)
@@ -97,6 +98,9 @@ void module_remove_driver(const struct device_driver *drv)
9798
if (!drv)
9899
return;
99100

101+
/* Synchronize with dev_uevent() */
102+
synchronize_rcu();
103+
100104
sysfs_remove_link(&drv->p->kobj, "module");
101105

102106
if (drv->owner)

rust/kernel/firmware.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//! Firmware abstraction
44
//!
5-
//! C header: [`include/linux/firmware.h`](srctree/include/linux/firmware.h")
5+
//! C header: [`include/linux/firmware.h`](srctree/include/linux/firmware.h)
66
77
use crate::{bindings, device::Device, error::Error, error::Result, str::CStr};
88
use core::ptr::NonNull;

0 commit comments

Comments
 (0)