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: <CAFiDJ59AuXmM8vN9=ry8_UvS-paRN54CdCFw6EUMx9RV2TT3bQ@mail.gmail.com>
Date:	Wed, 14 Oct 2015 17:28:45 +0800
From:	Ley Foon Tan <lftan@...era.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>,
	Russell King <linux@....linux.org.uk>,
	Marc Zyngier <marc.zyngier@....com>,
	Dinh Nguyen <dinguyen@...nsource.altera.com>,
	linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Subject: Re: [PATCH v9 3/6] pci:host: Add Altera PCIe host controller driver

On Wed, Oct 14, 2015 at 5:09 PM, Arnd Bergmann <arnd@...db.de> wrote:
> On Wednesday 14 October 2015 16:32:25 Ley Foon Tan wrote:
>> On Wed, Oct 14, 2015 at 4:20 PM, Arnd Bergmann <arnd@...db.de> wrote:
>> > On Wednesday 14 October 2015 10:41:29 Ley Foon Tan wrote:
>> >> +static int altera_pcie_remove(struct platform_device *pdev)
>> >> +{
>> >> +     struct altera_pcie *pcie = platform_get_drvdata(pdev);
>> >> +
>> >> +     altera_pcie_free_irq_domain(pcie);
>> >> +     platform_set_drvdata(pdev, NULL);
>> >> +     return 0;
>> >> +}
>> >
>> > I just noticed this. Does it actually work to unload the module
>> > and tear down all the pci_dev structures in a safe way?
>> Good catch. It only can be compiled as builtin-moduley now, so we can
>> remove this _remove callback function.
>
> I think we should change both: make it possible to load the
> driver dynamically, and remove the altera_pcie_remove function.
This driver depends on the pci fixups to work correctly. But, fixups
callback functions in this driver are not being call if the driver is
loadable module.
The linker script keeps all pci fixup callbacks in pci fixup regions
during kernel compile time. So, it needs to be builtin module. Do you
know any way we can update those fixup regions?

>
> You can prevent the module from being unloaded if you also remove
> the module_platform_driver() directive and add a module_init()
> without a matching module_exit().
>
> Please also add a '.suppress_bind_attrs = true,' flag in the driver
> struct to prevent manual unbinding.
I think we don't need these if it only can work as builtin module.

Thanks for reviewing.

Regards
Ley Foon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ