Hello!
On 22.03.2021 6:05, Sasha Levin wrote:
This is a note to let you know that I've just added the patch titled
module: merge repetitive strings in module_sig_check()
to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su...
The filename of the patch is: module-merge-repetitive-strings-in-module_sig_check.patch and it can be found in the queue-5.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it.
Why add this patch to the -stable tree? It's just a cleanup...
commit dd8dfb1bde1ec60845b6e32d1150814d8d98b396 Author: Sergey Shtylyov s.shtylyov@omprussia.ru Date: Sat Oct 31 23:06:45 2020 +0300
module: merge repetitive strings in module_sig_check() [ Upstream commit 705e9195187d85249fbb0eaa844b1604a98fbc9a ] The 'reason' variable in module_sig_check() points to 3 strings across the *switch* statement, all needlessly starting with the same text. Let's put the starting text into the pr_notice() call -- it saves 21 bytes of the object code (x86 gcc 10.2.1). Suggested-by: Joe Perches <joe@perches.com> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru> Signed-off-by: Jessica Yu <jeyu@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
diff --git a/kernel/module.c b/kernel/module.c index 94f926473e35..3b6dd8200d3d 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2922,16 +2922,17 @@ static int module_sig_check(struct load_info *info, int flags) * enforcing, certain errors are non-fatal. */ case -ENODATA:
reason = "Loading of unsigned module";
goto decide; case -ENOPKG:reason = "unsigned module";
reason = "Loading of module with unsupported crypto";
goto decide; case -ENOKEY:reason = "module with unsupported crypto";
reason = "Loading of module with unavailable key";
decide: if (is_module_sig_enforced()) {reason = "module with unavailable key";
pr_notice("%s: %s is rejected\n", info->name, reason);
pr_notice("%s: loading of %s is rejected\n",
}info->name, reason); return -EKEYREJECTED;
MBR, Sergei
On Mon, Mar 22, 2021 at 11:31:55AM +0300, Sergey Shtylyov wrote:
Hello!
On 22.03.2021 6:05, Sasha Levin wrote:
This is a note to let you know that I've just added the patch titled
module: merge repetitive strings in module_sig_check()
to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su...
The filename of the patch is: module-merge-repetitive-strings-in-module_sig_check.patch and it can be found in the queue-5.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it.
Why add this patch to the -stable tree? It's just a cleanup...
Looks to be needed for ec2a29593c83 ("module: harden ELF info handling")
linux-stable-mirror@lists.linaro.org