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]
Date:   Mon, 12 Dec 2016 11:04:04 -0800
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Imran Khan <kimran@...eaurora.org>
Cc:     andy.gross@...aro.org, lee.jones@...aro.org,
        David Brown <david.brown@...aro.org>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:ARM/QUALCOMM SUPPORT" <linux-arm-msm@...r.kernel.org>,
        "open list:ARM/QUALCOMM SUPPORT" <linux-soc@...r.kernel.org>
Subject: Re: [PATCH v5] soc: qcom: Add SoC info driver

On Mon 12 Dec 07:14 PST 2016, Imran Khan wrote:

> On 12/5/2016 11:35 PM, Bjorn Andersson wrote:
[..]
> > 
> > Rather than having this based on two huge macros take a look at
> > DEVICE_INT_ATTR() and struct dev_ext_attribute in
> > include/linux/device.h. It looks like if you just put the index in a
> > struct and use container_of to reach that you can replace these with
> > direct functions.
> > 
> > Also, it's perfectly fine to always specify a store operation and use
> > 0444 vs 0644 to control it's availability. So you don't need two sets if
> > you just expose the mode in your macro.
> >
> 
> If I understood this correct, the main idea here is to use dev_ext_attribute
> and avoid wrapper macros. Have tried to implement this suggestion in the 
> subsequent patch set. Please let me know if it looks okay or can be improved
> further. 
>  

Not necessarily using dev_ext_attribute directly, but using the same
design (a struct and container_of) allows you do parameterize these
functions.

Looking forward to v6.

Regards,
Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ