Matching names with casefolded encrypting directories requires
decrypting entries to confirm case since we are case preserving. We can
avoid needing to decrypt if our hash values don't match.
Signed-off-by: Daniel Rosenberg
---
fs/ext4/ext4.h | 17 ---
fs/ext4/namei.c
.
The hash is stored at the end of the directory entry for all entries
inside of an encrypted and casefolded directory apart from those that
deal with '.' and '..'. This way, the change is backwards compatible
with existing ext4 filesystems.
Signed-off-by: Daniel Rosenberg
instead of position
-Assume last entry in directory will be csum for __ext4_check_entry if
csum enabled
This means we don't need to pass along lblk all over the place
-Don't use siphash value for find_group_orlov, just use regular hash
Daniel Rosenberg
On Wed, Feb 17, 2021 at 2:48 PM Andreas Dilger wrote:
>
> On Feb 17, 2021, at 9:08 AM, Theodore Ts'o wrote:
> >
> > On Tue, Feb 16, 2021 at 08:01:11PM -0800, Daniel Rosenberg wrote:
> >> I'm not sure what the conflict is, at least format-wise. Naturally,
>
I'm not sure what the conflict is, at least format-wise. Naturally,
there would need to be some work to reconcile the two patches, but my
patch only alters the format for directories which are encrypted and
casefolded, which always must have the additional hash field. In the
case of dirdata along w
.
The hash is stored at the end of the directory entry for all entries
inside of an encrypted and casefolded directory apart from those that
deal with '.' and '..'. This way, the change is backwards compatible
with existing ext4 filesystems.
Signed-off-by: Daniel Rosenberg
Matching names with casefolded encrypting directories requires
decrypting entries to confirm case since we are case preserving. We can
avoid needing to decrypt if our hash values don't match.
Signed-off-by: Daniel Rosenberg
Signed-off-by: Paul Lawrence
---
fs/ext4/ext4.h
.
e2fsprogs has already been updated with support for casefolding and encryption.
Daniel Rosenberg (2):
ext4: Handle casefolding with encryption
ext4: Optimize match for casefolded encrypted dirs
Documentation/filesystems/ext4/directory.rst | 27 ++
fs/ext4/dir.c
ound directory right? If you remove it you
can still change it, and then add the lost+found directory back. Isn't
that how it works currently? I definitely didn't intend to change any
behavior around non-encrypted casefolding there.
I should look at what fsck does if you do that and have a LoSt+fOuNd folder...
-Daniel Rosenberg
variable
ifdef consistency
Daniel Rosenberg (3):
libfs: Add generic function for setting dentry_ops
fscrypt: Have filesystems handle their d_ops
f2fs: Handle casefolding with Encryption
fs/crypto/fname.c | 4 --
fs/crypto/fscrypt_private.h | 1 -
fs/crypto/hooks.c |
r own specific dentry operations as well. That operation
will set the minimal d_ops required under the circumstances.
Since the fscrypt d_ops are set later on, we must set all d_ops there,
since we cannot adjust those later on. This should not result in any
change in behavior.
Signed-off-by: D
ed to i_name.
This patch incorporates work by Eric Biggers
and Jaegeuk Kim .
Co-developed-by: Eric Biggers
Signed-off-by: Eric Biggers
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric Biggers
---
fs/f2fs/dir.c | 98 +++---
fs/f2fs/f2fs.h
filesystem supports certain dentry_operations.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric Biggers
---
fs/libfs.c | 70 ++
include/linux/fs.h | 1 +
2 files changed, 71 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index fc
ed to i_name.
This patch incorporates work by Eric Biggers
and Jaegeuk Kim .
Co-developed-by: Eric Biggers
Signed-off-by: Eric Biggers
Signed-off-by: Daniel Rosenberg
---
fs/f2fs/dir.c | 98 +++---
fs/f2fs/f2fs.h | 8 ++--
fs/f2fs/hash.c | 11
r own specific dentry operations as well. That operation
will set the minimal d_ops required under the circumstances.
Since the fscrypt d_ops are set later on, we must set all d_ops there,
since we cannot adjust those later on. This should not result in any
change in behavior.
Signed-off-by: D
filesystem supports certain dentry_operations.
Signed-off-by: Daniel Rosenberg
---
fs/libfs.c | 70 ++
include/linux/fs.h | 1 +
2 files changed, 71 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index fc34361c1489..babef1f7b50e 100644
--- a/
r upcoming Casefolding/Encryption patches"
v2:
Simplified generic dentry_op function
Passed through errors in f2fs_match_ci_name
v3:
Split some long lines
Cleaned up some code
Made some comments clearer
Fixed bug in v2 error passing
Daniel Rosenberg (3):
libfs: Add generic function for set
On Tue, Nov 17, 2020 at 10:50 AM Eric Biggers wrote:
>
>
> What is the assignment to dentry_page supposed to be accomplishing? It looks
> like it's meant to pass up errors from f2fs_find_target_dentry(), but it
> doesn't
> do that.
Woops. Fixed that for the next version.
>
> > @@ -222,14 +250,
functions that should work for most
cases.
These are a follow-up to the previously sent patch set
"[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches"
v2:
Simplified generic dentry_op function
Passed through errors in f2fs_match_ci_name
Daniel Rosenberg (3):
libfs:
ned-off-by: Daniel Rosenberg
---
fs/libfs.c | 60 ++
include/linux/fs.h | 1 +
2 files changed, 61 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index fc34361c1489..dd8504f3ff5d 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1449,4 +1449
r own specific dentry operations as well. That operation
will set the minimal d_ops required under the circumstances.
Since the fscrypt d_ops are set later on, we must set all d_ops there,
since we cannot adjust those later on. This should not result in any
change in behavior.
Signed-off-by: D
ed to i_name.
This patch incorporates work by Eric Biggers
and Jaegeuk Kim .
Co-developed-by: Eric Biggers
Signed-off-by: Eric Biggers
Signed-off-by: Daniel Rosenberg
---
fs/f2fs/dir.c | 89 +-
fs/f2fs/f2fs.h | 8 +++--
fs/f2fs/hash.c
This switches ext4 over to the generic support provided in libfs.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric Biggers
ed to i_name.
This patch incorporates work by Eric Biggers
and Jaegeuk Kim .
Co-developed-by: Eric Biggers
Signed-off-by: Eric Biggers
Signed-off-by: Daniel Rosenberg
---
fs/f2fs/dir.c | 57 +++---
fs/f2fs/f2fs.h | 8 ---
fs/f2fs/hash.c
This switches ext4 over to the generic support provided in
the previous patch.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric
r own specific dentry operations as well. That operation
will set the minimal d_ops required under the circumstances.
Since the fscrypt d_ops are set later on, we must set all d_ops there,
since we cannot adjust those later on. This should not result in any
change in behavior.
Signed-off-by: D
This is in preparation for shifting the responsibility of setting the
dentry_operations to the filesystem, allowing it to maintain its own
operations.
Signed-off-by: Daniel Rosenberg
---
fs/crypto/fname.c | 3 ++-
include/linux/fscrypt.h | 1 +
2 files changed, 3 insertions(+), 1 deletion
elper functions that should work for most
cases.
These are a follow-up to the previously sent patch set
"[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches"
Daniel Rosenberg (5):
ext4: Use generic casefolding support
fscrypt: Export fscrypt_d_revalidate
libfs: Add gen
itself.
Currently the casefolding dentry operation are always set because the
feature is toggleable on empty directories. Since we don't know what
set of functions we'll eventually need, and cannot change them later,
we add just add them.
Signed-off-by: Daniel Rosenberg
---
elper functions that should work for most
cases.
These are a follow-up to the previously sent patch set
"[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches"
Daniel Rosenberg (5):
ext4: Use generic casefolding support
fscrypt: Export fscrypt_d_revalidate
libfs: Add gen
On Mon, Sep 21, 2020 at 11:29 AM Eric Biggers wrote:
>
> On Sun, Sep 20, 2020 at 09:10:57PM -0400, Gabriel Krisman Bertazi wrote:
> > Daniel Rosenberg writes:
> >
> > > This switches ext4 over to the generic support provided in
> > > the previous patch.
&
This switches ext4 over to the generic support provided in
the previous patch.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric
and f2fs, apart from the use of utf8_casefold_hash to
avoid an allocation.
By providing a common implementation, all users can benefit from any
optimizations without needing to port over improvements.
Signed-off-by: Daniel Rosenberg
---
fs/libfs.c | 87
This switches f2fs over to the generic support provided in
the previous patch.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric
allocation.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Gabriel Krisman Bertazi
Reviewed-by: Eric Biggers
---
fs/unicode/utf8-core.c | 23 ++-
include/linux/unicode.h | 3 +++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8
requiring a
new string allocation.
Daniel Rosenberg (4):
unicode: Add utf8_casefold_hash
fs: Add standard casefolding support
f2fs: Use generic casefolding support
ext4: Use generic casefolding support
fs/ext4/dir.c | 64 +-
fs/ext4/ext4.h | 12
On Tue, Jul 7, 2020 at 9:12 PM Eric Biggers wrote:
>
> On Tue, Jul 07, 2020 at 08:05:50PM -0700, Daniel Rosenberg wrote:
> > +/**
> > + * generic_ci_d_compare - generic d_compare implementation for casefolding
> > filesystems
> > + * @dentry: dentry whos
allocation.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Gabriel Krisman Bertazi
Reviewed-by: Eric Biggers
---
fs/unicode/utf8-core.c | 23 ++-
include/linux/unicode.h | 3 +++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8
requiring a
new string allocation.
Daniel Rosenberg (4):
unicode: Add utf8_casefold_hash
fs: Add standard casefolding support
f2fs: Use generic casefolding support
ext4: Use generic casefolding support
fs/ext4/dir.c | 64 +---
fs/ext4/ext4.h | 12
This switches f2fs over to the generic support provided in
the previous patch.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric
and f2fs, apart from the use of utf8_casefold_hash to
avoid an allocation.
By providing a common implementation, all users can benefit from any
optimizations without needing to port over improvements.
Signed-off-by: Daniel Rosenberg
---
fs/libfs.c | 94
This switches ext4 over to the generic support provided in
the previous patch.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
Reviewed-by: Eric
requiring a
new string allocation, and ensure we don't attempt to casefold the no-key
token of an encrypted filename.
Daniel Rosenberg (4):
unicode: Add utf8_casefold_hash
fs: Add standard casefolding support
f2fs: Use generic casefolding support
ext4: Use generic casefolding support
fs
allocation.
Signed-off-by: Daniel Rosenberg
---
fs/unicode/utf8-core.c | 23 ++-
include/linux/unicode.h | 3 +++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c
index 2a878b739115..dc25823bfed9 100644
--- a/fs/unicode
t from any
optimizations without needing to port over improvements.
Signed-off-by: Daniel Rosenberg
---
fs/libfs.c | 96 ++
include/linux/fs.h | 16
2 files changed, 112 insertions(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index 4d
This switches f2fs over to the generic support provided in
the previous patch.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
---
fs/f2fs
This switches ext4 over to the generic support provided in
the previous patch.
Since casefolded dentries behave the same in ext4 and f2fs, we decrease
the maintenance burden by unifying them, and any optimizations will
immediately apply to both.
Signed-off-by: Daniel Rosenberg
---
fs/ext4
On Tue, Jun 23, 2020 at 10:43 PM Gabriel Krisman Bertazi
wrote:
>
> Daniel Rosenberg writes:
>
> > -
> > const struct dentry_operations ext4_dentry_ops = {
> > - .d_hash = ext4_d_hash,
> > - .d_compare = ext4_d_compare,
> > + .d_hash =
On Tue, Jun 23, 2020 at 10:57 PM Eric Biggers wrote:
>
> Note that the '!IS_ENCRYPTED(dir) || fscrypt_has_encryption_key(dir)' check
> can
> be racy, because a process can be looking up a no-key token in a directory
> while
> concurrently another process initializes the directory's ->i_crypt_inf
This adds a case insensitive hash function to allow taking the hash
without needing to allocate a casefolded copy of the string.
Signed-off-by: Daniel Rosenberg
---
fs/unicode/utf8-core.c | 23 ++-
include/linux/unicode.h | 3 +++
2 files changed, 25 insertions(+), 1
This switches f2fs over to the generic support provided in
commit 5f829feca774 ("fs: Add standard casefolding support")
Signed-off-by: Daniel Rosenberg
---
fs/f2fs/dir.c | 84 +
fs/f2fs/f2fs.h | 4 --
fs/f2fs/super.c
This switches ext4 over to the generic support provided in
commit 5f829feca774 ("fs: Add standard casefolding support")
Signed-off-by: Daniel Rosenberg
---
fs/ext4/dir.c | 64 ++---
fs/ext4/ext4.h | 12 --
fs/ext4/hash.c | 2 +
This lays the ground work for enabling casefolding and encryption at the
same time for ext4 and f2fs. A future set of patches will enable that
functionality. These unify the highly similar dentry_operations that ext4
and f2fs both use for casefolding.
Daniel Rosenberg (4):
unicode: Add
This adds general supporting functions for filesystems that use
utf8 casefolding. It provides standard dentry_operations and adds the
necessary structures in struct super_block to allow this standardization.
Ext4 and F2fs will switch to these common implementations.
Signed-off-by: Daniel
On 08/31/2018 08:56 AM, Greg Kroah-Hartman wrote:
On Thu, Aug 30, 2018 at 06:36:18PM -0700, Daniel Rosenberg wrote:
The sign off was on the 4.4.y version that I cherry-picked this from.
Ah that wasn't obvious at all. What is that git commit id? You need to
give us a hint as to wh
On 08/30/2018 05:41 PM, Greg Kroah-Hartman wrote:
On Thu, Aug 30, 2018 at 04:09:46PM -0700, Daniel Rosenberg wrote:
This patch is against 4.9. It does not apply to master due to a large
rework of ion in 4.12 which removed the affected functions altogther.
4c23cbff073f3b9b ("staging: an
t does not overflow.
Signed-off-by: Daniel Rosenberg
Signed-off-by: Greg Kroah-Hartman
---
drivers/staging/android/ion/ion.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/android/ion/ion.c
b/drivers/staging/android/ion/ion.c
index 6f9
Userspace can cause the kref to handles to increment
arbitrarily high. Ensure it does not overflow.
Signed-off-by: Daniel Rosenberg
---
v2: Fixed patch corruption :(
This patch is against 4.4. It does not apply to master due to a large
rework of ion in 4.12 which removed the affected functions
Userspace can cause the kref to handles to increment
arbitrarily high. Ensure it does not overflow.
Signed-off-by: Daniel Rosenberg
---
This patch is against 4.4. It does not apply to master due to a large
rework of ion in 4.12 which removed the affected functions altogther.
It applies from
If our length is greater than the size of the buffer, we
overflow the buffer
Signed-off-by: Daniel Rosenberg
Cc: sta...@vger.kernel.org
---
drivers/hid/hid-debug.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index
The format specifier %p can leak kernel addresses
while not valuing the kptr_restrict system settings.
Use %pK instead of %p, which also evaluates whether
kptr_restrict is set.
Signed-off-by: Divya Ponnusamy
Signed-off-by: Daniel Rosenberg
Cc: stable
---
drivers/dma-buf/sync_debug.c | 2 +-
1
kernel can truly
prefetch pages using its readahead algorithm.
Signed-off-by: Adrien Schildknecht
Signed-off-by: Daniel Rosenberg
---
fs/squashfs/file.c| 137 ++
fs/squashfs/file_direct.c | 62 ++---
fs/squashfs/squashfs.h
be merged. Moreover, merging the reads
at the FS level means that we rely less on the IO scheduler.
Signed-off-by: Adrien Schildknecht
Signed-off-by: Daniel Rosenberg
---
fs/squashfs/block.c | 522 +-
fs/squashfs/file_direct.c | 195 ++-
. It also
reduces the number of unnecessary reads.
Signed-off-by: Adrien Schildknecht
Signed-off-by: Daniel Rosenberg
---
fs/squashfs/block.c | 25 +
fs/squashfs/file_direct.c | 37 ++---
2 files changed, 55 insertions(+), 7 deletions
These patches contain several optimizations to Squashfs. ll_rw_block is
replaced with submit_bio. readpages is implemented to support asynchronous
readahead. Uncompressed file reads are optimized, no longer requiring the
entire block to be read if the block doesn't need to be decompressed, which
gr
uffer.
3/ Refactor the wrappers to share code that deals with page actors.
Signed-off-by: Adrien Schildknecht
Signed-off-by: Daniel Rosenberg
---
fs/squashfs/cache.c | 73 +++---
fs/squashfs/decompressor.c | 55 +++---
fs/squashfs/file_direct.c| 4 +-
f
From: Adrien Schildknecht
FILE_DIRECT is working fine and offers faster results and lower memory
footprint.
Removing FILE_CACHE makes our life easier because we don't have to
maintain 2 differents function that does the same thing.
Signed-off-by: Adrien Schildknecht
Signed-off-by: D
67 matches
Mail list logo