From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:54538 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753781AbeGCIk2 (ORCPT ); Tue, 3 Jul 2018 04:40:28 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0E3E0ADAD for ; Tue, 3 Jul 2018 08:40:27 +0000 (UTC) Subject: Re: [PATCH v2 1/2] btrfs: Check each block group has corresponding chunk at mount time From: Nikolay Borisov To: Qu Wenruo , linux-btrfs@vger.kernel.org References: <20180703080830.8300-1-wqu@suse.com> <034ca6af-0f07-f9b8-86c0-463333bb41f5@suse.com> Message-ID: Date: Tue, 3 Jul 2018 11:40:26 +0300 MIME-Version: 1.0 In-Reply-To: <034ca6af-0f07-f9b8-86c0-463333bb41f5@suse.com> Content-Type: text/plain; charset=utf-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 3.07.2018 11:33, Nikolay Borisov wrote: > > > On 3.07.2018 11:08, Qu Wenruo wrote: >> Reported in https://bugzilla.kernel.org/show_bug.cgi?id=199837, if a >> crafted btrfs with incorrect chunk<->block group mapping, it could leads >> to a lot of unexpected behavior. >> >> Although the crafted image can be catched by block group item checker >> added in "[PATCH] btrfs: tree-checker: Verify block_group_item", if one >> crafted a valid enough block group item which can pass above check but >> still mismatch with existing chunk, it could cause a lot of undefined >> behavior. >> >> This patch will add extra block group -> chunk mapping check, to ensure >> we have a completely matching (start, len, flags) chunk for each block >> group at mount time. >> >> Reported-by: Xu Wen >> Signed-off-by: Qu Wenruo >> --- >> changelog: >> v2: >> Add better error message for each mismatch case. >> Rename function name, to co-operate with later patch. >> Add flags mismatch check. >> --- > > It's getting really hard to keep track of the various validation patches > you sent with multiple versions + new checks. Please batch everything in > a topic series i.e "Making checks stricter" or some such and send > everything again nicely packed, otherwise the risk of mis-merging is > increased. I now see that Gu Jinxiang from fujitsu also started sending > validation fixes. Also for evry patch which fixes a specific issue from one of the reported on bugzilla.kernel.org just use the Link: tag to point to the original report on bugzilla that will make it easier to relate the fixes to the original report. > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >