Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 728433 Details for
Bug 790191
sys-fs/e2fsprogs-1.46.2: Tests failed: j_recover_csum2_32bit j_recover_csum2_64bit j_recover_fast_commit m_rootdir_acl
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-e2fsck-fix-.-directory-repair-on-big-endian-systems.patch
0001-e2fsck-fix-.-directory-repair-on-big-endian-systems.patch (text/plain), 1.78 KB, created by
Sergei Trofimovich (RETIRED)
on 2021-07-30 18:58:24 UTC
(
hide
)
Description:
0001-e2fsck-fix-.-directory-repair-on-big-endian-systems.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2021-07-30 18:58:24 UTC
Size:
1.78 KB
patch
obsolete
>From 3568d9297dccd7dcff9d46648a2239064c013574 Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Fri, 30 Jul 2021 19:44:26 +0100 >Subject: [PATCH] e2fsck: fix '..' directory repair on big-endian systems > >The bug is initially observed on hppa and sparc by Rolf Eike Beer >where `f_baddotdir` test failed cimplaining about invalid ".." >directly after repair. > >It's a regression bisected down to 63f44aaf ("e2fsck: fix ".." more >gracefully if possible "). > >The bug happens in check_dot() where repair splits one on-disk dirent >into two: > > | dirent "." | <overlapped dirent ".."> | ... more ... > | dirent "." | dirent ".." | ... more ... | > >The problem is that newly creted ".." dirent is in on-disk little-endian >format as ext2fs_read_dir_block4() only accounted for oversized "." dirent. > >The change explicitly flips bytes around for dirent "..". > >Tested on powerpc-unknown-linux-gnu. > >Reported-by: Rolf Eike Beer >Bug: https://bugs.gentoo.org/790191 >Bug: https://github.com/tytso/e2fsprogs/issues/75 >Fixes: 63f44aaf ("e2fsck: fix ".." more gracefully if possible ") >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > e2fsck/pass2.c | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c >index f00cb40e..48a37872 100644 >--- a/e2fsck/pass2.c >+++ b/e2fsck/pass2.c >@@ -447,6 +447,12 @@ static int check_dot(e2fsck_t ctx, > nextdir = (struct ext2_dir_entry *) > ((char *) dirent + 12); > dirent->rec_len = 12; >+#ifdef WORDS_BIGENDIAN >+ /* We discover new on disk dir entry. >+ * Account for it's endianness. */ >+ ext2fs_dirent_swab_in2(ctx->fs, >+ nextdir, new_len, 0); >+#endif > /* if the next entry looks like "..", leave it > * and let check_dotdot() verify the dirent, > * otherwise zap the following entry. */ >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 790191
:
708498
|
728433