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: <Zcsu7nj1MPzrES2x@pluto>
Date: Tue, 13 Feb 2024 08:57:18 +0000
From: Cristian Marussi <cristian.marussi@....com>
To: "Ricardo B. Marliere" <ricardo@...liere.net>
Cc: Sudeep Holla <sudeep.holla@....com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 1/2] firmware: arm_ffa: Make ffa_bus_type const

On Sun, Feb 11, 2024 at 12:51:29PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the ffa_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>

Reviewed-by: Cristian Marussi <cristian.marussi@....com>

Thanks,
Cristian

> ---
>  drivers/firmware/arm_ffa/bus.c | 2 +-
>  include/linux/arm_ffa.h        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
> index 1c7940ba5539..2f557e90f2eb 100644
> --- a/drivers/firmware/arm_ffa/bus.c
> +++ b/drivers/firmware/arm_ffa/bus.c
> @@ -105,7 +105,7 @@ static struct attribute *ffa_device_attributes_attrs[] = {
>  };
>  ATTRIBUTE_GROUPS(ffa_device_attributes);
>  
> -struct bus_type ffa_bus_type = {
> +const struct bus_type ffa_bus_type = {
>  	.name		= "arm_ffa",
>  	.match		= ffa_device_match,
>  	.probe		= ffa_device_probe,
> diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
> index 3d0fde57ba90..c906f666ff5d 100644
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
> @@ -209,7 +209,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev) { return false; }
>  #define module_ffa_driver(__ffa_driver)	\
>  	module_driver(__ffa_driver, ffa_register, ffa_unregister)
>  
> -extern struct bus_type ffa_bus_type;
> +extern const struct bus_type ffa_bus_type;
>  
>  /* FFA transport related */
>  struct ffa_partition_info {
> 
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ