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: <YmJEkoVGCnCXb5Ff@kroah.com>
Date:   Fri, 22 Apr 2022 08:00:50 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     "Luck, Tony" <tony.luck@...el.com>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: [PATCH v2] topology/sysfs: Fix allnoconfig build breakage.

On Thu, Apr 21, 2022 at 07:51:02PM -0700, Luck, Tony wrote:
> On Fri, Apr 22, 2022 at 10:00:54AM +1000, Stephen Rothwell wrote:
> > I assume that there is some good reason that topology_ppin() is not
> > implemented as a static inline function?
> 
> I don't think so. I just cut & pasted how all the other topology_*()
> things were implemented.
> 
> Making it a static inline appears to fix this problem. But before
> embarrassing myself with a third broken version I'll let zero day
> crunch on:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git hide_ppin
> 
> to see if there is some subtle config or arch where the inline trick
> doesn't work.
> 
> Thanks for the idea! :-)

Why not just do the following, which passes my build tests here:


diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index 706dbf8bf249..ac6ad9ab67f9 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -155,9 +155,7 @@ static struct attribute *default_attrs[] = {
 static umode_t topology_is_visible(struct kobject *kobj,
 				   struct attribute *attr, int unused)
 {
-	struct device *dev = kobj_to_dev(kobj);
-
-	if (attr == &dev_attr_ppin.attr && !topology_ppin(dev->id))
+	if (attr == &dev_attr_ppin.attr && !topology_ppin(kobj_to_dev(kobj)->id))
 		return 0;
 
 	return attr->mode;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ