Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20023987rwd; Wed, 28 Jun 2023 18:40:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7rrSqPEGEW5pC6i2GxFvFeI5jxaIXO5ytqVkuQCTjD+eUHt+5tYNeq4xPp4Sq8tgXpM68R X-Received: by 2002:a05:6a00:170e:b0:666:e1f4:5153 with SMTP id h14-20020a056a00170e00b00666e1f45153mr30547891pfc.0.1688002834123; Wed, 28 Jun 2023 18:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688002834; cv=none; d=google.com; s=arc-20160816; b=sw/rtj6MRviTG23qq8nB9VNBghXGFwaq0nLumupsv6jISZM5oUfL4putWwpv4E/79x 1dYJBAo8oSYLClDyDDpEfiHE+jfeWZvC0GGck3oi3EvAyaWVl6YvnGwyfN0nbl6mWJEW obhjsyz+l1piAI5e0dHaYYYrJhDPTg3jz7oQEakBQW6MMX3vzSR1U6B9Dz4BB6C/C3Av IFmxBZv7CbTou/xeyZ3s2t41gWW97pHOLcycAiC+UCNk66PFBNdJPu7ZT7DuYLFWeZa2 4XzPJaGXH5apfXuGR/DhxOAZ7D2wBVo+X9AFTsl1fs3mrfgIYvfm2tJtvl2+ZWQxejAj 75Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=LlYdaa2mLyX2zsqC5mtsAeIXagnHALY/4oslNoV9mbI=; fh=Ja0+8+U0177EoJE8e5VKhawTY3rQtuXHtJsk//tVtJM=; b=IjsFbd3xswTPQ5rUq0+cT2NaaE8vCRP9J6Q5aDIgnCWc5omLrc1hl8drD5r/C77Pln zXDbVD/aEz800tPa3AuQ6oL30zNvJUD68RFiWF+bTSceZgnPb7KZHpF4H1rZrAV7NCC9 PgdzfGv4KkjQQEyxmR6zoSxKFxyL/6TM2Nqi2OsncR97m5fN2VXgQHrWFlHgFKNbwFgH Zo2g6cPclaq5vslH+QHUg+Ev0p54wVBn3uHz5enNNzVrQcPxcsB9C8y9FR31PD1/vJQS l9iM/GhkSEFOt+0hptzxK+AwyHQuun4+uyAbEp6lMdKBsXaeq3oIUe4qRopQ2FP0MbnN HiBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a656687000000b0054f904a0a0dsi10444905pgw.624.2023.06.28.18.40.21; Wed, 28 Jun 2023 18:40:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231631AbjF2BEq (ORCPT + 99 others); Wed, 28 Jun 2023 21:04:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231356AbjF2BEn (ORCPT ); Wed, 28 Jun 2023 21:04:43 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 709D0268A; Wed, 28 Jun 2023 18:04:42 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Qs0bV1fl8z4f3jq4; Thu, 29 Jun 2023 09:04:38 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP4 (Coremail) with SMTP id gCh0CgCX_7Kj2JxkJTUUMw--.27706S3; Thu, 29 Jun 2023 09:04:37 +0800 (CST) Subject: Re: [PATCH v3] block: add check that partition length needs to be aligned with block size To: Min Li , hch@lst.de Cc: axboe@kernel.dk, dlemoal@kernel.org, gregkh@linuxfoundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, stable@kernel.org, willy@infradead.org, "yukuai (C)" References: <20230628083839.GA26606@lst.de> <20230628170734.2960-1-min15.li@samsung.com> From: Yu Kuai Message-ID: Date: Thu, 29 Jun 2023 09:04:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20230628170734.2960-1-min15.li@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgCX_7Kj2JxkJTUUMw--.27706S3 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYx7kC6x804xWl14x267AKxVW8JVW5JwAF c2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII 0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xv wVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4 x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG 64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r 1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwACI402YVCY1x02628vn2kI c2xKxwCYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4 AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE 17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMI IF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq 3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIda VFxhVjvjDU0xZFpf9x07UWE__UUUUU= X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 在 2023/06/29 1:07, Min Li 写道: > On Mon, Jun 28, 2023 at 04:48:36PM +0000, Christoph Hellwig wrote: >> They are long long in the UAPI, which is weird but has been that way >> for a long time. So I think we need checks for negative values >> before they are shifted and converted to a sector_t. > > Do you mean that we need to check if p.start and p.length are negative? > Perhaps this patch will make sense. https://lore.kernel.org/all/20230525072041.3701176-1-zhongjinghua@huawei.com/ Thanks, Kuai > Thanks for your reply > > Min li > . >