From: Sasha Levin Date: Tue, 6 Apr 2021 15:38:29 +0000 (-0400) Subject: Add missing commit to backport of queue-5.4/module-merge-repetitive-strings-in-module... X-Git-Tag: v4.4.265~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4dea5118093dddbc7459daab15d4f3cca3840369;p=thirdparty%2Fkernel%2Fstable-queue.git Add missing commit to backport of queue-5.4/module-merge-repetitive-strings-in-module_sig_check.patch Signed-off-by: Sasha Levin --- 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 index 00000000000..a48a9d66f01 --- /dev/null +++ b/queue-5.4/modsign-print-module-name-along-with-error-message.patch @@ -0,0 +1,34 @@ +From eef3727cad147be181567195df98f0a53fd05fdb Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 15 Jan 2020 15:49:31 +0100 +Subject: modsign: print module name along with error message + +From: Jessica Yu + +[ 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 +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-5.4/module-merge-repetitive-strings-in-module_sig_check.patch b/queue-5.4/module-merge-repetitive-strings-in-module_sig_check.patch index 73efe4f349f..1dd1e47e794 100644 --- a/queue-5.4/module-merge-repetitive-strings-in-module_sig_check.patch +++ b/queue-5.4/module-merge-repetitive-strings-in-module_sig_check.patch @@ -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 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 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 diff --git a/queue-5.4/series b/queue-5.4/series index 8dc0fd93484..4ba53edf8e8 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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