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: <CAMuHMdWobCyOtQTWjzFi410Vmx9qXW3PRD3kTs46QBzv_8J+sQ@mail.gmail.com>
Date:   Sat, 18 Sep 2021 13:16:13 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Maciej Żenczykowski <zenczykowski@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux NetDev <netdev@...r.kernel.org>,
        Hayes Wang <hayeswang@...ltek.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: nt: usb: USB_RTL8153_ECM should not default to y

Hi Jakub,

On Fri, Sep 17, 2021 at 9:37 PM Jakub Kicinski <kuba@...nel.org> wrote:
> On Fri, 17 Sep 2021 21:05:55 +0200 Maciej Żenczykowski wrote:
> > > Yeah.. more context here:
> > >
> > > https://lore.kernel.org/all/7fd014f2-c9a5-e7ec-f1c6-b3e4bb0f6eb6@samsung.com/
> > >
> > > default !USB_RTL8152 would be my favorite but that probably doesn't
> > > compute in kconfig land. Or perhaps bring back the 'y' but more clearly
> > > mark it as a sub-option of CDCETHER? It's hard to blame people for
> > > expecting drivers to default to n, we should make it clearer that this
> > > is more of a "make driver X support variation Y", 'cause now it sounds
> > > like a completely standalone driver from the Kconfig wording. At least
> > > to a lay person like myself.
> >
> > I think:
> >         depends on USB_NET_CDCETHER && (USB_RTL8152 || USB_RTL8152=n)
> >         default y
> > accomplished exactly what was wanted.
> >
> > USB_NET_CDCETHER is a dependency, hence:
> >
> > USB_NET_CDCETHER=n forces it off - as it should - it's an addon to cdcether.
> >
> > USB_NET_CDCETHER=m disallows 'y' - module implies addon must be module.

What is the expected behavior if USB_NET_CDCETHER=y, and USB_RTL8152=n?

In that case, the old "default y" made USB_RTL8153_ECM builtin.
That was the issue I was fixing.
If USB_RTL8153_ECM is somewhat critical, perhaps you want
"default m if USB_NET_CDCETHER=m"?

> > similarly USB_RTL8152 is a dependency, so it being a module disallows 'y'.
> > This is desired, because if CDCETHER is builtin, so this addon could
> > be builtin, then RTL8152 would fail to bind it by default.
> > ie. CDCETHER=y && RTL8152=m must force RTL8153_ECM != y  (this is the bugfix)
> >
> > basically the funky 'USB_RTL8152 || USB_RTL8152=n' --> disallows 'y'
> > iff RTL8152=m
> >
> > 'default y' enables it by default as 'y' if possible, as 'm' if not,
> > and disables it if impossible.
> >
> > So I believe this had the exact right default behaviour - and allowed
> > all the valid options.
>
> Right, it was _technically_ correct but run afoul of the "drivers
> should default to 'n'" policy. If it should not be treated as a driver
> but more of a feature of an existing driver which user has already
> selected we should refine the name of the option to make that clear.


Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ