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: <5emugcorjnrcgczkmi7njfzwbotpqn6heu7acfho2zfkdsajpv@yrztl7hoa6ky>
Date: Tue, 25 Jun 2024 12:34:28 +0200
From: Michal Koutný <mkoutny@...e.com>
To: Li Lingfeng <lilingfeng@...weicloud.com>
Cc: tj@...nel.org, josef@...icpanda.com, hch@....de, axboe@...nel.dk, 
	cgroups@...r.kernel.org, linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, 
	yangerkun@...wei.com, yukuai1@...weicloud.com, houtao1@...wei.com, yi.zhang@...wei.com, 
	lilingfeng3@...wei.com
Subject: Re: [PATCH] block: cancel all throttled bios when deleting the cgroup

Hello.

On Mon, Jun 24, 2024 at 09:09:40PM GMT, Li Lingfeng <lilingfeng@...weicloud.com> wrote:
> From: Li Lingfeng <lilingfeng3@...wei.com>
> 
> When a process migrates to another cgroup and the original cgroup is deleted,
> the restrictions of throttled bios cannot be removed. If the restrictions
> are set too low, it will take a long time to complete these bios.

When pd_offline_fn is called because of disk going away, it makes sense
to cancel the bios. However, when pd_offline_fn is called due to cgroup
removal (with possibly surviving originating process), wouldn't bio
cancelling lead to loss of data?
Aha, it wouldn't -- the purpose of the function is to "flush" throttled
bios (in the original patch they'd immediately fail, here they the IO
operation may succeed).
Is that correct? (Wouldn't there be a more descriptive name than
tg_cancel_bios then?)

And if a user is allowed to remove cgroup and use this to bypass the
throttling, they also must have permissions to migrate away from the
cgroup (and consistent config would thus allow them to change the limit
too), therefore this doesn't allow bypassing the throttling limit. If
you agree, could you please add the explanation to commit message too?

Thanks,
Michal

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ