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: <acd9a75d-4363-4e64-97e7-7b53cbcc9b3b@app.fastmail.com>
Date:   Tue, 28 Mar 2023 16:48:45 +0200
From:   "Arnd Bergmann" <arnd@...nel.org>
To:     "Richard Cochran" <richardcochran@...il.com>,
        "Tianfei Zhang" <tianfei.zhang@...el.com>
Cc:     Netdev <netdev@...r.kernel.org>, linux-fpga@...r.kernel.org,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>,
        vinicius.gomes@...el.com, pierre-louis.bossart@...ux.intel.com,
        marpagan@...hat.com, russell.h.weight@...el.com,
        matthew.gerlach@...ux.intel.com,
        "Nicolas Pitre" <nico@...xnic.net>,
        "Raghavendra Khadatare" <raghavendrax.anand.khadatare@...el.com>
Subject: Re: [PATCH v3] ptp: add ToD device driver for Intel FPGA cards

On Tue, Mar 28, 2023, at 16:42, Richard Cochran wrote:
> On Tue, Mar 28, 2023 at 10:24:55AM -0400, Tianfei Zhang wrote:
>
>> v3:
>> - add PTP_1588_CLOCK dependency for PTP_DFL_TOD in Kconfig file.
>> - don't need handle NULL case for ptp_clock_register() after adding
>>   PTP_1588_CLOCK dependency.
>
> Sorry, but this isn't how it is done...
>
>> +config PTP_DFL_TOD
>> +	tristate "FPGA DFL ToD Driver"
>> +	depends on FPGA_DFL
>> +	depends on PTP_1588_CLOCK
>
> Try these commands:
>
>    git grep "depends on PTP_1588_CLOCK_OPTIONAL"
>    git grep "depends on PTP_1588_CLOCK_OPTIONAL" | grep -v OPTIONAL
>
> Driver must depend on PTP_1588_CLOCK_OPTIONAL and then handle the NULL
> case correctly.

I think this one is one of the (few) cases where the 'depends on
PTP_1588_CLOCK' is correct and 'depends on PTP_1588_CLOCK_OPTIONAL'
would be wrong:

Using PTP_1588_CLOCK_OPTIONAL as a dependency for PTP_DFL_TOD would
allow enabling the driver even when PTP_1588_CLOCK is completely
disabled, which would cleanly build but not do anything useful
because the driver only handles PTP and not also networking.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ