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:   Thu, 25 Jan 2018 16:03:36 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] block: blk-tag: Replace GFP_ATOMIC with GFP_KERNEL in
 __blk_queue_init_tags



On 2018/1/25 11:44, Jens Axboe wrote:
> On 1/24/18 8:38 PM, Jia-Ju Bai wrote:
>> After checking all possible call chains to kmalloc here,
>> my tool finds that kmalloc is never called in atomic context.
>> Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL.
>>
>> This is found by a static analysis tool named DCNS written by myself.
> These two look OK to me, mostly.

It sounds good :)

> One issue is that blk_queue_init_tags()
> can be used to resize tags, in which case it's called with the
> queue lock held. Nobody is using it like that anymore, though. So I'd
> prefer if you did a v2 of this patch, and include a correction to that
> comment.
>

I am not sure what you mean...

Do you mean that the code in blk_queue_init_tags:
     else if (q->queue_tags) {
         ...
     }
can be deleted?

Or just delete the comment before blk_queue_init_tags?
  * Queue lock must be held here if the function is called to resize an
  * existing map.
  **/

Or add the description "The case that queue lock held is never used" in 
my patches?


Thanks,
Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ