Re: Patch "module: merge repetitive strings in module_sig_check()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;a=summary

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@xxxxxxxxxxxxxxx> know about it.

   Why add this patch to the -stable tree? It's just a cleanup...

commit dd8dfb1bde1ec60845b6e32d1150814d8d98b396
Author: Sergey Shtylyov <s.shtylyov@xxxxxxxxxxxx>
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@xxxxxxxxxxx>
     Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>
     Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxxxxxxxx>
     Signed-off-by: Jessica Yu <jeyu@xxxxxxxxxx>
     Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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";
+		reason = "unsigned module";
  		goto decide;
  	case -ENOPKG:
-		reason = "Loading of module with unsupported crypto";
+		reason = "module with unsupported crypto";
  		goto decide;
  	case -ENOKEY:
-		reason = "Loading of module with unavailable key";
+		reason = "module with unavailable key";
  	decide:
  		if (is_module_sig_enforced()) {
-			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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux