From nobody Tue Dec 2 02:42:58 2025 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29F2D36A005 for ; Tue, 18 Nov 2025 16:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763481678; cv=none; b=JP2Yy49SoAulZXVgZS3p2hvYlh9tI+H7MxbvNt4mHl3G0pbXakqbXl4cbDLRfqNQO2kJKp6zEOq1Xgd7tt3aEtFcF/V3LDQyu0XpY7ddTRFZ5EguZUn3fI5d/z0BXORZ2VRQcwuCsDYpT7kzu2nnKR+gRZ+TOxlFupp/D+BnM0E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763481678; c=relaxed/simple; bh=VT9cnG2GvDWxzJ6NpsrMcgVQzdOFSgSmN0wjS0VHRD8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J464PyBy7qzHwxsC14oh8AAIl1GrgmSld2AQG3nxu4SE60uIQ+UBcOtK9UL3H61Om0xbng/Mw3XrC6QpaEU0dYdWijPVbbanwSbBaIZxASKQx6EBLobEC6y6QTTfe7kkuYSBD8a7pGfH7225LxUz8yOUexfCyCl5kju5p2xnU94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 237AA21296; Tue, 18 Nov 2025 16:01:01 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 08B293EA61; Tue, 18 Nov 2025 16:01:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sBylAT2YHGkSWgAAD6G6ig (envelope-from ); Tue, 18 Nov 2025 16:01:01 +0000 From: Daniel Vacek To: Chris Mason , Josef Bacik , David Sterba Cc: Daniel Vacek , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Sweet Tea Dorminy , Boris Burkov , Daniel Vacek Subject: [PATCH v7 2/6] btrfs: disable verity on encrypted inodes Date: Tue, 18 Nov 2025 17:00:37 +0100 Message-ID: <20251118160043.3005684-3-neelx@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251118160043.3005684-1-neelx@suse.com> References: <20251118160043.3005684-1-neelx@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 237AA21296 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[] Content-Type: text/plain; charset="utf-8" From: Sweet Tea Dorminy Right now there isn't a way to encrypt things that aren't either filenames in directories or data on blocks on disk with extent encryption, so for now, disable verity usage with encryption on btrfs. fscrypt with fsverity should be possible and it can be implemented in the future. Signed-off-by: Sweet Tea Dorminy Signed-off-by: Josef Bacik Reviewed-by: Boris Burkov Signed-off-by: Daniel Vacek --- fs/btrfs/verity.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/verity.c b/fs/btrfs/verity.c index 16f5580cba55..06dfcb461f53 100644 --- a/fs/btrfs/verity.c +++ b/fs/btrfs/verity.c @@ -578,6 +578,9 @@ static int btrfs_begin_enable_verity(struct file *filp) =20 btrfs_assert_inode_locked(inode); =20 + if (IS_ENCRYPTED(&inode->vfs_inode)) + return -EOPNOTSUPP; + if (test_bit(BTRFS_INODE_VERITY_IN_PROGRESS, &inode->runtime_flags)) return -EBUSY; =20 --=20 2.51.0