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: <2023080320-dinner-ravine-7d18@gregkh>
Date:   Thu, 3 Aug 2023 20:36:10 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Eric DeVolder <eric.devolder@...cle.com>
Cc:     linux-kernel@...r.kernel.org, david@...hat.com, osalvador@...e.de,
        corbet@....net, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org, bhe@...hat.com,
        ebiederm@...ssion.com, kexec@...ts.infradead.org, hpa@...or.com,
        rafael@...nel.org, vgoyal@...hat.com, dyoung@...hat.com,
        lf32.dev@...il.com, akpm@...ux-foundation.org,
        naveen.n.rao@...ux.vnet.ibm.com, zohar@...ux.ibm.com,
        bhelgaas@...gle.com, vbabka@...e.cz, tiwai@...e.de,
        seanjc@...gle.com, linux@...ssschuh.net, vschneid@...hat.com,
        linux-mm@...ck.org, linux-doc@...r.kernel.org,
        sourabhjain@...ux.ibm.com, konrad.wilk@...cle.com,
        boris.ostrovsky@...cle.com
Subject: Re: [PATCH v25 01/10] drivers/base: refactor cpu.c to use
 .is_visible()

On Thu, Aug 03, 2023 at 01:20:28PM -0500, Eric DeVolder wrote:
> 
> 
> On 7/21/23 11:32, Eric DeVolder wrote:
> > 
> > 
> > On 7/3/23 11:53, Eric DeVolder wrote:
> > > 
> > > 
> > > On 7/3/23 08:05, Greg KH wrote:
> > > > On Thu, Jun 29, 2023 at 03:21:10PM -0400, Eric DeVolder wrote:
> > > > >   - the function body of the callback functions are now wrapped with
> > > > >     IS_ENABLED(); as the callback function must exist now that the
> > > > >     attribute is always compiled-in (though not necessarily visible).
> > > > 
> > > > Why do you need to do this last thing?  Is it a code savings goal?  Or
> > > > something else?  The file will not be present in the system if the
> > > > option is not enabled, so it should be safe to not do this unless you
> > > > feel it's necessary for some reason?
> > > 
> > > To accommodate the request, all DEVICE_ATTR() must be
> > > unconditionally present in this file. The DEVICE_ATTR() requires the
> > > .show() callback. As the callback is referenced from a data
> > > structure, the callback has to be present for link. All the
> > > callbacks for these attributes are in this file.
> > > 
> > > I have two basic choices for gutting the function body if the config
> > > feature is not enabled. I can either use #ifdef or IS_ENABLED().
> > > Thomas has made it clear I need to use IS_ENABLED(). I can certainly
> > > use #ifdef (which is what I did in v24).
> > > 
> > > > 
> > > > Not doing this would make the diff easier to read :)
> > > 
> > > I agree this is messy. I'm not really sure what this request/effort
> > > achieves as these attributes are not strongly related (unlike
> > > cacheinfo) and the way the file was before results in less code.
> > > 
> > > At any rate, please indicate if you'd rather I use #ifdef.
> > > Thanks for your time!
> > > eric
> > > 
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > 
> > Hi Greg,
> > I was wondering if you might weigh-in so that I can proceed.
> > 
> > I think there are three options on the table:
> > - use #ifdef to comment out these function bodies, which keeps the diff much more readable
> > - use IS_ENABLED() as Thomas has requested I do, but makes the diff more difficult to read
> > - remove this refactor altogether, perhaps post-poning until after this
> > crash hotplug series merges, as this refactor is largely unrelated to
> > crash hotplug.
> > 
> > Thank you for your time on this topic!
> > eric
> 
> Hi Greg,
> If you have an opinion on how to proceed, please provide.

Sorry, totally swamped by "stuff".  I don't know, use your judgement
here and send a new version, don't wait for me to weigh in on design
decisions for longer than a week.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ