lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 22 Feb 2024 23:30:33 +0530
From: Mukesh Ojha <quic_mojha@...cinc.com>
To: <mcgrof@...nel.org>, <russ.weight@...ux.dev>, <gregkh@...uxfoundation.org>,
        <rafael@...nel.org>
CC: <linux-kernel@...r.kernel.org>, Mukesh Ojha <quic_mojha@...cinc.com>
Subject: [PATCH vRFC 8/8] firmware: FW_OPT_UEVENT for all request_firmware family functions

Currently, FW_OPT_UEVENT is used in almost every request_firmware
family function apart from request_firmware_nowait(), however,
request_firmware_nowait() uses much lower level api which does
not assume FW_OPT_UEVENT to be a default flag.

Apply FW_OPT_UEVENT as default flag.

Signed-off-by: Mukesh Ojha <quic_mojha@...cinc.com>
---
 drivers/base/firmware_loader/main.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
index 91a45767a3a7..4650fef9b713 100644
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -985,7 +985,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
 
 	/* Need to pin this module until return */
 	__module_get(THIS_MODULE);
-	ret = __request_firmware(firmware_p, name, device, NULL, 0, 0, opt_flags);
+	ret = __request_firmware(firmware_p, name, device, NULL, 0, 0,
+				 FW_OPT_UEVENT | opt_flags);
 	module_put(THIS_MODULE);
 	return ret;
 }
@@ -1013,8 +1014,7 @@ int
 request_firmware(const struct firmware **firmware_p, const char *name,
 		 struct device *device)
 {
-	return _request_firmware(firmware_p, name, device, NULL, 0, 0,
-				 FW_OPT_UEVENT);
+	return _request_firmware(firmware_p, name, device, NULL, 0, 0, 0);
 }
 EXPORT_SYMBOL(request_firmware);
 
@@ -1034,8 +1034,7 @@ EXPORT_SYMBOL(request_firmware);
 int request_firmware_nowarn(const struct firmware **firmware, const char *name,
 			    struct device *device)
 {
-	return _request_firmware(firmware, name, device, NULL, 0, 0,
-				 FW_OPT_UEVENT | FW_OPT_NO_WARN);
+	return _request_firmware(firmware, name, device, NULL, 0, 0, FW_OPT_NO_WARN);
 }
 EXPORT_SYMBOL_GPL(request_firmware_nowarn);
 
@@ -1054,8 +1053,7 @@ int request_firmware_direct(const struct firmware **firmware_p,
 			    const char *name, struct device *device)
 {
 	return _request_firmware(firmware_p, name, device, NULL, 0, 0,
-				 FW_OPT_UEVENT | FW_OPT_NO_WARN |
-				 FW_OPT_NOFALLBACK_SYSFS);
+				 FW_OPT_NO_WARN | FW_OPT_NOFALLBACK_SYSFS);
 }
 EXPORT_SYMBOL_GPL(request_firmware_direct);
 
@@ -1073,7 +1071,7 @@ int request_firmware_platform(const struct firmware **firmware,
 			      const char *name, struct device *device)
 {
 	return _request_firmware(firmware, name, device, NULL, 0, 0,
-				 FW_OPT_UEVENT | FW_OPT_FALLBACK_PLATFORM);
+				 FW_OPT_FALLBACK_PLATFORM);
 }
 EXPORT_SYMBOL_GPL(request_firmware_platform);
 
@@ -1124,7 +1122,7 @@ request_firmware_into_buf(const struct firmware **firmware_p, const char *name,
 		return -EOPNOTSUPP;
 
 	return _request_firmware(firmware_p, name, device, buf, size, 0,
-				 FW_OPT_UEVENT | FW_OPT_NOCACHE);
+				 FW_OPT_NOCACHE);
 }
 EXPORT_SYMBOL(request_firmware_into_buf);
 
@@ -1149,8 +1147,7 @@ request_partial_firmware_into_buf(const struct firmware **firmware_p,
 		return -EOPNOTSUPP;
 
 	return _request_firmware(firmware_p, name, device, buf, size, offset,
-				 FW_OPT_UEVENT | FW_OPT_NOCACHE |
-				 FW_OPT_PARTIAL);
+				 FW_OPT_NOCACHE | FW_OPT_PARTIAL);
 }
 EXPORT_SYMBOL(request_partial_firmware_into_buf);
 
-- 
2.43.0.254.ga26002b62827


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ