[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 8/8] virtio-mem: kdump mode to sanitize /proc/vmcore access
- To: linux-kernel@xxxxxxxxxxxxxxx
- From: David Hildenbrand <david@xxxxxxxxxx>
- Date: Wed, 29 Sep 2021 10:38:01 +0200
- Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@xxxxxxxxxx
- Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Dave Young <dyoung@xxxxxxxxxx>, Baoquan He <bhe@xxxxxxxxxx>, Vivek Goyal <vgoyal@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>, x86@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- Delivery-date: Wed, 29 Sep 2021 08:38:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.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
|