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:   Wed, 12 Apr 2017 10:49:32 +0300
From:   Felipe Balbi <felipe.balbi@...ux.intel.com>
To:     Randy Dunlap <rdunlap@...radead.org>, yann.morin.1998@...e.fr
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] scripts: kconfig: implement a sort method


Hi,

Randy Dunlap <rdunlap@...radead.org> writes:
> On 04/11/17 04:12, Felipe Balbi wrote:
>> With a growing amount of Kernel configuration, it's
>> getting ever more difficult to find anything on
>> menuconfig. Because of that, implement mergesort for
>> kconfig to make it a little easier for anybody
>> building kernels.
>
> Search works for me, but I don't mind Sort either.

yes, it works. It does a different thing, though. Here's what happens
when I want to find DWC3:

/ DWC3 RET

  | Symbol: USB_DWC3 [=m]                                                      │  
  │ Type  : tristate                                                           │  
  │ Prompt: DesignWare USB3 DRD Core Support                                   │  
  │   Location:                                                                │  
  │     -> Device Drivers                                                      │  
  │ (1)   -> USB support (USB_SUPPORT [=y])                                    │  
  │   Defined at drivers/usb/dwc3/Kconfig:1                                    │  
  │   Depends on: USB_SUPPORT [=y] && (USB [=y] || USB_GADGET [=y]) && HAS_DMA │  
  │   Selects: USB_XHCI_PLATFORM [=m]                                          │  
  │                                                                            │  
  │                                                                            │  
  │ Symbol: USB_DWC3_DUAL_ROLE [=n]                                            │  
  │ Type  : boolean                                                            │  
  │ Prompt: Dual Role mode                                                     │  
  │   Location:                                                                │  
  │     -> Device Drivers                                                      │  
  │       -> USB support (USB_SUPPORT [=y])                                    │  
  │         -> DesignWare USB3 DRD Core Support (USB_DWC3 [=m])                │  
  │ (2)       -> DWC3 Mode Selection (<choice> [=y])                           │  
  │   Defined at drivers/usb/dwc3/Kconfig:41                                   │  
  │   Depends on: <choice> && (USB [=y]=y || USB [=y]=USB_DWC3 [=m]) && (USB_G │  
  │                                                                            │  
  │                                                                            │  
  │ Symbol: USB_DWC3_EXYNOS [=n]                                               │  
  │ Type  : tristate                                                           │  
  │ Prompt: Samsung Exynos Platform                                            │  
  │   Location:                                                                │  
  │     -> Device Drivers                                                      │  
  │       -> USB support (USB_SUPPORT [=y])                                    │  
  │ (3)     -> DesignWare USB3 DRD Core Support (USB_DWC3 [=m])                │  
  │   Defined at drivers/usb/dwc3/Kconfig:63                                   │  
  │   Depends on: USB_SUPPORT [=y] && USB_DWC3 [=m] && (ARCH_EXYNOS || COMPILE │  
  │                                                                            │  
  │                                                                            │  
  │ Symbol: USB_DWC3_GADGET [=y]                                               │  
  │ Type  : boolean                                                            │  
  │ Prompt: Gadget only mode                                                   │  
  │   Location:                                                                │  
  │     -> Device Drivers                                                      │  
  │       -> USB support (USB_SUPPORT [=y])                                    │  
  │         -> DesignWare USB3 DRD Core Support (USB_DWC3 [=m])                │  
  │ (4)       -> DWC3 Mode Selection (<choice> [=y])                           │  
  │   Defined at drivers/usb/dwc3/Kconfig:34                                   │  
  │   Depends on: <choice> && (USB_GADGET [=y]=y || USB_GAD

Now I know where DWC3 is defined, so I navigate to Device Driver, USB
Support and search for DesignWare USB3 DRD Core Support:

  │ │    <M>     USB Test and Measurement Class support                      │ │  
  │ │            *** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ***│ │  
  │ │            *** also be needed; see USB_STORAGE Help for more info ***  │ │  
  │ │    <M>     USB Mass Storage support                                    │ │  
  │ │    [ ]       USB Mass Storage verbose debug                            │ │  
  │ │    <M>       Realtek Card Reader support                               │ │  
  │ │    [*]         Realtek Card Reader autosuspend support                 │ │  
  │ │    <M>       Datafab Compact Flash Reader support                      │ │  
  │ │    <M>       Freecom USB/ATAPI Bridge support                          │ │  
  │ │    <M>       ISD-200 USB/ATA Bridge support                            │ │  
  │ │    <M>       USBAT/USBAT02-based storage support                       │ │  
  │ │    <M>       SanDisk SDDR-09 (and other SmartMedia, including DPCM) sup│ │  
  │ │    <M>       SanDisk SDDR-55 SmartMedia support                        │ │  
  │ │    <M>       Lexar Jumpshot Compact Flash Reader                       │ │  
  │ │    <M>       Olympus MAUSB-10/Fuji DPC-R1 support                      │ │  
  │ │    <M>       Support OneTouch Button on Maxtor Hard Drives             │ │  
  │ │    <M>       Support for Rio Karma music player                        │ │  
  │ │    <M>       SAT emulation on Cypress USB/ATA Bridge with ATACB        │ │  
  │ │    <M>       USB ENE card reader support                               │ │  
  │ │    <M>       USB Attached SCSI                                         │ │  
  │ │            *** USB Imaging devices ***                                 │ │  
  │ │    < >     USB Mustek MDC800 Digital Camera support                    │ │  
  │ │    < >     Microtek X6USB scanner support                              │ │  
  │ │    < >     USB/IP support                                              │ │  
  │ │    < >   Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)    │ │  
  │ │    < >   DesignWare USB3 DRD Core Support                              │ │  
  │ │    < >   DesignWare USB2 DRD Core Support                              │ │  
  │ │    < >   ChipIdea Highspeed Dual Role Controller                       │ │  
  │ │    < >   NXP ISP 1760/1761 support                                     │ │  
  │ │          *** USB port drivers ***                                      │ │  
  │ │    <M>   USB Serial Converter support  --->                            │ │  
  │ │          *** USB Miscellaneous drivers ***                             │ │  
  │ │    < >   EMI 6|2m USB Audio interface support                          │ │  
  │ │    < >   EMI 2|6 USB Audio interface support                           │ │  
  │ │    < >   ADU devices from Ontrak Control Systems                       │ │  
  │ │    < >   USB 7-Segment LED Display                                     │ │  
  │ │    < >   USB Diamond Rio500 support                                    │ │  
  │ │    < >   USB Lego Infrared Tower support                               │ │  
  │ │    < >   USB LCD driver support                                        │ │  

Compare that to the sorted view of this same entry:

  │ │    --- USB support                                                     │ │  
  │ │    < >   ADU devices from Ontrak Control Systems                       │ │  
  │ │    < >   Apple Cinema Display support                                  │ │  
  │ │    < >   ChaosKey random number generator driver support               │ │  
  │ │    < >   ChipIdea Highspeed Dual Role Controller                       │ │  
  │ │    < >   Cypress CY7C63xxx USB driver support                          │ │  
  │ │    < >   Cypress USB thermometer driver support                        │ │  
  │ │    < >   DesignWare USB2 DRD Core Support                              │ │  
  │ │    < >   DesignWare USB3 DRD Core Support                              │ │  
  │ │    < >   EMI 2|6 USB Audio interface support                           │ │  
  │ │    < >   EMI 6|2m USB Audio interface support                          │ │  
  │ │    < >   Elan PCMCIA CardBus Adapter USB Client                        │ │  
  │ │    {M}   Functions for loading firmware on EZUSB chips                 │ │  
  │ │    < >   IO Warrior driver support                                     │ │  
  │ │    < >   Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)    │ │  
  │ │    < >   NXP ISP 1760/1761 support                                     │ │  
  │ │    < >   PlayStation 2 Trance Vibrator driver support                  │ │  
  │ │    < >   Siemens ID USB Mouse Fingerprint sensor support               │ │  
  │ │    <*>   Support for Host-side USB                                     │ │  
  │ │    < >     BCMA usb host driver                                        │ │  
  │ │    < >     Cypress C67x00 HCD support                                  │ │  
  │ │    [*]     Dynamic USB minor allocation                                │ │  
  │ │    < >     EHCI HCD (USB 2.0) support                                  │ │  
  │ │    [*]     Enable USB persist by default                               │ │  
  │ │    < >     FOTG210 HCD support                                         │ │  
  │ │    [ ]     HCD test mode support                                       │ │  
  │ │    < >     ISP116X HCD support                                         │ │  
  │ │    < >     ISP1362 HCD support                                         │ │  
  │ │    < >     Microtek X6USB scanner support                              │ │  
  │ │            *** Miscellaneous USB options ***                           │ │  
  │ │            *** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ***│ │  
  │ │    < >     OHCI HCD (USB 1.1) support                                  │ │  
  │ │    [ ]     OTG support                                                 │ │  
  │ │    < >     OXU210HP HCD support                                        │ │  
  │ │    < >     R8A66597 HCD support                                        │ │  
  │ │    [ ]     Rely on OTG and EH Targeted Peripherals List                │ │  
  │ │    < >     SL811HS HCD support                                         │ │  
  │ │    < >     SSB usb host driver                                         │ │  
  │ │    < >     Support WUSB Cable Based Association (CBA)                  │ │ 

much easier to find, don't you think?

> Why only menuconfig?  Is it the one that you use mostly?

shouldn't be difficult to port to nconfig.

> Any Help text for Sort?  or is it obvious what it does?  (no)

wait, it's not obvious what "Sort" means?

> In an 80x25 terminal (window), the < Sort > option wraps around
> past column 80.

not what I see here [1]

> I haven't looked at the source code (lately), but I think that it
> would OK to not have the (extra) spaces inside the <...> brackets.
> I.e., instead of
>   │        <Select>    < Exit >    < Help >    < Save >    < Load >    < Sort  
>    >
> just have
>   │        <Select>    <Exit>    <Help>    <Save>    <Load>    <Sort>
>
> Or the <Select> does not need to be indented as much as it is.

I changed that for this very reason

> And BTW, Yann made kconfig an orphan today. :(

oh well

[1] https://imgur.com/a/qyvG6

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ