Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5009835ybl; Tue, 4 Feb 2020 06:09:09 -0800 (PST) X-Google-Smtp-Source: APXvYqztrqcrvp9ESetEFJhaQ4JUre0f4mWympA73qWl8z6SdRcc9n+QtjqG79TlENBvhtHqzrXn X-Received: by 2002:aca:d0a:: with SMTP id 10mr3373576oin.50.1580825349577; Tue, 04 Feb 2020 06:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580825349; cv=none; d=google.com; s=arc-20160816; b=NZa4+E1r1FIy5vIFUrQNFQIdIAl746J8auOjPcuTQXlPWzRVOIGkt7GGQCYviiwbJq bElgAoVynrZj7xIJT1rfmpEhhlqAppco9Zt3wyJatEBf/Jw264NGMhbxBQryObiqkUwZ xzaIb2RSDkgb3LWdpny359112eJ7FBfBMgous9NkycCKQr4PTZC6siVpYJYoRZ6tx+TV Gpngjlfv0gYwbMf8OID8NsrYfWtjr/To93oOGDFtSm+2npe+WpWY+EtSR7yW7KEZnsJz hF2P03+C50Do9us8lpMDKs7LHX05l79GegxxsxOdP2xZFB7WC5sd/a72sHxIIc41um1O eofQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=W4lLUrDIIX+rWx9u4syymGkAUYdtYfWSlqq4G1nIF0s=; b=hf8A8Hp52+K2yvrndQQ7yrFtVxsJP6eSH6Cos13K5dy3543kA/FqoJSMNPqf3RU2uS ASiQ+I+vyKCSm/5RxdVGmwOAod+fvFtYWZtdv6cdLaDhARbEiDARG+8IJFdwCOD4DN5a 3e4rwWHx1Y7NZ+r17hVHkb+cZe/u5Oyr4xvDgPTsKz2yC6T0VN0bsO/zBBMS2ZbyBOPe 8nzzQikQmRI1+sIIkGfHn0Ipxt6Mz4wKj+sx+AEMQsK/pMnM4mOHiBJN2eWrBrbrCd3Z fEy1u9V5QmaVZiY6OFmEGx967sABF56PQNoXpAZpHXh+LQUEGvRz5f67eCCnbowTpqrU c0ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="f7Z/dQWi"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22si9912997oij.35.2020.02.04.06.08.52; Tue, 04 Feb 2020 06:09:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="f7Z/dQWi"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727236AbgBDOHE (ORCPT + 99 others); Tue, 4 Feb 2020 09:07:04 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:38944 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727210AbgBDOHD (ORCPT ); Tue, 4 Feb 2020 09:07:03 -0500 Received: by mail-io1-f67.google.com with SMTP id c16so21025034ioh.6 for ; Tue, 04 Feb 2020 06:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=W4lLUrDIIX+rWx9u4syymGkAUYdtYfWSlqq4G1nIF0s=; b=f7Z/dQWifxeAqa76tIV5UG6gJPB2p1keyqaKb3RPxsIiK3cLSh/vEft+WHfs0eqknN GUBt9dX8A+11CDLM2qGU6kkuEOsEM566jm0DEbzK7iPzaJ7IHYtkcxOT4MnmEPHtWxYj uBatm2Wi8YzOFnYC6IZpaqs0MJCRxOjwAd+mu4ygP5lXJRLSkkOfkRXfUr/LVwSI48St Oj1wfo8PT7B+Eaq8+3vsU7ogYFRWlaUDVSHgLpMd1NXoyVizP7ndqNyGwrOSm/336s2g wKOQ+DHPQZ2M5R0pUnKYIX5rCtyhk1tboF39CRrR0zCdJbRW5S1cQvq0qSWY7tH4iVmJ t+JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=W4lLUrDIIX+rWx9u4syymGkAUYdtYfWSlqq4G1nIF0s=; b=pUMRYUBbTd1yrYumEOKuLFsEUcxO4ucUrczWyQVyBW11N3ky3bGKCRXWFVpk+ND2BB juScYmhRtpBC1bDa+l7S1mh9utzdhwaQv+Z5FszkkWlSCCvPT5aSqbQyQNspilO5+dNV qKw8OqLXir06sKaHugbdoilgm/QMqmExsfNoz04JS6gB5BFwCpZI2PEnoCVJrDEdOuuO WO+c4r8/4dmzbBaKQmQ9Aa10GsIzEofJlSBr/9XHEvZLR0ELHt3oHfomHwdmBBHinzmt PjzIV4KI1dfnoBmYeufuNZ7UXo9jwmFowxNY4SGvu9wrHt/VuaDA2AUQ28HWZPdqGApd rnoQ== X-Gm-Message-State: APjAAAWUFH4/Q15RZ+5HbgpiDVKnPD2Ny4sd1rd2m/Sm2RwpYN+VNStj RhBcTL6H3crhK1pBuw+8EQz7+VEiIfY= X-Received: by 2002:a6b:ac45:: with SMTP id v66mr23742889ioe.76.1580825221368; Tue, 04 Feb 2020 06:07:01 -0800 (PST) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id f21sm6726083ioc.31.2020.02.04.06.07.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Feb 2020 06:07:00 -0800 (PST) Subject: Re: [PATCH] Fix io_read() and io_write() when io_import_fixed() is used. To: David Laight Cc: LKML References: <0cf51853bebe4c889e4d00e4bbc61fb3@AcuMS.aculab.com> <3d5daf51252846cb851bf37d18842c4c@AcuMS.aculab.com> From: Jens Axboe Message-ID: <0db5b894-1914-1970-677e-01cdb8c93254@kernel.dk> Date: Tue, 4 Feb 2020 07:07:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <3d5daf51252846cb851bf37d18842c4c@AcuMS.aculab.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/4/20 7:05 AM, David Laight wrote: > From: Jens Axboe >> Sent: 04 February 2020 14:01 >> On 2/4/20 4:20 AM, David Laight wrote: >>> io_import_fixed() returns 0 on success so io_import_iovec() may >>> not return the length of the transfer. >>> >>> Instead always use the value from iov_iter_count() >>> (Which is called at the same place.) >>> >>> Fixes 9d93a3f5a (modded by 491381ce0) and 9e645e110. >> >> What kernel is this against? This shouldn't be an issue >> in anything newer than 5.3-stable. > > Sources are 5.4.0-rc7. > So not entirely 'the latest'. > I didn't update late in the 5.5 cycle and won't until > we get to rc4 (or so). Ah ok, I think that's why. 5.4-stable will have a fix, 5.4.0 probably not. 5.5-rc and forward should be fine. -- Jens Axboe