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] [day] [month] [year] [list]
Message-ID: <249abbe2-0f2a-4e58-b7f2-bb286c0a4f8f@infradead.org>
Date: Sun, 27 Jul 2025 11:38:27 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Masahiro Yamada <masahiroy@...nel.org>, Brian Masney <bmasney@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH 2/2] scripts: add kconfig lookup script

Hi,
Sorry about the very late feedback.


On 8/2/23 11:23 PM, Masahiro Yamada wrote:
> On Wed, Aug 2, 2023 at 2:49 AM Brian Masney <bmasney@...hat.com> wrote:
>>
>> Add a script that allows looking up the full Kconfig entry based on
>> the symbol name. Documentation and example usage is found at the top
>> of the script itself.
>>
>> Signed-off-by: Brian Masney <bmasney@...hat.com>
>> ---
>>  scripts/kconfig/lookup.sh | 77 +++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 77 insertions(+)
>>  create mode 100755 scripts/kconfig/lookup.sh
> 
> 
> 
> Everyone tends to have their own utility scripts
> on their machines.
> 
> I think this patch set falls into that category
> as "create a wrapper script of grep" is what everyone
> does to reduce typing.
> 
> 
> 
> 
> FWIW, I have the following scripts in my ~/bin directory.
> 
> 
> 
> $ cat ~/bin/kgrep
> #!/bin/sh
> 
> exec find . -name .repo -prune -o -name .git -prune -o -type f \
> \( -name 'Kconfig*' -o -name 'Config.in' \) \
> -print0 | xargs -0 grep --color -n "$@"
> 

Sometimes I just want to see a symbol's definition. So using
$ kgrep -A8 config.TSL2772
finds only the config|menuconfig definition for the symbol
without printing other mentions of it (in selects or depends on
or help text or comments etc.).

> 
> $ cat ~/bin/mgrep
> #!/bin/sh
> 
> exec find . -name .repo -prune -o -name .git -prune -o -type f \
> \( -name 'Makefile*' -o -name 'Kbuild*' -o -name "*.mk" \) \
> -print0 | xargs -0 grep --color -n "$@"
> 
> 

Using
$ mgrep floppy.o
shows me nothing. It never completes, just hangs (OK, I killed it
after 30 seconds). Any ideas?

Thanks for the tooling.

> 
> 
> masahiro@zoe:~/ref/linux(master)$ kgrep -A5 TSL2772
> ./drivers/iio/light/Kconfig:564:config TSL2772
> ./drivers/iio/light/Kconfig-565- tristate "TAOS TSL/TMD2x71 and
> TSL/TMD2x72 Family of light and proximity sensors"
> ./drivers/iio/light/Kconfig-566- depends on I2C
> ./drivers/iio/light/Kconfig-567- help
> ./drivers/iio/light/Kconfig-568-   Support for: tsl2571, tsl2671,
> tmd2671, tsl2771, tmd2771, tsl2572, tsl2672,
> ./drivers/iio/light/Kconfig-569-   tmd2672, tsl2772, tmd2772 devices.
> 
> masahiro@zoe:~/ref/linux(master)$ mgrep efivarfs.o
> ./fs/efivarfs/Makefile:6:obj-$(CONFIG_EFIVAR_FS) += efivarfs.o
> ./fs/efivarfs/Makefile:8:efivarfs-objs := inode.o file.o super.o vars.o
> 
> 
> 
> That's my local way to satisfy my demand.
> I do not intend to force my way or merge it in the upstream.


-- 
~Randy


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ