From patchwork Fri Sep 4 16:05:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 11758081 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F6AD618 for ; Fri, 4 Sep 2020 16:07:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F6EA20772 for ; Fri, 4 Sep 2020 16:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599235633; bh=HgVwdbGtocve/7WmBJzWMhD1oA0sq+cEIsf3lamsiHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AayWgfAiNBtcs6G9UX41cPG2JS2g20Wtt0UStpWVTZOOOWVDBzyQPzSa1a4PzP142 T93o4rkuMnnRrxRzQZmFwy3RBwsFttRGg4zMsXpaKSNATecSlvXLTqK7U3pik+icu0 zKAfvike+e0+P6wZIQpB2ntw92PfsM0OWfoedZz8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728073AbgIDQHI (ORCPT ); Fri, 4 Sep 2020 12:07:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:51308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgIDQFr (ORCPT ); Fri, 4 Sep 2020 12:05:47 -0400 Received: from tleilax.com (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D57420797; Fri, 4 Sep 2020 16:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599235546; bh=HgVwdbGtocve/7WmBJzWMhD1oA0sq+cEIsf3lamsiHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O6fJKTHsrwNKb5+QC8621pYbgaBxisNBx6lngM15ooDKc9OxnwNKHabtJuZT41fBZ uOM1S96nuj4hJ6KFsooP6hOHrzuBsYHO3XqlugFzDD+F7un5OUltUlIY9giQWROqRe OkMlarE+vbzAT6BXXydfAR8EKGSErXUWt+Svh9zw= From: Jeff Layton To: ceph-devel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-fscrypt@vger.kernel.org, ebiggers@kernel.org Subject: [RFC PATCH v2 08/18] ceph: add fscrypt ioctls Date: Fri, 4 Sep 2020 12:05:27 -0400 Message-Id: <20200904160537.76663-9-jlayton@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200904160537.76663-1-jlayton@kernel.org> References: <20200904160537.76663-1-jlayton@kernel.org> MIME-Version: 1.0 Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org Boilerplate ioctls for controlling encryption. Signed-off-by: Jeff Layton --- fs/ceph/ioctl.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c index 6e061bf62ad4..381e44b2d60a 100644 --- a/fs/ceph/ioctl.c +++ b/fs/ceph/ioctl.c @@ -6,6 +6,7 @@ #include "mds_client.h" #include "ioctl.h" #include +#include /* * ioctls @@ -289,6 +290,30 @@ long ceph_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case CEPH_IOC_SYNCIO: return ceph_ioctl_syncio(file); + + case FS_IOC_SET_ENCRYPTION_POLICY: + return fscrypt_ioctl_set_policy(file, (const void __user *)arg); + + case FS_IOC_GET_ENCRYPTION_POLICY: + return fscrypt_ioctl_get_policy(file, (void __user *)arg); + + case FS_IOC_GET_ENCRYPTION_POLICY_EX: + return fscrypt_ioctl_get_policy_ex(file, (void __user *)arg); + + case FS_IOC_ADD_ENCRYPTION_KEY: + return fscrypt_ioctl_add_key(file, (void __user *)arg); + + case FS_IOC_REMOVE_ENCRYPTION_KEY: + return fscrypt_ioctl_remove_key(file, (void __user *)arg); + + case FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS: + return fscrypt_ioctl_remove_key_all_users(file, (void __user *)arg); + + case FS_IOC_GET_ENCRYPTION_KEY_STATUS: + return fscrypt_ioctl_get_key_status(file, (void __user *)arg); + + case FS_IOC_GET_ENCRYPTION_NONCE: + return fscrypt_ioctl_get_nonce(file, (void __user *)arg); } return -ENOTTY;