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: <20250110144757.GA1641025@yaz-khff2.amd.com>
Date: Fri, 10 Jan 2025 09:47:57 -0500
From: Yazen Ghannam <yazen.ghannam@....com>
To: Robert Richter <rrichter@....com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	John Allen <john.allen@....com>, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h

On Thu, Jan 09, 2025 at 12:43:09PM +0100, Robert Richter wrote:
> Yazen,
> 
> On 08.01.25 10:10:37, Yazen Ghannam wrote:
> > On Tue, Jan 07, 2025 at 05:19:22PM +0100, Robert Richter wrote:
> > > Seen the following build error:
> > > 
> > >  ./include/linux/prmt.h:5:27: error: unknown type name ‘guid_t’
> > >      5 | int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > >        |                           ^~~~~~
> > > 
> > > The include file uses guid_t but it is not declared. Include
> > > linux/uuid.h to fix this.
> > > 
> > > Cc: Yazen Ghannam <Yazen.Ghannam@....com>
> > > Cc: John Allen <john.allen@....com>
> > > Cc: Borislav Petkov (AMD) <bp@...en8.de>
> > > Signed-off-by: Robert Richter <rrichter@....com>

Reviewed-by: Yazen Ghannam <yazen.ghannam@....com>

> > > ---
> > >  include/linux/prmt.h | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/include/linux/prmt.h b/include/linux/prmt.h
> > > index 9c094294403f..c53ab287e932 100644
> > > --- a/include/linux/prmt.h
> > > +++ b/include/linux/prmt.h
> > > @@ -1,5 +1,7 @@
> > >  /* SPDX-License-Identifier: GPL-2.0-only */
> > >  
> > > +#include <linux/uuid.h>
> > > +
> > >  #ifdef CONFIG_ACPI_PRMT
> > >  void init_prmt(void);
> > >  int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> > > -- 
> > 
> > Hi Robert,
> > 
> > This looks correct. But can you please share how you've encountered the
> > issue?
> 
> sure, I have used it here:
> 
>  https://lore.kernel.org/all/20250107141015.3367194-26-rrichter@amd.com/
> 
> I just included linux/prmt.h to get the declaration of
> acpi_call_prm_handler() without anything else. I assume other users of
> linux/prmt.h indirectly include linux/uuid.h with some other include
> file.
> 

Thanks Robert. This reminded me of a rule, but it took me a bit to find
it again.

Documentation/process/submit-checklist.rst -> "Review your code" #1

I wonder: is there a script, coccinelle test, or something that will
catch this in case we forget?

Thanks,
Yazen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ