Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp408770pxb; Wed, 29 Sep 2021 01:42:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJwS0AFVDwasoPSRFM0qf/9AeMW4TmT4b/GkmLLF6HKmQPTCGDkTj6UWO+5cvBcStSsH4U X-Received: by 2002:a17:907:7f16:: with SMTP id qf22mr1165797ejc.1.1632904922555; Wed, 29 Sep 2021 01:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632904922; cv=none; d=google.com; s=arc-20160816; b=swWigVyXvJ2mygkaJdaYoZ0foyWahpenNHm6GoJvg0FAsHM9lmV8qAsK9NMEPqXBL1 BJpLNsEp/ORbKd8L7kf+PkIJBH5qny5K2yTzqidYJCXfy4WV4KC82Ok61be38XKjjpma IRwbW8IYAp2YrPoHPs6BqgAZ9zOH5OqJygQ327Pq3xx3VfRla1iFORM/HOTQfu7YGAPC l5AlKLuj4CVGS60aDq0+2CPd6txQl6rAh+U/l9obA/1pV1ApcWubSrV/EeAWU2EGez31 qe5Kg2Ha1kZAyHjnKZfaB9ifFGKp7kkDRmEWTF/crmAUBlf44rbBx8t8T/xlr1gSHY/M tY6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=/rI4ipp+6p4YsURf5SVEvaXl3JhZmp49Hm7auACiD3c=; b=sm/zC3fu1M4H0pF5t0gOIU08WPujWoLyCljsZEbvJpBIynsGtEPY1OkFaUCwYJ5XW1 W0M6nfD7T7V+j3k16FHJUQER5wPx1Fi0tHQW+8chbL+scYBg8WRKaY4OdEWA0iAGOl4y ZtV6nlu4z9kSvfb1exJHDt9bFw5/WFiqvSn46lDi5epATAPxeaRozNTuQm6gkIP9P81j mVCmCHvJ6/RiydObGoL1PUnGXdKJOuScUcuHqbZw513RqPRVEY8K/rd2FVZSZ4VbpG9j hNnHVje+GUKJIs46beH0iyT5ysX7JlawyQFtPAi4vKtDQrnVck1dSqQRCbXM7bUqNpQN dFXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aGLrO075; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si3012009edc.20.2021.09.29.01.41.37; Wed, 29 Sep 2021 01:42:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aGLrO075; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S244789AbhI2Ijz (ORCPT + 99 others); Wed, 29 Sep 2021 04:39:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46340 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244459AbhI2Ijq (ORCPT ); Wed, 29 Sep 2021 04:39:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632904686; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/rI4ipp+6p4YsURf5SVEvaXl3JhZmp49Hm7auACiD3c=; b=aGLrO075h6l3SS3vaxgxVQnxc2Iiq769tmBx4DHpw4NwRJHV7cCacdPyCn60njuSE25/5L G4sP1Ih58rehmC0nGcr3ZAXQgsBluyZy8dp+YYGOZuyG3Ji0MeP511BweWTebKedGUY+8d z80i/pyvyx2H224CBudR2P9R0VUSyYI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-p3JR88A9PYq4v8KvcgyT5w-1; Wed, 29 Sep 2021 04:38:04 -0400 X-MC-Unique: p3JR88A9PYq4v8KvcgyT5w-1 Received: by mail-wm1-f69.google.com with SMTP id r66-20020a1c4445000000b0030cf0c97157so882620wma.1 for ; Wed, 29 Sep 2021 01:38:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/rI4ipp+6p4YsURf5SVEvaXl3JhZmp49Hm7auACiD3c=; b=oAqBzE/inRGs8MVx7DSXagoIPDwNrvOD3vkhi2Tx1jMeaXZg2Fp5Af/QzWq+Uc2/sl A/V/ny3uexCR1IFgI/PGlfD+p9A7UpW/6zoeZ7Bcg7X6vKMhbX1NlHla0Ep5QE02g5QA TOCS127xqJORCpjsShgGUDRKSZkaioXvETizwkTwnckn1Ed0HSUh0raqBgYyRiKQ5e+w a4czgyrYwaPkuGot+5Knu2mAKp46HpmCpGWA9VHxmJY1L3zcihyAus2b/NMuUCwSTwGv sNgxnWwKKjXStbX1JbPBeSL7chl166snHgFVANGrNCgdSIq6gaUaIm1UaXOgx6D/P/Av Zuyw== X-Gm-Message-State: AOAM530A3tOMp3/AtjOwguvpmbWLZR65RWpGgo4TJl6tYEZGnRPIBjRz isUj1MQ4GSKISZ58WIgLPnniW4Rto62RkZg2Ib26VxdHRjB471qUWJZMAsj0V42w5BLzJymsksQ sRtJHDs40W8b0lwbrcFw+CVJj X-Received: by 2002:a05:600c:3652:: with SMTP id y18mr8981999wmq.66.1632904683466; Wed, 29 Sep 2021 01:38:03 -0700 (PDT) X-Received: by 2002:a05:600c:3652:: with SMTP id y18mr8981980wmq.66.1632904683305; Wed, 29 Sep 2021 01:38:03 -0700 (PDT) Received: from [192.168.3.132] (p4ff23c3b.dip0.t-ipconnect.de. [79.242.60.59]) by smtp.gmail.com with ESMTPSA id f17sm1497220wrm.83.2021.09.29.01.38.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Sep 2021 01:38:02 -0700 (PDT) Subject: Re: [PATCH v1 8/8] virtio-mem: kdump mode to sanitize /proc/vmcore access To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , "Michael S. Tsirkin" , Jason Wang , Dave Young , Baoquan He , Vivek Goyal , Michal Hocko , Oscar Salvador , Mike Rapoport , "Rafael J. Wysocki" , x86@kernel.org, xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <20210928182258.12451-1-david@redhat.com> <20210928182258.12451-9-david@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Wed, 29 Sep 2021 10:38:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210928182258.12451-9-david@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [...] > + > +static bool virtio_mem_vmcore_pfn_is_ram(struct vmcore_cb *cb, > + unsigned long pfn) > +{ > + struct virtio_mem *vm = container_of(cb, struct virtio_mem, > + vmcore_cb); > + uint64_t addr = PFN_PHYS(pfn); > + bool is_ram; > + int rc; > + > + if (!virtio_mem_contains_range(vm, addr, addr + PAGE_SIZE)) Some more testing revealed that this has to be if (!virtio_mem_contains_range(vm, addr, PAGE_SIZE)) -- Thanks, David / dhildenb