Re: [f2fs-dev] [PATCH 05/12] ext4: make the IS_EXT2_SB/IS_EXT3_SB checks more robust

2023-08-04 Thread Theodore Ts'o
On Wed, Aug 02, 2023 at 05:41:24PM +0200, Christoph Hellwig wrote: > Check for sb->s_type which is the right place to look at the file system > type, not the holder, which is just an implementation detail in the VFS > helpers. > > Signed-off-by: Christoph Hellwig Acked

Re: [f2fs-dev] [PATCH 09/12] ext4: drop s_umount over opening the log device

2023-08-04 Thread Theodore Ts'o
gt; It might be preferable to just drop s_umount over ->fill_super entirely, > but that will require a fairly massive audit first, so we'll do the easy > version here first. > > Signed-off-by: Christoph Hellwig Acked-by: Theodore Ts'o _

Re: [f2fs-dev] [PATCH v5 01/10] fs: Expose helper to check if a directory needs casefolding

2023-08-12 Thread Theodore Ts'o
On Fri, Aug 11, 2023 at 06:59:15PM -0700, Eric Biggers wrote: > > To be honest I've always been confused about why the ->s_encoding check is > there. It looks like Ted added it in 6456ca6520ab ("ext4: fix kernel oops > caused by spurious casefold flag") to address a fuzzing report for a > filesy

Re: [f2fs-dev] [PATCH v5 01/10] fs: Expose helper to check if a directory needs casefolding

2023-08-14 Thread Theodore Ts'o
On Sat, Aug 12, 2023 at 09:30:22PM -0700, Eric Biggers wrote: > Well, one thing that the kernel community can do to make things better is > identify when a large number of bug reports are caused by a single issue > ("userspace can write to mounted block devices"), and do something about that > unde

Re: [f2fs-dev] [PATCH v5 01/10] fs: Expose helper to check if a directory needs casefolding

2023-08-14 Thread Theodore Ts'o
On Mon, Aug 14, 2023 at 10:22:44AM -0700, Eric Biggers wrote: > > Keep in mind, the syzkaller team isn't asking for these pointless "fixes" > either. They'd very much prefer 1 fix to 1000 fixes. I think some confusion > might be arising from the very different types of problems that syzkaller >

Re: [f2fs-dev] [PATCH 0/3] Simplify rejection of unexpected casefold inode flag

2023-08-23 Thread Theodore Ts'o
be5 [2/3] ext4: remove redundant checks of s_encoding commit: fe9ef4ceae694597fe7318aafd7357cc5b85724e [3/3] libfs: remove redundant checks of s_encoding commit: 6d7772c4427aaa21251c629d4fabb17e5c10a463 Best regards, -- Theodore Ts'o __

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Theodore Ts'o
On Thu, Sep 28, 2023 at 01:40:55PM -0400, Jeff Layton wrote: > > Correct. We'd lose some fidelity in currently stored timestamps, but as > Linus and Ted pointed out, anything below ~100ns granularity is > effectively just noise, as that's the floor overhead for calling into > the kernel. It's hard

Re: [f2fs-dev] [PATCH v6 0/9] Support negative dentries on case-insensitive ext4 and f2fs

2023-11-20 Thread Theodore Ts'o
On Mon, Nov 20, 2023 at 10:07:51AM -0800, Linus Torvalds wrote: > Of course, "do it in shared generic code" doesn't tend to really fix > the braindamage, but at least it's now shared braindamage and not > spread out all over. I'm looking at things like > generic_ci_d_compare(), and it hurts to see

Re: [f2fs-dev] [PATCH v6 0/9] Support negative dentries on case-insensitive ext4 and f2fs

2023-11-20 Thread Theodore Ts'o
On Mon, Nov 20, 2023 at 07:03:13PM -0800, Linus Torvalds wrote: > On Mon, 20 Nov 2023 at 18:29, Linus Torvalds > wrote: > > > > It's a bit complicated, yes. But no, doing things one unicode > > character at a time is just bad bad bad. > > Put another way: the _point_ of UTF-8 is that ASCII is sti

Re: [f2fs-dev] [PATCH v5 09/12] ext4: Configure dentry operations at dentry-creation time

2024-02-02 Thread Theodore Ts'o
olume, > simplifying the implementation across these features. > > Signed-off-by: Gabriel Krisman Bertazi Acked-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-26 Thread Theodore Ts'o
On Fri, Jul 26, 2024 at 05:22:37PM +0200, David Sterba wrote: > All of this sounds overengineered for something that is a simple array > and two helpers. The code is not finalized so I'll wait for the next > version but specific file order in makefile and linker tricks seems > fragile and I'm not s

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-27 Thread Theodore Ts'o
On Fri, Jul 26, 2024 at 11:09:02AM -0700, Christoph Hellwig wrote: > On Fri, Jul 26, 2024 at 01:58:00PM -0400, Theodore Ts'o wrote: > > Yeah, that's my reaction as well. This only saves 50 lines of code in > > ext4, and that includes unrelated changes such as getti

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-28 Thread Theodore Ts'o
On Mon, Jul 29, 2024 at 09:46:17AM +0800, Youling Tang wrote: > 1. Previous version implementation: array mode (see link 1) : >    Advantages: >    - Few changes, simple principle, easy to understand code. >    Disadvantages: >    - Each modified module needs to maintain an array, more code. > > 2

Re: [f2fs-dev] [syzbot] [f2fs?] WARNING in rcu_sync_dtor

2024-07-29 Thread Theodore Ts'o
On Mon, Jul 29, 2024 at 03:27:21PM +0200, Jan Kara wrote: > > So in ext4 we have EXT4_FLAGS_SHUTDOWN flag which we now use > internally instead of SB_RDONLY flag for checking whether the > filesystem was shutdown (because otherwise races between remount and > hitting fs error were really messy). H

Re: [f2fs-dev] [PATCH] Documentation: filesystems: correct possessive "its"

2022-08-30 Thread Theodore Ts'o
On Tue, Aug 30, 2022 at 10:01:33PM +0100, Al Viro wrote: > On Mon, Aug 29, 2022 at 04:54:29PM -0700, Randy Dunlap wrote: > > compress_log_size=%uSupport configuring compress cluster size, the > > size will > > -be 4KB * (1 << %u), 16KB is minimum size, also it's > > +

Re: [f2fs-dev] Separate mailing list (and git and patchwork) for fsverity?

2022-12-22 Thread Theodore Ts&#x27;o
On Wed, Dec 21, 2022 at 03:48:32PM -0800, Eric Biggers wrote: > > What would people say about having a separate mailing list, git repo, and > > patchwork project for fsverity? So the fsverity entry would look like: > > > > FSVERITY: READ-ONLY FILE-BASED AUTHENTICITY PROTECTION > > [...] > > L:

Re: [f2fs-dev] [PATCH 4/7] libfs: Support revalidation of encrypted case-insensitive dentries

2023-03-23 Thread Theodore Ts&#x27;o
> enabled, as long as the directory is either casefolded or encrypted, but > not both at the same time. > > Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@l

Re: [f2fs-dev] [PATCH 3/7] libfs: Validate negative dentries in case-insensitive directories

2023-03-23 Thread Theodore Ts&#x27;o
Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 5/7] libfs: Merge encrypted_ci_dentry_ops and ci_dentry_ops

2023-03-23 Thread Theodore Ts&#x27;o
> Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/7] fs: Expose name under lookup to d_revalidate hook

2023-03-23 Thread Theodore Ts&#x27;o
se > this extra parameter. > > I'm fine with extending d_revalidate instead of adding a new hook, if > it is considered cleaner and the approach is accepted. I wrote a new > hook to simplify reviewing. > > Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Theodore Ts

Re: [f2fs-dev] [PATCH 2/7] fs: Add DCACHE_CASEFOLD_LOOKUP flag

2023-03-23 Thread Theodore Ts&#x27;o
gt; during a case-insensitive lookup. > > Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 6/7] ext4: Enable negative dentries on case-insensitive lookup

2023-03-23 Thread Theodore Ts&#x27;o
n the dentry casefold flag. > > Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/7] fs: Expose name under lookup to d_revalidate hook

2023-03-25 Thread Theodore Ts&#x27;o
On Thu, Mar 23, 2023 at 10:33:20AM -0400, Theodore Ts'o wrote: > On Wed, Jun 22, 2022 at 03:45:57PM -0400, Gabriel Krisman Bertazi wrote: > > Negative dentries support on case-insensitive ext4/f2fs will require > > access to the name under lookup to ensure it matches the dentr

Re: [f2fs-dev] [PATCH 01/12] backing_dev: remove current->backing_dev_info

2023-05-31 Thread Theodore Ts&#x27;o
gt; Signed-off-by: Christoph Hellwig > Reviewed-by: Hannes Reinecke > Reviewed-by: Darrick J. Wong Acked-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-05-31 Thread Theodore Ts&#x27;o
Reinecke > Acked-by: Darrick J. Wong Acked-by: Theodore Ts'o ___ 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 1/6] ext4: Remove ext4 locking of moved directory

2023-06-01 Thread Theodore Ts&#x27;o
On Thu, Jun 01, 2023 at 12:58:21PM +0200, Jan Kara wrote: > Remove locking of moved directory in ext4_rename2(). We will take care > of it in VFS instead. This effectively reverts commit 0813299c586b > ("ext4: Fix possible corruption when moving a directory") and followup > fixes. Remind me --- co

Re: [f2fs-dev] [PATCH v4 0/7] Support negative dentries on case-insensitive ext4 and f2fs

2023-07-27 Thread Theodore Ts&#x27;o
On Thu, Jul 27, 2023 at 01:28:36PM -0400, Gabriel Krisman Bertazi wrote: > This is the v4 of the negative dentry support on case-insensitive > directories. It doesn't have any functional changes from v1. It applies > Eric's comments to bring the flags check closet together, improve the > documenta

Re: [f2fs-dev] [PATCH v4 0/7] Support negative dentries on case-insensitive ext4 and f2fs

2023-07-27 Thread Theodore Ts&#x27;o
On Thu, Jul 27, 2023 at 02:39:55PM -0400, Gabriel Krisman Bertazi wrote: > > Also, Christian, I notice one of the five VFS patches in the series > > has your Reviewed-by tag, but not the others? Is that because you > > haven't had a chance to make a final determination on those patches, > > or you

[f2fs-dev] [PATCH] fs: push sync_filesystem() down to the file system's remount_fs()

2014-03-13 Thread Theodore Ts&#x27;o
e to read-only, and there are some file systems where this is not needed at all (for example, for a pseudo-filesystem or something like romfs). Signed-off-by: "Theodore Ts'o" Cc: linux-fsde...@vger.kernel.org Cc: Christoph Hellwig Cc: Artem Bityutskiy Cc: Adrian Hunter Cc: Ev

Re: [f2fs-dev] [Cluster-devel] [PATCH] fs: push sync_filesystem() down to the file system's remount_fs()

2014-03-13 Thread Theodore Ts&#x27;o
On Thu, Mar 13, 2014 at 04:28:23PM +, Steven Whitehouse wrote: > > I guess the same is true for other file systems which are mounted ro > too. So maybe a check for MS_RDONLY before doing the sync in those > cases? My original patch moved the sync_filesystem into the check for MS_RDONLY in the

Re: [f2fs-dev] [PATCH] fs: push sync_filesystem() down to the file system's remount_fs()

2014-03-15 Thread Theodore Ts&#x27;o
On Thu, Mar 13, 2014 at 07:33:02PM -0500, Steve French wrote: > On Thu, Mar 13, 2014 at 9:20 AM, Theodore Ts'o wrote: > > Previously, the no-op "mount -o mount /dev/xxx" operation when the > > file system is already mounted read-write causes an implied, > >

Re: [f2fs-dev] [PATCH 1/6] mm/fs: don't allow writes to immutable files

2019-06-20 Thread Theodore Ts&#x27;o
On Mon, Jun 10, 2019 at 09:46:17PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > The chattr manpage has this to say about immutable files: > > "A file with the 'i' attribute cannot be modified: it cannot be deleted > or renamed, no link can be created to this file, most of the file's

Re: [f2fs-dev] [PATCH 1/6] mm/fs: don't allow writes to immutable files

2019-06-20 Thread Theodore Ts&#x27;o
On Thu, Jun 20, 2019 at 03:13:06PM -0700, Darrick J. Wong wrote: > > I note that this patch doesn't allow writes to swap files. So Amir's > > generic/554 test will still fail for those file systems that don't use > > copy_file_range. > > I didn't add any IS_SWAPFILE checks here, so I'm not sure t

Re: [f2fs-dev] [PATCH v6 13/17] fs-verity: support builtin file signatures

2019-07-07 Thread Theodore Ts&#x27;o
quot; section of > Documentation/filesystems/fsverity.rst for the full documentation. > > Signed-off-by: Eric Biggers Looks good, you can add: Reviewed-by: Theodore Ts'o ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v6 14/17] ext4: add basic fs-verity support

2019-07-07 Thread Theodore Ts&#x27;o
to ext4. This approach avoids having to depend on the EA_INODE feature > and on rearchitecturing ext4's xattr support to support paging > multi-gigabyte xattrs into memory, and to support encrypting xattrs. > Note that the verity metadata *must* be encrypted when the file i

Re: [f2fs-dev] [PATCH v6 15/17] ext4: add fs-verity read support

2019-07-07 Thread Theodore Ts&#x27;o
mpage_readpages() sometimes falls > back to block_read_full_page(), which does not support fs-verity yet. > > Co-developed-by: Theodore Ts'o > Signed-off-by: Theodore Ts'o > Signed-off-by: Eric Biggers Looks good. Since there's a S-o-B, some might claim that a Reviewed-by

Re: [f2fs-dev] [PATCH v6 16/17] ext4: update on-disk format documentation for fs-verity

2019-07-07 Thread Theodore Ts&#x27;o
On Mon, Jul 01, 2019 at 08:32:36AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Document the format of verity files on ext4, and the corresponding inode > and superblock flags. > > Signed-off-by: Eric Biggers Looks good, you can add: Reviewed-by: Theo

[f2fs-dev] [PATCH] writeback: avoid double-writing the inode on a lazytime expiration

2020-03-06 Thread Theodore Ts&#x27;o
25...@gmail.com Reported-by: Eric Biggers Signed-off-by: Theodore Ts'o --- fs/fs-writeback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 76ac9c7d32ec..32101349ba97 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.

[f2fs-dev] [PATCH 1/2] writeback: avoid double-writing the inode on a lazytime expiration

2020-03-19 Thread Theodore Ts&#x27;o
25...@gmail.com Reported-by: Eric Biggers Signed-off-by: Theodore Ts'o --- fs/fs-writeback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 76ac9c7d32ec..867454997c9d 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.

[f2fs-dev] [PATCH 2/2] writeback, xfs: call dirty_inode() with I_DIRTY_TIME_EXPIRED when appropriate

2020-03-19 Thread Theodore Ts&#x27;o
Use the flag I_DIRTY_TIME_EXPIRED passed to dirty_inode() to signal to the file system that it is time to flush the inode's timestamps to stable storage. Signed-off-by: Theodore Ts'o --- fs/fs-writeback.c | 2 +- fs/xfs/xfs_super.c | 3 ++- 2 files changed, 3 insertions(+), 2

Re: [f2fs-dev] [PATCH v2 00/11] fscrypt: add some higher-level helper functions

2017-10-20 Thread Theodore Ts&#x27;o
On Mon, Oct 09, 2017 at 12:15:33PM -0700, Eric Biggers wrote: > From: Eric Biggers > > This series prepares to reduce code duplication among ext4, f2fs, and > ubifs by introducing a S_ENCRYPTED inode flag (so we don't have to call > back into the filesystem to test the filesystem-specific inode f

Re: [f2fs-dev] [PATCH v3] fscrypt: add a documentation file for filesystem-level encryption

2017-10-29 Thread Theodore Ts&#x27;o
On Fri, Sep 08, 2017 at 05:15:12PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Perhaps long overdue, add a documentation file for filesystem-level > encryption, a.k.a. fscrypt or fs/crypto/, to the Documentation > directory. The new file is based loosely on the latest version of the > "E

Re: [f2fs-dev] [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-07 Thread Theodore Ts&#x27;o
On Wed, Dec 06, 2017 at 06:06:48AM -0800, Matthew Wilcox wrote: > > Unfortunately for you, I don't find arguments along the lines of > > "lockdep will save us" at all convincing. lockdep already throws > > too many false positives to be useful as a tool that reliably and > > accurately points out

Re: [f2fs-dev] Lockdep is less useful than it was

2017-12-08 Thread Theodore Ts&#x27;o
On Thu, Dec 07, 2017 at 02:38:03PM -0800, Matthew Wilcox wrote: > I think it was a mistake to force these on for everybody; they have a > much higher false-positive rate than the rest of lockdep, so as you say > forcing them on leads to fewer people using *any* of lockdep. > > The bug you're hitti

Re: [f2fs-dev] xfstests: generic/342 run failed in f2fs

2017-12-25 Thread Theodore Ts&#x27;o
On Sun, Dec 24, 2017 at 11:47:20PM -0800, Eric Sandeen wrote: > Filesystems are free to do /more/ than the minimum required by posix - > see ext4_sync_parent for example. Or xfs_finish_rename, for synchronous > mounts: > > * If this is a synchronous mount, make sure that the rename > tr

Re: [f2fs-dev] xfstests: generic/342 run failed in f2fs

2017-12-27 Thread Theodore Ts&#x27;o
On Thu, Dec 28, 2017 at 11:17:09AM +0800, Chao Yu wrote: > > Indeed. Actually, since one of our goals was to reduce fsync latencies for > > Android, we decided to support posix in a minimum way. In order to avoid > > Agreed, in order to maximize performance of fsync regular file, we'd better > not

Re: [f2fs-dev] [PATCH v2 05/11] fscrypt: split fscrypt_dummy_context_enabled() into supp/notsupp versions

2018-01-05 Thread Theodore Ts&#x27;o
On Fri, Jan 05, 2018 at 04:39:50PM -0800, Jaegeuk Kim wrote: > > Agreed that dummy'd be easy to go for now tho, doesn't it give any security > concern at all, even only for ext4 testing purpose? Is there a chance to hack > the mount option in runtime? BTW, it may be doable to build an encrypt root

Re: [f2fs-dev] [PATCH v2 00/11] fscrypt: symlink helpers and fscrypt.h cleanup

2018-01-11 Thread Theodore Ts&#x27;o
I've taken the v2 version of this series, plus the ext4-specific patches to use the new symlink helpers (from the v1 patch series). After testing and validating them, I included the patches to convert f2fs and ubifs to use the symlink helpers, so I could also grab the cleanup patches from the V1 se

[f2fs-dev] [GIT PULL] fscrypt updates for 4.16

2018-02-03 Thread Theodore Ts&#x27;o
Note: there will be a merge conflict; please just take the chunk which calls fscrypt_encrypt_symlink() from the fscrypt tree. This will end up dropping the kzalloc() -> f2fs_kzalloc() change, which means the fscrypt-specific allocation won't get tested by f2fs's kmalloc error injection system; whi

Re: [f2fs-dev] [PATCH v2 00/12] lazytime fix and cleanups

2021-02-02 Thread Theodore Ts&#x27;o
On Mon, Jan 11, 2021 at 12:44:35PM -0800, Eric Biggers wrote: > > > > The series look good to me. How do you plan to merge it (after resolving > > Christoph's remarks)? I guess either Ted can take it through the ext4 tree > > or I can take it through my tree... > > I think taking it through your

Re: [f2fs-dev] [PATCH v2 11/12] ext4: simplify i_state checks in __ext4_update_other_inode_time()

2021-02-02 Thread Theodore Ts&#x27;o
On Tue, Jan 12, 2021 at 02:25:21PM +0100, Christoph Hellwig wrote: > > We could add: > > > > static inline bool other_inode_has_dirtytime(struct inode *inode) > > { > > return (inode->state & (I_FREEING | I_WILL_FREE | > > I_NEW | I_DIRTY_TIM

Re: [f2fs-dev] [PATCH v2 00/12] lazytime fix and cleanups

2021-02-03 Thread Theodore Ts&#x27;o
On Tue, Feb 02, 2021 at 09:22:16PM -0800, Eric Biggers wrote: > > I already sent out v3 of this series several weeks ago > (https://lkml.kernel.org/r/20210112190253.64307-1-ebigg...@kernel.org), > and Jan applied it already. Great, thanks. Sorry, I missed it. - T

Re: [f2fs-dev] [PATCH 1/2] ext4: fix error handling in ext4_end_enable_verity()

2021-03-11 Thread Theodore Ts&#x27;o
On Tue, Mar 02, 2021 at 12:04:19PM -0800, Eric Biggers wrote: > From: Eric Biggers > > ext4 didn't properly clean up if verity failed to be enabled on a file: > > - It left verity metadata (pages past EOF) in the page cache, which > would be exposed to userspace if the file was later extended.

Re: [f2fs-dev] [RFC PATCH 6/8] ext4: use memcpy_to_page() in pagecache_write()

2021-03-25 Thread Theodore Ts&#x27;o
On Sun, Feb 07, 2021 at 11:04:23AM -0800, Chaitanya Kulkarni wrote: > Signed-off-by: Chaitanya Kulkarni > --- > fs/ext4/verity.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) Hi, were you expecting to have file system maintainers take these patches into their own trees? The ext4 p

Re: [f2fs-dev] [PATCH v5 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-30 Thread Theodore Ts&#x27;o
On Mon, Mar 29, 2021 at 10:47:52PM -0700, Eric Biggers wrote: > > Isn't this a user problem? If the modules required to boot are on the > > filesystem itself, you are in trouble. But, if that is the case, your > > rootfs is case-insensitive and you gotta have utf8 as built-in or have > > it in an

Re: [f2fs-dev] [PATCH] f2fs crypto: use inode number for xts_tweak

2015-05-12 Thread Theodore Ts&#x27;o
On Mon, May 11, 2015 at 08:51:03PM -0700, Jaegeuk Kim wrote: > Previoulsy when making xts_tweak, page->index was used. > But, when it supports fcollapse, the block address was moved, so that we can > lose the original page->index, which causes decrytion failure. > > In order to avoid that, let's u

Re: [f2fs-dev] [PATCH 03/18] f2fs crypto: declare some definitions for f2fs encryption feature

2015-05-16 Thread Theodore Ts&#x27;o
On Thu, May 14, 2015 at 10:37:21AM +1000, Dave Chinner wrote: > > > > AFAIK, Ted wants to push the codes as a crypto library into fs/ finally, so > > I believe most part of crypto codes are common. > > Can I suggest fs/crypto/ if there are going to be multiple files? Yes, I think we definitely w

Re: [f2fs-dev] [PATCH] crypto: allow to assign gfp_t for __crypto_alloc_tfm

2015-05-19 Thread Theodore Ts&#x27;o
On Tue, May 19, 2015 at 03:15:21PM +0800, Herbert Xu wrote: > On Tue, May 19, 2015 at 12:13:17AM -0700, Jaegeuk Kim wrote: > > > > The key generation is done by ext4_generate_encryption_key in > > fs/ext4/crypto_key.c. > > And, ext4_file_mmap and ext4_file_open trigger it. > > Well that's where yo

Re: [f2fs-dev] [PATCH] f2fs crypto: add rwsem to avoid data races

2015-05-19 Thread Theodore Ts&#x27;o
On Mon, May 18, 2015 at 10:36:41PM -0700, Jaegeuk Kim wrote: > Previoulsy, fi->i_crypt_info was not covered by any lock, resulting in > memory leak. > > This patch adds a rwsem to avoid leaking objects on i_crypt_info. > > Signed-off-by: Jaegeuk Kim I'm not sure we need an rwsem to fix this iss

Re: [f2fs-dev] [PATCH] f2fs crypto: add rwsem to avoid data races

2015-05-19 Thread Theodore Ts&#x27;o
bably the more subtle ones. - Ted >From 6a57d7bbf7bd2d31432e55f266543bb56bf7e1fc Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 20 May 2015 00:27:45 -0400 Subject: [PATCH] ext4 crypto: use per-inode tfm structure As suggested by Herbert X

Re: [f2fs-dev] [PATCH 3/4] f2fs crypto: check encryption for tmpfile

2015-05-19 Thread Theodore Ts&#x27;o
On Tue, May 19, 2015 at 05:43:25PM -0700, Jaegeuk Kim wrote: > This patch adds to check encryption for tmpfile in early stage. Don't you also need a call to ext4_inherit_context(dir, inode) here? (I need to fix this for ext4 as well). - Ted ---

Re: [f2fs-dev] [PATCH] f2fs crypto: add rwsem to avoid data races

2015-05-20 Thread Theodore Ts&#x27;o
On Tue, May 19, 2015 at 09:55:54PM -0700, Jaegeuk Kim wrote: > > Looking at a glance, it's mostly same as what I wanted. The key is to share > ci->ci_ctfm for regular file and the other dir/symlink files. > So, ext4_get_encryption_info will handle most of cases. Yeah, I noticed after sending out

Re: [f2fs-dev] [PATCH] crypto: allow to assign gfp_t for __crypto_alloc_tfm

2015-05-20 Thread Theodore Ts&#x27;o
On Wed, May 20, 2015 at 09:21:20AM +0200, Steffen Klassert wrote: > The current pcrypt version is used just for IPsec because it supports > only AEAD type algorithms and does not support request backlog. But > I have patches to support ablkcipher algorithms and request backlog. > I could provide th

Re: [f2fs-dev] [PATCH] crypto: allow to assign gfp_t for __crypto_alloc_tfm

2015-05-20 Thread Theodore Ts&#x27;o
On Tue, May 19, 2015 at 10:27:55PM +0800, Herbert Xu wrote: > On Tue, May 19, 2015 at 10:14:30AM -0400, Theodore Ts'o wrote: > > > > There can be multiple reads going on in parallel, so we're currently > > creating tfm's as necessary. In fact one of the th

Re: [f2fs-dev] [PATCH 2/3] f2fs crypto: use bounce pages from mempool first

2015-05-25 Thread Theodore Ts&#x27;o
On Thu, May 21, 2015 at 05:40:24PM -0700, Jaegeuk Kim wrote: > If a lot of write streams are triggered, alloc_page and __free_page are > costly called, resulting in high memory pressure. > > In order to avoid that, let's reuse mempool pages for writeback pages. The reason why the mempool pages wa

Re: [f2fs-dev] [PATCH 2/3] f2fs crypto: use bounce pages from mempool first

2015-05-28 Thread Theodore Ts&#x27;o
On Wed, May 27, 2015 at 02:18:54PM -0700, Jaegeuk Kim wrote: > The problem that I'd like to address here is to reduce the call counts of > allocating and freeing a number of pages in pairs. > > When I conduct xfstests/224 under 1GB DRAM, I've seen triggering several oom > killers, and in that mome

Re: [f2fs-dev] Consolidated file encryption interface/semantics?

2016-01-11 Thread Theodore Ts&#x27;o
On Mon, Jan 11, 2016 at 11:56:25PM +0100, Richard Weinberger wrote: > > So, the data structures are identical and AFAIK also the supported cipher > modes are. > But as both use their own ioctls having a single tool to control file > encryption > can be error prone in future. > Interestingly the

Re: [f2fs-dev] Consolidated file encryption interface/semantics?

2016-01-12 Thread Theodore Ts&#x27;o
On Mon, Jan 11, 2016 at 11:47:56PM -0800, Jaegeuk Kim wrote: > > Actually, I tried to prepare this quite long time ago [1], which was stuck > that moment unfortunately, since I needed to wait for how AOSP finally treats > with this feature. At some moment later, I couldn't even follow up every ext

Re: [f2fs-dev] [GIT PULL] f2fs updates for v4.6

2016-03-26 Thread Theodore Ts&#x27;o
On Sat, Mar 26, 2016 at 01:48:23PM -0700, Linus Torvalds wrote: > > BTW, as far as switching ext4 to use the shared code in fs/crypto --- > > I'm hoping to get that done for the next merge window. There are a 2 > > or 3 patches to fix some recently discovered bugs that I'll need to > > push into t

Re: [f2fs-dev] [GIT PULL] f2fs updates for v4.6

2016-03-26 Thread Theodore Ts&#x27;o
On Sat, Mar 26, 2016 at 10:53:52AM -0700, Linus Torvalds wrote: > On Sat, Mar 26, 2016 at 6:47 AM, Eric Biggers wrote: > > Another question about the choice of IV. If the page index in CPU order is > > (supposed to be) used as the IV, doesn't make the on-disk format of the > > filesystem endianne

Re: [f2fs-dev] Legal characters in encrypted fscrypto (f2fs/ext4) filename?

2016-03-31 Thread Theodore Ts&#x27;o
On Fri, Apr 01, 2016 at 01:00:18AM -0500, Eric Biggers wrote: > Hello, > > While reviewing the new filesystem encryption code, I was confused by the > intended set of legal characters in the printable form of an encrypted > filename. > > According to the actual code in fs/crypto/fname.c, the leg

Re: [f2fs-dev] A few more filesystem encryption questions

2016-04-03 Thread Theodore Ts&#x27;o
On Sun, Apr 03, 2016 at 12:58:33AM -0500, Eric Biggers wrote: > > I found that a process without access to the master encryption key can read a > file's full decrypted contents, provided that the file was opened recently by > a > process with access to the key. This is true even if the privilege

Re: [f2fs-dev] [PATCH 02/13] fscrypto: rename some functions for clarity

2016-04-03 Thread Theodore Ts&#x27;o
On Sun, Apr 03, 2016 at 12:21:53AM -0500, Eric Biggers wrote: > Rename fscrypt_complete() to page_crypt_complete(). This callback is > specifically for data pages; fscrypto also performs filename encryption. > > Rename dir_crypt_complete() to fname_crypt_complete(). This callback is > also used

[f2fs-dev] [PATCH 2/2] Ask git to ignore the generated sg_write_buffer executable

2018-08-19 Thread Theodore Ts&#x27;o
Signed-off-by: Theodore Ts'o --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d5ca55d..3f04e85 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ stamp-h1 /tools/fibmap.f2fs /tools/parse.f2fs /tools/f2fscrypt +/tools/sg_write_b

[f2fs-dev] [PATCH 1/2] add configure option --with-root-libdir

2018-08-19 Thread Theodore Ts&#x27;o
x27;s inflexibility is borrowed from util-linux. Signed-off-by: Theodore Ts'o --- configure.ac | 11 +++ lib/Makefile.am | 17 + mkfs/Makefile.am | 15 +++ 3 files changed, 43 insertions(+) diff --git a/configure.ac b/configure.ac index f04f281..62c18eb 10

[f2fs-dev] [PATCH] build: declare that libf2fs_format uses the blkid library

2018-08-24 Thread Theodore Ts&#x27;o
Signed-off-by: Theodore Ts'o --- mkfs/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am index 32996ba..cae2f93 100644 --- a/mkfs/Makefile.am +++ b/mkfs/Makefile.am @@ -12,7 +12,7 @@ lib_LTLIBRARIES = libf2fs_form

[f2fs-dev] [PATCH] f2fs-tools: Fix cross-build problem caused by AC_CHECK_FILE abuse

2018-08-27 Thread Theodore Ts&#x27;o
place. A simple "test -d" should be used here. After doing so, f2fs-tools cross builds successfully. Addresses-Debian-Bug: #896909 Signed-off-by: Theodore Ts'o --- This was a FTCBFS problem reported by a Debian user: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896909

Re: [f2fs-dev] [PATCH v2 1/5] fscrypt: clean up and improve dentry revalidation

2019-04-16 Thread Theodore Ts&#x27;o
On Wed, Mar 20, 2019 at 11:39:09AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Make various improvements to fscrypt dentry revalidation: > > - Don't try to handle the case where the per-directory key is removed, > as this can't happen without the inode (and dentries) being evicted. >

Re: [f2fs-dev] [PATCH v2 1/5] fscrypt: clean up and improve dentry revalidation

2019-04-17 Thread Theodore Ts&#x27;o
On Tue, Apr 16, 2019 at 05:10:42PM -0700, Eric Biggers wrote: > > Hi Ted, I assumed you resolved the conflict with "fscrypt: use READ_ONCE() to > access ->i_crypt_info"? The code in fscrypt_d_revalidate() should be: > > dir = dget_parent(dentry); > err = fscrypt_get_encryption_in

Re: [f2fs-dev] [PATCH v2 2/5] fscrypt: fix race allowing rename() and link() of ciphertext dentries

2019-04-17 Thread Theodore Ts&#x27;o
On Wed, Mar 20, 2019 at 11:39:10AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Close some race conditions where fscrypt allowed rename() and link() on > ciphertext dentries that had been looked up just prior to the key being > concurrently added. It's better to return -ENOKEY in this cas

Re: [f2fs-dev] [PATCH v2 3/5] fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory

2019-04-17 Thread Theodore Ts&#x27;o
On Wed, Mar 20, 2019 at 11:39:11AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Make __d_move() clear DCACHE_ENCRYPTED_NAME on the source dentry. This > is needed for when d_splice_alias() moves a directory's encrypted alias > to its decrypted alias as a result of the encryption key being

Re: [f2fs-dev] [PATCH v2 4/5] fscrypt: only set dentry_operations on ciphertext dentries

2019-04-17 Thread Theodore Ts&#x27;o
On Wed, Mar 20, 2019 at 11:39:12AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Plaintext dentries are always valid, so only set fscrypt_d_ops on > ciphertext dentries. > > Besides marginally improved performance, this allows overlayfs to use an > fscrypt-encrypted upperdir, provided that

Re: [f2fs-dev] [PATCH v2 5/5] fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext

2019-04-17 Thread Theodore Ts&#x27;o
On Wed, Mar 20, 2019 at 11:39:13AM -0700, Eric Biggers wrote: > From: Eric Biggers > > ->lookup() in an encrypted directory begins as follows: > > 1. fscrypt_prepare_lookup(): > a. Try to load the directory's encryption key. > b. If the key is unavailable, mark the dentry as a ciphertext

Re: [f2fs-dev] [PATCH v2 1/2] vfs: use READ_ONCE() to access ->i_link

2019-04-17 Thread Theodore Ts&#x27;o
On Thu, Apr 11, 2019 at 03:25:15AM +0100, Al Viro wrote: > On Wed, Apr 10, 2019 at 04:15:48PM -0700, Eric Biggers wrote: > > On Wed, Apr 10, 2019 at 10:06:57PM +0100, Al Viro wrote: > > > On Wed, Apr 10, 2019 at 01:21:14PM -0700, Eric Biggers wrote: > > > > From: Eric Biggers > > > > > > > > Use

Re: [f2fs-dev] [PATCH v2 2/2] fscrypt: cache decrypted symlink target in ->i_link

2019-04-17 Thread Theodore Ts&#x27;o
On Wed, Apr 10, 2019 at 01:21:15PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Path lookups that traverse encrypted symlink(s) are very slow because > each encrypted symlink needs to be decrypted each time it's followed. > This also involves dropping out of rcu-walk mode. > > Make encryp

Re: [f2fs-dev] [PATCH v6 00/16] fscrypt: key management improvements

2019-05-20 Thread Theodore Ts&#x27;o
On Mon, May 20, 2019 at 10:25:36AM -0700, Eric Biggers wrote: > > This patchset makes major improvements to how keys are added, removed, > and derived in fscrypt, aka ext4/f2fs/ubifs encryption. It does this by > adding new ioctls that add and remove encryption keys directly to/from > the filesys

Re: [f2fs-dev] [PATCH v6 00/16] fscrypt: key management improvements

2019-05-20 Thread Theodore Ts&#x27;o
On Mon, May 20, 2019 at 05:41:20PM -0700, Eric Biggers wrote: > > This was answered in the cover letter, quoted below: Oops, thanks. My bad, I stopped reading when I saw the changelog, and missed that part of the description. - Ted _

Re: [f2fs-dev] [PATCH 1/2] ext4: only set project inherit bit for directory

2019-06-09 Thread Theodore Ts&#x27;o
On Thu, Jun 06, 2019 at 01:32:24PM +0900, Wang Shilong wrote: > From: Wang Shilong > > It doesn't make any sense to have project inherit bits > for regular files, even though this won't cause any > problem, but it is better fix this. > > Cc: Andreas Dilger > Signed-off-by: Wang Shilong Thanks

Re: [f2fs-dev] 回复: [PATCH 1/2] ext4: only set project inherit bit for directory

2019-06-09 Thread Theodore Ts&#x27;o
On Fri, Jun 07, 2019 at 11:14:52AM -0700, Eric Biggers wrote: > > Existing versions of chattr can't be changed, and people don't necessarily > upgrade the kernel and e2fsprogs at the same time. So (1) wouldn't really > work. > > A better solution might be to make FS_IOC_GETFLAGS and FS_IOC_FSGE

Re: [f2fs-dev] [PATCH v4 01/16] fs-verity: add a documentation file

2019-06-15 Thread Theodore Ts&#x27;o
On Thu, Jun 06, 2019 at 08:51:50AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add a documentation file for fs-verity, covering > > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-by: Theodore Ts'o One minor design point below: > +ext4 sto

Re: [f2fs-dev] [PATCH v4 02/16] fs-verity: add MAINTAINERS file entry

2019-06-15 Thread Theodore Ts&#x27;o
On Thu, Jun 06, 2019 at 08:51:51AM -0700, Eric Biggers wrote: > From: Eric Biggers > > fs-verity will be jointly maintained by Eric Biggers and Theodore Ts'o. > > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-o

Re: [f2fs-dev] [PATCH v4 04/16] fs: uapi: define verity bit for FS_IOC_GETFLAGS

2019-06-15 Thread Theodore Ts&#x27;o
. This flag will be gettable only; > FS_IOC_SETFLAGS won't allow setting it, since an ioctl must be used > instead to provide more parameters. > > This flag matches the on-disk bit that was already allocated for ext4. > > Signed-off-by: Eric Biggers Looks good; y

Re: [f2fs-dev] [PATCH v4 05/16] fs-verity: add Kconfig and the helper functions for hashing

2019-06-15 Thread Theodore Ts&#x27;o
s can easily be added. > > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-off-by: Theodore Ts'o One thought for consideration below... > + > +/* > + * Maximum depth of the Merkle tree. Up to 64 levels are theoretically > possible > + * with a very small

Re: [f2fs-dev] [PATCH v4 06/16] fs-verity: add inode and superblock fields

2019-06-15 Thread Theodore Ts&#x27;o
and thus still have NULL ->i_verity_info. > > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-off-by: Theodore Ts'o - Ted ___ Linux-f2fs-devel mailing list Linux-f2fs-devel

Re: [f2fs-dev] [PATCH v4 07/16] fs-verity: add the hook for file ->open()

2019-06-15 Thread Theodore Ts&#x27;o
ilesystems. > > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-off-by: Theodore Ts'o - Ted > +/* > + * Validate the given fsverity_descriptor and create a new fsverity_info from > + * it. The signat

Re: [f2fs-dev] [PATCH v4 08/16] fs-verity: add the hook for file ->setattr()

2019-06-15 Thread Theodore Ts&#x27;o
: Reviewed-off-by: Theodore Ts'o - Ted ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v4 09/16] fs-verity: add data verification hooks for ->readpages()

2019-06-15 Thread Theodore Ts&#x27;o
> > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-off-by: Theodore Ts'o - Ted ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v4 10/16] fs-verity: implement FS_IOC_ENABLE_VERITY ioctl

2019-06-15 Thread Theodore Ts&#x27;o
On Thu, Jun 06, 2019 at 08:51:59AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add a function for filesystems to call to implement the > FS_IOC_ENABLE_VERITY ioctl. This ioctl enables fs-verity on a file. > > See the "FS_IOC_ENABLE_VERITY" section of > Documentation/filesystems/fsverity

Re: [f2fs-dev] [PATCH v4 11/16] fs-verity: implement FS_IOC_MEASURE_VERITY ioctl

2019-06-15 Thread Theodore Ts&#x27;o
> > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-off-by: Theodore Ts'o - Ted ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v4 12/16] fs-verity: add SHA-512 support

2019-06-15 Thread Theodore Ts&#x27;o
e smaller space required to > store the hashes. But some users may prefer SHA-512. > > Signed-off-by: Eric Biggers Looks good; you can add: Reviewed-off-by: Theodore Ts'o - Ted ___

  1   2   >