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: <bc33b608-e0b5-4dff-aa05-8513dce409b3@gaisler.com>
Date: Wed, 6 Mar 2024 15:19:52 +0100
From: Andreas Larsson <andreas@...sler.com>
To: Arnd Bergmann <arnd@...db.de>, Sam Ravnborg <sam@...nborg.org>,
 "Maciej W. Rozycki" <macro@...am.me.uk>, sparclinux@...r.kernel.org,
 Randy Dunlap <rdunlap@...radead.org>
Cc: Miquel Raynal <miquel.raynal@...tlin.com>,
 linux-parport@...ts.infradead.org, "David S . Miller" <davem@...emloft.net>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/7] sparc32: Do not select ZONE_DMA

On 2024-03-05 16:26, Arnd Bergmann wrote:
> On Tue, Mar 5, 2024, at 16:06, Andreas Larsson wrote:
>> On 2024-02-24 18:42, Sam Ravnborg via B4 Relay wrote:
> 
>>> diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
>>> index 734f23daecca..bdbde506c01e 100644
>>> --- a/arch/sparc/Kconfig
>>> +++ b/arch/sparc/Kconfig
>>> @@ -62,7 +62,6 @@ config SPARC32
>>>  	select HAVE_UID16
>>>  	select LOCK_MM_AND_FIND_VMA
>>>  	select OLD_SIGACTION
>>> -	select ZONE_DMA
>>
>> This however makes a number of PCI drivers that depend on
>> ZONE_DMA unselectable.
> 
> 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.

Some of those sound card drivers sets a 24 bit mask, i.e. a 0-16MB
range, but some among those sets a 28, and 30 bit DMA mask with
dma_set_mask_and_coherent. Testing, in a different driver, setting and
allocating under a 30-bit DMA mask (or even a 28-bit DMA mask depending
on where the physical memory resides) is possible before removing
ZONE_DMA, but not after. 

I am also a bit concerned if removing ZONE_DMA will let DMA be allocated
in highmem and what that could lead to.

Cheers,
Andreas


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ