Live Patching
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Aaron Tomlin <atomlin@redhat.com>
Cc: "mcgrof@kernel.org" <mcgrof@kernel.org>,
	"cl@linux.com" <cl@linux.com>,
	"pmladek@suse.com" <pmladek@suse.com>,
	"mbenes@suse.cz" <mbenes@suse.cz>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"jeyu@kernel.org" <jeyu@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>,
	"live-patching@vger.kernel.org" <live-patching@vger.kernel.org>,
	"atomlin@atomlin.com" <atomlin@atomlin.com>,
	"ghalat@redhat.com" <ghalat@redhat.com>,
	"allen.lkml@gmail.com" <allen.lkml@gmail.com>,
	"void@manifault.com" <void@manifault.com>,
	"joe@perches.com" <joe@perches.com>,
	"msuchanek@suse.de" <msuchanek@suse.de>,
	"oleksandr@natalenko.name" <oleksandr@natalenko.name>
Subject: Re: [PATCH v5 13/13] module: Move version support into a separate file
Date: Sun, 13 Feb 2022 18:29:39 +0000	[thread overview]
Message-ID: <d3d87e3e-e13f-252a-1c06-f18a78af5d98@csgroup.eu> (raw)
In-Reply-To: <CANfR36gVY+1k7YJy0fn1z+mGv-LqEmZJSvSHXn_BFR4WC+oJrQ@mail.gmail.com>



Le 13/02/2022 à 19:03, Aaron Tomlin a écrit :
> On Thu 2022-02-10 14:28 +0000, Christophe Leroy wrote:
>>
>>
>> Le 09/02/2022 à 18:11, Aaron Tomlin a écrit :
>>> No functional change.
>>>
>>> This patch migrates module version support out of core code into
>>> kernel/module/version.c. In addition simple code refactoring to
>>> make this possible.
>>>
>>> Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
>>> ---
>>>    kernel/module/Makefile   |   1 +
>>>    kernel/module/internal.h |  50 +++++++++++++
>>>    kernel/module/main.c     | 150 +--------------------------------------
>>>    kernel/module/version.c  | 110 ++++++++++++++++++++++++++++
>>>    4 files changed, 163 insertions(+), 148 deletions(-)
>>>    create mode 100644 kernel/module/version.c
>>
>> Sparse reports:
>>
>>     CHECK   kernel/module/version.c
>> kernel/module/version.c:103:6: warning: symbol 'module_layout' was not
>> declared. Should it be static?
> 
> The function module_layout() does not appear to be used. So, I've decided
> to remove it.

I'm not sure you can do that.

 From commit 8c8ef42aee8f ("module: include other structures in module 
version check") I understand that module_layout is there for some signature.


> 
>> Checkpatch:
>>
>>      total: 0 errors, 2 warnings, 3 checks, 337 lines checked
> 
> Ok.
> 
>>> +struct symsearch {
>>> +    const struct kernel_symbol *start, *stop;
>>> +    const s32 *crcs;
>>> +    enum mod_license {
>>> +        NOT_GPL_ONLY,
>>> +        GPL_ONLY,
>>> +    } license;
>>> +};
>>
>> Why don't leave this in main.c ?
> 
> Yes, struct 'symsearch' is not used outside of kernel/module/main.c.
> 
>>> +inline int check_modstruct_version(const struct load_info *info,
>>> +                      struct module *mod)
>>
>> inline is pointless for a non static function
> 
> This was an unfortunate oversight.
> 
>>> +inline int same_magic(const char *amagic, const char *bmagic,
>>> +                 bool has_crcs)
>>
>> Same, not point for inline keyword here.
> 
> Agreed.
> 
> 
> Kind regards,
> 

  reply	other threads:[~2022-02-13 18:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 17:11 [PATCH v5 11/13] module: Move sysfs support into a separate file Aaron Tomlin
2022-02-09 17:11 ` [PATCH v5 12/13] module: Move kdb_modules list out of core code Aaron Tomlin
2022-02-10 14:05   ` Christophe Leroy
2022-02-13 14:14     ` Aaron Tomlin
2022-02-09 17:11 ` [PATCH v5 13/13] module: Move version support into a separate file Aaron Tomlin
2022-02-10 14:28   ` Christophe Leroy
2022-02-13 18:03     ` Aaron Tomlin
2022-02-13 18:29       ` Christophe Leroy [this message]
2022-02-15 15:05         ` Aaron Tomlin
2022-02-15 15:11           ` Christophe Leroy
2022-02-17 15:51       ` Miroslav Benes
2022-02-17 16:26         ` Aaron Tomlin
2022-02-10 14:00 ` [PATCH v5 11/13] module: Move sysfs " Christophe Leroy
2022-02-13 13:32   ` Aaron Tomlin

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=d3d87e3e-e13f-252a-1c06-f18a78af5d98@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=akpm@linux-foundation.org \
    --cc=allen.lkml@gmail.com \
    --cc=atomlin@atomlin.com \
    --cc=atomlin@redhat.com \
    --cc=cl@linux.com \
    --cc=ghalat@redhat.com \
    --cc=jeyu@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mcgrof@kernel.org \
    --cc=msuchanek@suse.de \
    --cc=oleksandr@natalenko.name \
    --cc=pmladek@suse.com \
    --cc=void@manifault.com \
    /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