Received: by 10.192.165.148 with SMTP id m20csp442300imm; Fri, 4 May 2018 00:08:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoIxz45a7iDO9FEHsYQ8MI7SXF8Be854fhE1pi0dBMPk/3n00IIZT81dC6ck0oKqQI9iZFL X-Received: by 2002:a17:902:462:: with SMTP id 89-v6mr26419840ple.300.1525417691571; Fri, 04 May 2018 00:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525417691; cv=none; d=google.com; s=arc-20160816; b=Z69ClGVgdz0Il3CRIo5bR+QqgteS17ndOeGivqR7xgBrQUfaUC4d3DfvcnOWS/pfGH q6sG1mE3sXsqAw1ONqPdaEL9Ge7tx1VKGzUAqPrOCQCUg8KPJWJmVL8tBxdnxXgsB8V8 KyHpN1EbHSQR/QuwxkH+5ccCpbM505duJuLff3tvhPiXu7KhmHQveSA1M2dWNPnJrz2V heGN0HfxG2wxwaOsNQMb28zTEq2+FIrJ987Nkiv3bokPFG4wH3bQ3FDIJGDVOX3fjhyr v6NTZ10gIRlLEpcOPiokVTC0s98kRbPSMQf48Z2rxmWf8CA/PqLjBn4bIENIVCd2EAYj /V/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=rqik/fDA7OSIq1mQtqlfTwdPtpD4rMhdcZKLD+SpN10=; b=KnbSC78gxbEYEr8bGmHh+vRgSxjLKbPlKnmE9O/9a3wjwX9j2tEIvl14W6Y4ZsaCQ7 CKCTsoHWt7yeVfGbX9a9Y8ubITfNOBBOIAZZQNdxdWdkRAHhe5kvCiOI53DkjOMTe3fW ZyMLiP9J/8AsrSuMZfJbyaeK0XtkHp58nuZrkea1Cehbyc02sTO7aK6mucwvtqQQ3d49 C7R7K5H7XLlHmeagl/GmmvV4bxiGkB07ZmHk3gK+C3+BW+ekSeL6DpLgztiv2poaFGU9 J2TeW09Kx5gaTAO+OGfFc3N5Fzp3KCGFGZtje+EPOV8pUTSQ690FTRDqCC8TgsZQzRsu dZ/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si12241122pln.97.2018.05.04.00.07.57; Fri, 04 May 2018 00:08:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751360AbeEDHHp convert rfc822-to-8bit (ORCPT + 99 others); Fri, 4 May 2018 03:07:45 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5922 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750733AbeEDHHn (ORCPT ); Fri, 4 May 2018 03:07:43 -0400 Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.55]) by Forcepoint Email with ESMTP id C999AEA08C6BB; Fri, 4 May 2018 15:07:40 +0800 (CST) Received: from DGGEMM422-HUB.china.huawei.com (10.1.198.39) by DGGEMM402-HUB.china.huawei.com (10.3.20.210) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 4 May 2018 15:07:41 +0800 Received: from DGGEMM511-MBS.china.huawei.com ([169.254.2.123]) by dggemm422-hub.china.huawei.com ([10.1.198.39]) with mapi id 14.03.0361.001; Fri, 4 May 2018 15:07:30 +0800 From: Caizhiyong To: Wang YanQing , "axboe@kernel.dk" CC: "gregkh@linuxfoundation.org" , "pombredanne@nexb.com" , "tglx@linutronix.de" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiangheng Subject: RE: [PATCH] block: add verifier for cmdline partition Thread-Topic: [PATCH] block: add verifier for cmdline partition Thread-Index: AQHT4tBgqIcfQVx8gUSka4WV0zpU+6QfJOHA Date: Fri, 4 May 2018 07:07:30 +0000 Message-ID: References: <20180503111748.GA904@udknight> In-Reply-To: <20180503111748.GA904@udknight> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.217.112] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Wang YanQing [mailto:udknight@gmail.com] > Sent: Thursday, May 03, 2018 7:18 PM > To: axboe@kernel.dk > Cc: gregkh@linuxfoundation.org; pombredanne@nexb.com; > tglx@linutronix.de; Caizhiyong ; linux- > block@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [PATCH] block: add verifier for cmdline partition > > I meet strange filesystem corruption issue recently, the reason > is there are overlaps partitions in cmdline partition argument. > > This patch add verifier for cmdline partition, then if there are > overlaps partitions, cmdline_partition will return error and log > a error message. > Partition overlap was intentionally designed in this cmdline partition. some time, the cmdline partition save raw data(not filesystem), the overlap makes data access very convenient. reference http://lists.infradead.org/pipermail/linux-mtd/2013-August/048092.html > Signed-off-by: Wang YanQing > --- > block/partitions/cmdline.c | 63 > +++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 62 insertions(+), 1 deletion(-) >