Message ID | 20230404145319.2057051-23-aalbersh@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-f2fs-devel-bounces@lists.sourceforge.net> 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 C562FC77B6E for <linux-f2fs-devel@archiver.kernel.org>; Tue, 4 Apr 2023 14:56:10 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from <linux-f2fs-devel-bounces@lists.sourceforge.net>) id 1pji4t-00082W-Ez; Tue, 04 Apr 2023 14:56:10 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from <aalbersh@redhat.com>) id 1pji4r-00082H-07 for linux-f2fs-devel@lists.sourceforge.net; Tue, 04 Apr 2023 14:56:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: 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=2wyXRFn15U7YuTtccu17S72kQxdrsvbnQJV5citpTBw=; b=MNtQWIJRVuqrk0lgE3WC0gSUAC b2CHgW8ncIgLrEm9wtK50AR8l1pPTdRHQqk47erKE5RnBAQe/Vt0JZRgEiBk3j4j8jJxugcjVHgjo rJjesnqZ7sp0RHvPu7UbzmjpDotEV8M/J78H0VLjwsTGAusYrhx8cPYgZ1JypHlTMO1U=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: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=2wyXRFn15U7YuTtccu17S72kQxdrsvbnQJV5citpTBw=; b=VmI1PVNk3tqubHID1pGxXp8gFN guqXrF3ACoSXMFrp4LF3ZDv/x0ryBKMDOYl1+1VfxUHqTWohHsG/eNKECUsGCPemPA92ynkkn9KCR AKD8jDFVPH7lTIiqUPRL69YJwUHuOknrZEnabQJH+9auvmyGsvQe9sXhK+bZmloW+1Y4=; Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pji4r-00028b-1d for linux-f2fs-devel@lists.sourceforge.net; Tue, 04 Apr 2023 14:56:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680620159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2wyXRFn15U7YuTtccu17S72kQxdrsvbnQJV5citpTBw=; b=LqcX52HFaZRxQJsyR+B4A1DfqUbQj1Fl1lBEWLQBAKyQwMddPKTuRVwjMbqGJsR8LD/QMc FRG3KS9ZB+MKZBJlYMW+5lEQ9dMUMMYs66QEYbzePngTYh2LSdMPSVZux151yc7S/klqSc 8Ot0jeRGf7wYpZxXBmWjwUlZ30r0Jik= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-298-WMJPNKUxOM-unpIdBG8-zw-1; Tue, 04 Apr 2023 10:55:57 -0400 X-MC-Unique: WMJPNKUxOM-unpIdBG8-zw-1 Received: by mail-qk1-f200.google.com with SMTP id x80-20020a376353000000b0074681bc7f42so14827067qkb.8 for <linux-f2fs-devel@lists.sourceforge.net>; Tue, 04 Apr 2023 07:55:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680620156; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2wyXRFn15U7YuTtccu17S72kQxdrsvbnQJV5citpTBw=; b=KxdgR3htr5K7wO9I6em9Amta2UE8ps1vfioJR/PGrlkdrqZeELtEcskeJ7Eb/s3y4L vfL9QrxKIA1znUTOkze+fJfpUaOaNFK08HMHgG+N8s2rh7xFsdyCYuFiYIV7N/vzfo3N 0jQ9pG/uNKqVdueSz9zH5hUStMvJlRS4IvSvL1oN19JuASbAK1b3xN3VNv9ql3OGvMYf LMG9JvLrq1flBuZMbwtMKwOW1ThbD0LQvQmLoaRCYQOpyjoN0THu1VkIqxpOwgqeGlhU PbQrKQ+nKMP8R1tW8zeIIuq8nYf13XbHwRQEomb3Zk/ommogE6gbY/DpRWyaY2dG1ks8 wiiA== X-Gm-Message-State: AAQBX9d67gRule0Z+wYA08J4FCzZhAd7Tn+6Cbo/EWYM1givUSV4wo8d Jm8q2kKeLtZP2o+9knaj7sO4e47sbrzdGDASFyZg5QQfLMjCWP+GYBKFcUyTcwUbfYOMQCWAlVM zEV1aWZKdZV+O/QSP2ughnGq8B2YspKO6al4d X-Received: by 2002:a05:6214:202b:b0:57e:67c2:b9cd with SMTP id 11-20020a056214202b00b0057e67c2b9cdmr4447873qvf.27.1680620156127; Tue, 04 Apr 2023 07:55:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bJb0tNOFsr5rCdSnciXn4UvwnouNwwbFSTjZxZAVItCMscXXWD/V0CsYzmlqPKXH2vmnAZgg== X-Received: by 2002:a05:6214:202b:b0:57e:67c2:b9cd with SMTP id 11-20020a056214202b00b0057e67c2b9cdmr4447836qvf.27.1680620155884; Tue, 04 Apr 2023 07:55:55 -0700 (PDT) Received: from aalbersh.remote.csb ([109.183.6.197]) by smtp.gmail.com with ESMTPSA id j4-20020ac86644000000b003e6387431dcsm3296539qtp.7.2023.04.04.07.55.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 07:55:55 -0700 (PDT) From: Andrey Albershteyn <aalbersh@redhat.com> To: djwong@kernel.org, dchinner@redhat.com, ebiggers@kernel.org, hch@infradead.org, linux-xfs@vger.kernel.org, fsverity@lists.linux.dev Date: Tue, 4 Apr 2023 16:53:18 +0200 Message-Id: <20230404145319.2057051-23-aalbersh@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230404145319.2057051-1-aalbersh@redhat.com> References: <20230404145319.2057051-1-aalbersh@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Headers-End: 1pji4r-00028b-1d Subject: [f2fs-dev] [PATCH v2 22/23] xfs: add fs-verity ioctls X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-f2fs-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/linux-f2fs-devel>, <mailto:linux-f2fs-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=linux-f2fs-devel> List-Post: <mailto:linux-f2fs-devel@lists.sourceforge.net> List-Help: <mailto:linux-f2fs-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel>, <mailto:linux-f2fs-devel-request@lists.sourceforge.net?subject=subscribe> Cc: linux-ext4@vger.kernel.org, agruenba@redhat.com, damien.lemoal@opensource.wdc.com, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, rpeterso@redhat.com, xiang@kernel.org, jth@kernel.org, linux-erofs@lists.ozlabs.org, Andrey Albershteyn <aalbersh@redhat.com>, 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 |
Series |
fs-verity support for XFS
|
expand
|
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 3d6d680b6cf3..ffa04f0aed4a 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -42,6 +42,7 @@ #include <linux/mount.h> #include <linux/namei.h> #include <linux/fileattr.h> +#include <linux/fsverity.h> /* * xfs_find_handle maps from userspace xfs_fsop_handlereq structure to @@ -2154,6 +2155,22 @@ xfs_file_ioctl( return error; } + case FS_IOC_ENABLE_VERITY: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_enable(filp, (const void __user *)arg); + + case FS_IOC_MEASURE_VERITY: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_measure(filp, (void __user *)arg); + + case FS_IOC_READ_VERITY_METADATA: + if (!xfs_has_verity(mp)) + return -EOPNOTSUPP; + return fsverity_ioctl_read_metadata(filp, + (const void __user *)arg); + default: return -ENOTTY; }
Add fs-verity ioctls to enable, dump metadata (descriptor and Merkle tree pages) and obtain file's digest. Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com> --- fs/xfs/xfs_ioctl.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)