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: <CAK7LNAS7Gmprpw+AxiZpFcrpzw_Y6ANEw3P43N3pEVFLH=yV1g@mail.gmail.com>
Date: Wed, 6 Nov 2024 08:15:20 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: David Hunter <david.hunter.linux@...il.com>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org, 
	shuah@...nel.org, javier.carrasco.cruz@...il.com, 
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH v1 4/7] streamline_config.pl: include tool to learn about
 a config option

On Mon, Oct 14, 2024 at 11:14 PM David Hunter
<david.hunter.linux@...il.com> wrote:
>
> Include a debugging tool that can help developers find out about a
> particular config option.
>
> It can be challenging to find out what is going on behind the scenes of
> the script due to the vast amount of config options and the ways the
> config options interact with each other.
>
> Signed-off-by: David Hunter <david.hunter.linux@...il.com>
> ---

This is not suitable for upstream.

Indeed, this tool is broken, and hard to figure out
what is happening, but you can add print-debug
when needed.


>  scripts/kconfig/streamline_config.pl | 49 ++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>
> diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> index f5a07b3a1922..bbcd5a6e9726 100755
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -713,4 +713,53 @@ foreach my $module (keys(%modules)) {
>      }
>  }
>
> +# the following tool can be used to check a particular config option.
> +# You can read the output if the variable "debugprint" is set to "1."
> +# Here is a sample way to use the tool:
> +# dprintvar("INET_ESP");
> +#
> +sub dprintvar {
> +    if ($debugprint) {
> +       my $dconfig = $_[0];
> +       my $fconfig = "CONFIG_$dconfig";
> +       my $con_found = "";
> +       my $dep_found = "";
> +       my $def_found = "";
> +       my $sel_found = "";
> +       my $prom_found = "";
> +       my $ori_found = "";
> +       my $proc_found = "";
> +
> +        if (defined($configs{$fconfig})) {
> +            $con_found = $configs{$fconfig};
> +        }
> +        if (defined($depends{$dconfig})) {
> +            $dep_found = $depends{$dconfig};
> +        }
> +        if (defined($defaults{$dconfig})) {
> +            $def_found = $defaults{$dconfig};
> +        }
> +        if (defined($selects{$dconfig})) {
> +            $sel_found = $selects{$dconfig};
> +        }
> +        if (defined($prompts{$dconfig})) {
> +            $prom_found = $prompts{$dconfig};
> +        }
> +        if (defined($orig_configs{$fconfig})) {
> +            $ori_found = $orig_configs{$fconfig};
> +        }
> +        if (defined($process_selects{$dconfig})) {
> +            $proc_found = $process_selects{$dconfig};
> +        }
> +
> +        dprint "config: $dconfig\n";
> +        dprint "config found: $con_found\n";
> +        dprint "depends: $dep_found\n";
> +        dprint "defaults: $def_found\n";
> +        dprint "selects: $sel_found\n";
> +        dprint "prompts: $prom_found\n";
> +        dprint "in original config: $ori_found\n";
> +       dprint "process selected: $proc_found\n";
> +    }
> +}
>  # vim: softtabstop=4
> --
> 2.43.0
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ