From: Leah Rumancik <leah.rumancik@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: Leah Rumancik <leah.rumancik@gmail.com>
Subject: [PATCH v2 1/2] ext4: wipe filename upon file deletion
Date: Wed, 7 Apr 2021 15:42:01 +0000 [thread overview]
Message-ID: <20210407154202.1527941-2-leah.rumancik@gmail.com> (raw)
In-Reply-To: <20210407154202.1527941-1-leah.rumancik@gmail.com>
Zero out filename and file type fields when file is deleted.
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
---
fs/ext4/namei.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 883e2a7cd4ab..0147c86de99e 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2492,6 +2492,10 @@ int ext4_generic_delete_entry(struct inode *dir,
else
de->inode = 0;
inode_inc_iversion(dir);
+
+ memset(de_del->name, 0, de_del->name_len);
+ memset(&de_del->file_type, 0, sizeof(__u8));
+
return 0;
}
i += ext4_rec_len_from_disk(de->rec_len, blocksize);
--
2.31.0.208.g409f899ff0-goog
next prev parent reply other threads:[~2021-04-07 15:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 15:42 [PATCH v2 0/2] Filename wipeout patch series updates Leah Rumancik
2021-04-07 15:42 ` Leah Rumancik [this message]
2021-04-07 21:33 ` [PATCH v2 1/2] ext4: wipe filename upon file deletion Eric Biggers
2021-04-08 3:48 ` Theodore Ts'o
2021-04-08 5:21 ` Dave Chinner
2021-04-08 19:25 ` Theodore Ts'o
2021-04-09 0:02 ` Darrick J. Wong
2021-04-09 2:51 ` Theodore Ts'o
2021-04-11 23:38 ` Dave Chinner
2021-04-07 15:42 ` [PATCH v2 2/2] ext4: add ioctl FS_IOC_CHKPT_JRNL Leah Rumancik
2021-04-07 18:35 ` Darrick J. Wong
2021-04-07 21:15 ` Dave Chinner
2021-04-08 1:26 ` Darrick J. Wong
2021-04-08 4:43 ` Dave Chinner
2021-04-08 23:49 ` Darrick J. Wong
2021-04-11 23:13 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210407154202.1527941-2-leah.rumancik@gmail.com \
--to=leah.rumancik@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).