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: <CAK8P3a3mM3CF889Fi4COr1A9LDDi74_93xnwt9rZkky5Zd5www@mail.gmail.com>
Date:   Sat, 14 Nov 2020 22:16:49 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Richard Cochran <richardcochran@...il.com>
Cc:     王擎 <wangqing@...o.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Grygorii Strashko <grygorii.strashko@...com>,
        "David S. Miller" <davem@...emloft.net>,
        Samuel Zou <zou_wei@...wei.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
        Networking <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Re: [PATCH V4 net-bugfixs] net/ethernet: Update ret when
 ptp_clock is ERROR

On Sat, Nov 14, 2020 at 4:14 PM Richard Cochran
<richardcochran@...il.com> wrote:
>
> On Fri, Nov 13, 2020 at 05:21:43PM +0100, Arnd Bergmann wrote:
> > I've prototyped a patch that I think makes this more sensible
> > again: https://pastebin.com/AQ5nWS9e
>
> I like the behavior described in the text.
>
> Instead of this ...
>
>      - if a built-in driver calls PTP interface functions but fails
>        to select HAVE_PTP_1588_CLOCK or depend on PTP_1588_CLOCK,
>        and PTP support is a loadable module, we get a link error
>        instead of having an unusable clock.
>
> how about simply deleting the #else clause of
>
>     --- a/include/linux/ptp_clock_kernel.h
>     +++ b/include/linux/ptp_clock_kernel.h
>     @@ -173,7 +173,7 @@ struct ptp_clock_event {
>       };
>      };
>
>     -#if IS_REACHABLE(CONFIG_PTP_1588_CLOCK)
>     +#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
>
> so that invalid configurations throw a compile time error instead?

I was trying to still allow PTP clocks to be disabled, either when
building a kernel that doesn't need it, or when posix timers are
disabled. Leaving out the #else path would break all drivers that
have PTP support in the main ethernet driver file rather than
conditionally compiling it based on a Kconfig symbol that depends
on CONFIG_PTP_1588_CLOCK.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ