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: <d9cf492e-1236-8446-9651-dfe848a5932d@huawei.com>
Date:   Wed, 7 Sep 2022 10:53:39 +0100
From:   John Garry <john.garry@...wei.com>
To:     Ethan Zhao <haifeng.zhao@...ux.intel.com>, <robin.murphy@....com>,
        <joro@...tes.org>, <will@...nel.org>
CC:     <iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>
Subject: Re: [PATCH v2 1/2] iova: Remove some magazine pointer NULL checks

On 07/09/2022 10:33, Ethan Zhao wrote:

Hi Ethan,

>>> Do you mean iova_magazine_alloc() is impossible to fail ?
>>
>> No, iova_magazine_alloc() may fail and return NULL. But if it does 
>> then we set iovad rcache pointer = NULL in the error path and don't 
>> use the rcache.
> 
> Yup,  if iova_magazine_alloc() failed ,
> 
> iovad->rcaches = NULL;
> 
> was set by free_iova_rcaches()
> 
> in error path of iova_domain_init_rcache().
> 
> and checked in
> 
> alloc_iova_fast()->iova_rcache_get().
> 
> More comment in code would wipe off my curiosity.

As discussed with Robin, we will actually remove that check in 
iova_rcache_get() for now and in future make the IOVA domain init more 
robust.

As for the "loaded" and "prev" NULL checks removal in this specific 
patch, I will add more words in the commit message to make it clearer 
that failure in init was the only way in which they NULL previously.

thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ