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: <3113a4cc-c1e9-cd14-b165-d8d1d39a39a1@huaweicloud.com>
Date: Fri, 12 Jul 2024 09:25:48 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Yu Kuai <yukuai1@...weicloud.com>, Bart Van Assche <bvanassche@....org>,
 tj@...nel.org, josef@...icpanda.com, jack@...e.cz, axboe@...nel.dk
Cc: cgroups@...r.kernel.org, linux-block@...r.kernel.org,
 linux-kernel@...r.kernel.org, yi.zhang@...wei.com, yangerkun@...wei.com,
 "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH 2/2] blk-ioprio: remove per-disk structure

Hi,

在 2024/07/12 9:10, Yu Kuai 写道:
> Hi,
> 
> 在 2024/07/12 2:03, Bart Van Assche 写道:
>> On 7/11/24 2:00 AM, Yu Kuai wrote:
>>> ioprio works on the blk-cgroup level, all disks in the same cgroup
>>> are the same, and the struct ioprio_blkg doesn't have anything in it.
>>> Hence register the policy is enough, because cpd_alloc/free_fn will
>>> be handled for each blk-cgroup, and there is no need to activate the
>>> policy for disk.
>>
>> As one can see in the output of git grep -nHEB1 '>pd_(alloc|free)_fn\(',
>> none of the pd_alloc_fn / pd_free_fn callers checks whether or not these
>> pointers are NULL. Hence my question why this patch does not trigger any
>> NULL pointer dereferences?
> 
> Because the blkcg_deactivate_policy() is removed as well, there are no

Sorry about the typo, blkcg_activate_policy() is removed, all the places
of pd_(alloc|free)_fn can't be reached.

Thanks,
Kuai

> callers now... blkcg_policy_register() is still called to make sure
> cpd_(alloc|free)_fn will still be called.
> 
> Thanks,
> Kuai
> 
>>
>> Thanks,
>>
>> Bart.
>> .
>>
> 
> .
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ