From patchwork Mon Oct 23 21:40:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10023171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5A0AB603D7 for ; Mon, 23 Oct 2017 21:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C40E28932 for ; Mon, 23 Oct 2017 21:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4126E2893D; Mon, 23 Oct 2017 21:42:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB48828932 for ; Mon, 23 Oct 2017 21:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932207AbdJWVmf (ORCPT ); Mon, 23 Oct 2017 17:42:35 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:52908 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932176AbdJWVm1 (ORCPT ); Mon, 23 Oct 2017 17:42:27 -0400 Received: by mail-io0-f196.google.com with SMTP id f20so21700658ioj.9; Mon, 23 Oct 2017 14:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jAhGMqQsViLdQ28Cp4m3d4i0dN1WL0MwsTETCvPIBwA=; b=gWqezrSCxDld13xUz5iB2icbznkayxMKXBPaNFNGz3aZAln6Dj6L0WVWesoVJ5gcJ+ ky4ctyzenvlSCM7k0TiyNbdmI++d+l3BPnCcNVtZunlu4UdVbuEuHPOXIHG+FaQzxYx7 MN2qFHwj+uoi2MGDSmqponQpWJs42LVb/DnwT4y/BN1vmY2hUr/XK7JdavfsO/srs4s0 NhHaPMlH7ovEJibVnM3MA2P+ARiLakODremgrjk5vxj7j11IgaSDOE5OB5Q4lD4oLNLe Q6aCjfVyD3uLtfpMxEAK/lcT1W3vZkRVdqPAHBLrovGRNAWV/Q4IBf+sPwLa0T7KoWJW jvuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jAhGMqQsViLdQ28Cp4m3d4i0dN1WL0MwsTETCvPIBwA=; b=RH6ktc4ZbrNDaZKar9gDO3pZTJJBZ9TJEzZnM0kYGNiRb/VI38SUDvKuWo0GiwnEFw NGUhP4PLc8/IxRS6ydY/bU+Rrzx7ArepJuOHswxS2RXDyoVKLSxrJ7WFW8/fekCvT/HC mm6uHDCJMfZCBYYYUBdTLfJGu1+KgpQ6vqV9C6yveGCT/zutC29GepWng2QOuBWxd7LJ l/B2rP3wus0qB8pCM8DJ6g+42SswoSLOYbrgW3y+Qr1txJxrO7mey2NGtQMvfBTxurCx WrbcZ8uUdPaQl98C43XXmi7Jg2q6ApxWTf266LOjfb+e69e9BQsP1ZmXixs0c/Ai5Kdp yvOg== X-Gm-Message-State: AMCzsaXN8/J5t/3Mej+grmgndbjcB2jIu1MO6mEyqejUQOvPCXvdGtvO VF32enBt8vY7IAQ067Rwt9UlhkLC X-Google-Smtp-Source: ABhQp+TC6a5lFG+uMjQBPXOwSNra3BElECyumBqazBHOEhaudVt6HRr/Jo5GenPtAyKladPibxwy3A== X-Received: by 10.107.186.87 with SMTP id k84mr19309249iof.121.1508794946719; Mon, 23 Oct 2017 14:42:26 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.66.175.88]) by smtp.gmail.com with ESMTPSA id i63sm3558482ioi.68.2017.10.23.14.42.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 14:42:26 -0700 (PDT) From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-api@vger.kernel.org, keyrings@vger.kernel.org, "Theodore Y . Ts'o" , Jaegeuk Kim , Gwendal Grignou , Ryo Hashimoto , Sarthak Kukreti , Nick Desaulniers , Michael Halcrow , Eric Biggers Subject: [RFC PATCH 13/25] f2fs crypto: wire up new ioctls for managing encryption keys Date: Mon, 23 Oct 2017 14:40:46 -0700 Message-Id: <20171023214058.128121-14-ebiggers3@gmail.com> X-Mailer: git-send-email 2.15.0.rc0.271.g36b669edcc-goog In-Reply-To: <20171023214058.128121-1-ebiggers3@gmail.com> References: <20171023214058.128121-1-ebiggers3@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers Signed-off-by: Eric Biggers --- fs/f2fs/file.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 517e112c8a9a..0296a9594fe7 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2651,6 +2651,12 @@ long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) return f2fs_ioc_get_encryption_policy(filp, arg); case F2FS_IOC_GET_ENCRYPTION_PWSALT: return f2fs_ioc_get_encryption_pwsalt(filp, arg); + case FS_IOC_ADD_ENCRYPTION_KEY: + return fscrypt_ioctl_add_key(filp, (void __user *)arg); + case FS_IOC_REMOVE_ENCRYPTION_KEY: + return fscrypt_ioctl_remove_key(filp, (const void __user *)arg); + case FS_IOC_GET_ENCRYPTION_KEY_STATUS: + return fscrypt_ioctl_get_key_status(filp, (void __user *)arg); case F2FS_IOC_GARBAGE_COLLECT: return f2fs_ioc_gc(filp, arg); case F2FS_IOC_GARBAGE_COLLECT_RANGE: @@ -2731,6 +2737,9 @@ long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case F2FS_IOC_SET_ENCRYPTION_POLICY: case F2FS_IOC_GET_ENCRYPTION_PWSALT: case F2FS_IOC_GET_ENCRYPTION_POLICY: + case FS_IOC_ADD_ENCRYPTION_KEY: + case FS_IOC_REMOVE_ENCRYPTION_KEY: + case FS_IOC_GET_ENCRYPTION_KEY_STATUS: case F2FS_IOC_GARBAGE_COLLECT: case F2FS_IOC_GARBAGE_COLLECT_RANGE: case F2FS_IOC_WRITE_CHECKPOINT: