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: <IA3PR11MB8986C86B054ED61A4CBDA14AE591A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Wed, 28 Jan 2026 17:49:15 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>, Jonathan Corbet
	<corbet@....net>, Linux Doc Mailing List <linux-doc@...r.kernel.org>
CC: "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, Peter Zijlstra
	<peterz@...radead.org>, Randy Dunlap <rdunlap@...radead.org>, "Stephen
 Rothwell" <sfr@...b.auug.org.au>
Subject: RE: [Intel-wired-lan] [PATCH v2 24/25] docs: kdoc_parser: better
 handle struct_group macros



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Mauro Carvalho Chehab
> Sent: Wednesday, January 28, 2026 5:50 PM
> To: Jonathan Corbet <corbet@....net>; Linux Doc Mailing List <linux-
> doc@...r.kernel.org>
> Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>;
> bpf@...r.kernel.org; intel-wired-lan@...ts.osuosl.org; linux-
> kernel@...r.kernel.org; netdev@...r.kernel.org; Peter Zijlstra
> <peterz@...radead.org>; Randy Dunlap <rdunlap@...radead.org>; Stephen
> Rothwell <sfr@...b.auug.org.au>
> Subject: [Intel-wired-lan] [PATCH v2 24/25] docs: kdoc_parser: better
> handle struct_group macros
> 
> Instead of converting them on two steps, implement a single logic to
> parse them using the new sub functionality of NestedMatch.sub().
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> ---
>  tools/lib/python/kdoc/kdoc_parser.py | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/lib/python/kdoc/kdoc_parser.py
> b/tools/lib/python/kdoc/kdoc_parser.py
> index 3a5614106af7..d2eb93f9d489 100644
> --- a/tools/lib/python/kdoc/kdoc_parser.py
> +++ b/tools/lib/python/kdoc/kdoc_parser.py
> @@ -124,10 +124,11 @@ struct_xforms = [
>      # matched. So, the implementation to drop STRUCT_GROUP() will be
>      # handled in separate.
>      #
> -    (KernRe(r'\bstruct_group\s*\(([^,]*,)', re.S), r'STRUCT_GROUP('),
> -    (KernRe(r'\bstruct_group_attr\s*\(([^,]*,){2}', re.S),
> r'STRUCT_GROUP('),
> -    (KernRe(r'\bstruct_group_tagged\s*\(([^,]*),([^,]*),', re.S),
> r'struct \1 \2; STRUCT_GROUP('),
> -    (KernRe(r'\b__struct_group\s*\(([^,]*,){3}', re.S),
> r'STRUCT_GROUP('),
> +    (NestedMatch(r'\bstruct_group\s*\('), r'\2'),
> +    (NestedMatch(r'\bstruct_group_attr\s*\('), r'\3'),
> +    (NestedMatch(r'\bstruct_group_tagged\s*\('), r'struct \1 { \3 }
> \2;'),
> +    (NestedMatch(r'\b__struct_group\s*\('), r'\4'),
> +
>      #
>      # Replace macros
>      #
> @@ -153,7 +154,6 @@ struct_xforms = [
>      (KernRe(r'DEFINE_DMA_UNMAP_ADDR\s*\(' + struct_args_pattern +
> r'\)', re.S), r'dma_addr_t \1'),
>      (KernRe(r'DEFINE_DMA_UNMAP_LEN\s*\(' + struct_args_pattern +
> r'\)', re.S), r'__u32 \1'),
>      (KernRe(r'VIRTIO_DECLARE_FEATURES\(([\w_]+)\)'), r'union { u64
> \1; u64 \1_array[VIRTIO_FEATURES_U64S]; }'),
> -    (NestedMatch(r'\bSTRUCT_GROUP\('), r'\0'),
>  ]
> 
>  #
> --
> 2.52.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ