Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3580466pxb; Mon, 16 Nov 2020 20:04:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbhGcQ3CUPczmchTDY9wwYuFzPwJK/f5AbklNUcxnR+23Yi0Uzx5Z+NBItnhB9RCmO6KIo X-Received: by 2002:a17:906:86cc:: with SMTP id j12mr6915800ejy.174.1605585896049; Mon, 16 Nov 2020 20:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605585896; cv=none; d=google.com; s=arc-20160816; b=mhz51uHSXQpVVjDFYV7oIELIT+PWz1gf3s5Wqkd+a0BEcdIm6/JHhOyUvPqc+/by2G dl43YyJ7c/RLoCeWVlCzUFtG81nt0KaWkdk7reey2jOViWr7zGA1hOyruBvbU+/Z2kOp tvc/EmlrBvwM44ggFWBYFayddjauLp7VS7S9WIO/fg0WVVxXG9HL322qbfiA9kZyHods OIFg3O4ShjEzlq0/ZpS6CyOqkDqvrKrfhZOveMr2tf+wEKYWAP3pGPL3q30l86PMWZKM IFRcXVEYu+9R/njR/zdU0PgWHH0pb4GfjBrxQTRkOerRQVIZskZh9MNCtCKFnFNkbqXC dYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=yi0JUluZtuNsiNBZqteV14yq9mKWglSiwibM+BbEW8s=; b=JZ0brTQHR9DsAtUqMXl7tOqaKu04KAG+1FsNEL++hVh9DGoiSyfI8lFex3RtBkledG e8kSRahLpZE61GaEkjlbsR0Bqyc1Uw4GC/11Uvhuu+h1t0+pwmgKTkpEjj6gh9xZZW5i BTDlTz6wPDzTqVe9IPxEtMFKzV44t30kQ8e5DR/sGfCOZVK7iG4l2ylrf4tzwftLfw2S vgDZcD+qbW5ZRC0XFsVbpJag4a0FjN6gwbm9B+HIOtSKwwJdhhreox3Hyx8lNKWAyKfg 5wAgB2TzXgd/u+bLFE+/jZMKruVVgJXxNjGi32GoYnzoP8BpZg9QIS+wppWqS1Lczy1S XhDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vUa28QYk; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si12301177edt.245.2020.11.16.20.04.33; Mon, 16 Nov 2020 20:04:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-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=@google.com header.s=20161025 header.b=vUa28QYk; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbgKQEDT (ORCPT + 99 others); Mon, 16 Nov 2020 23:03:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726982AbgKQEDT (ORCPT ); Mon, 16 Nov 2020 23:03:19 -0500 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87D91C0617A6 for ; Mon, 16 Nov 2020 20:03:19 -0800 (PST) Received: by mail-qt1-x84a.google.com with SMTP id b10so11605265qtb.16 for ; Mon, 16 Nov 2020 20:03:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=yi0JUluZtuNsiNBZqteV14yq9mKWglSiwibM+BbEW8s=; b=vUa28QYkFc2WUUIbgYO3nv/X2d3Z3MKwmP9a9NdvQ+iXI9eRQSpwcbM1zweGD+PWjQ QyO7PKMH7hALyP5kVRRUUEQhNUMyGcGxycU5hh15BIlDdMDVNFeomDPWZtAiNxYcDVgI O9N7Q8fQK6FCCYWzN4zAysq4VjpXkGWFoHwSAyIgOdZ3JdTXsHSQxt7A535mEFe6mbCI xRcdwurKrJjRS3x/Wy7Owt+nUhBzzoZd59OpZAMSSLJwMwiWNfuJ57bdm6HBz3MYe3jz CDHDezcGavS4VIbNKWOomIriqHoANjpxWR1mF8/FtsvNrR1jmsH9N2dG7lDQUsqelH/h IREQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=yi0JUluZtuNsiNBZqteV14yq9mKWglSiwibM+BbEW8s=; b=FnVXwn9/YNVFN4uBf86BraxyOQ+dfDE1NoSZccCO2p5Zo3QNn/XVfm2Z9WbIb2azdU RpxGKOw/Y3u27mx8w14+mePn/xHd2tPp6FTPiOLYrK1y78XLbgC/6XqeYlAjdBM6d5zB Vh485sJ2rdTxZpjkAHdjFBfg2yQRcjQnaZs5bzmcmJ140Rwi1sdpV1QU3d7O9EFmvbyS eEa8uap1LH5lp0hObI40MoykSnYWlgAFbmGbrES50uNLA9jaLiid9YMVYbnLLLuO32g0 dWTg6gyEqTp1apA/hNRx6B/mSIzBNwHefoRlez7fl9y2DscXogminU/CtrnwlLlhDKbc B8TA== X-Gm-Message-State: AOAM530WNxkgLBYCEq/Ux7eaF886BNQTLPUS4N1byLMVemajNYQT1+6f /LDpLj4FGY6fiHKwmbtNOqW11lPyACs= Sender: "drosen via sendgmr" X-Received: from drosen.c.googlers.com ([fda3:e722:ac3:10:24:72f4:c0a8:4e6f]) (user=drosen job=sendgmr) by 2002:a05:6214:12ed:: with SMTP id w13mr18440880qvv.23.1605585798591; Mon, 16 Nov 2020 20:03:18 -0800 (PST) Date: Tue, 17 Nov 2020 04:03:12 +0000 Message-Id: <20201117040315.28548-1-drosen@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH v2 0/3] Add support for Encryption and Casefolding in F2FS From: Daniel Rosenberg To: "Theodore Y . Ts'o" , Jaegeuk Kim , Eric Biggers , Andreas Dilger , Chao Yu , Alexander Viro , Richard Weinberger , linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, Gabriel Krisman Bertazi , kernel-team@android.com, Daniel Rosenberg Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org These patches are on top of the torvalds tree. F2FS currently supports casefolding and encryption, but not at the same time. These patches aim to rectify that. In a later follow up, this will be added for Ext4 as well. I've included one ext4 patch from the previous set since it isn't in the f2fs branch, but is needed for the fscrypt changes. The f2fs-tools changes have already been applied. Since both fscrypt and casefolding require their own dentry operations, I've moved the responsibility of setting the dentry operations from fscrypt to the filesystems and provided helper functions that should work for most cases. These are a follow-up to the previously sent patch set "[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches" v2: Simplified generic dentry_op function Passed through errors in f2fs_match_ci_name Daniel Rosenberg (3): libfs: Add generic function for setting dentry_ops fscrypt: Have filesystems handle their d_ops f2fs: Handle casefolding with Encryption fs/crypto/fname.c | 4 -- fs/crypto/hooks.c | 1 - fs/ext4/dir.c | 7 --- fs/ext4/ext4.h | 4 -- fs/ext4/namei.c | 1 + fs/ext4/super.c | 5 --- fs/f2fs/dir.c | 96 +++++++++++++++++++++++++++++++---------- fs/f2fs/f2fs.h | 11 +++-- fs/f2fs/hash.c | 11 ++++- fs/f2fs/inline.c | 4 ++ fs/f2fs/namei.c | 1 + fs/f2fs/recovery.c | 12 +++++- fs/f2fs/super.c | 7 --- fs/libfs.c | 60 ++++++++++++++++++++++++++ fs/ubifs/dir.c | 1 + include/linux/fs.h | 1 + include/linux/fscrypt.h | 5 ++- 17 files changed, 170 insertions(+), 61 deletions(-) -- 2.29.2.299.gdc1121823c-goog