]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add missing commit to backport of queue-5.4/module-merge-repetitive-strings-in-module...
authorSasha Levin <sashal@kernel.org>
Tue, 6 Apr 2021 15:38:29 +0000 (11:38 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 6 Apr 2021 15:38:29 +0000 (11:38 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.4/modsign-print-module-name-along-with-error-message.patch [new file with mode: 0644]
queue-5.4/module-merge-repetitive-strings-in-module_sig_check.patch
queue-5.4/series

diff --git a/queue-5.4/modsign-print-module-name-along-with-error-message.patch b/queue-5.4/modsign-print-module-name-along-with-error-message.patch
new file mode 100644 (file)
index 0000000..a48a9d6
--- /dev/null
@@ -0,0 +1,34 @@
+From eef3727cad147be181567195df98f0a53fd05fdb Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 15 Jan 2020 15:49:31 +0100
+Subject: modsign: print module name along with error message
+
+From: Jessica Yu <jeyu@kernel.org>
+
+[ Upstream commit e9f35f634e099894f4d6c3b039cd3de5281ee637 ]
+
+It is useful to know which module failed signature verification, so
+print the module name along with the error message.
+
+Signed-off-by: Jessica Yu <jeyu@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/module.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/module.c b/kernel/module.c
+index ab1f97cfe18d..0338fdd6acd8 100644
+--- a/kernel/module.c
++++ b/kernel/module.c
+@@ -2917,7 +2917,7 @@ static int module_sig_check(struct load_info *info, int flags)
+               reason = "Loading of module with unavailable key";
+       decide:
+               if (is_module_sig_enforced()) {
+-                      pr_notice("%s is rejected\n", reason);
++                      pr_notice("%s: %s is rejected\n", info->name, reason);
+                       return -EKEYREJECTED;
+               }
+-- 
+2.30.2
+
index 73efe4f349fd4bb9f8c48b115e5cce3dd109847a..1dd1e47e7941eb799a899d69fdd9ac772a05225c 100644 (file)
@@ -1,4 +1,4 @@
-From 3b69672d8fd44e02cfb51250ecf90d3573a29e7e Mon Sep 17 00:00:00 2001
+From 38b7e23cda6251acddce2003201edaabfe946e2f Mon Sep 17 00:00:00 2001
 From: Sasha Levin <sashal@kernel.org>
 Date: Sat, 31 Oct 2020 23:06:45 +0300
 Subject: module: merge repetitive strings in module_sig_check()
@@ -22,7 +22,7 @@ Signed-off-by: Sasha Levin <sashal@kernel.org>
  1 file changed, 5 insertions(+), 4 deletions(-)
 
 diff --git a/kernel/module.c b/kernel/module.c
-index ab1f97cfe18d..9fe3e9b85348 100644
+index 0338fdd6acd8..9fe3e9b85348 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
 @@ -2908,16 +2908,17 @@ static int module_sig_check(struct load_info *info, int flags)
@@ -41,12 +41,12 @@ index ab1f97cfe18d..9fe3e9b85348 100644
 +              reason = "module with unavailable key";
        decide:
                if (is_module_sig_enforced()) {
--                      pr_notice("%s is rejected\n", reason);
+-                      pr_notice("%s: %s is rejected\n", info->name, reason);
 +                      pr_notice("%s: loading of %s is rejected\n",
 +                                info->name, reason);
                        return -EKEYREJECTED;
                }
  
 -- 
-2.30.1
+2.30.2
 
index 8dc0fd93484316c62af1c0f1ba3c6403c24ed6ad..4ba53edf8e820e524bea1fac854089ad28662397 100644 (file)
@@ -1,5 +1,6 @@
 selinux-vsock-set-sid-for-socket-returned-by-accept.patch
 ipv6-weaken-the-v4mapped-source-check.patch
+modsign-print-module-name-along-with-error-message.patch
 module-merge-repetitive-strings-in-module_sig_check.patch
 module-avoid-goto-s-in-module_sig_check.patch
 module-harden-elf-info-handling.patch