[f2fs-dev] [PATCH 2/5] fscrypt-crypt-util: fix IV incrementing for --iv-ino-lblk-32

2020-09-30 Thread Eric Biggers
From: Eric Biggers fscrypt-crypt-util treats the "block number" part of the IV as 64-bit when incrementing it. That's wrong for --iv-ino-lblk-32 and --iv-ino-lblk-64, as in those cases the block number should be 32-bit. Fix this by using the correct length for the block number. For --iv-ino-lb

[f2fs-dev] [PATCH 1/5] fscrypt-crypt-util: clean up parsing --block-size and --inode-number

2020-09-30 Thread Eric Biggers
From: Eric Biggers For --block-size, check for strtoul() reporting an overflow. For --inode-number, check for strtoull() reporting an overflow. Also, move the check for 32-bit inode numbers into a more logical place (the place where we check the encryption format-specific limitations). Signed-

[f2fs-dev] [PATCH 5/5] f2fs: verify ciphertext of compressed+encrypted file

2020-09-30 Thread Eric Biggers
From: Eric Biggers In Linux v5.6, f2fs added support for per-file compression. f2fs compression can be used in combination with the existing f2fs encryption support (a.k.a. fscrypt), in which case the compressed data is encrypted rather than the uncompressed data. We need to verify that the enc

[f2fs-dev] [PATCH 0/5] xfstests: test f2fs compression+encryption

2020-09-30 Thread Eric Biggers
Add a test which verifies that encryption is done correctly when a file on f2fs uses both compression and encryption at the same time. Patches 1-4 add prerequisites for the test, while patch 5 adds the actual test. Patch 2 also fixes a bug which could cause the existing test generic/602 to fail i

[f2fs-dev] [PATCH 3/5] fscrypt-crypt-util: add --block-number option

2020-09-30 Thread Eric Biggers
From: Eric Biggers Currently fscrypt-crypt-util assumes that the number of the first block encrypted/decrypted is 0. I.e., it replicates either contents encryption from the start of a file, or encryption of a filename. However, to easily test compression+encryption on f2fs, we need the ability

[f2fs-dev] [PATCH 4/5] common/f2fs: add _require_scratch_f2fs_compression()

2020-09-30 Thread Eric Biggers
From: Eric Biggers Create the file common/f2fs, which will contain f2fs-specific utilities. Then add a function _require_scratch_f2fs_compression(), which checks for f2fs compression support on the scratch filesystem. Signed-off-by: Eric Biggers --- common/f2fs | 27 ++

Re: [f2fs-dev] [GIT PULL][PATCH v4 0/9] Update to zstd-1.4.6

2020-09-30 Thread Nick Terrell via Linux-f2fs-devel
> On Sep 29, 2020, at 11:53 PM, Nick Terrell wrote: > > From: Nick Terrell It has been brought to my attention that patch 3 hasn’t made it to patchwork, likely because it is too large. I’ll include a pull request in the next cover letter, together with the patches (if needed). Please pull fro

Re: [f2fs-dev] [PATCH v4 0/9] Update to zstd-1.4.6

2020-09-30 Thread Nick Terrell via Linux-f2fs-devel
> On Sep 29, 2020, at 11:53 PM, Christoph Hellwig wrote: > > As you keep resend this I keep retelling you that should not do it. > Please provide a proper Linux API, and switch to that. Versioned APIs > have absolutely no business in the Linux kernel. The API is not versioned. We provide a st