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: <20250622134617.06038722@foz.lan>
Date: Sun, 22 Jun 2025 13:46:17 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Jonathan Corbet <corbet@....net>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, Akira Yokosawa
 <akiyks@...il.com>
Subject: Re: [PATCH 1/9] docs: kdoc: Make body_with_blank_line parsing more
 flexible

Em Sat, 21 Jun 2025 14:35:04 -0600
Jonathan Corbet <corbet@....net> escreveu:

> The regex in the BODY_WITH_BLANK_LINE case was looking for lines starting
> with " * ", where exactly one space was allowed before the following text.
> There are many kerneldoc comments where the authors have put multiple
> spaces instead, leading to mis-formatting of the documentation.
> Specifically, in this case, the description portion is associated with the
> last of the parameters.
> 
> Allow multiple spaces in this context.
> 
> See, for example, synchronize_hardirq() and how its documentation is
> formatted before and after the change.
> 
> Signed-off-by: Jonathan Corbet <corbet@....net>
> ---
>  scripts/lib/kdoc/kdoc_parser.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
> index 42b2e0936b72..c46e1b6a7d4b 100644
> --- a/scripts/lib/kdoc/kdoc_parser.py
> +++ b/scripts/lib/kdoc/kdoc_parser.py
> @@ -1309,7 +1309,7 @@ class KernelDoc:
>          """
>  
>          if self.state == state.BODY_WITH_BLANK_LINE:
> -            r = KernRe(r"\s*\*\s?\S")
> +            r = KernRe(r"\s*\*\s*\S")
>              if r.match(line):
>                  self.dump_section()
>                  self.entry.section = SECTION_DEFAULT

I was a little bit afraid that this might be causing regressions,
but after checking the output, it looks ok. 

So:

Acked-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>


Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ