lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7394f5cc-35be-0bc8-f92d-bb9e71d3f85c@csgroup.eu>
Date:   Sat, 17 Dec 2022 10:05:15 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Allen Webb <allenwebb@...gle.com>,
        "linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Luis Chamberlain <mcgrof@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v7 1/5] module.h: MODULE_DEVICE_TABLE for built-in modules



Le 16/12/2022 à 23:16, Allen Webb a écrit :
> Implement MODULE_DEVICE_TABLE for build-in modules to make it possible
> to generate a builtin.alias file to complement modules.alias.
> 
> Signed-off-by: Allen Webb <allenwebb@...gle.com>
> ---
>   include/linux/module.h | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/module.h b/include/linux/module.h
> index ec61fb53979a9..49e4019393127 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -243,7 +243,15 @@ extern void cleanup_module(void);
>   extern typeof(name) __mod_##type##__##name##_device_table		\
>     __attribute__ ((unused, alias(__stringify(name))))
>   #else  /* !MODULE */
> -#define MODULE_DEVICE_TABLE(type, name)
> +/* The names may not be unique for built-in modules, so include the module name
> + * to guarantee uniqueness.
> + */

This is network only comment style.

Other parts of kenel have different style, see 
https://docs.kernel.org/process/coding-style.html#commenting

> +#define MODULE_DEVICE_TABLE(type, name)					\
> +extern void *CONCATENATE(						\

'extern' keyword is pointless of function prototypes and deprecated. 
Don't add new occurences.

> +	CONCATENATE(__mod_##type##__##name##__,				\
> +		__KBUILD_MODNAME),					\
> +	_device_table)							\
> +	__attribute__ ((unused, alias(__stringify(name))))
>   #endif
>   
>   /* Version of form [<epoch>:]<version>[-<extra-version>].

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ