to me. Feel free to add:
Reviewed-by: Gabriel Krisman Bertazi
Bringing Christian into the loop, since this is getting ready and it
should go through the VFS tree, as it touches libfs and a couple
filesystems.
Christian, can you please take a look? Eric has also been involved in
the review, so
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> generic_ci_match can be used by case-insensitive filesystems to compare
> strings under lookup with dirents in a case-insensitive way. This
> function is currently reimplemented by each filesystem supporting
> ca
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> Instead of reimplementing ext4_match_ci, use the new libfs helper.
>
> It also adds a comment explaining why fname->cf_name.name must be
> checked prior to the encryption hash optimization, because that tripped
&g
Eugen Hristev writes:
> On 5/23/24 02:05, Gabriel Krisman Bertazi wrote:
>> Eugen Hristev writes:
>>
>>> On 5/13/24 00:27, Gabriel Krisman Bertazi wrote:
>>>> Eric Biggers writes:
>>>>
>>>>> On Fri, Apr 05, 2024 at 03:13:2
Eugen Hristev writes:
> On 5/13/24 00:27, Gabriel Krisman Bertazi wrote:
>> Eric Biggers writes:
>>
>>> On Fri, Apr 05, 2024 at 03:13:26PM +0300, Eugen Hristev wrote:
>>
>>>> + if (WARN_ON_ONCE(!fscrypt_has_encryption_key(parent
t.len))
>> +goto out;
>> +res = utf8_strncasecmp_folded(um, folded_name, &dirent);
>
> Shouldn't the memcmp be done with the original user-specified name, not the
> casefolded name? I would think that the user-specified name is the one
ck look, the series is looking good and the strict mode issue
pointed in the last iteration seems fixed, though I didn't run it yet.
I'll take a closer look later today and fully review.
--
Gabriel Krisman Bertazi
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
trigger on a bad lookup, which is caught
>>> earlier, only if the actual disk name is bad.
>>>
>>> Suggested-by: Gabriel Krisman Bertazi
>>> Signed-off-by: Eugen Hristev
>>> ---
>>> fs/f2fs/dir.c | 15 ++-
>>> 1 f
Eric Biggers writes:
> On Tue, Apr 02, 2024 at 06:48:39PM +0300, Eugen Hristev via Linux-f2fs-devel
> wrote:
>> From: Gabriel Krisman Bertazi
>>
> I'm seeing this error when the volume is *not* in strict mode and a file has a
> name that is not valid UTF-8. Th
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> Instead of a bunch of ifdefs, make the unicode built checks part of the
> code flow where possible, as requested by Torvalds.
>
> Signed-off-by: Gabriel Krisman Bertazi
> [eugen.hris...@collabora.com: port to 6.8
Eugen Hristev via Linux-f2fs-devel
writes:
> From: Gabriel Krisman Bertazi
>
> Instead of a bunch of ifdefs, make the unicode built checks part of the
> code flow where possible, as requested by Torvalds.
>
> Reviewed-by: Eric Biggers
> Signed-off-by: Gabriel Krisman B
Eugen Hristev writes:
> If the volume is in strict mode, generi c_ci_compare can report a broken
> encoding name. This will not trigger on a bad lookup, which is caught
> earlier, only if the actual disk name is bad.
>
> Suggested-by: Gabriel Krisman Bertazi
> Signed-off
/dev/loop0
export TEST_DIR=$BASEMNT/test
export RESULT_BASE=${BASEMNT}/results
export REPORT_DIR=${BASEMNT}/report
export FSTYP=f2fs
mkfs.f2fs -f -C utf8 -O casefold ${TEST_DEV}
./check -g encrypt,quick
--
Gabriel Krisman Bertazi
___
Linux-f2fs-
62] PKRU: 5554
[ 75.792112] Kernel panic - not syncing: Fatal exception
[ 75.792797] Kernel Offset: 0x2a0 from 0x8100 (relocation
range: 0xffff8000-0xbfff)
--
Gabriel Krisman Bertazi
___
Linux-f2fs-devel maili
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> generic_ci_match can be used by case-insensitive filesystems to compare
> strings under lookup with dirents in a case-insensitive way. This
> function is currently reimplemented by each filesystem supporting
> ca
CONFIG_UNICODE; as requested by Linus, they are part of
> the codeflow now.
>
> While there, I noticed we can leverage the utf8 functions to detect
> encoded names that are corrupted in the filesystem. Therefore, it also
> adds an ext4 error on that scenario, to mark the filesystem as
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> If the volume is in strict mode, ext4_ci_compare can report a broken
> encoding name. This will not trigger on a bad lookup, which is caught
> earlier, only if the actual disk name is bad.
>
> Reviewed-by: Eric Big
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> generic_ci_match can be used by case-insensitive filesystems to compare
> strings under lookup with dirents in a case-insensitive way. This
> function is currently reimplemented by each filesystem supporting
> ca
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> Keeping it as qstr avoids the unnecessary conversion in f2fs_match
>
> Reviewed-by: Eric Biggers
> Signed-off-by: Gabriel Krisman Bertazi
> [eugen.hris...@collabora.com: port to 6.8-rc3]
> Signed-off-by: Eugen H
Eric Biggers writes:
> On Wed, Feb 21, 2024 at 12:14:02PM -0500, Gabriel Krisman Bertazi wrote:
>>
>> When case-insensitive and fscrypt were adapted to work together, we moved the
>> code that sets the dentry operations for case-insensitive dentries(d_hash and
>>
No filesystems depend on it anymore, and it is generally a bad idea.
Since all dentries should have the same set of dentry operations in
case-insensitive capable filesystems, it should be propagated through
->s_d_op.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/libfs.c |
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
ned-off-by: Gabriel Krisman Bertazi
---
changes since v3:
- Fix typo in comment (Eric)
---
fs/libfs.c | 28
include/linux/fs.h | 1 +
2 files changed, 29 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index c4be0961faf0..0aa388ee82ff 100644
--- a/fs/libf
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
Acked-by:
fscrypt now supports configuring dentry operations at dentry-creation
time through the preset sb->s_d_op, instead of at lookup time.
Enable this in ubifs, since the lookup-time mechanism is going away.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/ubifs/dir.c | 1 -
fs/ubifs/super.c | 1 +
IV/
Gabriel Krisman Bertazi (10):
ovl: Always reject mounting over case-insensitive directories
fscrypt: Factor out a helper to configure the lookup dentry
fscrypt: Drop d_revalidate for valid dentries during lookup
fscrypt: Drop d_revalidate once the key is added
libfs: Merge encrypted_ci_de
worst, we will
get an extra d_revalidate on the keyed dentry, which will still find the
dentry to be valid.
Finally, now that we do more than just clear the DCACHE_NOKEY_NAME in
fscrypt_handle_d_move, skip it entirely for plaintext dentries, to avoid
extra costs.
Signed-off-by: Gabriel Krism
In preparation to get case-insensitive dentry operations from sb->s_d_op
again, use the same structure with and without fscrypt.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v1:
- fix header guard (eric)
---
fs/libfs.c | 34 ++
1 file changed
-by: Gabriel Krisman Bertazi
---
changes since v7
- Fix function names in commit message (Eric)
- Have a stub for the CONFIG_FS_ENCRYPTION=n case (Eric)
changes since v6
- Use inline comparison for is_nokey_name (eric)
- rename fscrypt_prepare_lookup_dentry->fscrypt_prepare_dentry (eric)
-
ed when we move d_op configuration back
to ->s_d_op. Yet, we better have an explicit fix to avoid messing up
again.
While there, re-sort the entries to have more descriptive error messages
first.
Fixes: bb9cd9106b22 ("fscrypt: Have filesystems handle their d_ops")
Signed-off-by: Ga
actually need to write the flag.
Signed-off-by: Gabriel Krisman Bertazi
---
changes since v5
- d_set_always_valid -> d_revalidate (eric)
- Avoid acquiring the lock for !fscrypt-capable filesystems (eric, Christian)
---
include/linux/fscrypt.h | 22 ++
1 file changed,
Eric Biggers writes:
> On Mon, Feb 12, 2024 at 09:13:14PM -0500, Gabriel Krisman Bertazi wrote:
>> Finally, we need to clean the dentry->flags even for unencrypted
>> dentries, so the ->d_lock might be acquired even for them. In order to
>
> might => must?
&
tive, and you get these apparent weird
semantics.
Not ideal from a user point of view. But not a kernel bug. If it
pushes people away from using case-insensitive directories in their
day-to-day work and leave it to only be used by Windows compatibility
Eric Biggers writes:
> On Wed, Feb 14, 2024 at 04:16:31PM -0800, Eric Biggers wrote:
>> On Mon, Feb 12, 2024 at 09:13:15PM -0500, Gabriel Krisman Bertazi wrote:
>> > From fscrypt perspective, once the key is available, the dentry will
>> > remain valid until evict
Eugen Hristev writes:
> On 2/16/24 18:12, Gabriel Krisman Bertazi wrote:
>> Eugen Hristev writes:
>>
>>> From: Gabriel Krisman Bertazi
>>>
>>> generic_ci_match can be used by case-insensitive filesystems to compare
>>> strings under l
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> generic_ci_match can be used by case-insensitive filesystems to compare
> strings under lookup with dirents in a case-insensitive way. This
> function is currently reimplemented by each filesystem supporting
> ca
Eugen Hristev writes:
> On 2/9/24 16:40, Gabriel Krisman Bertazi wrote:
>> Eugen Hristev writes:
> With the changes you suggested, I get these errors now :
>
> [ 107.409410] EXT4-fs error (device sda1): ext4_lookup:1816: inode #521217:
> comm
> ls: 'CUC'
No filesystems depend on it anymore, and it is generally a bad idea.
Since all dentries should have the same set of dentry operations in
case-insensitive capable filesystems, it should be propagated through
->s_d_op.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/libfs.c |
fscrypt now supports configuring dentry operations at dentry-creation
time through the preset sb->s_d_op, instead of at lookup time.
Enable this in ubifs, since the lookup-time mechanism is going away.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/ubifs/dir.c | 1 -
fs/ubifs/super.c | 1 +
ble.
Signed-off-by: Gabriel Krisman Bertazi
---
changes since v6
- Use inline comparison for is_nokey_name (eric)
- rename fscrypt_prepare_lookup_dentry->fscrypt_prepare_dentry (eric)
---
fs/crypto/hooks.c | 15 +--
include/linux/fscrypt.h | 10 ++
2 files chang
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
Acked-by:
ed when we move d_op configuration back
to ->s_d_op. Yet, we better have an explicit fix to avoid messing up
again.
While there, re-sort the entries to have more descriptive error messages
first.
Fixes: bb9cd9106b22 ("fscrypt: Have filesystems handle their d_ops")
Signed-off-by: Ga
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
In preparation to get case-insensitive dentry operations from sb->s_d_op
again, use the same structure with and without fscrypt.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v1:
- fix header guard (eric)
---
fs/libfs.c | 34 ++
1 file changed
ned-off-by: Gabriel Krisman Bertazi
---
changes since v3:
- Fix typo in comment (Eric)
---
fs/libfs.c | 28
include/linux/fs.h | 1 +
2 files changed, 29 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index c4be0961faf0..0aa388ee82ff 100644
--- a/fs/libf
entirely for plaintext dentries, to avoid
extra costs.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v5:
- Merge with another patch(eric)
- revert conditional check (eric)
- drop comment (eric)
Changes since v3:
- Fix null-ptr-deref for filesystems that don't support fsc
actually need to write the flag.
Signed-off-by: Gabriel Krisman Bertazi
---
changes since v5
- d_set_always_valid -> d_revalidate (eric)
- Avoid acquiring the lock for !fscrypt-capable filesystems (eric, Christian)
---
include/linux/fscrypt.h | 22 ++
1 file changed,
quick groups without regressions. Based on
v6.7-rc1.
[1] https://lore.kernel.org/linux-fsdevel/20231123195327.GP38156@ZenIV/
[2] https://lore.kernel.org/linux-fsdevel/20231123171255.GN38156@ZenIV/
Gabriel Krisman Bertazi (10):
ovl: Always reject mounting over case-insensitive directories
fsc
Christian Brauner writes:
> On Fri, Feb 02, 2024 at 11:50:07AM -0300, Gabriel Krisman Bertazi wrote:
>> Eric Biggers writes:
>>
>> > On Wed, Jan 31, 2024 at 03:35:40PM -0300, Gabriel Krisman Bertazi wrote:
>> >> Eric Biggers writes:
>> >>
Eugen Hristev writes:
> On 2/8/24 20:38, Gabriel Krisman Bertazi wrote:
>> (untested)
>
> I implemented your suggestion, but any idea about testing ? I ran smoke on
> xfstests
> and it appears to be fine, but maybe some specific test case might try the
> different
gt; + * corruption or ENOMEM.
> + */
> + return false;
A minor problem with splitting the series as you did is that "ext4: Log
error when lookup of encoded dentry fails" conflicts with this change
and
Eugen Hristev writes:
> From: Gabriel Krisman Bertazi
>
> generic_ci_match can be used by case-insensitive filesystems to compare
> strings under lookup with dirents in a case-insensitive way. This
> function is currently reimplemented by each filesystem supporting
> ca
Eric Biggers writes:
> On Wed, Jan 31, 2024 at 03:35:40PM -0300, Gabriel Krisman Bertazi wrote:
>> Eric Biggers writes:
>>
>> > On Mon, Jan 29, 2024 at 05:43:22PM -0300, Gabriel Krisman Bertazi wrote:
>> >> Unencrypted and encrypted-dentries where the key
Eric Biggers writes:
> On Mon, Jan 29, 2024 at 05:43:22PM -0300, Gabriel Krisman Bertazi wrote:
>> Unencrypted and encrypted-dentries where the key is available don't need
>> to be revalidated with regards to fscrypt, since they don't go stale
>> from under VFS an
Eric Biggers writes:
> On Mon, Jan 29, 2024 at 05:43:19PM -0300, Gabriel Krisman Bertazi wrote:
>> ovl: Reject mounting over case-insensitive directories
>
> Maybe:
>
> ovl: Reject mounting over rootdir of case-insensitive capable FS
>
> or:
>
> ovl:
fscrypt now supports configuring dentry operations at dentry-creation
time through the preset sb->s_d_op, instead of at lookup time.
Enable this in ubifs, since the lookup-time mechanism is going away.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/ubifs/dir.c | 1 -
fs/ubifs/super.c | 1 +
No filesystems depend on it anymore, and it is generally a bad idea.
Since all dentries should have the same set of dentry operations in
case-insensitive filesystems, it should be propagated through ->s_d_op.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/libfs.c |
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
ned-off-by: Gabriel Krisman Bertazi
---
changes since v3:
- Fix typo in comment (Eric)
---
fs/libfs.c | 28
include/linux/fs.h | 1 +
2 files changed, 29 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index c4be0961faf0..0aa388ee82ff 100644
--- a/fs/libf
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
us, we'll only have only pay the cost once, and
not per-lookup.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v1:
- fix header guard (eric)
---
fs/libfs.c | 34 ++
1 file changed, 6 insertions(+), 28 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs
e holding the d_lock. We might race with a
concurrent RCU lookup but this is harmless because, at worst, we will
get an extra d_revalidate on the keyed dentry, which is will find the
dentry is valid.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v3:
- Fix null-ptr-deref for filesyste
fscrypt
code instead of the caller.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v4:
- Check based on the dentry itself (eric)
---
include/linux/fscrypt.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index c1e285053b3e
In preparation to dropping DCACHE_OP_REVALIDATE for dentries that
don't need it at lookup time, refactor the code to make unencrypted
denties also call fscrypt_prepare_dentry. This makes the
non-inline __fscrypt_prepare_lookup superfulous, so drop it.
Signed-off-by: Gabriel Krisman Be
ble.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/crypto/hooks.c | 18 --
include/linux/fscrypt.h | 10 ++
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c
index 52504dd478d3..71463cef08f9 100644
--- a/fs/crypto/hook
V/
[2] https://lore.kernel.org/linux-fsdevel/20231123171255.GN38156@ZenIV/
Gabriel Krisman Bertazi (12):
ovl: Reject mounting over case-insensitive directories
fscrypt: Factor out a helper to configure the lookup dentry
fscrypt: Call fscrypt_prepare_lookup_dentry on unencrypted dentries
f
, re-sort the entries to have more descriptive error messages
first.
Fixes: bb9cd9106b22 ("fscrypt: Have filesystems handle their d_ops")
Signed-off-by: Gabriel Krisman Bertazi
Acked-by: Amir Goldstein
---
changes since v3:
- Case insensitive filesystem ->Case insensitive capable
f
nnecessary revalidation, in preparation to always configuring
d_op through sb->s_d_op.
Since the filesystem might have other features that require
revalidation, only apply this optimization if the d_revalidate handler
is fscrypt_d_revalidate itself.
Signed-off-by: Gabriel Krisman Bertazi
---
Eric Biggers writes:
> On Thu, Jan 25, 2024 at 05:20:56PM -0300, Gabriel Krisman Bertazi wrote:
>> Eric Biggers writes:
>>
>> > On Fri, Jan 19, 2024 at 03:47:36PM -0300, Gabriel Krisman Bertazi wrote:
>> >> /*
>> >> * When d_splice
No filesystems depend on it anymore, and it is generally a bad idea.
Since all dentries should have the same set of dentry operations in
case-insensitive filesystems, it should be propagated through ->s_d_op.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/libfs.c |
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
fscrypt now supports configuring dentry operations at dentry-creation
time through the preset sb->s_d_op, instead of at lookup time.
Enable this in ubifs, since the lookup-time mechanism is going away.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/ubifs/dir.c | 1 -
fs/ubifs/super.c | 1 +
o the check in the
callee to avoid polluting the caller code with header guards.
Signed-off-by: Gabriel Krisman Bertazi
---
include/linux/fscrypt.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index c1e285053b3e..566362fdc3af 100644
ned-off-by: Gabriel Krisman Bertazi
---
changes since v3:
- Fix typo in comment (Eric)
---
fs/libfs.c | 28
include/linux/fs.h | 1 +
2 files changed, 29 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index c4be0961faf0..0aa388ee82ff 100644
--- a/fs/libf
us, we'll only have only pay the cost once, and
not per-lookup.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v1:
- fix header guard (eric)
---
fs/libfs.c | 34 ++
1 file changed, 6 insertions(+), 28 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs
In preparation to dropping DCACHE_OP_REVALIDATE for dentries that
don't need it at lookup time, refactor the code to make unencrypted
denties also call fscrypt_prepare_dentry. This makes the
non-inline __fscrypt_prepare_lookup superfulous, so drop it.
Signed-off-by: Gabriel Krisman Be
, re-sort the entries to have more descriptive error messages
first.
Fixes: bb9cd9106b22 ("fscrypt: Have filesystems handle their d_ops")
Signed-off-by: Gabriel Krisman Bertazi
Acked-by: Amir Goldstein
---
changes since v3:
- Case insensitive filesystem ->Case insensitive capable
f
ives fstests encrypt and quick groups without regressions. Based on
v6.7-rc1.
[1] https://lore.kernel.org/linux-fsdevel/20231123195327.GP38156@ZenIV/
[2] https://lore.kernel.org/linux-fsdevel/20231123171255.GN38156@ZenIV/
Gabriel Krisman Bertazi (12):
ovl: Reject mounting over case-insensitive
nnecessary revalidation, in preparation to always configuring
d_op through sb->s_d_op.
Since the filesystem might have other features that require
revalidation, only apply this optimization if the d_revalidate handler
is fscrypt_d_revalidate itself.
Signed-off-by: Gabriel Krisman Bertazi
---
ble.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/crypto/hooks.c | 18 --
include/linux/fscrypt.h | 10 ++
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c
index 52504dd478d3..71463cef08f9 100644
--- a/fs/crypto/hook
e holding the d_lock. We might race with a
concurrent RCU lookup but this is harmless because, at worst, we will
get an extra d_revalidate on the keyed dentry, which is will find the
dentry is valid.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v3:
- Fix null-ptr-deref for filesyste
Eric Biggers writes:
> On Fri, Jan 19, 2024 at 03:47:36PM -0300, Gabriel Krisman Bertazi wrote:
>> /*
>> * When d_splice_alias() moves a directory's no-key alias to its plaintext
>> alias
>> * as a result of the encryption key being added, DCACHE_NOKEY_NAME m
Eric Biggers writes:
> On Fri, Jan 19, 2024 at 03:47:34PM -0300, Gabriel Krisman Bertazi wrote:
>> To make the patch simpler, we now call fscrypt_get_encryption_info twice
>> for fscrypt_prepare_lookup, once inside fscrypt_setup_filename and once
>> inside fscrypt_prepa
Eric Biggers writes:
> On Fri, Jan 19, 2024 at 03:47:33PM -0300, Gabriel Krisman Bertazi wrote:
>> ovl: Reject mounting case-insensitive filesystems
>
> Overlayfs doesn't mount filesystems. I think you might mean something like
> reject case-insensitive lowerdirs?
uppe
fscrypt now supports configuring dentry operations at dentry-creation
time through the preset sb->s_d_op, instead of at lookup time.
Enable this in ubifs, since the lookup-time mechanism is going away.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/ubifs/dir.c | 1 -
fs/ubifs/super.c | 1 +
No filesystems depend on it anymore, and it is generally a bad idea.
Since all dentries should have the same set of dentry operations in
case-insensitive filesystems, it should be propagated through ->s_d_op.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/libfs.c |
ned-off-by: Gabriel Krisman Bertazi
---
fs/libfs.c | 29 +
include/linux/fs.h | 1 +
2 files changed, 30 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index c4be0961faf0..9cd4df6969d2 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1822,6 +1822,35 @@ v
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
>lookup() won't have any visibility of the operations.
Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.
Signed-off-by: Gabriel Krisman Bertazi
---
fs
us, we'll only have only pay the cost once, and
not per-lookup.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v1:
- fix header guard (eric)
---
fs/libfs.c | 34 ++
1 file changed, 6 insertions(+), 28 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs
nnecessary revalidation, in preparation to always configuring
d_op through sb->s_d_op.
Since the filesystem might have other features that require
revalidation, only apply this optimization if the d_revalidate handler
is fscrypt_d_revalidate itself.
Signed-off-by: Gabriel Krisman Bertazi
-
e holding the d_lock. We might race with a
concurrent RCU lookup but this is harmless because, at worst, we will
get an extra d_revalidate on the keyed dentry, which is will find the
dentry is valid.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v3:
- Fix null-ptr-deref for filesyste
sts, which yielded no regressions.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/ceph/dir.c | 2 +-
fs/ceph/file.c | 2 +-
fs/crypto/hooks.c | 53 ++---
include/linux/fscrypt.h | 40 +--
4 files changed, 47
, re-sort the entries to have more descriptive error messages
first.
Fixes: bb9cd9106b22 ("fscrypt: Have filesystems handle their d_ops")
Signed-off-by: Gabriel Krisman Bertazi
Acked-by: Amir Goldstein
---
changes since v2:
- Re-sort checks to trigger more descriptive error messages
firs
by Al Viro to disable d_revalidate
on some dentries on the fly.
It survives fstests encrypt and quick groups without regressions. Based on
v6.7-rc1.
[1] https://lore.kernel.org/linux-fsdevel/20231123195327.GP38156@ZenIV/
[2] https://lore.kernel.org/linux-fsdevel/20231123171255.GN38156@ZenIV/
Gabri
> https://github.com/intel-lab-lkp/linux/commits/Gabriel-Krisman-Bertazi/ovl-Reject-mounting-case-insensitive-filesystems/20240112-070113
> base: https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git dev-test
> patch link:
> https://lore.kernel.org/all/20240111225816.18117-5-kris.
sts, which yielded no regressions.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/ceph/dir.c | 2 +-
fs/ceph/file.c | 2 +-
fs/crypto/hooks.c | 53 ++---
include/linux/fscrypt.h | 40 +--
4 files changed, 47
No filesystems depend on it anymore, and it is generally a bad idea.
Since all dentries should have the same set of dentry operations in
case-insensitive filesystems, it should be propagated through ->s_d_op.
Signed-off-by: Gabriel Krisman Bertazi
---
fs/libfs.c |
us, we'll only have only pay the cost once, and
not per-lookup.
Signed-off-by: Gabriel Krisman Bertazi
---
Changes since v1:
- fix header guard (eric)
---
fs/libfs.c | 34 ++
1 file changed, 6 insertions(+), 28 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs
1 - 100 of 360 matches
Mail list logo