| Message ID | 20261002223705.2175542-6-aalbersh@kernel.org |
|---|---|
| State | Not Applicable |
| Headers | show
Return-Path: <SRS0=xA4k=HY=vger.kernel.org=linux-ext4+bounces-19946-patchwork-incoming=ozlabs.org@ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OEaM6Ilz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=xa4k=hy=vger.kernel.org=linux-ext4+bounces-19946-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hxNyw4Ftpz1xvt for <incoming@patchwork.ozlabs.org>; Sat, 03 Oct 2026 08:40:24 +1000 (AEST) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4hxNyH6vd9z4w0Q for <incoming@patchwork.ozlabs.org>; Sat, 03 Oct 2026 08:39:51 +1000 (AEST) Received: by gandalf.ozlabs.org (Postfix) id 4hxNyH6sjvz4w9T; Sat, 03 Oct 2026 08:39:51 +1000 (AEST) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; arc=pass smtp.remote-ip=172.234.253.10 arc.chain=subspace.kernel.org ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1790980791; cv=pass; b=V4fwMyfC3semo5y6cRfW5l9er5HSgg+caHw9+CKK0jCgHDj+lctqidM984MSS8zceyNjMPh+/W1tpM5kdQtq5KCx1fU7xlvhHeeI1KTkuXrtbR9WQbFCeS8DlVi6OwY90KRfGW73v1hvD3FLLVGug85McCmFhF9/YoUMMroDf2aOQPEl2i0sdyPyxrBwC0FsHxlBgkIi/OHliI9RQyKaWAJt0fWll1LPnSzSui3P/EGCTTNGDXh++ztSkNpfiHnPV3X1rlUcPP2ioVhsTxgkhfN+ROQdMXBGUlqSIoRrzHcTsnoTkN4NZUs8YtRX5hxKbAiLZAUjQBmlxmO9PwSiCA== ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1790980791; c=relaxed/relaxed; bh=nbiOvvmh3uAAd1oxFar1z2uB37LIOE/Lgee7w9bmdyU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u0LR+JHouY/2laJpYTeoZvUqnoO/0LWfb8xNcTFF5AHedihBMNliDg604KTtPivBGvGYU8gEUewTsMotcCbJ/TrBgXLDSTopyEEcAvzt+qjiy+bdshlLI2eBxciM5kYLVyJFbLF4Y8H0lA9/eYoOmaa3gi6qU7EdC1VQXmK7sREJezOzWT9C5vB7eA62anBmj62hMQBgV5zLhLdNdPkqFk51HdJGjin2I/DPqQI/P8IDHIlzNZ5vUOlU+HY2OMxWf92ytOj66HdFpifvbiYUFGs9/jq95bTnTlrNqRqHwGhteU0uALgzdm0OLiTHW+TSmVvwrTJMYzztJlKqxnTzvA== ARC-Authentication-Results: i=2; gandalf.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OEaM6Ilz; dkim-atps=neutral; spf=pass (client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=linux-ext4+bounces-19946-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OEaM6Ilz; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=linux-ext4+bounces-19946-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4hxNyD4FFTz4w0Q for <patchwork-incoming@ozlabs.org>; Sat, 03 Oct 2026 08:39:48 +1000 (AEST) Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 95E84430E7 for <patchwork-incoming@ozlabs.org>; Fri, 2 Oct 2026 22:37:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20C0F46EC7F; Fri, 2 Oct 2026 22:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OEaM6Ilz" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D813C411A03; Fri, 2 Oct 2026 22:37:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790980653; cv=none; b=fKTxcLboOolJ5SSG1oum7WOOMJymvN9tebZ5E/tanoOz7NyrMQ95/s4Ai6nYu5la9rrIvXLF1WnaNPP0zbHgjo6huCVlXVJMlO3G+f/SkSvunP5wgOdk2QcRjVhGGPOql/L5FBxaDPXml3flfNQgXf1ONCEKTwoVQ4BCM/YdCzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790980653; c=relaxed/simple; bh=NciHHsUwbDFuZeKCsrcMzZSUKpPt3AZax3aBo18/9+A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IPNj5u5h5LECqb+0DeVc7kHuUKBxoZf2XeTjIUKWDGTXQS969qEixwMIBgBSsfap0ZZoSB5UHmtKai+Vu9O+/UDKAaSEqidw8XQsrp2c0ggleLtXAADQjcfVloRZ3xWVy0xHvIiWy49Auk+PjQs8ELQq0UX6d5ivrfWr8dmB09M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OEaM6Ilz; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BD9B1F00893; Fri, 2 Oct 2026 22:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790980650; bh=nbiOvvmh3uAAd1oxFar1z2uB37LIOE/Lgee7w9bmdyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OEaM6Ilz8wEalxqxW4RlHAB/L8XqhWxXwEAxiLKewJye9vhz5bG+NATN/YFaN5IpG yWsJAsptz9sUEUCYWCpUvgSJyEXHuXjnQ9ah/20SZrURo1SaJuFs3v2hu8wsutEO/S 4qFI9rmeepYpgaNmgiWkOycA6MV0gYVLvDqaXxEJUiaqeG84urAmcDKNvZADtd0Mir KmX/NDZb7fb9kZWSUSB+ur62k9cJoU7WpqrWoznu+G2ckxLdbJVeOE1eQTXdy47iWi /14VMESV2btPQkm434A6y+yiecauQvW6oOEVKs3ZwWmCKYgw0ILP4IcHHthrtH16Bs no80OKQWBoXEQ== From: Andrey Albershteyn <aalbersh@kernel.org> To: djwong@kernel.org, ebiggers@kernel.org, hch@lst.de, Carlos Maiolino <cem@kernel.org> Cc: Andrey Albershteyn <aalbersh@kernel.org>, fsverity@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, david@fromorbit.com Subject: [PATCH v17 05/21] fsverity: don't allow setting DAX file attribute on fsverity files Date: Sat, 3 Oct 2026 00:36:46 +0200 Message-ID: <20261002223705.2175542-6-aalbersh@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261002223705.2175542-1-aalbersh@kernel.org> References: <20261002223705.2175542-1-aalbersh@kernel.org> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: <linux-ext4.vger.kernel.org> List-Subscribe: <mailto:linux-ext4+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-ext4+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org |
| Series |
fs-verity support for XFS with post EOF merkle tree
|
expand
|
> When fsverity is enabled on the file, with FS_IOC_ENABLE_VERITY ioctl(), > it checks if file has DAX enabled and fails if that's true. However, the > opposite case is not checked. > > Note, that the only other filesystem supporting DAX and fsverity is > ext4, and ext4 does check for this case. > > Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org> Sashiko has reviewed this patch and found no issues. It looks great!
diff --git a/fs/file_attr.c b/fs/file_attr.c index bfb00d256dd5..391edd1d0ce3 100644 --- a/fs/file_attr.c +++ b/fs/file_attr.c @@ -235,10 +235,15 @@ static int fileattr_set_prepare(struct inode *inode, /* * It is only valid to set the DAX flag on regular files and * directories on filesystems. + * + * DAX and fsverity are incompatible. */ - if ((fa->fsx_xflags & FS_XFLAG_DAX) && - !(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) - return -EINVAL; + if (fa->fsx_xflags & FS_XFLAG_DAX) { + if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) + return -EINVAL; + if (old_ma->fsx_xflags & FS_XFLAG_VERITY) + return -EINVAL; + } /* Extent size hints of zero turn off the flags. */ if (fa->fsx_extsize == 0)