From: Jessica Yu <jeyu@kernel.org>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] modsign: log module name in the event of an error
Date: Sun, 1 Jul 2018 10:36:48 +0200 [thread overview]
Message-ID: <20180701083648.5de5sbskp3atqat2@redbean.fritz.box> (raw)
In-Reply-To: <15a087e0c207e87b0e1e7e0bdd5a09c5d336c224.camel@perches.com>
+++ Joe Perches [29/06/18 21:04 -0700]:
>On Fri, 2018-06-29 at 17:53 +0200, Jessica Yu wrote:
>> Now that we have the load_info struct all initialized (including
>> info->name, which contains the name of the module) before
>> module_sig_check(), make the load_info struct and hence module name
>> available to mod_verify_sig() so that we can log the module name in the
>> event of an error.
>[]
>> diff --git a/kernel/module-internal.h b/kernel/module-internal.h
>[]
>> +extern int mod_verify_sig(const void *mod, struct load_info *info,
>> + unsigned long *_modlen);
>> diff --git a/kernel/module.c b/kernel/module.c
>[]
>> @@ -2778,7 +2758,7 @@ static int module_sig_check(struct load_info *info, int flags)
>> memcmp(mod + info->len - markerlen, MODULE_SIG_STRING, markerlen) == 0) {
>> /* We truncate the module to discard the signature */
>> info->len -= markerlen;
>> - err = mod_verify_sig(mod, &info->len);
>> + err = mod_verify_sig(mod, info, &info->len);
>
>This is the only place this is used correct?
>So why pass info and info->member?
>
>info should be enough
Ah yeah you're right, thanks!
Jessica
prev parent reply other threads:[~2018-07-01 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 15:53 Jessica Yu
2018-06-30 4:04 ` Joe Perches
2018-07-01 8:36 ` Jessica Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180701083648.5de5sbskp3atqat2@redbean.fritz.box \
--to=jeyu@kernel.org \
--cc=dhowells@redhat.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®