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: <a5f5b63a-ff9d-ed74-212f-f959f038b781@infradead.org>
Date:   Sat, 7 Nov 2020 14:20:56 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     John Hubbard <jhubbard@...dia.com>,
        "Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:     Linuxarm <linuxarm@...wei.com>,
        Ralph Campbell <rcampbell@...dia.com>,
        John Garry <john.garry@...wei.com>
Subject: Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

On 11/7/20 11:16 AM, John Hubbard wrote:
> On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote:
>>> -----Original Message-----
>>> From: John Hubbard [mailto:jhubbard@...dia.com]
> ...
>>>>    config GUP_BENCHMARK
>>>>        bool "Enable infrastructure for get_user_pages() and related calls
>>> benchmarking"
>>>> +    depends on DEBUG_FS
>>>
>>>
>>> I think "select DEBUG_FS" is better here. "depends on" has the obnoxious
>>> behavior of hiding the choice from you, if the dependencies aren't already met.
>>> Whereas what the developer *really* wants is a no-nonsense activation of the
>>> choice: "enable GUP_BENCHMARK and the debug fs that it requires".
>>>
>>
>> To some extent, I agree with you. But I still think here it is better to use "depends on".
>> According to
>> https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
>>
>>     select should be used with care. select will force
>>     a symbol to a value without visiting the dependencies.
>>     By abusing select you are able to select a symbol FOO even
>>     if FOO depends on BAR that is not set.
>>     In general use select only for non-visible symbols
>>     (no prompts anywhere) and for symbols with no dependencies.
>>     That will limit the usefulness but on the other hand avoid
>>     the illegal configurations all over.
>>
>> On the other hand, in kernel there are 78 "depends on DEBUG_FS" and
>> only 14 "select DEBUG_FS".
>>
> 
> You're not looking at the best statistics. Go look at what *already* selects
> DEBUG_FS, and you'll find about 50 items.

Sorry, I'm not following you. I see the same 14 "select DEBUG_FS" as Barry.

In general we don't want any one large "feature" (or subsystem) to be enabled
by one driver. If someone has gone to the trouble to disable DEBUG_FS (or whatever),
then a different Kconfig symbol shouldn't undo that.

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ