Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18873245rwd; Wed, 28 Jun 2023 01:42:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67OF1I0ZNSoiibYm0eXsyxImko/ssLOpDLr4TxsQICQWc2xxkKP+4bF8yQQlK8GDOE7OQp X-Received: by 2002:aa7:c1d6:0:b0:51d:ad03:95f with SMTP id d22-20020aa7c1d6000000b0051dad03095fmr2864642edp.7.1687941760038; Wed, 28 Jun 2023 01:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687941760; cv=none; d=google.com; s=arc-20160816; b=jzZI+kYk/NdzLYVzSfv6SJ0mliImmZmHoC9Bz44l+OYINayD1IKykgSU4zYZFE8K6W D4vffSrbLDMfGgysg2O6a1kYDsJqBrUpNrWjM79lGCT5UmF/HbYMou3jMhZtpdvsnfs3 e7tkgKalYV4eMlEiTCJ821QSMshaV/rgJ55Yw0tyak9n9kb2sBOBztmhh7OjHY4tMFmJ l6eZNuZc23I6VEHSf+xaKBF+XPagy1xoDJQXDnqyny6p8/umjv6yhUM2EWlN3FuKw1um 2XEEa2Yfep9HsixqMuvMtYQyC2x6bhm12XyscjwP/9wSx3mSbLv+UHi2rgghUiGD91yK Ko+A== 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=XjmiDEaLe6kJvMMtTj0arSrZgaB1Qz8tcbGBgWR455M=; fh=EhHjB54jRavzjurxGKNjkbjuMvKMUYZJ7F6WnGW7UwE=; b=m4m2cYrWRuxKReppArgJEIZZgVs8LLhtrJH9JNPKbad1UWVycG7QcMxBULDgTR2fi9 rx+9xX/WXSIWRaVsEX//m2fcgGPS2UDmLz+NHDP4tGDvzwbctG3sCwIt2Wwae4STo2m2 Btq5FNvxhbL54zyZvTNQ9/bzeX7b2GiHiq2DiZzexZcd8bcPrnm/YSKEzZGcI2NNKTL8 Aa6IrXsjTeIAwlgA1qAS/JIWJWva6javUpoMUFUyO70a7p3yvixF8I5ry9VfNRisOU+9 JJ3eK4m5dqji0h0wgslrq/3xiBeS5yxKHaqn/IjNEGNJiPfsGhFJFfQV586fv5jLFwvR dGcw== 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 z3-20020a50eb43000000b0051a4e8b625fsi5361727edp.273.2023.06.28.01.42.15; Wed, 28 Jun 2023 01:42:40 -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 S232504AbjF1IL3 (ORCPT + 99 others); Wed, 28 Jun 2023 04:11:29 -0400 Received: from verein.lst.de ([213.95.11.211]:38751 "EHLO verein.lst.de" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232490AbjF1IIE (ORCPT ); Wed, 28 Jun 2023 04:08:04 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 89DA467373; Wed, 28 Jun 2023 09:32:14 +0200 (CEST) Date: Wed, 28 Jun 2023 09:32:14 +0200 From: Christoph Hellwig To: Min Li Cc: axboe@kernel.dk, willy@infradead.org, hch@lst.de, dlemoal@kernel.org, gregkh@linuxfoundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, stable@kernel.org Subject: Re: [PATCH v3] block: add check that partition length needs to be aligned with block size Message-ID: <20230628073214.GA25314@lst.de> References: <20230628130941.10690-1-min15.li@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628130941.10690-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 01:09:41PM +0000, Min Li wrote: > + long long blksz = bdev_logical_block_size(bdev), start, length; long long for the blocksize is a bit weird here, as the value is an unsigned int. Also while pre-existing the long long for start/length looks weird, do we need to check for negative values somewhere? Also don't forget the Cc stable that Greg requested.