lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 8 Nov 2016 08:19:02 -0700
From:   Andreas Dilger <adilger@...ger.ca>
To:     Lokesh Jaliminche <lokesh.jaliminche@...gate.com>
Cc:     linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] EXT4: fixes for recovery mode.

On Nov 8, 2016, at 2:36 AM, Lokesh Jaliminche <lokesh.jaliminche@...gate.com> wrote:
> 
> commit 3fd23caad436c961339ea3866a910354a83849d2
> Author: Lokesh Nagappa Jaliminche <lokesh.jaliminche@...gate.com>
> Date:   Tue Nov 8 14:27:48 2016 +0530
> 
>     ext4: fixes for recovery mode.
> 
>     After kernel crash when ext4 runs in recovery mode,
>     with read-only disk, it may loose part of allocation
>     updates and fail while mounting fs due to group
>     descriptor checks before journal replay. So group
>     descriptor check is moved after journal replay.
> 
>     Signed-off-by: Alexey Lyashkov <alexey_lyashkov@...atex.com>
>     Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@...gate.com>

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 20da99d..3922487 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3820,11 +3820,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>                         goto failed_mount2;
>                 }
>         }
> -       if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
> -               ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
> -               ret = -EFSCORRUPTED;
> -               goto failed_mount2;
> -       }
> 
>         sbi->s_gdb_count = db_count;
>         get_random_bytes(&sbi->s_next_generation, sizeof(u32));
> @@ -3957,6 +3952,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>         sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
> 
>  no_journal:
> +
> +       if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
> +               ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
> +               ret = -EFSCORRUPTED;
> +               goto failed_mount2;
> +       }
>         sbi->s_mb_cache = ext4_xattr_create_cache();
>         if (!sbi->s_mb_cache) {
>                 ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache");


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ