From patchwork Mon Oct 23 21:40:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10023231 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 D4BAE603D7 for ; Mon, 23 Oct 2017 21:44:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6C5128921 for ; Mon, 23 Oct 2017 21:44:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBADD28938; Mon, 23 Oct 2017 21:44:00 +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 78DF828921 for ; Mon, 23 Oct 2017 21:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbdJWVnx (ORCPT ); Mon, 23 Oct 2017 17:43:53 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:50614 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932182AbdJWVm3 (ORCPT ); Mon, 23 Oct 2017 17:42:29 -0400 Received: by mail-io0-f195.google.com with SMTP id 97so21701012iok.7; Mon, 23 Oct 2017 14:42:28 -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=QUfHkpecBlLdLVUNqn67/PgAG+kEvbbZIrssE94eL6s=; b=VGPzTcZoDtmaIFyxFbGwrU4iDmMt8zk9KIp/BkYfI2I1WlPPXuortAGSY7LHBncdDv MXUnYnZNttnx3vDNNeO4GadXZrCPnlic/+t3FticaJ6bZHnjYAADoRVGExyhNzsaDc89 iIMxM9jb7zBgdVo4jK/F/lo5N1ds1J9tey1QC+s64HkjFmdCjC1EH2fTZISR01ssHaiT WgzkEKoEj1LSFHbepybfb3EEqD5MaNr0pG/PWtziFox1mqqwo8Kw2RG/zOuv2rdmto8u 5qCi4lXRJWLWrOZOryurd/zFg2EBZwY0tSqsGSSJSggpUH3KvIdElAww8+GnSWD+W/D2 JBlQ== 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=QUfHkpecBlLdLVUNqn67/PgAG+kEvbbZIrssE94eL6s=; b=gco0EfjsCo87BnXHk0CZvWxJxRulCQ8Z6m/WJoTdiI6PUMZNACPDDX7gH2TS+p3EHB VN1WgppePLIDYmTB7SD14O3Y8FCvQaMhcyddKmPxz32Jm7H6zVUVmcClsQJkAziF0oj2 +eXBoqohWX3PYHJex9R98SY+K8SIFLbf28WWyXDrv9MRPrQ5Cf1gdSke+vlFz7UOcJp3 AI3pAhPU/TDRcTwciCc0veJkwqE+R3oEysY15m79N97fXKr8jwSG1A30UMGiWfEV+HA0 Fas/wo7ZGDKVZnmpzti7jimOs5c1+bi4CZcO5BMaO78IGmhEZKADzPqjnlNuvN62/nx/ mlTw== X-Gm-Message-State: AMCzsaWjyzVSior1OMW+RV6gKudmTOhwc0dAUd4VI6xxEW/Wf1If4htC lK/DLlu40EMlZWcJS3tph7xQsmOq X-Google-Smtp-Source: ABhQp+TPuEafxtwHdHrn3WFN7nQ7gLOS4bDqSLYIa6OozxpNhD68RV709wXkOz9M6Nd1cbtE9tr8jQ== X-Received: by 10.107.192.71 with SMTP id q68mr6542203iof.81.1508794947960; Mon, 23 Oct 2017 14:42:27 -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.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 14:42:27 -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 14/25] ubifs crypto: wire up new ioctls for managing encryption keys Date: Mon, 23 Oct 2017 14:40:47 -0700 Message-Id: <20171023214058.128121-15-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/ubifs/ioctl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c index 0164bcc827f8..09ede2d1898f 100644 --- a/fs/ubifs/ioctl.c +++ b/fs/ubifs/ioctl.c @@ -205,6 +205,15 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) #endif } + 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, (const void __user *)arg); + + case FS_IOC_GET_ENCRYPTION_KEY_STATUS: + return fscrypt_ioctl_get_key_status(file, (void __user *)arg); + default: return -ENOTTY; } @@ -222,6 +231,9 @@ long ubifs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) break; case FS_IOC_SET_ENCRYPTION_POLICY: case FS_IOC_GET_ENCRYPTION_POLICY: + case FS_IOC_ADD_ENCRYPTION_KEY: + case FS_IOC_REMOVE_ENCRYPTION_KEY: + case FS_IOC_GET_ENCRYPTION_KEY_STATUS: break; default: return -ENOIOCTLCMD;