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]
Message-ID: <20240910145018.GA17038@suse.cz>
Date: Tue, 10 Sep 2024 16:50:18 +0200
From: David Sterba <dsterba@...e.cz>
To: Johannes Thumshirn <Johannes.Thumshirn@....com>
Cc: Filipe Manana <fdmanana@...nel.org>,
	Johannes Thumshirn <jth@...nel.org>, Chris Mason <clm@...com>,
	Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>,
	"open list:BTRFS FILE SYSTEM" <linux-btrfs@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] btrfs: don't take dev_replace rwsem on task already
 holding it

On Mon, Sep 09, 2024 at 12:31:23PM +0000, Johannes Thumshirn wrote:
> On 09.09.24 14:29, Filipe Manana wrote:
> >>>
> >>> So the idea I suggested was not like this.
> >>> The idea was just to not ever down_read() the semaphore if the current
> >>> task is the replace task.
> >>
> >> So your idea is sth like the following (not yet tested):
> > 
> > Yes, exactly.
> 
> Thanks.
> 
> >>> For my suggestion, since we will skip the locking of the semaphore,
> >>> we'll have to compare "current" with "dev_replace->replace_task"
> >>> without any locking,
> >>> but that's ok and we can use data_race() to silence KCSAN.
> >>
> >> I'll check if KCSAN actually complains about this.
> >>
> >> As for David's remark, do you prefere a pid or a task_struct to be
> >> stored in struct dev_replace?
> > 
> > I'm fine with either one.
> 
> Ok David, your call then. I'm fine with either one as well.

The task struct works, so please use it, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ