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: <e7a48398-6ea2-458c-bb2d-8142c8086d36@infradead.org>
Date: Thu, 6 Nov 2025 21:46:57 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 Jonathan Corbet <corbet@....net>,
 Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
 linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v1 1/2] doc: kdoc: Handle DEFINE_IDTENTRY_*() cases

Hi,

On 11/6/25 2:12 AM, Andy Shevchenko wrote:
> We have an unparsed kernel-doc for spurious_interrupt() IDTENTRY.
> Update kdoc to handle that.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  scripts/lib/kdoc/kdoc_parser.py | 27 +++++++++++++++++++++++----
>  1 file changed, 23 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
> index f7dbb0868367..b583edd80a52 100644
> --- a/scripts/lib/kdoc/kdoc_parser.py
> +++ b/scripts/lib/kdoc/kdoc_parser.py
> @@ -1430,6 +1430,25 @@ class KernelDoc:
>  
>          return proto
>  
> +    def idtentry_munge(self, ln, proto):
> +        """
> +        Handle DEFINE_IDTENTRY_*() definitions
> +        """
> +
> +        name = None
> +
> +        # Replace DEFINE_IDTENTRY_IRQ with correct return type & function name
> +        r = KernRe(r'DEFINE_IDTENTRY_IRQ\((.*?)\)')
> +        if r.search(proto):
> +            name = r.group(1)
> +
> +        if not name:
> +            self.emit_msg(ln, f"Unrecognized IDTENTRY format:\n{proto}\n")
> +        else:
> +            proto = f"static inline void {name}((struct pt_regs *regs, unsigned long error_code)"

Seems to be an extra '(' here ...................^^^

Oh, weird: is the comma inside function parameters converted to a '#' somewhere?
See below in SYNOPSIS.


Output from testing says: (-man format output)

NAME
       spurious_interrupt - Catch all for interrupts raised on unused vectors

SYNOPSIS
       void spurious_interrupt ((struct pt_regs *regs# unsigned long error_code
       );

ARGUMENTS
       error_code  The vector number

> +
> +        return proto
> +
>      def tracepoint_munge(self, ln, proto):
>          """
>          Handle tracepoint definitions
> @@ -1499,13 +1518,13 @@ class KernelDoc:
>              # Handle special declaration syntaxes
>              #
>              if 'SYSCALL_DEFINE' in self.entry.prototype:
> -                self.entry.prototype = self.syscall_munge(ln,
> -                                                          self.entry.prototype)
> +                self.entry.prototype = self.syscall_munge(ln, self.entry.prototype)
> +            elif 'DEFINE_IDTENTRY' in self.entry.prototype:
> +                self.entry.prototype = self.idtentry_munge(ln, self.entry.prototype)
>              else:
>                  r = KernRe(r'TRACE_EVENT|DEFINE_EVENT|DEFINE_SINGLE_EVENT')
>                  if r.search(self.entry.prototype):
> -                    self.entry.prototype = self.tracepoint_munge(ln,
> -                                                                 self.entry.prototype)
> +                    self.entry.prototype = self.tracepoint_munge(ln, self.entry.prototype)
>              #
>              # ... and we're done
>              #

-- 
~Randy


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ