From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 224DE35505B for ; Mon, 19 Jan 2026 09:27:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768814876; cv=none; b=NYgADO2MiK4RA1Ho61NevEJH0YFAx5VEW/Z05m08wKGU471Ym9Jxdaf/bNvNu3sOqkwb6RiZ2rekPVTf+gyMj7DX0i8hhdn4AxlKS/+/Zh2r39YtTsD6VVvRgnMR3GM/E+7DVd0YpsTAEUkxPo8tVRIc/Ut43czObAYmywbDD5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768814876; c=relaxed/simple; bh=sh0TkxkEOKhDl2DVrl4mw+NTqDA2lqqTM0EYMUUo+sI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KUG5o7QjV0afPhy3N3GQ8Rh8pJThDz3SNPdiZWje8QckDSfeMgIqMwelf5rm+WAN1OmkFADMBpFs4ZfvSFOzZoZLZLWEoZjui7QoNjT/JNQDccuYPKJ/eQ3pKbnmpxcdmcliHkYH4sO846B87zvV7nC07GJqfX8RRmxJ3XuPeBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 7696C227A88; Mon, 19 Jan 2026 10:27:49 +0100 (CET) Date: Mon, 19 Jan 2026 10:27:48 +0100 From: Christoph Hellwig To: Jan Kara Cc: Christoph Hellwig , Eric Biggers , Al Viro , Christian Brauner , David Sterba , Theodore Ts'o , Jaegeuk Kim , Chao Yu , Andrey Albershteyn , linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, fsverity@lists.linux.dev Subject: Re: [PATCH 4/6] fsverity: use a hashtable to find the fsverity_info Message-ID: <20260119092748.GA10125@lst.de> References: <20260119062250.3998674-1-hch@lst.de> <20260119062250.3998674-5-hch@lst.de> Precedence: bulk X-Mailing-List: fsverity@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Jan 19, 2026 at 10:21:00AM +0100, Jan Kara wrote: > OK, but since __fsverity_get_info() is just rhashtable_lookup_fast() what > prevents the CPU from reordering the hash table reads before the S_VERITY > check? I think you need a barrier in fsverity_get_info() to enforce the > proper ordering. The matching ordering during setting of S_VERITY is > implied by cmpxchg used to manipulate i_flags so that part should be fine. Yes, probably. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3913CCF2D2 for ; Mon, 19 Jan 2026 09:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kvUyY8wJqkaJjpPbybz9SWndgOiESOIXteXcQzjZMIs=; b=G9TLRruADTKpQEgc7+Lp8GWO/4 wRPj1LTifYExTvVWZXLF2p4R5/eQkEAUfAqI4Cv1mmCJl5+46TiXED7Z+iwgjWFFEvCwoaB4DSWFK KP8XgmdCtPar47701CqlnkRfNlfgYNSrIGzdCsFxIrq7cLdpQ8VgtzOreo6NhdpFSw8c=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vhlYJ-0003e0-JU; Mon, 19 Jan 2026 09:28:03 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vhlYI-0003dl-Jn for linux-f2fs-devel@lists.sourceforge.net; Mon, 19 Jan 2026 09:28:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sh0TkxkEOKhDl2DVrl4mw+NTqDA2lqqTM0EYMUUo+sI=; b=DZ2ybzdiNU0YUiq4as3MnC1cbK UHnb1l07bx6JAP1rCuMVkQFdLajrIVeuWAxumFFa1vNq0SkD9PUZ72rc+FaJqdQQ+F1CRtkO0pE0y 44BvEHaKn2aopnZ03qMjkIyeLyZWCPPp9S9WZJrwUyWdOfJC3Zk7I0cDUG7wJTrDDpE4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sh0TkxkEOKhDl2DVrl4mw+NTqDA2lqqTM0EYMUUo+sI=; b=AmyElY/FHQ/gnRlwGvI0dwKlsB 9K3kZDb5zuWHSESGcwBA+a5YSWUqumYiyV5MOlQZBTjkzB71++Mbwz0OxjtNpQKwp6bsv81zAszX1 BNkafNmkAkebM75aitqQZxptBbyu59bCiAicPqyvD+wVCdLSSx8DyxhbXSLyiL9BZtL0=; Received: from verein.lst.de ([213.95.11.211]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vhlYI-0000Nb-52 for linux-f2fs-devel@lists.sourceforge.net; Mon, 19 Jan 2026 09:28:02 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 7696C227A88; Mon, 19 Jan 2026 10:27:49 +0100 (CET) Date: Mon, 19 Jan 2026 10:27:48 +0100 From: Christoph Hellwig To: Jan Kara Message-ID: <20260119092748.GA10125@lst.de> References: <20260119062250.3998674-1-hch@lst.de> <20260119062250.3998674-5-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Headers-End: 1vhlYI-0000Nb-52 Subject: Re: [f2fs-dev] [PATCH 4/6] fsverity: use a hashtable to find the fsverity_info X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fsverity@lists.linux.dev, Christian Brauner , Theodore Ts'o , Andrey Albershteyn , linux-f2fs-devel@lists.sourceforge.net, Eric Biggers , linux-fsdevel@vger.kernel.org, Al Viro , David Sterba , Jaegeuk Kim , linux-ext4@vger.kernel.org, Christoph Hellwig , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Mon, Jan 19, 2026 at 10:21:00AM +0100, Jan Kara wrote: > OK, but since __fsverity_get_info() is just rhashtable_lookup_fast() what > prevents the CPU from reordering the hash table reads before the S_VERITY > check? I think you need a barrier in fsverity_get_info() to enforce the > proper ordering. The matching ordering during setting of S_VERITY is > implied by cmpxchg used to manipulate i_flags so that part should be fine. Yes, probably. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel