Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3016919pxb; Mon, 4 Apr 2022 05:54:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLfavbSs9rH9rFjPwfdN3TTombWwjpNL2XOHGLyUUbmfNi9RXP1XNNjDfIKDdPpCsTrJX/ X-Received: by 2002:a17:906:7948:b0:6da:64ed:178e with SMTP id l8-20020a170906794800b006da64ed178emr11263759ejo.523.1649076895147; Mon, 04 Apr 2022 05:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649076895; cv=none; d=google.com; s=arc-20160816; b=sE8N3Jie8xfcJPLXC0KDJUePQcayEDAvP4iyvenfymMSLUWLP4E1KsVC29gBQMHAaB RrywdtgSznIg1ZiftYabvg7it1n+0kmNoKb2GvNwESD7MvEmWLh/FHv3KnDZPCHaZ9Pd tqcbgkKElg4xxKEGT/vBsv2D3A557NzQEY5CJlaZMZfQPZlL8CPBDYEQlP9cFMTgZO2R f9flKQ5REuOyQItXPzRSINMe+tSiNMjx7FGSzrIczJ8OmUvoqrzqtYAVbZyFTJ/JttBk gRgWsbSkmJlp733VipGEcfIzFqFu1NR5Ede4Nh+KMrS+OTZqfht2RodAkr58LRY3pywa Wb/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ix78aZP47urDv3iTeA0Q3nb+WHDclJx1qZep72eGdxo=; b=04R8VSqWOSJ1heeTod+mdolX2LwvQOw1nEL/lty+I8H4IWt4C60bPvlxWxtcrEXBSp jHAm+M+G6O9SzYfYElhyzMGgXBl+0mETRxhBZMA+xKoVRnk7nFPon6wQpir7Hdm5OOf1 DitKkRClEXuS6bXnZKevUPlSuQ7QTVtktxuupPSy7wLc/oKuZBzlWKsfLn6N1dnQsbOw HgKACyi2c+MhBsSjpcewGkerNUCamL0MgiGsoIsNsrCZBu2Gu32Ko3R78mK583IqEM+I Ls+70A5rtDFXYFLu4PoKfkw5T6S1xO+MRjMwJSRQxjjC0363dxjoBTUBhF3lCl1tD+wG WdfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WlUYtqhW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a509dc7000000b00418c2b5be6asi6063430edk.332.2022.04.04.05.54.30; Mon, 04 Apr 2022 05:54:55 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WlUYtqhW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236404AbiDBEcQ (ORCPT + 99 others); Sat, 2 Apr 2022 00:32:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbiDBEcO (ORCPT ); Sat, 2 Apr 2022 00:32:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C759C15A1C for ; Fri, 1 Apr 2022 21:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648873822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ix78aZP47urDv3iTeA0Q3nb+WHDclJx1qZep72eGdxo=; b=WlUYtqhWOnAoGEU6D3Lnh13h7cta5yIgh0M1OY2395ODE9R6k8tUKseNHpMFTS8U9ndWga iovAuXgTa6a/sOUt5jCaPusqIVl5iT/6DaKRgyZP3FQ/2MprlcYv0+Kiqq274UJqjSm8TB d5TzsaVihfSc+HTc5zIagCJ+uc36sg0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-155-knxkZDP4NmqHVN4w2etF7w-1; Sat, 02 Apr 2022 00:30:18 -0400 X-MC-Unique: knxkZDP4NmqHVN4w2etF7w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E2CA08001EA; Sat, 2 Apr 2022 04:30:17 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-21.pek2.redhat.com [10.72.12.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id C60E740FF416; Sat, 2 Apr 2022 04:30:12 +0000 (UTC) From: Baoquan He To: akpm@linux-foundation.org, willy@infradead.org Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, yangtiezhu@loongson.cn, amit.kachhap@arm.com, hch@lst.de, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, bhe@redhat.com Subject: [PATCH v5 0/3] Convert vmcore to use an iov_iter Date: Sat, 2 Apr 2022 12:30:05 +0800 Message-Id: <20220402043008.458679-1-bhe@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Copy the description of v3 cover letter from Willy: === 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. V4: [PATCH v4 0/3] Convert vmcore to use an iov_iter https://lore.kernel.org/all/20220318093706.161534-1-bhe@redhat.com/T/#u v3: [PATCH v3 0/3] Convert vmcore to use an iov_iter https://lore.kernel.org/all/20211213143927.3069508-1-willy@infradead.org/T/#u Changelog: === v5: - Rebased on Linus's latest master branch. - Merge the patch 4 of v4 into patch 2. v4: - Append one patch to replace the open code with iov_iter_count(). This is suggested by Al. - Fix a indentation error by replacing space with tab in arch/sh/kernel/crash_dump.c of patch 1 reported by checkpatch. The rest of patch 1~3 are untouched. - Add Christopy's Reviewed-by and my Acked-by for patch 1~3. v3: - Send the correct patches this time v2: - Removed unnecessary kernel-doc - Included uio.h to fix compilation problems - Made read_from_oldmem_iter static to avoid compile warnings during the conversion - Use iov_iter_truncate() (Christoph) Matthew Wilcox (Oracle) (3): vmcore: Convert copy_oldmem_page() to take an iov_iter vmcore: Convert __read_vmcore to use an iov_iter vmcore: Convert read_from_oldmem() to take an iov_iter arch/arm/kernel/crash_dump.c | 27 +------ arch/arm64/kernel/crash_dump.c | 29 +------ arch/ia64/kernel/crash_dump.c | 32 +------- arch/mips/kernel/crash_dump.c | 27 +------ arch/powerpc/kernel/crash_dump.c | 35 ++------- arch/riscv/kernel/crash_dump.c | 26 +------ arch/s390/kernel/crash_dump.c | 13 ++-- arch/sh/kernel/crash_dump.c | 29 ++----- arch/x86/kernel/crash_dump_32.c | 29 +------ arch/x86/kernel/crash_dump_64.c | 48 ++++-------- fs/proc/vmcore.c | 130 +++++++++++++------------------ include/linux/crash_dump.h | 19 ++--- 12 files changed, 123 insertions(+), 321 deletions(-) -- 2.34.1