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]
Date:   Thu, 24 Nov 2022 09:58:24 +0000
From:   Salil Mehta <salil.mehta@...wei.com>
To:     Alexander Lobakin <alobakin@...lbox.org>
CC:     Alexander Lobakin <alobakin@...me>,
        "linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nicolas Schier <nicolas@...sle.eu>,
        Jens Axboe <axboe@...nel.dk>,
        "Boris Brezillon" <bbrezillon@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Tony Luck <tony.luck@...el.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        "Vladimir Oltean" <vladimir.oltean@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Derek Chickles <dchickles@...vell.com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Sunil Goutham <sgoutham@...vell.com>,
        Daniel Scally <djrscally@...il.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Mark Brown <broonie@...nel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        NXP Linux Team <linux-imx@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 16/18] net: hns3: fix mixed module-builtin object

Hi Alexander,

> From: Alexander Lobakin <alobakin@...lbox.org>
> Sent: Wednesday, November 23, 2022 10:08 PM
> To: Salil Mehta <salil.mehta@...wei.com>
> 
> From: Salil Mehta <salil.mehta@...wei.com>
> Date: Tue, 22 Nov 2022 12:39:04 +0000
> 
> > Hi Alexander,
> >
> > > From: Alexander Lobakin <alobakin@...me>
> > > Sent: Saturday, November 19, 2022 11:10 PM
> > > To: linux-kbuild@...r.kernel.org
> 
> [...]
> 
> > > diff --git a/drivers/net/ethernet/hisilicon/Kconfig
> > > b/drivers/net/ethernet/hisilicon/Kconfig
> > > index 3312e1d93c3b..9d2be93d0378 100644
> > > --- a/drivers/net/ethernet/hisilicon/Kconfig
> > > +++ b/drivers/net/ethernet/hisilicon/Kconfig
> > > @@ -100,11 +100,15 @@ config HNS3
> > >
> > >  if HNS3
> > >
> > > +config HNS3_HCLGE_COMMON
> > > +	tristate
> > > +
> >
> >
> > This change does not looks right to me. We do not intend to expose these
> 
> ...does not looks right to me -- because? The "wrong" line?


Agreed. Not very helpful. Sorry about that :(


> > common files via kconfig and as a separate module. I would need time to
> > address this in a different way.
> 
> I'm curious how 40 Kb of shared code can be addressed differently :D
> This Kconfig opt is hidden, it can only be selected by some other
> symbol -- in this case, by the PF and VF HCLGE options. Nothing gets
> exposed in a way it shouldn't be.


There is a discussion to unify the VF and PF HCLGE driver for HNS3.
This is to reduce the overhead of adding/maintaining features in 
both of the drivers.


> Lemme guess, some cross-OS "shared code" in the OOT nobody in the
> upstream cares about (for good), how familiar :D IIRC ZSTD folks
> also weren't happy at first.


We have HNAE interfacing layer above HCLGE, if any such out-of-tree
code maintains the sanctity of that interface then there should not be
an issue at HCLGE. These functions are never going to get directly
used by such out-of-tree code. This is by design.


> > Please do not merge this change into the mainline!
> >
> >
> > Thanks
> > Salil
> >
> >
> >
> > >  config HNS3_HCLGE
> > >  	tristate "Hisilicon HNS3 HCLGE Acceleration Engine & Compatibility
> > > Layer Support"
> > >  	default m
> > >  	depends on PCI_MSI
> > >  	depends on PTP_1588_CLOCK_OPTIONAL
> > > +	select HNS3_HCLGE_COMMON
> 
> [...]
> 
> > > diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> > > b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> > > index 987271da6e9b..39a7ab51be31 100644
> > > --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> > > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> > > @@ -13133,6 +13133,8 @@ static void __exit hclge_exit(void)
> > >  module_init(hclge_init);
> > >  module_exit(hclge_exit);
> > >
> > > +MODULE_IMPORT_NS(HNS3_HCLGE_COMMON);
> >
> >
> > No, we don't want this.
> 
> I can export the common functions globally, without a namespace
> if you prefer ._.


I was wondering if we could detect below condition in the Makefile
itself and not depend upon separate namespace?

"With CONFIG_HNS3_HCLGE=y and CONFIG_HNS3_HCLGEVF=m "


Thanks
Salil.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ