From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7DC52C81 for ; Fri, 15 Oct 2021 15:49:36 +0000 (UTC) Received: by mail-pl1-f177.google.com with SMTP id i5so408614pla.5 for ; Fri, 15 Oct 2021 08:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ph+oZ8UT4h1HTx6qQ3UwPOnmmXuejFlF+FpHdhVkhfw=; b=iSbFTO7hl5wsHi/v9726DpD3kjwHBmUweM5nSVDlyWBslMc3wVKEMvQCq5pVO/6MpZ QpL/26LdJe7GrULqRDxfawSnvbruhiXNd7VKIbgGj0HAHUSD4T22YVTuGUCVLgeYQ9DD YRPQKjchN3EU8Gz5xfRwkBHxJQvIPm4lQcdPQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ph+oZ8UT4h1HTx6qQ3UwPOnmmXuejFlF+FpHdhVkhfw=; b=w7642bgQ168zw9JedvX8tiV2fpoLfaQeTF3Pr9HMeZ8IUlj2GWg44yFOFd4990kbBn s4PWNrT+dIxQSy28DU7qT6jgNrAxbZTzHbYq01PH18Zib3wg4/4l71FDev/QcnrmF1Ty /SzZ7JSIRhcs2gxXNxDKFZYhwXNITjo7tz/zdpPy6jzyI028yTRv2ZxNLThs9mdAtG0/ vn3RxKqHIHuZo2p3xeXPxIEgOOTlR5ouMh4+vWrZC+T7nIAkAtuzxZuJSXZH/tnOB7SR 20uQsms9+cTXhRq0hBSV8wopEivM/IPhsP70+/kLQYbJDcziZiZIpxHdZTutAoJ8sxbT o/Og== X-Gm-Message-State: AOAM530aoPiWNQxtA4CtWnJ5aGK26lnYz+0f+6ZC8jCmwDYT+lB0fM5F nv7f+rbxyIF1sBDTmB06dkwy8g== X-Google-Smtp-Source: ABdhPJz6i9tGVLgkq0eULPGyuk5x/dLn8xi+sif8q9XJ9Fat4Z2U3sGqOIlP99kszRnqXPDgBVaPnw== X-Received: by 2002:a17:903:234d:b0:13f:3180:626a with SMTP id c13-20020a170903234d00b0013f3180626amr11815749plh.49.1634312976314; Fri, 15 Oct 2021 08:49:36 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id v22sm5451930pff.93.2021.10.15.08.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 08:49:35 -0700 (PDT) Date: Fri, 15 Oct 2021 08:49:35 -0700 From: Kees Cook To: Anton Altaparmakov Cc: Christoph Hellwig , Jens Axboe , Coly Li , Mike Snitzer , Song Liu , David Sterba , Josef Bacik , Theodore Ts'o , OGAWA Hirofumi , Dave Kleikamp , Ryusuke Konishi , Konstantin Komarov , Phillip Lougher , Jan Kara , "linux-block@vger.kernel.org" , "dm-devel@redhat.com" , "drbd-dev@lists.linbit.com" , "linux-bcache@vger.kernel.org" , "linux-raid@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "linux-scsi@vger.kernel.org" , "target-devel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "linux-ext4@vger.kernel.org" , "jfs-discussion@lists.sourceforge.net" , "linux-nfs@vger.kernel.org" , "linux-nilfs@vger.kernel.org" , "linux-ntfs-dev@lists.sourceforge.net" , "ntfs3@lists.linux.dev" , "reiserfs-devel@vger.kernel.org" Subject: Re: [PATCH 02/30] block: add a bdev_nr_bytes helper Message-ID: <202110150848.375151B3@keescook> References: <20211015132643.1621913-1-hch@lst.de> <20211015132643.1621913-3-hch@lst.de> <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> On Fri, Oct 15, 2021 at 02:37:41PM +0000, Anton Altaparmakov wrote: > Hi Christoph, > > > On 15 Oct 2021, at 14:26, Christoph Hellwig wrote: > > > > Add a helpe to query the size of a block device in bytes. This > > will be used to remove open coded access to ->bd_inode. > > Matthew already pointed out the return type for bdev_nr_bytes() but also your commit message has a typo: "Add a helpe" -> "Add a helper". Right. With these fixed, I'm a fan. :) Reviewed-by: Kees Cook -Kees -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 920B4C433EF for ; Fri, 15 Oct 2021 15:55:22 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0B8E9611C1 for ; Fri, 15 Oct 2021 15:55:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0B8E9611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-557-3oPR-BFjP9KMv-GDzYKnJQ-1; Fri, 15 Oct 2021 11:55:17 -0400 X-MC-Unique: 3oPR-BFjP9KMv-GDzYKnJQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F48579EDD; Fri, 15 Oct 2021 15:55:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD53260BD8; Fri, 15 Oct 2021 15:55:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 744FF180598A; Fri, 15 Oct 2021 15:55:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19FFniET005470 for ; Fri, 15 Oct 2021 11:49:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7AF302166B25; Fri, 15 Oct 2021 15:49:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 278A72166B3F for ; Fri, 15 Oct 2021 15:49:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D3208001EA for ; Fri, 15 Oct 2021 15:49:41 +0000 (UTC) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-123-_nn_E_u2PM-JqFf-WKqiEQ-1; Fri, 15 Oct 2021 11:49:37 -0400 X-MC-Unique: _nn_E_u2PM-JqFf-WKqiEQ-1 Received: by mail-pl1-f181.google.com with SMTP id y4so6685983plb.0 for ; Fri, 15 Oct 2021 08:49:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ph+oZ8UT4h1HTx6qQ3UwPOnmmXuejFlF+FpHdhVkhfw=; b=HXaECnCijB5GVLC3sgCcq7xDG4PpH7FvNqfsbm2jbykl2Px2cZadOoMyMvK5zvgXZS CxpAbHHXrK0irPPfs3saMoe6ReCKOGl4QcfbT+jX+UWL/wnTfaQjvwbK/ISIXPuGI2Ph TX+csneIbYMbM3VZK5dPrBIuZJPHvdp49iu40Nbdpl/WJposv4WDX25F7l9jmA6lhOx8 DeDiIlmIpU3JVOvefCAHIrpBI7RLNLXI08Cnyvhn1/5kv8IoEUE78dlnHqCg7+hUDHTY 7bjh7As8OCMoQmlNNwr6ItV9C4oUkTaweGmEnxbCrDbAsUBjn+B685RafXstJsVsR2ug 6odQ== X-Gm-Message-State: AOAM531tDA+lLaPXTSeM6xOVHntLBdrJ1w6ypII6XtVbFp5ulgqSn94O c2U/V3g87cdgunpTeWoguZkZZg== X-Google-Smtp-Source: ABdhPJz6i9tGVLgkq0eULPGyuk5x/dLn8xi+sif8q9XJ9Fat4Z2U3sGqOIlP99kszRnqXPDgBVaPnw== X-Received: by 2002:a17:903:234d:b0:13f:3180:626a with SMTP id c13-20020a170903234d00b0013f3180626amr11815749plh.49.1634312976314; Fri, 15 Oct 2021 08:49:36 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id v22sm5451930pff.93.2021.10.15.08.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 08:49:35 -0700 (PDT) Date: Fri, 15 Oct 2021 08:49:35 -0700 From: Kees Cook To: Anton Altaparmakov Message-ID: <202110150848.375151B3@keescook> References: <20211015132643.1621913-1-hch@lst.de> <20211015132643.1621913-3-hch@lst.de> <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> MIME-Version: 1.0 In-Reply-To: <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: dm-devel@redhat.com Cc: Dave Kleikamp , "jfs-discussion@lists.sourceforge.net" , Mike Snitzer , "linux-nvme@lists.infradead.org" , Konstantin Komarov , Song Liu , "dm-devel@redhat.com" , "target-devel@vger.kernel.org" , "reiserfs-devel@vger.kernel.org" , Christoph Hellwig , "drbd-dev@lists.linbit.com" , "linux-nilfs@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-ext4@vger.kernel.org" , Josef Bacik , Coly Li , "linux-raid@vger.kernel.org" , "linux-bcache@vger.kernel.org" , David Sterba , Ryusuke Konishi , OGAWA Hirofumi , Jens Axboe , "linux-block@vger.kernel.org" , "linux-nfs@vger.kernel.org" , Theodore Ts'o , "linux-ntfs-dev@lists.sourceforge.net" , Jan Kara , "linux-fsdevel@vger.kernel.org" , Phillip Lougher , "ntfs3@lists.linux.dev" , "linux-btrfs@vger.kernel.org" Subject: Re: [dm-devel] [PATCH 02/30] block: add a bdev_nr_bytes helper X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, Oct 15, 2021 at 02:37:41PM +0000, Anton Altaparmakov wrote: > Hi Christoph, > > > On 15 Oct 2021, at 14:26, Christoph Hellwig wrote: > > > > Add a helpe to query the size of a block device in bytes. This > > will be used to remove open coded access to ->bd_inode. > > Matthew already pointed out the return type for bdev_nr_bytes() but also your commit message has a typo: "Add a helpe" -> "Add a helper". Right. With these fixed, I'm a fan. :) Reviewed-by: Kees Cook -Kees -- Kees Cook -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH 02/30] block: add a bdev_nr_bytes helper Date: Fri, 15 Oct 2021 08:49:35 -0700 Message-ID: <202110150848.375151B3@keescook> References: <20211015132643.1621913-1-hch@lst.de> <20211015132643.1621913-3-hch@lst.de> <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ph+oZ8UT4h1HTx6qQ3UwPOnmmXuejFlF+FpHdhVkhfw=; b=iSbFTO7hl5wsHi/v9726DpD3kjwHBmUweM5nSVDlyWBslMc3wVKEMvQCq5pVO/6MpZ QpL/26LdJe7GrULqRDxfawSnvbruhiXNd7VKIbgGj0HAHUSD4T22YVTuGUCVLgeYQ9DD YRPQKjchN3EU8Gz5xfRwkBHxJQvIPm4lQcdPQ= Content-Disposition: inline In-Reply-To: <7C4AC4BD-B62D-41B3-AAF7-46125D1A1146@tuxera.com> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Anton Altaparmakov Cc: Christoph Hellwig , Jens Axboe , Coly Li , Mike Snitzer , Song Liu , David Sterba , Josef Bacik , Theodore Ts'o , OGAWA Hirofumi , Dave Kleikamp , Ryusuke Konishi , Konstantin Komarov , Phillip Lougher , Jan Kara , "linux-block@vger.kernel.org" , "dm-devel@redhat.com" , "drbd-dev@lists.linbit.com" , "linux-bcache@vger.kernel.org" , "linux-raid@vger.kernel.org" <> On Fri, Oct 15, 2021 at 02:37:41PM +0000, Anton Altaparmakov wrote: > Hi Christoph, > > > On 15 Oct 2021, at 14:26, Christoph Hellwig wrote: > > > > Add a helpe to query the size of a block device in bytes. This > > will be used to remove open coded access to ->bd_inode. > > Matthew already pointed out the return type for bdev_nr_bytes() but also your commit message has a typo: "Add a helpe" -> "Add a helper". Right. With these fixed, I'm a fan. :) Reviewed-by: Kees Cook -Kees -- Kees Cook