Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp465181pxj; Thu, 3 Jun 2021 10:56:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/Kz/DNWwx1TwlvwdyTU3WKb0hZDAYVCtHr8VBpkqSuBptgHpqdPMP7W/eMPlgI37/AdDB X-Received: by 2002:a17:907:3e28:: with SMTP id hp40mr509328ejc.121.1622742996833; Thu, 03 Jun 2021 10:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622742996; cv=none; d=google.com; s=arc-20160816; b=Xhm8OzVs6qHfVoRstIBfDjQCzG+ArwCADhngabIsRrfWuqzpn8vqFK61ipvP76ZO0P n2MJcBx5hFygxAK3rZ9PLf0NVaBBxFbhQBH95ojEGofo+9XXOcIelXSr8MY7E+LOIc5R fePWpHTKiu3y6CT1EqjTvBzAX4Ikf4LH9qRc6KvZidLTHA1GBi12hKw513Y+QJxWZE8z /y7bX4CSbN16c/0Di12dudjT6S2KPbl2+M9G5kQSj9f21j2VdjV+eeoz3W7Onp7NTfhP p9oHH02rDQFVlWNr/EF31OiaMey5uJpjpArA5+ICdLCO82JQa6T86koSfiaX63licnRt dbiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Rg3T03pa46b62x8gGhFAHBi9/9WRd6dDsioK9MbaH0M=; b=XvY/zio6mja8nXJA2f2pqqhnLh5QfzNbASzKM1Xh0BBajORR29rNlx/c6JMu5WNnnm MwgTrw8xhKpnhVjRziqOvCrh8AFQ0DxidfMDhE9dY8YuB9A2XnLi2rF1rG9jFkjWgJ7+ YddJ2ganp1uiJH/b2zTApB1sJuwC0Vi70ZocOL/3lPd7umYkjeKo7S/FlWILKEFUaO60 J6S+0g0T4w0NHMWvP2tKGke1SEZrdHOL6pXyqg9nAs1SA7wtszeZrumBrObQ7BsxssPt I6rinw/RzfTPSiE0uBRUhh0RgPwkQhKR5tnChmqcryP5C+nJav+FHedBVvhGNBOI2hDb io6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nwq9nSiB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si564613ejo.403.2021.06.03.10.56.10; Thu, 03 Jun 2021 10:56:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nwq9nSiB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230015AbhFCRzP (ORCPT + 99 others); Thu, 3 Jun 2021 13:55:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:44716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbhFCRzO (ORCPT ); Thu, 3 Jun 2021 13:55:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D15B61361; Thu, 3 Jun 2021 17:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622742808; bh=pDpZsiO18U3DpgGBUoBUjRv/wLt0NlND3MIarXRGoV8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nwq9nSiBoW/Ze1Swd6Tze6bxP2LUM0bNiB/4j4SsGplCWyCz0W07OoZxwumPGWpmj a/5GEzYZlV1zEcE9SNyZM7R2phDc3sJr8ot1yiMrH5itbqzcCKMxO2nwxbvniRpd+a hPhTNUWTFCMx1j6PouGjKjegEdhy0FhFqXbLrDj4x5Btx/vc9Fa0VtcGIt1ab8E1wT 6yJPd6knHT/lU0r03vKdBq8MwU5neM1v9paHSM8Yw2A1kwNsHLajxDWIvOXiEh8deQ 7lPSbN5EVpr8S/jnQdyRhKF/+IRyXdDwba/EjroEcrfGU5+k7I8WewYIg3yfxacIWW 5g0qh3/z0pyMQ== Date: Thu, 3 Jun 2021 10:53:26 -0700 From: Jaegeuk Kim To: Greg KH Cc: Daniel Rosenberg , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Gabriel Krisman Bertazi , kernel-team@android.com, stable@vger.kernel.org Subject: Re: [PATCH v2 2/2] f2fs: Advertise encrypted casefolding in sysfs Message-ID: References: <20210603095038.314949-1-drosen@google.com> <20210603095038.314949-3-drosen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03, Greg KH wrote: > On Thu, Jun 03, 2021 at 08:40:24AM -0700, Jaegeuk Kim wrote: > > On 06/03, Greg KH wrote: > > > On Thu, Jun 03, 2021 at 09:50:38AM +0000, Daniel Rosenberg wrote: > > > > Older kernels don't support encryption with casefolding. This adds > > > > the sysfs entry encrypted_casefold to show support for those combined > > > > features. Support for this feature was originally added by > > > > commit 7ad08a58bf67 ("f2fs: Handle casefolding with Encryption") > > > > > > > > Fixes: 7ad08a58bf67 ("f2fs: Handle casefolding with Encryption") > > > > Cc: stable@vger.kernel.org # v5.11+ > > > > Signed-off-by: Daniel Rosenberg > > > > --- > > > > fs/f2fs/sysfs.c | 15 +++++++++++++-- > > > > 1 file changed, 13 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c > > > > index 09e3f258eb52..6604291a3cdf 100644 > > > > --- a/fs/f2fs/sysfs.c > > > > +++ b/fs/f2fs/sysfs.c > > > > @@ -161,6 +161,9 @@ static ssize_t features_show(struct f2fs_attr *a, > > > > if (f2fs_sb_has_compression(sbi)) > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > len ? ", " : "", "compression"); > > > > + if (f2fs_sb_has_casefold(sbi) && f2fs_sb_has_encrypt(sbi)) > > > > + len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > + len ? ", " : "", "encrypted_casefold"); > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > len ? ", " : "", "pin_file"); > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "\n"); > > > > > > This is a HUGE abuse of sysfs and should not be encouraged and added to. > > > > This feature entry was originally added in 2017. Let me try to clean this up > > after merging this. > > Thank you. > > > > Please make these "one value per file" and do not keep growing a single > > > file that has to be parsed otherwise you will break userspace tools. > > > > > > And I don't see a Documentation/ABI/ entry for this either :( > > > > There is in Documentation/ABI/testing/sysfs-fs-f2fs. > > So this new item was documented in the file before the kernel change was > made? Do we need to describe all the strings in this entry? 203 What: /sys/fs/f2fs//features 204 Date: July 2017 205 Contact: "Jaegeuk Kim" 206 Description: Shows all enabled features in current device. > > greg k-h