From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CB0DC432C2 for ; Wed, 25 Sep 2019 23:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F02121D7E for ; Wed, 25 Sep 2019 23:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569454093; bh=HgpJVoo1oDBsU4R190zGFEOuZgZWgudt8hbOnoLsuzE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=ZtOAYF5fZjGmVYdnY37Key7mVzsBbHRxEWwp5fueZwgZ3b2Ey+reElTA4UxeWB6Js tDPtnsiDpLByemEi5XczbAoxLMblfFgSBl2yzJduhtdD2ORpdD4hSxnp0+WABfwirK SlzNp9FLqjAkmoyb5ugMwFAGwZF04n1aww7EoibU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731432AbfIYX2M (ORCPT ); Wed, 25 Sep 2019 19:28:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:36212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731427AbfIYX2M (ORCPT ); Wed, 25 Sep 2019 19:28:12 -0400 Received: from gmail.com (unknown [104.132.1.77]) (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 63EE3208C3; Wed, 25 Sep 2019 23:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569454091; bh=HgpJVoo1oDBsU4R190zGFEOuZgZWgudt8hbOnoLsuzE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0aMlxMnv4a/6hk8Mu5f5wNKf7jcJhhzTdIPgahGUi+TfQp5wJLPfmTGd/ATkO1dhf gGZcPmpo1us6dFX1uckmc++w99/DdJEbO/Tq8XuI/huJyS6Q8ifMR/7P9f+gpCBKE7 KP4aYaTxOx5rxpsLMvNH1j2WvnEkcdiNkmrwABmI= Date: Wed, 25 Sep 2019 16:28:09 -0700 From: Eric Biggers To: Eric Sandeen Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, linux-fscrypt@vger.kernel.org Subject: Re: [RFC PATCH 4/8] xfs_io/encrypt: extend 'get_encpolicy' to support v2 policies Message-ID: <20190925232809.GC3163@gmail.com> Mail-Followup-To: Eric Sandeen , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, linux-fscrypt@vger.kernel.org References: <20190812175635.34186-1-ebiggers@kernel.org> <20190812175635.34186-5-ebiggers@kernel.org> <93a8536c-191d-340e-2d18-2ef87d0dcd5d@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93a8536c-191d-340e-2d18-2ef87d0dcd5d@sandeen.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Wed, Sep 25, 2019 at 12:23:25PM -0500, Eric Sandeen wrote: > On 8/12/19 12:56 PM, Eric Biggers wrote: > > From: Eric Biggers > > > > get_encpolicy uses the FS_IOC_GET_ENCRYPTION_POLICY ioctl to retrieve > > the file's encryption policy, then displays it. But that only works for > > v1 encryption policies. A new ioctl, FS_IOC_GET_ENCRYPTION_POLICY_EX, > > has been introduced which is more flexible and can retrieve both v1 and > > v2 encryption policies. > > ... > > > +static void > > +test_for_v2_policy_support(void) > > +{ > > + struct fscrypt_get_policy_ex_arg arg; > > + > > + arg.policy_size = sizeof(arg.policy); > > + > > + if (ioctl(file->fd, FS_IOC_GET_ENCRYPTION_POLICY_EX, &arg) == 0 || > > + errno == ENODATA /* file unencrypted */) { > > + printf("supported\n"); > > + return; > > + } > > + if (errno == ENOTTY) { > > + printf("unsupported\n"); > > + return; > > + } > > + fprintf(stderr, > > + "%s: unexpected error checking for FS_IOC_GET_ENCRYPTION_POLICY_EX support: %s\n", > > Darrick also mentioned to me off-list that the io/encrypt.c code is chock full of > strings that really need to be _("translatable") > Sure, I can do that, though is this really something that people want? These commands are only intended for testing, and the xfsprogs translations don't seem actively maintained (only 1 language was updated in the last 10 years?). - Eric