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, 15 Aug 2019 15:32:04 +0200
From:   Christoph Hellwig <hch@....de>
To:     Robin Murphy <robin.murphy@....com>
Cc:     Christoph Hellwig <hch@....de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Maxime Chevallier <maxime.chevallier@...tlin.com>,
        linux-arch@...r.kernel.org, Olav Kongas <ok@...ecdesign.ee>,
        Gavin Li <git@...gavinli.com>, linuxppc-dev@...ts.ozlabs.org,
        Mathias Nyman <mathias.nyman@...el.com>,
        Geoff Levand <geoff@...radead.org>,
        Fabio Estevam <festevam@...il.com>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        linux-usb@...r.kernel.org, Michal Simek <michal.simek@...inx.com>,
        linux-kernel@...r.kernel.org, Tony Prisk <linux@...sktech.co.nz>,
        iommu@...ts.linux-foundation.org,
        Alan Stern <stern@...land.harvard.edu>,
        NXP Linux Team <linux-imx@....com>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Minas Harutyunyan <hminas@...opsys.com>,
        Shawn Guo <shawnguo@...nel.org>, Bin Liu <b-liu@...com>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 6/6] driver core: initialize a default DMA mask for
 platform device

On Wed, Aug 14, 2019 at 04:49:13PM +0100, Robin Murphy wrote:
>> because we have to support platform_device structures that are
>> statically allocated.
>
> This would be a good point to also get rid of the long-standing bodge in 
> platform_device_register_full().

platform_device_register_full looks odd to start with, especially
as the coumentation is rather lacking..

>>   +static void setup_pdev_archdata(struct platform_device *pdev)
>
> Bikeshed: painting the generic DMA API properties as "archdata" feels a bit 
> off-target :/
>
>> +{
>> +	if (!pdev->dev.coherent_dma_mask)
>> +		pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
>> +	if (!pdev->dma_mask)
>> +		pdev->dma_mask = DMA_BIT_MASK(32);
>> +	if (!pdev->dev.dma_mask)
>> +		pdev->dev.dma_mask = &pdev->dma_mask;
>> +	arch_setup_pdev_archdata(pdev);
>
> AFAICS m68k's implementation of that arch hook becomes entirely redundant 
> after this change, so may as well go. That would just leave powerpc's 
> actual archdata, which at a glance looks like it could probably be cleaned 
> up with not *too* much trouble.

Actually I think we can just kill both off.  At the point archdata
is indeed entirely misnamed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ