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]
Date: Sun, 25 Feb 2024 09:33:22 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: "Ricardo B. Marliere" <ricardo@...liere.net>
Cc: Alex Elder <elder@...e.org>, Johan Hovold <johan@...nel.org>,
	Alex Elder <elder@...nel.org>, greybus-dev@...ts.linaro.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] greybus: constify the struct device_type usage

On Sat, Feb 24, 2024 at 05:22:39PM -0300, Ricardo B. Marliere wrote:
> On 24 Feb 09:43, Alex Elder wrote:
> > On 2/19/24 6:40 AM, Ricardo B. Marliere wrote:
> > > Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
> > > core can properly handle constant struct device_type. Move the
> > > greybus_hd_type, greybus_module_type, greybus_interface_type,
> > > greybus_control_type, greybus_bundle_type and greybus_svc_type variables to
> > > be constant structures as well, placing it into read-only memory which can
> > > not be modified at runtime.
> > > 
> > > Signed-off-by: Ricardo B. Marliere <ricardo@...liere.net>
> > 
> > This looks good to me.  Assuming it compiles cleanly:
> > 
> > Reviewed-by: Alex Elder <elder@...aro.org>
> 
> Hi Alex!
> 
> Thanks for reviewing.
> 
> > 
> > On another subject:
> > 
> > Johan might disagree, but I think it would be nice to make
> > the definitions of the Greybus device types as static (private)
> > and make the is_gb_host_device() etc. functions real functions
> > rather than static inlines in <linux/greybus.h>.
> > 
> > It turns out that all of the is_gb_*() functions are called only
> > from drivers/greybus/core.c; they could all be moved there rather
> > than advertising them in <linux/greybus.h>.
> 
> I guess it depends whether they would be used somewhere else in the
> future. Perhaps it was left there with that intention when it was first
> being developed? I agree, though. Will happily send a patch with this if
> desired.

Let's clean the code up for what we have today.  If it's needed in the
future, we can move the structures then.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ