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: <20200406031649.zujfod44bz53ztlo@wunner.de>
Date:   Mon, 6 Apr 2020 05:16:49 +0200
From:   Lukas Wunner <lukas@...ner.de>
To:     Marek Vasut <marex@...x.de>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Petr Stetiar <ynezz@...e.cz>,
        YueHaibing <yuehaibing@...wei.com>
Subject: Re: [PATCH V3 00/18] net: ks8851: Unify KS8851 SPI and MLL drivers

On Sat, Mar 28, 2020 at 01:31:30AM +0100, Marek Vasut wrote:
> The KS8851SNL/SNLI and KS8851-16MLL/MLLI/MLLU are very much the same pieces
> of silicon, except the former has an SPI interface, while the later has a
> parallel bus interface. Thus far, Linux has two separate drivers for each
> and they are diverging considerably.
> 
> This series unifies them into a single driver with small SPI and parallel
> bus specific parts. The approach here is to first separate out the SPI
> specific parts into a separate file, then add parallel bus accessors in
> another separate file and then finally remove the old parallel bus driver.
> The reason for replacing the old parallel bus driver is because the SPI
> bus driver is much higher quality.

Sorry for the delay Marek.

ks8851.ko (SPI variant) no longer compiles with this series.
The attached 0001 patch fixes it.

Both drivers can only be compiled as modules with this series:
If only one of them is built-in, there's a linker error because of
the module_param_named() for msg_enable.
If both are built-in, the symbol collisions you've mentioned occur.

It seems Kbuild can't support building a .o file with a different name
than the corresponding .c file because of the implicit rules used
everywhere.  However, ks8851_common.c can be renamed to be a header
file (a library of sorts) which is included by the two .c files.
I've renamed ks8851_spi.c back to the original ks8851.c and
ks8851_par.c back to ks8851_mll.c. The result is the attached 0002 patch.
Compiles without any errors regardless if one or both drivers are
built-in or modules.

I'll be back at the office this week and will conduct performance
measurements with this version.

Thanks,

Lukas

View attachment "0001-net-ks8851-Unbreak-the-build-of-CONFIG_KS8851.patch" of type "text/x-diff" (2864 bytes)

View attachment "0002-net-ks8851-Unbreak-the-build-of-CONFIG_KS8851-y-CONF.patch" of type "text/x-diff" (17265 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ