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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Jun 2021 11:57:03 +0200
From:   Jan Kara <jack@...e.cz>
To:     yangerkun <yangerkun@...wei.com>
Cc:     tytso@....edu, jack@...e.com, linux-ext4@...r.kernel.org,
        yukuai3@...wei.com
Subject: Re: [PATCH] ext4: no need to verify new add extent block

On Wed 09-06-21 15:55:45, yangerkun wrote:
> ext4_ext_grow_indepth will add a new extent block which has init the
> expected content. We can mark this buffer as verified so to stop a
> useless check in __read_extent_tree_block.
> 
> Signed-off-by: yangerkun <yangerkun@...wei.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/ext4/extents.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index cbf37b2cf871..6ca5be8a8fc2 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -1306,6 +1306,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode,
>  	neh->eh_magic = EXT4_EXT_MAGIC;
>  	ext4_extent_block_csum_set(inode, neh);
>  	set_buffer_uptodate(bh);
> +	set_buffer_verified(bh);
>  	unlock_buffer(bh);
>  
>  	err = ext4_handle_dirty_metadata(handle, inode, bh);
> -- 
> 2.31.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ