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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41AB2C636CD for ; Sat, 4 Feb 2023 04:12:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 84BF76B0072; Fri, 3 Feb 2023 23:12:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7FB596B0073; Fri, 3 Feb 2023 23:12:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 69C6D6B0074; Fri, 3 Feb 2023 23:12:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 568A46B0072 for ; Fri, 3 Feb 2023 23:12:20 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id DF517403BA for ; Sat, 4 Feb 2023 04:12:19 +0000 (UTC) X-FDA: 80428287198.19.14E2E0E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id BC0D280003 for ; Sat, 4 Feb 2023 04:12:17 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="jG/0DJVp"; spf=pass (imf30.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675483938; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZCd6IH1kuSRhazY3lirDDEsbjEKOXtX6NtTmDCDsrd8=; b=nyEYyeKe++RWgRKUx0OXVSoNNTjKoWjR4mZQn2mLUCLwsjK1Yj6QJhFIsbae/0OfETCevk WVotNwz3vvK+f5HSK1w3q5j0YMgohFNu9VweuLwZO+UttR1w6lMzOQyBjxtsSTwfNKlfE4 MyfjJ4IRcxFPd4A0myM/tIX3nMTyKRE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="jG/0DJVp"; spf=pass (imf30.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675483938; a=rsa-sha256; cv=none; b=ltYhixLFzHZrEzZUS2r2oIlNqFwo93EFxa/H55ayoRGkIu+/DLrtv5VtAHbKLTvF8x2AE0 t6D18uxV4DT47G3FfFK1I7HxLJ4nB8oA4hxQ9J8N4w25eyhXWSmM7PYyUWMrEGE/2FLxXs 3n2U99pPilv/cRsP9bkRBTllt665x1g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675483936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZCd6IH1kuSRhazY3lirDDEsbjEKOXtX6NtTmDCDsrd8=; b=jG/0DJVpf4/GAXcSh1YpH4j+VTOm8QpUpYc3b8rSJP/9HMveKkH2PrSFEnD4ge8+hb9rX6 JUEqmYLdbNjBy7/4Lw7QHzMa+2gARrK9hS1+I4lTGJ0441u9jA57Qxvj5tp/nqrIjGB3P0 1T35dHax8SgmZAOEmjc+2d8fURCY9bg= 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-196-BdN2xQFkMbO6m7WXdcsDHA-1; Fri, 03 Feb 2023 23:12:13 -0500 X-MC-Unique: BdN2xQFkMbO6m7WXdcsDHA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BAEF9802314; Sat, 4 Feb 2023 04:12:12 +0000 (UTC) Received: from localhost (ovpn-12-127.pek2.redhat.com [10.72.12.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E2D70112132C; Sat, 4 Feb 2023 04:12:11 +0000 (UTC) Date: Sat, 4 Feb 2023 12:12:08 +0800 From: Baoquan He To: Stephen Brennan , akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, urezki@gmail.com, lstoakes@gmail.com, willy@infradead.org, hch@infradead.org, error27@gmail.com Subject: Re: [PATCH v4 0/7] mm/vmalloc.c: allow vread() to read out vm_map_ram areas Message-ID: References: <20230201091339.61761-1-bhe@redhat.com> <87357o7yeh.fsf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87357o7yeh.fsf@oracle.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: BC0D280003 X-Stat-Signature: oejqp8rzzf3phakdrj19y3rmfwsdabth X-HE-Tag: 1675483937-287381 X-HE-Meta: U2FsdGVkX1881oSqSmCu9b1VyJF5t6VNU2CRDQp+frsTnJNv7oWHUirq3bqNyBhTwOKrSmoBTWXljHVYpnTUtbyJFZ+qrvjzV2lBWlUyUo2gikRdLEYANbPLNeDw20lGDd31HyTRhg4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qmP3AY8sHYtswuSiX4xU8eiQdQzUPaqlP4+mz01hCHH33adyCBMeubrcv2qm6MuWXVkjO76CLTTjYCAPW23D X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 02/02/23 at 09:47am, Stephen Brennan wrote: ......snip... > > Testing > > *** > > Only did the basic testing on kvm guest, and run below commands to > > access kcore file to do statistics: > > > > makedumpfile --mem-usage /proc/kcore > > Hi Baoquan, > > Sorry I haven't commented with testing info or review on each revision: > I'm not really familiar with the details necessary for review. However, > it looks like this is getting close to ready, so I did another test: That's OK, and your testing is very helpful because I don't know how to create vm_map_ram() area to test the patches, just did basic testing. > > [opc@stepbren-ol8-1 drgn_vmalloc_test]$ sudo insmod drgn_vmalloc_test.ko > [opc@stepbren-ol8-1 drgn_vmalloc_test]$ sudo dmesg | tail -n 5 > [ 20.763310] missing module BTF, cannot register kfuncs > [ 20.840200] missing module BTF, cannot register kfuncs > [ 91.475814] drgn_vmalloc_test: loading out-of-tree module taints kernel. > [ 91.479913] drgn_vmalloc_test: module verification failed: signature and/or required key missing - tainting kernel > [ 91.484926] drgn_vmalloc_test: 0xffffa51ac2d00000 > [opc@stepbren-ol8-1 drgn_vmalloc_test]$ sudo drgn > drgn 0.0.22 (using Python 3.6.8, elfutils 0.186, with libkdumpfile) > For help, type help(drgn). > >>> import drgn > >>> from drgn import NULL, Object, cast, container_of, execscript, offsetof, reinterpret, sizeof > >>> from drgn.helpers.common import * > >>> from drgn.helpers.linux import * > warning: could not get debugging information for: > drgn_vmalloc_test (could not find module in depmod) > >>> prog.read(0xffffa51ac2d00000, 64) > b'\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\t\x00\x00\x00\n\x00\x00\x00\x0b\x00\x00\x00\x0c\x00\x00\x00\r\x00\x00\x00\x0e\x00\x00\x00\x0f\x00\x00\x00' > >>> > > So this definitely still resolves the originally reported issue. Feel > free to add, if you want: > > Tested-by: Stephen Brennan I noticed Andrew had picked this v4 into his mm tree, maybe Andrew can help add this Tested-by tag.