git: 7beeacb27b27 - main - Honor the vm page's PG_NODUMP flag on arm and i386.

Alan Cox alc at FreeBSD.org
Mon Jan 4 22:16:59 UTC 2021


The branch main has been updated by alc:

URL: https://cgit.FreeBSD.org/src/commit/?id=7beeacb27b2792dfdab9c806c00d50b6ac9fc34b

commit 7beeacb27b2792dfdab9c806c00d50b6ac9fc34b
Author:     Alan Cox <alc at FreeBSD.org>
AuthorDate: 2021-01-04 21:59:05 +0000
Commit:     Alan Cox <alc at FreeBSD.org>
CommitDate: 2021-01-04 22:15:42 +0000

    Honor the vm page's PG_NODUMP flag on arm and i386.
    
    Reviewed by:    kib, markj
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D27949
---
 sys/arm/arm/minidump_machdep.c        | 3 +++
 sys/i386/i386/minidump_machdep_base.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/sys/arm/arm/minidump_machdep.c b/sys/arm/arm/minidump_machdep.c
index 92e15bec860b..c5f9cb58302e 100644
--- a/sys/arm/arm/minidump_machdep.c
+++ b/sys/arm/arm/minidump_machdep.c
@@ -68,8 +68,11 @@ static uint64_t counter, progress;
 static int
 is_dumpable(vm_paddr_t pa)
 {
+	vm_page_t m;
 	int i;
 
+	if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL)
+		return ((m->flags & PG_NODUMP) == 0);
 	for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) {
 		if (pa >= dump_avail[i] && pa < dump_avail[i + 1])
 			return (1);
diff --git a/sys/i386/i386/minidump_machdep_base.c b/sys/i386/i386/minidump_machdep_base.c
index 9e803c6fd813..e2b4234eba11 100644
--- a/sys/i386/i386/minidump_machdep_base.c
+++ b/sys/i386/i386/minidump_machdep_base.c
@@ -65,8 +65,11 @@ static uint64_t counter, progress;
 static int
 is_dumpable(vm_paddr_t pa)
 {
+	vm_page_t m;
 	int i;
 
+	if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL)
+		return ((m->flags & PG_NODUMP) == 0);
 	for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) {
 		if (pa >= dump_avail[i] && pa < dump_avail[i + 1])
 			return (1);


More information about the dev-commits-src-all mailing list