* Re: Patch "module: merge repetitive strings in module_sig_check()" has been added to the 5.10-stable tree
[not found] <20210322030544.97E2961930@mail.kernel.org>
@ 2021-03-22 8:31 ` Sergey Shtylyov
2021-03-22 8:55 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2021-03-22 8:31 UTC (permalink / raw)
To: Sasha Levin; +Cc: stable-commits, stable
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@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";
> + 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch "module: merge repetitive strings in module_sig_check()" has been added to the 5.10-stable tree
2021-03-22 8:31 ` Patch "module: merge repetitive strings in module_sig_check()" has been added to the 5.10-stable tree Sergey Shtylyov
@ 2021-03-22 8:55 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-03-22 8:55 UTC (permalink / raw)
To: Sergey Shtylyov; +Cc: Sasha Levin, stable-commits, stable
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;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@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")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-22 8:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210322030544.97E2961930@mail.kernel.org>
2021-03-22 8:31 ` Patch "module: merge repetitive strings in module_sig_check()" has been added to the 5.10-stable tree Sergey Shtylyov
2021-03-22 8:55 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.