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] [day] [month] [year] [list]
Date: Sat, 4 May 2024 11:02:23 +0200
From: Petr Tesařík <petr@...arici.cz>
To: Christoph Hellwig <hch@....de>
Cc: Will Deacon <will@...nel.org>, linux-kernel@...r.kernel.org,
 iommu@...ts.linux.dev, Marek Szyprowski <m.szyprowski@...sung.com>, Robin
 Murphy <robin.murphy@....com>, Michael Kelley <mhkelley58@...il.com>,
 Nikita Ioffe <ioffe@...gle.com>
Subject: Re: [PATCH] swiotlb: Initialise restricted pool list_head when
 SWIOTLB_DYNAMIC=y

On Thu, 2 May 2024 14:56:01 +0200
Christoph Hellwig <hch@....de> wrote:

> Thanks,
> 
> applied to the dma-mapping for-linus branch.
> 
> I plan to send it to Linus this weekend unless someone find a grave bug
> in this pretty obvious one liner.

Thank you, and big thanks to Will for the fix!

Yes, the fix is obviously correct. During development, the pool list was
never dereferenced when mem->can_grow was false, but I forgot to add
the initialization when I optimized away the check for can_grow.

BTW this mem->can_grow flag is also why mem->dyn_alloc can be left
uninitialized, but now I wonder if it should be initialized even though
it's unused, just to make the code more robust in case of future
changes.

Petr T

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ