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: <IA3PR11MB89867387C416560E957E42C3E59EA@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Thu, 29 Jan 2026 10:26:10 +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-hardening@...r.kernel.org" <linux-hardening@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, Mauro Carvalho Chehab
	<mchehab@...nel.org>, Randy Dunlap <rdunlap@...radead.org>
Subject: RE: [Intel-wired-lan] [PATCH v3 03/30] docs: kdoc_parser: move var
 transformers to the beginning



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Mauro Carvalho Chehab
> Sent: Thursday, January 29, 2026 9:08 AM
> 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-
> hardening@...r.kernel.org; linux-kernel@...r.kernel.org;
> netdev@...r.kernel.org; Mauro Carvalho Chehab <mchehab@...nel.org>;
> Randy Dunlap <rdunlap@...radead.org>
> Subject: [Intel-wired-lan] [PATCH v3 03/30] docs: kdoc_parser: move
> var transformers to the beginning
> 
> Just like functions and structs had their transform variables placed
> at the beginning, move variable transforms to there as well.
> 
> No functional changes.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> Acked-by: Randy Dunlap <rdunlap@...radead.org>
> Tested-by: Randy Dunlap <rdunlap@...radead.org>
> ---
>  tools/lib/python/kdoc/kdoc_parser.py | 23 +++++++++++++----------
>  1 file changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/tools/lib/python/kdoc/kdoc_parser.py
> b/tools/lib/python/kdoc/kdoc_parser.py
> index fd57944ae907..0b68b140cd02 100644
> --- a/tools/lib/python/kdoc/kdoc_parser.py
> +++ b/tools/lib/python/kdoc/kdoc_parser.py
> @@ -191,6 +191,18 @@ function_xforms  = [
> 
> (KernRe(r"__attribute__\s*\(\((?:[\w\s]+(?:\([^)]*\))?\s*,?)+\)\)\s+")
> , ""),  ]
> 
> +#
> +# Transforms for variable prototypes
> +#
> +var_xforms = [
> +    (KernRe(r"__read_mostly"), ""),
> +    (KernRe(r"__ro_after_init"), ""),
> +    (KernRe(r"(?://.*)$"), ""),
> +    (KernRe(r"(?:/\*.*\*/)"), ""),
> +    (KernRe(r";$"), ""),
> +    (KernRe(r"=.*"), ""),
> +]
> +
>  #
>  # Ancillary functions
>  #
> @@ -971,15 +983,6 @@ class KernelDoc:
>          ]
>          OPTIONAL_VAR_ATTR = "^(?:" + "|".join(VAR_ATTRIBS) + ")?"
> 
> -        sub_prefixes = [
> -            (KernRe(r"__read_mostly"), ""),
> -            (KernRe(r"__ro_after_init"), ""),
> -            (KernRe(r"(?://.*)$"), ""),
> -            (KernRe(r"(?:/\*.*\*/)"), ""),
> -            (KernRe(r";$"), ""),
> -            (KernRe(r"=.*"), ""),
> -        ]
> -
>          #
>          # Store the full prototype before modifying it
>          #
> @@ -1003,7 +1006,7 @@ class KernelDoc:
>          # Drop comments and macros to have a pure C prototype
>          #
>          if not declaration_name:
> -            for r, sub in sub_prefixes:
> +            for r, sub in var_xforms:
>                  proto = r.sub(sub, proto)
> 
>          proto = proto.rstrip()
> --
> 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