[f2fs-dev] [PATCH v9 6/9] iomap: support direct I/O with fscrypt using blk-crypto

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required. No DUN contiguity checks are done - callers are expected to set up the iomap correctly to ensure that each bio submitted by iomap will not have blocks with incontiguous DUNs by calling fscrypt_limit_io_blocks

[f2fs-dev] [PATCH v9 3/9] fscrypt: add functions for direct I/O support

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Introduce fscrypt_dio_supported() to check whether a direct I/O request is unsupported due to encryption constraints. Also introduce fscrypt_limit_io_blocks() to limit how many blocks can be added to a bio being prepared for direct I/O. This is needed for filesystems that use

[f2fs-dev] [PATCH v9 7/9] ext4: support direct I/O with fscrypt using blk-crypto

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 with fscrypt direct I/O support. Direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v9 2/9] block: blk-crypto: relax alignment requirements for bvecs in bios

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
blk-crypto only accepted bios whose bvecs' offsets and lengths were aligned to the crypto data unit size, since blk-crypto-fallback required that to work correctly. Now that the blk-crypto-fallback has been updated to work without that assumption, we relax the alignment requirement - blk-crypto no

[f2fs-dev] [PATCH v9 1/9] block: blk-crypto-fallback: handle data unit split across multiple bvecs

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
Till now, the blk-crypto-fallback required each crypto data unit to be contained within a single bvec. It also required the starting offset of each bvec to be aligned to the data unit size. This patch removes both restrictions, so that blk-crypto-fallback can handle crypto data units split across m

[f2fs-dev] [PATCH v9 4/9] direct-io: add support for fscrypt using blk-crypto

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required, and explicitly check for DUN continuity when adding pages to the bio. (While DUN continuity is usually implied by logical block contiguity, this is not the case when using certain fscrypt IV generation method

[f2fs-dev] [PATCH v9 8/9] f2fs: support direct I/O with fscrypt using blk-crypto

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up f2fs with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v9 9/9] fscrypt: update documentation for direct I/O support

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- Documentation/filesystems/fscrypt.rst | 21 +

[f2fs-dev] [PATCH v9 5/9] block: Make bio_iov_iter_get_pages() respect bio_required_sector_alignment()

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
Previously, bio_iov_iter_get_pages() wasn't used with bios that could have an encryption context. However, direct I/O support using blk-crypto introduces this possibility, so this function must now respect bio_required_sector_alignment() (otherwise, xfstests like generic/465 with ext4 will fail).

[f2fs-dev] [PATCH v9 0/9] add support for direct I/O with fscrypt using blk-crypto

2021-06-04 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. Note that this patch relies on another patchset ("ensure bios aren't split in middle of crypto data unit" found at https://lore.kernel.org/linux-block/20210604195900.2096121-1-sat...@google.com/ ) Till now, the blk-crypto

Re: [f2fs-dev] [PATCH v8 0/8] add support for direct I/O with fscrypt using blk-crypto

2021-05-25 Thread Satya Tangirala via Linux-f2fs-devel
On Tue, May 25, 2021 at 01:57:28PM +0100, Lee Jones wrote: > On Thu, 21 Jan 2021 at 23:06, Satya Tangirala wrote: > > > This patch series adds support for direct I/O with fscrypt using > > blk-crypto. > > > > Is there an update on this set please? > > I can't seem to find any reviews or follow-

[f2fs-dev] [PATCH v8 0/8] add support for direct I/O with fscrypt using blk-crypto

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. Till now, the blk-crypto-fallback expected the offset and length of each bvec in a bio to be aligned to the crypto data unit size. This in turn would mean that any user buffer used to read/write encrypted data using the b

[f2fs-dev] [PATCH v8 6/8] ext4: support direct I/O with fscrypt using blk-crypto

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 with fscrypt direct I/O support. Direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v8 4/8] direct-io: add support for fscrypt using blk-crypto

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required, and explicitly check for DUN continuity when adding pages to the bio. (While DUN continuity is usually implied by logical block contiguity, this is not the case when using certain fscrypt IV generation method

[f2fs-dev] [PATCH v8 8/8] fscrypt: update documentation for direct I/O support

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- Documentation/filesystems/fscrypt.rst | 21 +

[f2fs-dev] [PATCH v8 5/8] iomap: support direct I/O with fscrypt using blk-crypto

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required. No DUN contiguity checks are done - callers are expected to set up the iomap correctly to ensure that each bio submitted by iomap will not have blocks with incontiguous DUNs by calling fscrypt_limit_io_blocks

[f2fs-dev] [PATCH v8 1/8] block: blk-crypto-fallback: handle data unit split across multiple bvecs

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
Till now, the blk-crypto-fallback required each crypto data unit to be contained within a single bvec. It also required the starting offset of each bvec to be aligned to the data unit size. This patch removes both restrictions, so that blk-crypto-fallback can handle crypto data units split across m

[f2fs-dev] [PATCH v8 7/8] f2fs: support direct I/O with fscrypt using blk-crypto

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up f2fs with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v8 2/8] block: blk-crypto: relax alignment requirements for bvecs in bios

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
blk-crypto only accepted bios whose bvecs' offsets and lengths were aligned to the crypto data unit size, since blk-crypto-fallback required that to work correctly. Now that the blk-crypto-fallback has been updated to work without that assumption, we relax the alignment requirement - blk-crypto no

[f2fs-dev] [PATCH v8 3/8] fscrypt: add functions for direct I/O support

2021-01-21 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Introduce fscrypt_dio_supported() to check whether a direct I/O request is unsupported due to encryption constraints. Also introduce fscrypt_limit_io_blocks() to limit how many blocks can be added to a bio being prepared for direct I/O. This is needed for filesystems that use

Re: [f2fs-dev] [PATCH v2 2/3] fscrypt: Add metadata encryption support

2020-12-24 Thread Satya Tangirala via Linux-f2fs-devel
I realized I didn't update fscrypt_mergeable_bio() to take metadata encryption into account, so bios will be more fragmented than required. I'll fix it in v3. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourcef

Re: [f2fs-dev] [PATCH 0/3] add support for metadata encryption to F2FS

2020-12-24 Thread Satya Tangirala via Linux-f2fs-devel
On Tue, Dec 22, 2020 at 07:47:45PM +0800, Chao Yu wrote: > On 2020/12/18 19:53, Satya Tangirala wrote: > > On Fri, Dec 18, 2020 at 05:02:23PM +0800, Chao Yu wrote: > > > But, what's the plan about supporting software encryption for metadata? > > > Current > > > f2fs write flow will handle all oper

Re: [f2fs-dev] [PATCH 0/3] add support for metadata encryption to F2FS

2020-12-18 Thread Satya Tangirala via Linux-f2fs-devel
On Fri, Dec 18, 2020 at 05:02:23PM +0800, Chao Yu wrote: > On 2020/12/17 23:44, Satya Tangirala wrote: > > On Sat, Oct 10, 2020 at 05:53:06PM +0800, Chao Yu wrote: > > > Why not using nid as DUN, then GC could migrate encrypted node block > > > directly via > > > meta inode's address space like we

Re: [f2fs-dev] [PATCH v3 2/3] f2fs-tools:sload.f2fs compression support

2020-12-18 Thread Satya Tangirala via Linux-f2fs-devel
On Tue, Dec 08, 2020 at 04:15:54PM +0800, Robin Hsu wrote: > From: Robin Hsu > > Add F2FS compression support for sload > * Support file extension filter, either default-accept or default-deny > policy > * Support choice of compression algorithm, LZO (version 2) or LZ4 > (default) > * Support

Re: [f2fs-dev] [PATCH 0/1] userspace support for F2FS metadata encryption

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
On Thu, Dec 17, 2020 at 08:23:18AM -0800, Jaegeuk Kim wrote: > Hi Satya, > > Could you please consider to rebase the patches on f2fs-tools/dev branch? > I've applied compression support which will have some conflicts with this > series. And, could you check this works with multi-partition support?

Re: [f2fs-dev] [PATCH v2 1/2] f2fs-tools: Introduce metadata encryption support

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
On Fri, Dec 18, 2020 at 09:06:00AM +0800, Chao Yu wrote: > On 2020/12/17 23:10, Satya Tangirala via Linux-f2fs-devel wrote: > > Introduce native metadata encryption support for f2fs. All blocks > > other than the super block (and its redundant copy) are encrypted with the > &g

Re: [f2fs-dev] [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
On Thu, Dec 17, 2020 at 06:34:27PM -0500, Theodore Y. Ts'o wrote: > On Thu, Dec 17, 2020 at 08:51:14PM +, Satya Tangirala wrote: > > On Thu, Dec 17, 2020 at 01:08:49PM -0500, Theodore Y. Ts'o wrote: > > > On Thu, Dec 17, 2020 at 03:04:32PM +, Satya Tangirala wrote: > > > > This patch series

Re: [f2fs-dev] [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
On Thu, Dec 17, 2020 at 01:08:49PM -0500, Theodore Y. Ts'o wrote: > On Thu, Dec 17, 2020 at 03:04:32PM +, Satya Tangirala wrote: > > This patch series adds support for metadata encryption to F2FS using > > blk-crypto. > > Is there a companion patch series needed so that f2fstools can > check/r

[f2fs-dev] [PATCH v2 2/2] libf2fs_io: Make metadata encryption work with sparse mode

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
This patch is an *untested* attempt to make metadata encryption work with sparse mode. It's included only in case there are already objections to the approach. The easiest way to make metadata encryption work with sparse mode might be to encrypt buffers before the calls to sparse_write_blk() and d

Re: [f2fs-dev] [PATCH 1/1] f2fs-tools: Introduce metadata encryption support

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
On Wed, Oct 07, 2020 at 12:42:09PM -0700, jaeg...@kernel.org wrote: > Hi Satya, > > On 10/05, Satya Tangirala wrote: > > This patch introduces two new options '-A' and '-M' for specifying metadata > > crypt options. '-A' takes the desired metadata encryption algorithm as > > argument. '-M' takes t

Re: [f2fs-dev] [PATCH v2 1/2] f2fs-tools: Introduce metadata encryption support

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
I still need to update configure.ac to check for the new libraries - I'll do that in v3 of the patch series ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
On Sat, Oct 10, 2020 at 05:53:06PM +0800, Chao Yu wrote: > On 2020/10/5 15:36, Satya Tangirala wrote: > > This patch series adds support for metadata encryption to F2FS using > > blk-crypto. > > It looks this implementation is based on hardware crypto engine, could you > please add this info into

Re: [f2fs-dev] [PATCH v2 2/3] fscrypt: Add metadata encryption support

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
I'm not yet done with the xfstests that Eric asked for - I'll send them out as soon as they're done. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
On Thu, Dec 17, 2020 at 03:04:32PM +, Satya Tangirala wrote: > Changes to the userspace > tools (that are required to test out metadata encryption with F2FS) are > also being sent out - I'll post a link as a reply to this mail once it's > out. The userspace changes are at https://lore.kernel.o

[f2fs-dev] [PATCH v2 1/2] f2fs-tools: Introduce metadata encryption support

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
Introduce native metadata encryption support for f2fs. All blocks other than the super block (and its redundant copy) are encrypted with the specified metadata encryption key and algorithm. The IV for each block is its block number in the filesystem. This patch introduces two new options '-A' and

[f2fs-dev] [PATCH v2 0/2] userspace support for metadata encryption.

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
The kernel patches for metadata encryption are at: https://lore.kernel.org/linux-fscrypt/20201217150435.1505269-1-sat...@google.com/ This patch series implements the userspace changes required for metadata encryption support as implemented in the kernel changes above. All blocks in the filesystem

[f2fs-dev] [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for metadata encryption to F2FS using blk-crypto. Currently, F2FS supports native file based encryption (FBE) via fscrypt. FBE encrypts the contents of files that reside in folders with encryption policies, as well as their filenames, but all other file contents and

[f2fs-dev] [PATCH v2 3/3] f2fs: Add metadata encryption support

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
Wire up metadata encryption support with the fscrypt metadata crypt additions. Note that this feature relies on the blk-crypto framework for encryption, and thus requires either hardware inline encryption support or the blk-crypto-fallback. Filesystems can be configured with metadata encryption su

[f2fs-dev] [PATCH v2 2/3] fscrypt: Add metadata encryption support

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
Introduces functions that help with metadata encryption. In particular, we introduce: fscrypt_setup_metadata_encryption() - filesystems should call this function to set up metadata encryption on a super block with the encryption algorithm (the desired FSCRYPT_MODE_*) and the key identifier of the

[f2fs-dev] [PATCH v2 1/3] fscrypt, f2fs: replace fscrypt_get_devices with fscrypt_get_device

2020-12-17 Thread Satya Tangirala via Linux-f2fs-devel
The new function takes the super_block and the index of a device, and returns the request_queue of the device at that index (whereas the old function would take a pointer to an array of request_queues and fill them all up). This allows callers to avoid allocating an array of request_queues in some

Re: [f2fs-dev] [PATCH v7 0/8] add support for direct I/O with fscrypt using blk-crypto

2020-12-03 Thread Satya Tangirala via Linux-f2fs-devel
On Tue, Nov 17, 2020 at 12:15:26PM -0500, Theodore Y. Ts'o wrote: > What is the expected use case for Direct I/O using fscrypt? This > isn't a problem which is unique to fscrypt, but one of the really > unfortunate aspects of the DIO interface is the silent fallback to > buffered I/O. We've lived

Re: [f2fs-dev] [PATCH v7 1/8] block: ensure bios are not split in middle of crypto data unit

2020-12-02 Thread Satya Tangirala via Linux-f2fs-devel
On Wed, Nov 25, 2020 at 02:12:35PM -0800, Eric Biggers wrote: > On Wed, Nov 18, 2020 at 12:38:15AM +, Satya Tangirala wrote: > > > > +/** > > > > + * update_aligned_sectors_and_segs() - Ensures that *@aligned_sectors > > > > is aligned > > > > + *to @bio_sec

Re: [f2fs-dev] [PATCH v7 1/8] block: ensure bios are not split in middle of crypto data unit

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
On Tue, Nov 17, 2020 at 03:31:23PM -0800, Eric Biggers wrote: > On Tue, Nov 17, 2020 at 02:07:01PM +, Satya Tangirala wrote: > > Introduce blk_crypto_bio_sectors_alignment() that returns the required > > alignment for the number of sectors in a bio. Any bio split must ensure > > that the number

[f2fs-dev] [PATCH v7 6/8] ext4: support direct I/O with fscrypt using blk-crypto

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 with fscrypt direct I/O support. Direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v7 4/8] direct-io: add support for fscrypt using blk-crypto

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required, and explicitly check for DUN continuity when adding pages to the bio. (While DUN continuity is usually implied by logical block contiguity, this is not the case when using certain fscrypt IV generation method

[f2fs-dev] [PATCH v7 7/8] f2fs: support direct I/O with fscrypt using blk-crypto

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up f2fs with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v7 1/8] block: ensure bios are not split in middle of crypto data unit

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
Introduce blk_crypto_bio_sectors_alignment() that returns the required alignment for the number of sectors in a bio. Any bio split must ensure that the number of sectors in the resulting bios is aligned to that returned value. This patch also updates __blk_queue_split(), __blk_queue_bounce() and bl

[f2fs-dev] [PATCH v7 5/8] iomap: support direct I/O with fscrypt using blk-crypto

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required. No DUN contiguity checks are done - callers are expected to set up the iomap correctly to ensure that each bio submitted by iomap will not have blocks with incontiguous DUNs by calling fscrypt_limit_io_blocks

[f2fs-dev] [PATCH v7 2/8] blk-crypto: don't require user buffer alignment

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
Previously, blk-crypto-fallback required the offset and length of each bvec in a bio to be aligned to the crypto data unit size. This patch enables blk-crypto-fallback to work even if that's not the case - the requirement now is only that the total length of the data in the bio is aligned to the cr

[f2fs-dev] [PATCH v7 8/8] fscrypt: update documentation for direct I/O support

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- Documentation/filesystems/fscrypt.rst | 21 +

[f2fs-dev] [PATCH v7 3/8] fscrypt: add functions for direct I/O support

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Introduce fscrypt_dio_supported() to check whether a direct I/O request is unsupported due to encryption constraints. Also introduce fscrypt_limit_io_blocks() to limit how many blocks can be added to a bio being prepared for direct I/O. This is needed for filesystems that use

[f2fs-dev] [PATCH v7 0/8] add support for direct I/O with fscrypt using blk-crypto

2020-11-17 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. It has been rebased on fscrypt/master (i.e. the "master" branch of the fscrypt tree at https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git) Patch 1 ensures that bios are not split in the middle of a crypto data unit. T

Re: [f2fs-dev] [PATCH] fscrypt: fix inline encryption not used on new files

2020-11-11 Thread Satya Tangirala via Linux-f2fs-devel
On Tue, Nov 10, 2020 at 05:52:24PM -0800, Eric Biggers wrote: > From: Eric Biggers > > The new helper function fscrypt_prepare_new_inode() runs before > S_ENCRYPTED has been set on the new inode. This accidentally made > fscrypt_select_encryption_impl() never enable inline encryption on newly >

Re: [f2fs-dev] [PATCH 3/3] f2fs: Add metadata encryption support

2020-10-07 Thread Satya Tangirala via Linux-f2fs-devel
On Wed, Oct 07, 2020 at 02:20:52PM -0700, Eric Biggers wrote: > On Mon, Oct 05, 2020 at 07:36:06AM +, Satya Tangirala wrote: > > Wire up metadata encryption support with the fscrypt metadata crypt > > additions. > > > > Introduces a new mount option for metadata encryption - > > metadata_crypt

Re: [f2fs-dev] [PATCH 2/3] fscrypt: Add metadata encryption support

2020-10-07 Thread Satya Tangirala via Linux-f2fs-devel
On Wed, Oct 07, 2020 at 01:52:21PM -0700, Eric Biggers wrote: > On Mon, Oct 05, 2020 at 07:36:05AM +, Satya Tangirala wrote: > > Introduces functions that help with metadata encryption. > > > > In particular, we introduce: > > > > fscrypt_setup_metadata_encryption() - filesystems should call

Re: [f2fs-dev] [PATCH 0/3] add support for metadata encryption to F2FS

2020-10-07 Thread Satya Tangirala via Linux-f2fs-devel
On Wed, Oct 07, 2020 at 02:00:40PM -0700, Eric Biggers wrote: > On Mon, Oct 05, 2020 at 07:36:03AM +, Satya Tangirala wrote: > > This patch series adds support for metadata encryption to F2FS using > > blk-crypto. > > This patch series needs more explanation about what "metadata encryption" is

[f2fs-dev] [PATCH 0/1] userspace support for F2FS metadata encryption

2020-10-05 Thread Satya Tangirala via Linux-f2fs-devel
The kernel patches for F2FS metadata encryption are at: https://lore.kernel.org/linux-fscrypt/20201005073606.1949772-4-sat...@google.com/ This patch implements the userspace changes required for metadata encryption support as implemented in the kernel changes above. All blocks in the filesystem a

[f2fs-dev] [PATCH 3/3] f2fs: Add metadata encryption support

2020-10-05 Thread Satya Tangirala via Linux-f2fs-devel
Wire up metadata encryption support with the fscrypt metadata crypt additions. Introduces a new mount option for metadata encryption - metadata_crypt_key=%s. The argument to this option is the key descriptor of the metadata encryption key in hex. This key descriptor will be looked up in the logon

[f2fs-dev] [PATCH 0/3] add support for metadata encryption to F2FS

2020-10-05 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for metadata encryption to F2FS using blk-crypto. Patch 1 replaces fscrypt_get_devices (which took an array of request_queues and filled it up) with fscrypt_get_device, which takes a index of the desired device and returns the device at that index (so the index passe

[f2fs-dev] [PATCH 1/3] fscrypt, f2fs: replace fscrypt_get_devices with fscrypt_get_device

2020-10-05 Thread Satya Tangirala via Linux-f2fs-devel
The new function takes the super_block and the index of a device, and returns the request_queue of the device at that index (whereas the old function would take a pointer to an array of request_queues and fill them all up). This allows callers to avoid allocating an array of request_queues in some

[f2fs-dev] [PATCH 2/3] fscrypt: Add metadata encryption support

2020-10-05 Thread Satya Tangirala via Linux-f2fs-devel
Introduces functions that help with metadata encryption. In particular, we introduce: fscrypt_setup_metadata_encryption() - filesystems should call this function to set up metadata encryption on a super block with the encryption algorithm (the desired FSCRYPT_MODE_*) and the key descriptor of the

Re: [f2fs-dev] [PATCH 0/3] add support for metadata encryption to F2FS

2020-10-05 Thread Satya Tangirala via Linux-f2fs-devel
On Mon, Oct 05, 2020 at 07:36:03AM +, Satya Tangirala wrote: > This patch series adds support for metadata encryption to F2FS using > blk-crypto. > > Patch 1 replaces fscrypt_get_devices (which took an array of request_queues > and filled it up) with fscrypt_get_device, which takes a index of

[f2fs-dev] [PATCH 1/1] f2fs-tools: Introduce metadata encryption support

2020-10-05 Thread Satya Tangirala via Linux-f2fs-devel
Introduce native metadata encryption support for F2FS. All blocks other than the super block are encrypted with the specified metadata encryption key and algorithm. The data unit number for each block is its block number in the filesystem. This patch introduces two new options '-A' and '-M' for sp

[f2fs-dev] [PATCH v6 4/7] ext4: support direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 with fscrypt direct I/O support. Direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v6 1/7] fscrypt: Add functions for direct I/O support

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Introduce fscrypt_dio_supported() to check whether a direct I/O request is unsupported due to encryption constraints. Also introduce fscrypt_limit_io_blocks() to limit how many blocks can be added to a bio being prepared for direct I/O. This is needed for filesystems that use

[f2fs-dev] [PATCH v6 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required. No DUN contiguity checks are done - callers are expected to set up the iomap correctly to ensure that each bio submitted by iomap will not have blocks with incontiguous DUNs by calling fscrypt_limit_io_blocks

[f2fs-dev] [PATCH v6 6/7] fscrypt: document inline encryption support

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
Update the fscrypt documentation file for inline encryption support. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- Documentation/filesystems/fscrypt.rst | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/fi

[f2fs-dev] [PATCH v6 0/7] add support for direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. It has been rebased on fscrypt/master (i.e. the "master" branch of the fscrypt tree at https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git) Patch 1 adds two functions to fscrypt that need to be called to determine if di

[f2fs-dev] [PATCH v6 5/7] f2fs: support direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up f2fs with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v6 7/7] fscrypt: update documentation for direct I/O support

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- Documentation/filesystems/fscrypt.rst | 20 +

[f2fs-dev] [PATCH v6 2/7] direct-io: add support for fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required, and explicitly check for DUN continuity when adding pages to the bio. (While DUN continuity is usually implied by logical block contiguity, this is not the case when using certain fscrypt IV generation method

[f2fs-dev] [PATCH v5 6/7] fscrypt: document inline encryption support

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
Update the fscrypt documentation file for inline encryption support. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- Documentation/filesystems/fscrypt.rst | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/fi

[f2fs-dev] [PATCH v5 1/7] fscrypt: Add functions for direct I/O support

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Introduce fscrypt_dio_supported() to check whether a direct I/O request is unsupported due to encryption constraints. Also introduce fscrypt_limit_io_blocks() to limit how many blocks can be added to a bio being prepared for direct I/O. This is needed for filesystems that use

[f2fs-dev] [PATCH v5 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required. No DUN contiguity checks are done - callers are expected to set up the iomap correctly to ensure that each bio submitted by iomap will not have blocks with incontiguous DUNs by calling fscrypt_limit_io_blocks

[f2fs-dev] [PATCH v5 0/7] add support for direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. It has been rebased on fscrypt/master (i.e. the "master" branch of the fscrypt tree at https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git) Patch 1 adds two functions to fscrypt that need to be called to determine if di

[f2fs-dev] [PATCH v5 7/7] fscrypt: update documentation for direct I/O support

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- Documentation/filesystems/fscrypt.rst | 20 +

[f2fs-dev] [PATCH v5 4/7] ext4: support direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 with fscrypt direct I/O support. Direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v5 5/7] f2fs: support direct I/O with fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up f2fs with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v5 2/7] direct-io: add support for fscrypt using blk-crypto

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required, and explicitly check for DUN continuity when adding pages to the bio. (While DUN continuity is usually implied by logical block contiguity, this is not the case when using certain fscrypt IV generation method

[f2fs-dev] [PATCH v4 4/7] ext4: support direct I/O with fscrypt using blk-crypto

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v4 5/7] f2fs: support direct I/O with fscrypt using blk-crypto

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up f2fs with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v4 7/7] fscrypt: update documentation for direct I/O support

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala --- Documentation/filesystems/fscrypt.rst | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-)

[f2fs-dev] [PATCH v4 2/7] direct-io: add support for fscrypt using blk-crypto

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required, and explicitly check for DUN continuity when adding pages to the bio. (While DUN continuity is usually implied by logical block contiguity, this is not the case when using certain fscrypt IV generation method

[f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up iomap direct I/O with the fscrypt additions for direct I/O. This allows ext4 to support direct I/O on encrypted files when inline encryption is enabled. This change consists of two parts: - Set a bio_crypt_ctx on bios for encrypted files, so that the file contents g

[f2fs-dev] [PATCH v4 6/7] fscrypt: document inline encryption support

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
Update the fscrypt documentation file for inline encryption support. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers --- Documentation/filesystems/fscrypt.rst | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/fscrypt.rst b/D

[f2fs-dev] [PATCH v4 1/7] fscrypt: Add functions for direct I/O support

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Introduce fscrypt_dio_supported() to check whether a direct I/O request is unsupported due to encryption constraints. Also introduce fscrypt_limit_io_pages() to limit how many pages can be added to a bio being prepared for direct I/O. This is needed for the iomap direct I/O im

[f2fs-dev] [PATCH v4 0/7] add support for direct I/O with fscrypt using blk-crypto

2020-07-20 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. It has been rebased on fscrypt/master. Patch 1 adds two functions to fscrypt that need to be called to determine if direct I/O is supported for a request. Patches 2 and 3 wire up direct-io and iomap respectively with the

[f2fs-dev] [PATCH v2 7/7] fscrypt: update documentation for direct I/O support

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala --- Documentation/filesystems/fscrypt.rst | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-)

[f2fs-dev] [PATCH v3 1/7] fscrypt: Add functions for direct I/O support

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Introduce fscrypt_dio_supported() to check whether a direct I/O request is unsupported due to encryption constraints, and fscrypt_limit_io_pages() to check how many pages may be added to a bio being prepared for direct I/O. The IV_INO_LBLK_32 fscrypt policy introduced the poss

[f2fs-dev] [PATCH v2 0/7] add support for direct I/O with fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. It has been rebased on fscrypt/master. Patch 1 adds two functions to fscrypt that need to be called to determine if direct I/O is supported for a request. Patches 2 and 3 wire up direct-io and iomap respectively with the

Re: [f2fs-dev] [PATCH 2/5] direct-io: add support for fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
On Mon, Jul 13, 2020 at 11:36:19AM -0700, Eric Biggers wrote: > On Fri, Jul 10, 2020 at 06:34:06AM +0100, Christoph Hellwig wrote: > > On Thu, Jul 09, 2020 at 07:47:48PM +, Satya Tangirala wrote: > > > From: Eric Biggers > > > > > > Set bio crypt contexts on bios by calling into fscrypt when

[f2fs-dev] [PATCH v3 0/7] add support for direct I/O with fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
This patch series adds support for direct I/O with fscrypt using blk-crypto. It has been rebased on fscrypt/master. Patch 1 adds two functions to fscrypt that need to be called to determine if direct I/O is supported for a request. Patches 2 and 3 wire up direct-io and iomap respectively with the

[f2fs-dev] [PATCH v3 5/7] f2fs: support direct I/O with fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up f2fs with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v3 7/7] fscrypt: update documentation for direct I/O support

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
Update fscrypt documentation to reflect the addition of direct I/O support and document the necessary conditions for direct I/O on encrypted files. Signed-off-by: Satya Tangirala --- Documentation/filesystems/fscrypt.rst | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-)

[f2fs-dev] [PATCH v3 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up iomap direct I/O with the fscrypt additions for direct I/O, and set bio crypt contexts on bios when appropriate. Make iomap_dio_bio_actor() call fscrypt_limit_io_pages() to ensure that DUNs remain contiguous within a bio, since it works directly with logical ranges and

[f2fs-dev] [PATCH v3 4/7] ext4: support direct I/O with fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up ext4 with fscrypt direct I/O support. direct I/O with fscrypt is only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must have been enabled, the 'inlinecrypt' mount option must have been specified, and either hardware inline encryption support must be p

[f2fs-dev] [PATCH v3 6/7] fscrypt: document inline encryption support

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
Update the fscrypt documentation file for inline encryption support. Signed-off-by: Satya Tangirala --- Documentation/filesystems/fscrypt.rst | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fs

[f2fs-dev] [PATCH v3 2/7] direct-io: add support for fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Set bio crypt contexts on bios by calling into fscrypt when required, and explicitly check for DUN continuity when adding pages to the bio. (While DUN continuity is usually implied by logical block contiguity, this is not the case when using certain fscrypt IV generation method

[f2fs-dev] [PATCH v2 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
From: Eric Biggers Wire up iomap direct I/O with the fscrypt additions for direct I/O, and set bio crypt contexts on bios when appropriate. Make iomap_dio_bio_actor() call fscrypt_limit_io_pages() to ensure that DUNs remain contiguous within a bio, since it works directly with logical ranges and

[f2fs-dev] [PATCH v2 6/7] fscrypt: document inline encryption support

2020-07-16 Thread Satya Tangirala via Linux-f2fs-devel
Update the fscrypt documentation file for inline encryption support. Signed-off-by: Satya Tangirala --- Documentation/filesystems/fscrypt.rst | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fs

  1   2   3   >