All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Aaron Tomlin <atomlin@redhat.com>,
	"mcgrof@kernel.org" <mcgrof@kernel.org>
Cc: "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 03/13] module: Make internal.h more compliant
Date: Thu, 10 Feb 2022 11:20:08 +0000	[thread overview]
Message-ID: <4591a317-9e4f-3608-2e3b-6c213d295bc0@csgroup.eu> (raw)
In-Reply-To: <20220209170358.3266629-4-atomlin@redhat.com>



Le 09/02/2022 à 18:03, Aaron Tomlin a écrit :
> This patch will address the following warning and style violations
> generated by ./scripts/checkpatch.pl:
> 
>    WARNING: Use #include <linux/module.h> instead of <asm/module.h>
>    #10: FILE: kernel/module/internal.h:10:
>    +#include <asm/module.h>
> 
>    CHECK: spaces preferred around that '-' (ctx:VxV)
>    #18: FILE: kernel/module/internal.h:18:
>    +#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
> 						   ^
>    CHECK: extern prototypes should be avoided in .h files
>    #84: FILE: kernel/module/internal.h:84:
>    +extern int mod_verify_sig(const void *mod, struct load_info *info);
> 
> Note: Fortunately, the multiple-include optimisation found in
> include/linux/module.h will prevent duplication/or inclusion more than
> once.
> 
> Fixes: f314dfea16a ("modsign: log module name in the event of an error")
> Signed-off-by: Aaron Tomlin <atomlin@redhat.com>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   kernel/module/internal.h | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/module/internal.h b/kernel/module/internal.h
> index 1a4b33ce9f5f..1cf5d6dabc97 100644
> --- a/kernel/module/internal.h
> +++ b/kernel/module/internal.h
> @@ -6,7 +6,8 @@
>    */
>   
>   #include <linux/elf.h>
> -#include <asm/module.h>
> +#include <linux/compiler.h>
> +#include <linux/module.h>
>   #include <linux/mutex.h>
>   
>   #ifndef ARCH_SHF_SMALL
> @@ -14,7 +15,7 @@
>   #endif
>   
>   /* If this is set, the section belongs in the init part of the module */
> -#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
> +#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG - 1))
>   /* Maximum number of characters written by module_flags() */
>   #define MODULE_FLAGS_BUF_SIZE (TAINT_FLAGS_COUNT + 4)
>   #define MODULE_SECT_READ_SIZE (3 /* "0x", "\n" */ + (BITS_PER_LONG / 4))
> @@ -55,7 +56,7 @@ struct load_info {
>   	} index;
>   };
>   
> -extern int mod_verify_sig(const void *mod, struct load_info *info);
> +int mod_verify_sig(const void *mod, struct load_info *info);
>   
>   #ifdef CONFIG_MODULE_DECOMPRESS
>   int module_decompress(struct load_info *info, const void *buf, size_t size);

  reply	other threads:[~2022-02-10 11:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 17:03 [PATCH v5 00/13] module: core code clean up Aaron Tomlin
2022-02-09 17:03 ` [PATCH v5 01/13] module: Move all into module/ Aaron Tomlin
2022-02-10 11:11   ` Christophe Leroy
2022-02-10 14:45     ` Aaron Tomlin
2022-02-10 17:02       ` Joe Perches
2022-02-10 17:22         ` Aaron Tomlin
2022-02-10 18:50         ` Luis Chamberlain
2022-02-09 17:03 ` [PATCH v5 02/13] module: Simple refactor in preparation for split Aaron Tomlin
2022-02-10 11:18   ` Christophe Leroy
2022-02-10 16:26     ` Aaron Tomlin
2022-02-09 17:03 ` [PATCH v5 03/13] module: Make internal.h more compliant Aaron Tomlin
2022-02-10 11:20   ` Christophe Leroy [this message]
2022-02-09 17:03 ` [PATCH v5 04/13] module: Move livepatch support to a separate file Aaron Tomlin
2022-02-09 18:51   ` Christophe Leroy
2022-02-10 11:44   ` Christophe Leroy
2022-02-10 17:20     ` Aaron Tomlin
2022-02-09 17:03 ` [PATCH v5 05/13] module: Move latched RB-tree " Aaron Tomlin
2022-02-10 12:03   ` Christophe Leroy
2022-02-10 22:41     ` Aaron Tomlin
2022-02-09 17:03 ` [PATCH v5 06/13] module: Move strict rwx " Aaron Tomlin
2022-02-10 12:21   ` Christophe Leroy
2022-02-11 11:09     ` 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=4591a317-9e4f-3608-2e3b-6c213d295bc0@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 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.