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]
Date:   Sat, 20 Feb 2021 07:27:41 +0100
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     Aditya Srivastava <yashsri421@...il.com>
Cc:     Jonathan Corbet <corbet@....net>,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>
Subject: Re: [RFC] scripts: kernel-doc: fix array element capture in
 pointer-to-func parsing

On Wed, Feb 17, 2021 at 3:56 PM Aditya Srivastava <yashsri421@...il.com> wrote:
>
> Currently, kernel-doc causes an unexpected error when array element (i.e.,
> "type (*foo[bar])(args)") is present as pointer parameter in
> pointer-to-function parsing.
>
> For e.g., running kernel-doc -none on kernel/gcov/gcc_4_7.c causes this
> error:
> "Use of uninitialized value $param in regexp compilation at ...", in
> combination with:
> "warning: Function parameter or member '' not described in 'gcov_info'"
>
> Here, the parameter parsing does not take into account the presence of
> array element (i.e. square brackets) in $param.
>
> Provide a simple fix by adding square brackets in the regex, responsible
> for capturing $param.
>
> A quick evaluation, by running 'kernel-doc -none' on entire kernel-tree,
> reveals that no additional warning or error has been added or removed by
> the fix.
>
> Suggested-by: Lukas Bulwahn <lukas.bulwahn@...il.com>
> Signed-off-by: Aditya Srivastava <yashsri421@...il.com>
> ---
> * Applies perfectly over next-20210217
>

Aditya, Jonathan,

I have tested this change with:

git ls-files | xargs ./scripts/kernel-doc -none 2>&1 | tee kernel-doc-output

Applied the patch, and re-ran that command and compared the diff.

First, I observed that ./scripts/kernel-doc is not fully deterministic
on my machine, although I could not really pinpoint it to the exact
reason where that comes in.

Secondly, more importantly, the relevant diff affected by this patch is:

< Use of uninitialized value $param in regexp compilation at
./scripts/kernel-doc line 1559, <IN_FILE> line 308.
< Use of uninitialized value $actual in substitution (s///) at
./scripts/kernel-doc line 1523, <IN_FILE> line 308.
< Use of uninitialized value $actual in substitution (s///) at
./scripts/kernel-doc line 1523, <IN_FILE> line 308.
< Use of uninitialized value $param in substitution (s///) at
./scripts/kernel-doc line 1617, <IN_FILE> line 308.
< Use of uninitialized value $param in hash element at
./scripts/kernel-doc line 1651, <IN_FILE> line 308.
< Use of uninitialized value $param in pattern match (m//) at
./scripts/kernel-doc line 1651, <IN_FILE> line 308.
< Use of uninitialized value $param in hash element at
./scripts/kernel-doc line 1652, <IN_FILE> line 308.
< Use of uninitialized value $param in pattern match (m//) at
./scripts/kernel-doc line 1654, <IN_FILE> line 308.
< Use of uninitialized value $param in concatenation (.) or string at
./scripts/kernel-doc line 1655, <IN_FILE> line 308.
< drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h:308:
warning: Function parameter or member '' not described in
'brcmf_fweh_info'
< Use of uninitialized value $param in hash element at
./scripts/kernel-doc line 1672, <IN_FILE> line 308.


< Use of uninitialized value $param in regexp compilation at
./scripts/kernel-doc line 1559, <IN_FILE> line 96.
< Use of uninitialized value $actual in substitution (s///) at
./scripts/kernel-doc line 1523, <IN_FILE> line 96.
< Use of uninitialized value $actual in substitution (s///) at
./scripts/kernel-doc line 1523, <IN_FILE> line 96.
< Use of uninitialized value $param in substitution (s///) at
./scripts/kernel-doc line 1617, <IN_FILE> line 96.
< Use of uninitialized value $param in hash element at
./scripts/kernel-doc line 1651, <IN_FILE> line 96.
< Use of uninitialized value $param in pattern match (m//) at
./scripts/kernel-doc line 1651, <IN_FILE> line 96.
< Use of uninitialized value $param in hash element at
./scripts/kernel-doc line 1652, <IN_FILE> line 96.
< Use of uninitialized value $param in pattern match (m//) at
./scripts/kernel-doc line 1654, <IN_FILE> line 96.
< Use of uninitialized value $param in concatenation (.) or string at
./scripts/kernel-doc line 1655, <IN_FILE> line 96.
< kernel/gcov/gcc_4_7.c:96: warning: Function parameter or member ''
not described in 'gcov_info'
< Use of uninitialized value $param in hash element at
./scripts/kernel-doc line 1672, <IN_FILE> line 96.

So, I can confirm that the mentioned issue is really resolved with
this patch, and that deserves a tag:

Tested-by: Lukas Bulwahn <lukas.bulwahn@...il.com>

Thanks, Aditya. When can we expect the next patch for ./scripts/kernel-doc?

Looking forward to running the next test :)

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ