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: <8123c1ca-f06c-8d42-7553-c0907580ef52@linux.intel.com>
Date: Sun, 25 May 2025 23:59:55 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Suma Hegde <Suma.Hegde@....com>, Arnd Bergmann <arnd@...nel.org>
cc: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>, 
    Hans de Goede <hdegoede@...hat.com>, Arnd Bergmann <arnd@...db.de>, 
    Carlos Bilbao <carlos.bilbao@...nel.org>, 
    Yazen Ghannam <yazen.ghannam@....com>, 
    "Borislav Petkov (AMD)" <bp@...en8.de>, 
    platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/x86/amd/hsmp: fix building with
 CONFIG_HWMON=m

On Fri, 23 May 2025, Suma Hegde wrote:

> Hi Arnd,
> 
> 
> On 5/22/2025 8:08 PM, Arnd Bergmann wrote:
> > Caution: This message originated from an External Source. Use proper caution
> > when opening attachments, clicking links, or responding.
> > 
> > 
> > From: Arnd Bergmann <arnd@...db.de>
> > 
> > When CONFIG_HWMON is built as a loadable module, the HSMP drivers
> > cannot be built-in:
> > 
> > ERROR: modpost: "hsmp_create_sensor"
> > [drivers/platform/x86/amd/hsmp/amd_hsmp.ko] undefined!
> > ERROR: modpost: "hsmp_create_sensor"
> > [drivers/platform/x86/amd/hsmp/hsmp_acpi.ko] undefined!
> > 
> > Enforce that through the usual Kconfig dependnecy trick.
> > 
> > Fixes: 92c025db52bb ("platform/x86/amd/hsmp: Report power via hwmon
> > sensors")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > ---
> >   drivers/platform/x86/amd/hsmp/Kconfig | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/platform/x86/amd/hsmp/Kconfig
> > b/drivers/platform/x86/amd/hsmp/Kconfig
> > index d6f7a62d55b5..2911120792e8 100644
> > --- a/drivers/platform/x86/amd/hsmp/Kconfig
> > +++ b/drivers/platform/x86/amd/hsmp/Kconfig
> > @@ -12,6 +12,7 @@ menu "AMD HSMP Driver"
> >   config AMD_HSMP_ACPI
> >          tristate "AMD HSMP ACPI device driver"
> >          depends on ACPI
> > +       depends on HWMON || !HWMON
> 
> 
> Thanks for sending this fix.  I verified it.
> 
> Along with this  fix, I will change IS_REACHABLE() to IS_ENABLED() in hsmp.h
> as its not necessary and send v2 of this patch.
> 
> -#if IS_REACHABLE(CONFIG_HWMON)
> +#if IS_ENABLED(CONFIG_HWMON)
>  int hsmp_create_sensor(struct device *dev, u16 sock_ind);
>  #else
> static inline int hsmp_create_sensor(struct device *dev, u16 sock_ind) {
> return 0; }
> #endif
> 
> >          select AMD_HSMP
> >          help
> >            Host System Management Port (HSMP) interface is a mailbox
> > interface
> > @@ -29,6 +30,7 @@ config AMD_HSMP_ACPI
> > 
> >   config AMD_HSMP_PLAT
> >          tristate "AMD HSMP platform device driver"
> > +       depends on HWMON || !HWMON
> >          select AMD_HSMP
> >          help
> >            Host System Management Port (HSMP) interface is a mailbox
> > interface

Hi,

I've taken Arnd's patch now as the merge window is pressing in and this 
issue is disturbing build testing.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ