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] [day] [month] [year] [list]
Message-ID: <20200325105306.GA3146321@kroah.com>
Date:   Wed, 25 Mar 2020 11:53:06 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     linux-kernel@...r.kernel.org,
        nicholas.johnson-opensource@...look.com.au
Subject: Re: [PATCH v2 2/2] nvmem: core: use is_bin_visible for permissions

On Wed, Mar 25, 2020 at 10:40:10AM +0000, Srinivas Kandagatla wrote:
> 
> 
> On 25/03/2020 10:21, Greg KH wrote:
> > > -
> > >   const struct attribute_group **nvmem_sysfs_get_groups(
> > >   					struct nvmem_device *nvmem,
> > >   					const struct nvmem_config *config)
> > You no longer need any parameters for this function, right?
> no we do not need that, I can update that in next version.

Ok.

> > Also, you really don't even need the function, just point to the
> > variable instead.
> We have a use case where in the user can chose to not have sysfs entry,
> specially if we have hypervisor trapping access to some range of entries in
> nvmem. This is enforced using CONFIG_NVMEM_SYSFS option.
> 
> Currently in upstream we have a stub function when CONFIG_NVMEM_SYSFS is not
> selected returning NULL.
> 
> If we want to remove this function and subsequently the nvmem-sysfs.c file
> then we have to have #ifdef in the code which am okay to do if that is
> something that you are keen on.

You can still do it in the .h file, defining the variable as NULL if
that config option is not enabled.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ