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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240709111425.GA4421@lst.de>
Date: Tue, 9 Jul 2024 13:14:25 +0200
From: Christoph Hellwig <hch@....de>
To: Yangyu Chen <cyy@...self.name>
Cc: iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Christoph Hellwig <hch@....de>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH -fixes] dma-direct: only reference
 arch_dma_set_uncached symbol when usable

On Tue, Jul 09, 2024 at 04:32:48PM +0800, Yangyu Chen wrote:
> The arch_dma_set_uncached symbol is only used when the architecture
> provides it. However, many architectures do not provide it, and the
> code currently relies on compiler optimization to cut the unnecessary
> code. When the compiler fails to optimize it, the code will reference
> the symbol and cause a link error. I found this bug when developing
> some new extensions for RISC-V on LLVM.
> 
> This patch adds a check to avoid the reference to the symbol when it is
> not provided.

arch_dma_set_uncached is only called from dma_direct_alloc when the
set_uncached variable is set to true.   The variable is only set to
true if CONFIG_ARCH_HAS_DMA_SET_UNCACHED is set.

Are you running the compiler without basic optimizations? Because even
the most basic compile time constant propagation would make it
unreachable


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ