Date: Mon, 20 Dec 2021 14:02:18 GMT From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b2db0024aef9 - stable/13 - Fix bracketing in the arm64 minidump code Message-ID: <202112201402.1BKE2IYE042868@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b2db0024aef90e7e264a7aac599b49cb1292ece3 commit b2db0024aef90e7e264a7aac599b49cb1292ece3 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2021-11-23 18:28:28 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2021-12-20 11:09:27 +0000 Fix bracketing in the arm64 minidump code When building with gcc10 it suggests the parentheses are wrong. Set them to be the calculated physical address or'd with page table attributes. Reviewed by: mhorne, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33099 (cherry picked from commit 3ff041945054e692672f506a2448d1200133032d) --- sys/arm64/arm64/minidump_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c index 8383d69fc5f8..ac5a7b271b85 100644 --- a/sys/arm64/arm64/minidump_machdep.c +++ b/sys/arm64/arm64/minidump_machdep.c @@ -303,8 +303,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) for (i = 0; i < Ln_ENTRIES; i++) { for (j = 0; j < Ln_ENTRIES; j++) { - tmpbuffer[j] = pa + i * L2_SIZE + - j * PAGE_SIZE | ATTR_DEFAULT | + tmpbuffer[j] = (pa + i * L2_SIZE + + j * PAGE_SIZE) | ATTR_DEFAULT | L3_PAGE; } error = blk_write(di, (char *)&tmpbuffer, 0, @@ -323,7 +323,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) /* Generate fake l3 entries based upon the l1 entry */ for (i = 0; i < Ln_ENTRIES; i++) { - tmpbuffer[i] = pa + (i * PAGE_SIZE) | + tmpbuffer[i] = (pa + i * PAGE_SIZE) | ATTR_DEFAULT | L3_PAGE; } error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112201402.1BKE2IYE042868>