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:	Thu, 04 Jan 2007 11:47:36 -0800
From:	Mingming Cao <cmm@...ibm.com>
To:	Alex Tomas <alex@...sterfs.com>
CC:	"Amit K. Arora" <aarora@...ux.vnet.ibm.com>,
	linux-ext4@...r.kernel.org, suparna@...ibm.com
Subject: Re: [PATCH 1/1 version2] Extent overlap bugfix in ext4

Alex Tomas wrote:

>>>>>>Amit K Arora (AKA) writes:
> 
> 
>  AKA> @@ -1984,6 +2034,10 @@ int ext4_ext_get_blocks(handle_t *handle
>  AKA>  		 */
>  AKA>  		if (ee_len > EXT_MAX_LEN)
>  AKA>  			goto out2;
>  AKA> +
>  AKA> +		if (iblock < ee_block && iblock + max_blocks >= ee_block)
>  AKA> +			allocated = ee_block - iblock;
>  AKA> +
>  AKA>  		/* if found extent covers block, simply return it */
>  AKA>  	        if (iblock >= ee_block && iblock < ee_block + ee_len) {
>  AKA>  			newblock = iblock - ee_block + ee_start;
> 
> I thought existing code already does this:
> 
> 	/* if found extent covers block, simply return it */
>         if (iblock >= ee_block && iblock < ee_block + ee_len) {
> 		newblock = iblock - ee_block + ee_start;
> 		/* number of remaining blocks in the extent */
> 		allocated = ee_len - (iblock - ee_block);
> 
> 
> thanks, Alex
That's different: the existing code address the case when the left part 
of the new extent  overlaps with an exisitng extent, in that case I 
understand it just returns the allocated part of extent, and continue 
the block allocation in the next call of get_blocks().

Well Amit's new code here trying to address the case when the right part 
of the new extent overlap with an exisitng extent. He was trying to 
update the new extent length to prevent that. As I mentioned ealier we 
could put this code into ext4_ext_check_overlap,let it judge whether 
there is overlap, and if so, what's the right start block number and length

Thanks,
Mingming

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists