Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+109 -63
+96 -57
Documentation/process/embargoed-hardware-issues.rst
··· 13 13 Hardware issues like Meltdown, Spectre, L1TF etc. must be treated 14 14 differently because they usually affect all Operating Systems ("OS") and 15 15 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. 19 19 20 20 .. _Contact: 21 21 ··· 32 32 <securitybugs>`) instead. 33 33 34 34 The team can be contacted by email at <hardware-security@kernel.org>. 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. 37 37 38 38 The list is encrypted and email to the list can be sent by either PGP or 39 39 S/MIME encrypted and must be signed with the reporter's PGP key or S/MIME ··· 43 43 - PGP: https://www.kernel.org/static/files/hardware-security.asc 44 44 - S/MIME: https://www.kernel.org/static/files/hardware-security.crt 45 45 46 - While hardware security issues are often handled by the affected hardware 46 + While hardware security issues are often handled by the affected silicon 47 47 vendor, we welcome contact from researchers or individuals who have 48 48 identified a potential hardware flaw. 49 49 ··· 65 65 ability to access the embargoed information, but are obliged to 66 66 confidentiality by their employment contract. Linux Foundation IT 67 67 personnel are also responsible for operating and managing the rest of 68 - kernel.org infrastructure. 68 + kernel.org's infrastructure. 69 69 70 70 The Linux Foundation's current director of IT Project infrastructure is 71 71 Konstantin Ryabitsev. ··· 85 85 86 86 The Linux kernel community has a deep understanding of the requirement to 87 87 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. 89 89 90 90 The Linux kernel community has successfully handled hardware security 91 91 issues in the past and has the necessary mechanisms in place to allow ··· 103 103 All involved developers pledge to adhere to the embargo rules and to keep 104 104 the received information confidential. Violation of the pledge will lead to 105 105 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 107 107 the offender from future issues. The impact of this consequence is a highly 108 108 effective deterrent in our community. In case a violation happens the 109 109 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 111 111 immediately to the Hardware security officers. 112 112 113 113 ··· 124 124 Start of Disclosure 125 125 """"""""""""""""""" 126 126 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. 132 134 133 135 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, 135 137 further disclosure, and coordination of fixes. 136 138 137 139 The hardware security team will provide the disclosing party a list of ··· 160 158 - The disclosed entities can be contacted to name experts who should 161 159 participate in the mitigation development. 162 160 163 - - If an expert which is required to handle an issue is employed by an 164 - listed entity or member of an listed entity, then the response teams can 161 + - If an expert who is required to handle an issue is employed by a listed 162 + entity or member of an listed entity, then the response teams can 165 163 request the disclosure of that expert from that entity. This ensures 166 164 that the expert is also part of the entity's response team. 167 165 ··· 171 169 The disclosing party provides detailed information to the initial response 172 170 team via the specific encrypted mailing-list. 173 171 174 - From our experience the technical documentation of these issues is usually 175 - a sufficient starting point and further technical clarification is best 172 + From our experience, the technical documentation of these issues is usually 173 + a sufficient starting point, and further technical clarification is best 176 174 done via email. 177 175 178 176 Mitigation development ··· 181 179 The initial response team sets up an encrypted mailing-list or repurposes 182 180 an existing one if appropriate. 183 181 184 - Using a mailing-list is close to the normal Linux development process and 185 - has been successfully used in developing mitigations for various hardware 182 + Using a mailing list is close to the normal Linux development process and 183 + has been successfully used to develop mitigations for various hardware 186 184 security issues in the past. 187 185 188 - The mailing-list operates in the same way as normal Linux development. 189 - Patches are posted, discussed and reviewed and if agreed on applied to a 190 - non-public git repository which is only accessible to the participating 186 + The mailing list operates in the same way as normal Linux development. 187 + Patches are posted, discussed, and reviewed and if agreed upon, applied to 188 + a non-public git repository which is only accessible to the participating 191 189 developers via a secure connection. The repository contains the main 192 190 development branch against the mainline kernel and backport branches for 193 191 stable kernel versions as necessary. 194 192 195 193 The initial response team will identify further experts from the Linux 196 - kernel developer community as needed. Bringing in experts can happen at any 197 - time of the development process and needs to be handled in a timely manner. 194 + kernel developer community as needed. Any involved party can suggest 195 + further experts to be included, each of which will be subject to the same 196 + requirements outlined above. 198 197 199 - If an expert is employed by or member of an entity on the disclosure list 198 + Bringing in experts can happen at any time in the development process and 199 + needs to be handled in a timely manner. 200 + 201 + If an expert is employed by or a member of an entity on the disclosure list 200 202 provided by the disclosing party, then participation will be requested from 201 203 the relevant entity. 202 204 203 - If not, then the disclosing party will be informed about the experts 205 + If not, then the disclosing party will be informed about the experts' 204 206 participation. The experts are covered by the Memorandum of Understanding 205 - and the disclosing party is requested to acknowledge the participation. In 206 - case that the disclosing party has a compelling reason to object, then this 207 - objection has to be raised within five work days and resolved with the 208 - incident team immediately. If the disclosing party does not react within 209 - five work days this is taken as silent acknowledgement. 207 + and the disclosing party is requested to acknowledge their participation. 208 + In the case where the disclosing party has a compelling reason to object, 209 + any objection must to be raised within five working days and resolved with 210 + the incident team immediately. If the disclosing party does not react 211 + within five working days this is taken as silent acknowledgment. 210 212 211 - After acknowledgement or resolution of an objection the expert is disclosed 212 - by the incident team and brought into the development process. 213 + After the incident team acknowledges or resolves an objection, the expert 214 + is disclosed and brought into the development process. 213 215 214 216 List participants may not communicate about the issue outside of the 215 217 private mailing list. List participants may not use any shared resources 216 218 (e.g. employer build farms, CI systems, etc) when working on patches. 217 219 220 + Early access 221 + """""""""""" 222 + 223 + The patches discussed and developed on the list can neither be distributed 224 + to any individual who is not a member of the response team nor to any other 225 + organization. 226 + 227 + To allow the affected silicon vendors to work with their internal teams and 228 + industry partners on testing, validation, and logistics, the following 229 + exception is provided: 230 + 231 + Designated representatives of the affected silicon vendors are 232 + allowed to hand over the patches at any time to the silicon 233 + vendor’s response team. The representative must notify the kernel 234 + response team about the handover. The affected silicon vendor must 235 + have and maintain their own documented security process for any 236 + patches shared with their response team that is consistent with 237 + this policy. 238 + 239 + The silicon vendor’s response team can distribute these patches to 240 + their industry partners and to their internal teams under the 241 + silicon vendor’s documented security process. Feedback from the 242 + industry partners goes back to the silicon vendor and is 243 + communicated by the silicon vendor to the kernel response team. 244 + 245 + The handover to the silicon vendor’s response team removes any 246 + responsibility or liability from the kernel response team regarding 247 + premature disclosure, which happens due to the involvement of the 248 + silicon vendor’s internal teams or industry partners. The silicon 249 + vendor guarantees this release of liability by agreeing to this 250 + process. 218 251 219 252 Coordinated release 220 253 """"""""""""""""""" 221 254 222 - The involved parties will negotiate the date and time where the embargo 223 - ends. At that point the prepared mitigations are integrated into the 224 - relevant kernel trees and published. There is no pre-notification process: 225 - fixes are published in public and available to everyone at the same time. 255 + The involved parties will negotiate the date and time when the embargo 256 + ends. At that point, the prepared mitigations are published into the 257 + relevant kernel trees. There is no pre-notification process: the 258 + mitigations are published in public and available to everyone at the same 259 + time. 226 260 227 261 While we understand that hardware security issues need coordinated embargo 228 - time, the embargo time should be constrained to the minimum time which is 229 - required for all involved parties to develop, test and prepare the 262 + time, the embargo time should be constrained to the minimum time that is 263 + required for all involved parties to develop, test, and prepare their 230 264 mitigations. Extending embargo time artificially to meet conference talk 231 - dates or other non-technical reasons is creating more work and burden for 232 - the involved developers and response teams as the patches need to be kept 233 - up to date in order to follow the ongoing upstream kernel development, 234 - which might create conflicting changes. 265 + dates or other non-technical reasons creates more work and burden for the 266 + involved developers and response teams as the patches need to be kept up to 267 + date in order to follow the ongoing upstream kernel development, which 268 + might create conflicting changes. 235 269 236 270 CVE assignment 237 271 """""""""""""" ··· 313 275 314 276 If you want your organization to be added to the ambassadors list, please 315 277 contact the hardware security team. The nominated ambassador has to 316 - understand and support our process fully and is ideally well connected in 278 + understand and support our process fully and is ideally well-connected in 317 279 the Linux kernel community. 318 280 319 281 Encrypted mailing-lists 320 282 ----------------------- 321 283 322 - We use encrypted mailing-lists for communication. The operating principle 284 + We use encrypted mailing lists for communication. The operating principle 323 285 of these lists is that email sent to the list is encrypted either with the 324 - list's PGP key or with the list's S/MIME certificate. The mailing-list 286 + list's PGP key or with the list's S/MIME certificate. The mailing list 325 287 software decrypts the email and re-encrypts it individually for each 326 288 subscriber with the subscriber's PGP key or S/MIME certificate. Details 327 - about the mailing-list software and the setup which is used to ensure the 289 + about the mailing list software and the setup that is used to ensure the 328 290 security of the lists and protection of the data can be found here: 329 291 https://korg.wiki.kernel.org/userdoc/remail. 330 292 331 293 List keys 332 294 ^^^^^^^^^ 333 295 334 - For initial contact see :ref:`Contact`. For incident specific mailing-lists 335 - the key and S/MIME certificate are conveyed to the subscribers by email 336 - sent from the specific list. 296 + For initial contact see the :ref:`Contact` section above. For incident 297 + specific mailing lists, the key and S/MIME certificate are conveyed to the 298 + subscribers by email sent from the specific list. 337 299 338 - Subscription to incident specific lists 300 + Subscription to incident-specific lists 339 301 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 340 302 341 - Subscription is handled by the response teams. Disclosed parties who want 342 - to participate in the communication send a list of potential subscribers to 343 - the response team so the response team can validate subscription requests. 303 + Subscription to incident-specific lists is handled by the response teams. 304 + Disclosed parties who want to participate in the communication send a list 305 + of potential experts to the response team so the response team can validate 306 + subscription requests. 344 307 345 308 Each subscriber needs to send a subscription request to the response team 346 309 by email. The email must be signed with the subscriber's PGP key or S/MIME
+8 -5
drivers/base/core.c
··· 25 25 #include <linux/mutex.h> 26 26 #include <linux/pm_runtime.h> 27 27 #include <linux/netdevice.h> 28 + #include <linux/rcupdate.h> 28 29 #include <linux/sched/signal.h> 29 30 #include <linux/sched/mm.h> 30 31 #include <linux/string_helpers.h> ··· 2641 2640 static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env) 2642 2641 { 2643 2642 const struct device *dev = kobj_to_dev(kobj); 2643 + struct device_driver *driver; 2644 2644 int retval = 0; 2645 2645 2646 2646 /* add device node properties if present */ ··· 2670 2668 if (dev->type && dev->type->name) 2671 2669 add_uevent_var(env, "DEVTYPE=%s", dev->type->name); 2672 2670 2673 - if (dev->driver) 2674 - add_uevent_var(env, "DRIVER=%s", dev->driver->name); 2671 + /* Synchronize with module_remove_driver() */ 2672 + rcu_read_lock(); 2673 + driver = READ_ONCE(dev->driver); 2674 + if (driver) 2675 + add_uevent_var(env, "DRIVER=%s", driver->name); 2676 + rcu_read_unlock(); 2675 2677 2676 2678 /* Add common DT information about the device */ 2677 2679 of_device_uevent(dev, env); ··· 2745 2739 if (!env) 2746 2740 return -ENOMEM; 2747 2741 2748 - /* Synchronize with really_probe() */ 2749 - device_lock(dev); 2750 2742 /* let the kset specific function add its keys */ 2751 2743 retval = kset->uevent_ops->uevent(&dev->kobj, env); 2752 - device_unlock(dev); 2753 2744 if (retval) 2754 2745 goto out; 2755 2746
+4
drivers/base/module.c
··· 7 7 #include <linux/errno.h> 8 8 #include <linux/slab.h> 9 9 #include <linux/string.h> 10 + #include <linux/rcupdate.h> 10 11 #include "base.h" 11 12 12 13 static char *make_driver_name(const struct device_driver *drv) ··· 97 96 98 97 if (!drv) 99 98 return; 99 + 100 + /* Synchronize with dev_uevent() */ 101 + synchronize_rcu(); 100 102 101 103 sysfs_remove_link(&drv->p->kobj, "module"); 102 104
+1 -1
rust/kernel/firmware.rs
··· 2 2 3 3 //! Firmware abstraction 4 4 //! 5 - //! C header: [`include/linux/firmware.h`](srctree/include/linux/firmware.h") 5 + //! C header: [`include/linux/firmware.h`](srctree/include/linux/firmware.h) 6 6 7 7 use crate::{bindings, device::Device, error::Error, error::Result, str::CStr}; 8 8 use core::ptr::NonNull;