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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0717DC433FE for ; Sat, 1 Jan 2022 00:36:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230523AbiAAAgj (ORCPT ); Fri, 31 Dec 2021 19:36:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiAAAgh (ORCPT ); Fri, 31 Dec 2021 19:36:37 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2251CC061574; Fri, 31 Dec 2021 16:36:37 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n3SNm-00GKiS-4A; Sat, 01 Jan 2022 00:36:26 +0000 Date: Sat, 1 Jan 2022 00:36:26 +0000 From: Al Viro To: "Matthew Wilcox (Oracle)" Cc: Baoquan He , Vivek Goyal , Dave Young , kexec@lists.infradead.org, Tiezhu Yang , linux-kernel@vger.kernel.org, Amit Daniel Kachhap , Christoph Hellwig , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 0/3] Convert vmcore to use an iov_iter Message-ID: References: <20211213143927.3069508-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211213143927.3069508-1-willy@infradead.org> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 13, 2021 at 02:39:24PM +0000, Matthew Wilcox (Oracle) wrote: > For some reason several people have been sending bad patches to fix > compiler warnings in vmcore recently. Here's how it should be done. > Compile-tested only on x86. As noted in the first patch, s390 should > take this conversion a bit further, but I'm not inclined to do that > work myself. A couple of notes: please, use iov_iter_count(i) instead of open-coding i->count. And there's a preexisting nastiness in read_vmcore() - generally, a fault halfway through the read() is treated as a short read, rather than -EFAULT...