Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18921648rwd; Wed, 28 Jun 2023 02:31:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4AdKoVg84KssMbxAZp4whYNrWpglDcwgfZ7TpXdwPIuTqsXPFDZKjga3E3+vexC2duAebi X-Received: by 2002:a05:6808:138a:b0:3a1:e132:dd8b with SMTP id c10-20020a056808138a00b003a1e132dd8bmr9958262oiw.41.1687944683991; Wed, 28 Jun 2023 02:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687944683; cv=none; d=google.com; s=arc-20160816; b=cvvNcUn15zGgg2qyWJ8PM8ypIsiE241wcDobjGVdCR3sggAjmTuvPGrJ0k0MxEtMd4 nW4IFP3WaNVawQ34STNFBqhotEIpXfpaeaQBGFCSOt5+/UVYQK/CWgS4G+ap7oloLwzo GFuZTvc2LFo2K2JIGmjOobZQPSLW98ly1irZ7sYb0TPsL1KQhi/TzrAW5MrLI6kn4BQZ gIyTdUJd3yEWO9LB0zbwKt9zmgVqTRMjEPlqFl1aS5LlFjPKx//QqpTZSzGcVwklhGm3 T5g+TSlCdRy6BV1ULHXb0CmNg3VoSkAKg4P1glXmDAuI37/vBzwpzsuBS6+kxfXryJoF ljcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ZSf8hUgp6X6LTcOUljs8zxm9dUTB+vkZ6juY96cTmF8=; fh=lWBPJ/RAyqsiABlVSwU9jxgWiyD09At96yf8Qn74l9E=; b=imjRMKILPeMB4suINoI/JPbytcFbYFBX6+iLOldCqXcAuqff97V5gkAX1EiGvu+PRE ruzJkSJswuuBDdGKV/Lb9m6rvkZLWHgrxCFql8RyBtZ/sYY1kzAtjleBRabcaFZ7IDJu jN9sA+Vodbl0Ayskt0bnfNzWwz+5K01+pkQyzwn90+O8p2Nj8U15cWt0BXc+jK6sd8YB zBB+aubmj+FfU6JRApQUkjuqHisjwSWMK2OD7ZhVooshHOFo6N0ZbYhx1s+rLo6+0hiA zdmPIKu+GdFAT6EzpMGO5zvTFfXepvHeGd/tqCJ7ImGCrwCt+A9w+s05BT40so6jY3CU p0/g== 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 h20-20020a17090ac39400b00262f99a851asi5176280pjt.96.2023.06.28.02.31.11; Wed, 28 Jun 2023 02:31:23 -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 S230430AbjF1Ilv (ORCPT + 99 others); Wed, 28 Jun 2023 04:41:51 -0400 Received: from verein.lst.de ([213.95.11.211]:38934 "EHLO verein.lst.de" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S234010AbjF1Iin (ORCPT ); Wed, 28 Jun 2023 04:38:43 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id E214E67373; Wed, 28 Jun 2023 10:38:39 +0200 (CEST) Date: Wed, 28 Jun 2023 10:38:39 +0200 From: Christoph Hellwig To: Min Li Cc: hch@lst.de, 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 Subject: Re: [PATCH v3] block: add check that partition length needs to be aligned with block size Message-ID: <20230628083839.GA26606@lst.de> References: <20230628073214.GA25314@lst.de> <20230628163442.2796-1-min15.li@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628163442.2796-1-min15.li@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 28, 2023 at 04:34:42PM +0000, Min Li wrote: > I will modify the blksz to unsigned int. > For pre-existing start/length, is it ok to change them to sector_t? 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.