From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 7 Nov 2018 09:09:09 -0700 From: Keith Busch To: Ming Lei Cc: Jens Axboe , linux-block Subject: Re: [PATCH] block: Clear kernel memory before copying to user Message-ID: <20181107160909.GC11941@localhost.localdomain> References: <20181107143745.11845-1-keith.busch@intel.com> <20181107151538.GA11941@localhost.localdomain> <20181107154412.GB11941@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-ID: On Thu, Nov 08, 2018 at 12:03:41AM +0800, Ming Lei wrote: > On Wed, Nov 7, 2018 at 11:47 PM Keith Busch wrote: > > > > On Wed, Nov 07, 2018 at 11:44:59PM +0800, Ming Lei wrote: > > > blk_update_request() may tell us how much progress made, :-) > > > > Except when it doesn't, which is 100% of the time for many block > > drivers, including nvme. > > Please look at blk_mq_end_request()(<- nvme_complete_rq()), which > calls blk_update_request(). Huh? That just says 100% of the request size was transerred no matter what was actually transferred. The protocol doesn't have a way to express what transfer size occured with a command's completion, and even it did, there's no way I'd trust every firmware not to screw it.