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: Wed, 06 Mar 2024 16:24:10 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Christoph Hellwig" <hch@...radead.org>,
 "Andreas Larsson" <andreas@...sler.com>
Cc: "Sam Ravnborg" <sam@...nborg.org>,
 "Maciej W. Rozycki" <macro@...am.me.uk>, sparclinux@...r.kernel.org,
 "Randy Dunlap" <rdunlap@...radead.org>,
 "Miquel Raynal" <miquel.raynal@...tlin.com>,
 linux-parport@...ts.infradead.org, "David S . Miller" <davem@...emloft.net>,
 linux-kernel@...r.kernel.org, "Takashi Iwai" <tiwai@...e.de>,
 iommu@...ts.linux.dev, linux-kbuild@...r.kernel.org,
 "Masahiro Yamada" <masahiroy@...nel.org>
Subject: Re: [PATCH v2 4/7] sparc32: Do not select ZONE_DMA

On Wed, Mar 6, 2024, at 16:04, Christoph Hellwig wrote:
> On Wed, Mar 06, 2024 at 03:19:52PM +0100, Andreas Larsson wrote:
>> > I think that is the correct thing to do then: the only
>> > drivers that I see with this dependency are PCI sound cards
>> > that apparently rely on DMA to the 16MB ISA range, which is
>> > not provided by sparc.
>> 
>> The ZONE_DMA dependency does not seem related to ISA per se. Commit
>> 80ab8eae70e5 ("ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks")
>> that started to introduce it did were about ensuring 32-bit masks.
>
> Yikes!  That commit is just unbelievable buggy.  CONFIG_ZONE_DMA
> is only for architetures to select, not drivers.  A driver randomly
> enabling such an arch zone is just crazy.

It looks like it did not remain that way for long, as
2db1a57986d3 ("ALSA: pci: depend on ZONE_DMA") removed
the broken select again.

> I've been wondering for a while if we need some Kconfig magic
> so that certain symbols can only be select from arch/* and not
> elsewhere to prevent this (we had a few other similar cases like
> DMA_MAP_OPS).

It's a nice idea, but it would require a lot of reworks to get right,
with things like drivers/platform/x86 or drivers/{parisc,s390,sh}
that are still somewhat architecture code, and subsystems like
drivers/gpu/drm that typically just select whatever they want
instead of using dependencies.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ