mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
Driver core fixes for 5.18-rc7
Here is one fix, and 3 documentation updates for 5.18-rc7. The fix is for the firmware loader which resolves a long-reported problem where the credentials of the firmware loader could be set to a userspace process without enough permissions to actually load the firmware image. Many Android vendors have been reporting this for quite some time. The documentation updates are for the embargoed-hardware-issues.rst file to add a new entry, change an existing one, and sort the list to make changes easier in the future. All of these have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYoEMSw8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ynl8wCgw54h8hggK6eikgctGuyoLJZjDR4AnRVNvtQi ItQ1+zHzBjkdz1s/DlM7 =/7MV -----END PGP SIGNATURE----- Merge tag 'driver-core-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here is one fix, and three documentation updates for 5.18-rc7. The fix is for the firmware loader which resolves a long-reported problem where the credentials of the firmware loader could be set to a userspace process without enough permissions to actually load the firmware image. Many Android vendors have been reporting this for quite some time. The documentation updates are for the embargoed-hardware-issues.rst file to add a new entry, change an existing one, and sort the list to make changes easier in the future. All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation/process: Update ARM contact for embargoed hardware issues Documentation/process: Add embargoed HW contact for Ampere Computing Documentation/process: Make groups alphabetical and use tabs consistently firmware_loader: use kernel credentials when reading firmware
This commit is contained in:
commit
0cdd776ec9
2 changed files with 21 additions and 3 deletions
|
|
@ -244,10 +244,11 @@ disclosure of a particular issue, unless requested by a response team or by
|
||||||
an involved disclosed party. The current ambassadors list:
|
an involved disclosed party. The current ambassadors list:
|
||||||
|
|
||||||
============= ========================================================
|
============= ========================================================
|
||||||
ARM Grant Likely <grant.likely@arm.com>
|
|
||||||
AMD Tom Lendacky <tom.lendacky@amd.com>
|
AMD Tom Lendacky <tom.lendacky@amd.com>
|
||||||
IBM Z Christian Borntraeger <borntraeger@de.ibm.com>
|
Ampere Darren Hart <darren@os.amperecomputing.com>
|
||||||
IBM Power Anton Blanchard <anton@linux.ibm.com>
|
ARM Catalin Marinas <catalin.marinas@arm.com>
|
||||||
|
IBM Power Anton Blanchard <anton@linux.ibm.com>
|
||||||
|
IBM Z Christian Borntraeger <borntraeger@de.ibm.com>
|
||||||
Intel Tony Luck <tony.luck@intel.com>
|
Intel Tony Luck <tony.luck@intel.com>
|
||||||
Qualcomm Trilok Soni <tsoni@codeaurora.org>
|
Qualcomm Trilok Soni <tsoni@codeaurora.org>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -735,6 +735,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
|
||||||
size_t offset, u32 opt_flags)
|
size_t offset, u32 opt_flags)
|
||||||
{
|
{
|
||||||
struct firmware *fw = NULL;
|
struct firmware *fw = NULL;
|
||||||
|
struct cred *kern_cred = NULL;
|
||||||
|
const struct cred *old_cred;
|
||||||
bool nondirect = false;
|
bool nondirect = false;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
@ -751,6 +753,18 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
|
||||||
if (ret <= 0) /* error or already assigned */
|
if (ret <= 0) /* error or already assigned */
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We are about to try to access the firmware file. Because we may have been
|
||||||
|
* called by a driver when serving an unrelated request from userland, we use
|
||||||
|
* the kernel credentials to read the file.
|
||||||
|
*/
|
||||||
|
kern_cred = prepare_kernel_cred(NULL);
|
||||||
|
if (!kern_cred) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
old_cred = override_creds(kern_cred);
|
||||||
|
|
||||||
ret = fw_get_filesystem_firmware(device, fw->priv, "", NULL);
|
ret = fw_get_filesystem_firmware(device, fw->priv, "", NULL);
|
||||||
|
|
||||||
/* Only full reads can support decompression, platform, and sysfs. */
|
/* Only full reads can support decompression, platform, and sysfs. */
|
||||||
|
|
@ -776,6 +790,9 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
|
||||||
} else
|
} else
|
||||||
ret = assign_fw(fw, device);
|
ret = assign_fw(fw, device);
|
||||||
|
|
||||||
|
revert_creds(old_cred);
|
||||||
|
put_cred(kern_cred);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fw_abort_batch_reqs(fw);
|
fw_abort_batch_reqs(fw);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue