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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Feb 2024 11:44:16 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: "Ricardo B. Marliere" <ricardo@...liere.net>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dio: make dio_bus_type const

On Sun, Feb 11, 2024 at 12:40:16PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the dio_bus_type variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
> 
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@...liere.net>
> ---
>  drivers/dio/dio-driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c
> index 69c46935ffc7..2d9fa6011945 100644
> --- a/drivers/dio/dio-driver.c
> +++ b/drivers/dio/dio-driver.c
> @@ -123,7 +123,7 @@ static int dio_bus_match(struct device *dev, struct device_driver *drv)
>  }
>  
>  
> -struct bus_type dio_bus_type = {
> +const struct bus_type dio_bus_type = {
>  	.name	= "dio",
>  	.match	= dio_bus_match,
>  	.probe	= dio_device_probe,
> 

Don't you also have to change this in include/linux/dio.h?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ