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:   Fri, 12 Feb 2021 11:23:57 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Mihai Carabas <mihai.carabas@...cle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Randy Dunlap <rdunlap@...radead.org>,
        Wang ShaoBo <bobo.shaobowang@...wei.com>
Subject: Re: [PATCH v2 2/3] misc/pvpanic: add PCI driver

On Fri, Feb 12, 2021 at 11:18 AM Greg KH <gregkh@...uxfoundation.org> wrote:
le
> > @@ -1,2 +1,4 @@
> >  obj-$(CONFIG_PVPANIC_MMIO)   += pvpanic-mmio.o
> >  pvpanic-mmio-objs := pvpanic-common.o mmio.o
> > +obj-$(CONFIG_PVPANIC_PCI)    += pvpanic-pci.o
> > +pvpanic-pci-objs := pvpanic-common.o pci.o
>
> So you now have the pvpanic-common.o file linked into both modules at
> the same time?  What happens if they are both loaded?
>
> This feels really broken...

Loading them as two modules should work, but this will probably lead to
a link failure if one of the two drivers is built-in and the other one is
a loadable module.

The usual way to fix this is to make the common part a separate module
with exported symbols for the probe/release functions and built
based on CONFIG_PVPANIC, which then needs to be a tristate
symbol again.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ