From nobody Mon Dec 20 14:02:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6B60F18FCA7C; Mon, 20 Dec 2021 14:02:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JHh9R3znJz3G97; Mon, 20 Dec 2021 14:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6ED12173DE; Mon, 20 Dec 2021 14:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BKE2IpA042869; Mon, 20 Dec 2021 14:02:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BKE2IYE042868; Mon, 20 Dec 2021 14:02:18 GMT (envelope-from git) Date: Mon, 20 Dec 2021 14:02:18 GMT Message-Id: <202112201402.1BKE2IYE042868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: b2db0024aef9 - stable/13 - Fix bracketing in the arm64 minidump code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b2db0024aef90e7e264a7aac599b49cb1292ece3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640008939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgLYN3Vde70fFYTmf+6PeRSHjx9Nfc570npO0qxl3F0=; b=OM4RnrbnIVQXHxKhz4/W47IBwy8xrKcnpuRVgWua5klL2HI2/00Qrn6Hg1vXAz2/lLKNlU 6U50S0Cx0aJwsq2KEA64+iN0ulcf/pOQ6eaAkPnMCVvDqOkK/RYi+u7e92M5/lcr7xU5qa Xvtr4J5W+R5fMVbZGrHEBe1RIYHlOWSt++NhYmDKiu91YXYdQHSTk1eRADGiCSp3KTvsYu sIENIKTl5A75YftQzBMERlhY1viU9GktM6R/ARYYdDyNuSZznXKHKwIH/f8VBXnf5S89GE a8Y7FuWD+cuNdkHWfQOtnJMFtpubFku/a/BILYgrIoFULnpySkKdwOaiJ0Q0NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640008939; a=rsa-sha256; cv=none; b=g8QJlFUM8uSC/UoKsjigQh2FgiKOumcY2v5hzMv912u3D4lZrQoHnHoVFXG7Tom95pXzaj xsvc7WDForLSynwZw1ZFcn0bJc63zp7BxO0rHY9kHm2u9jmtGgbjVc7NY70A2PZJHveE6t r0wAcJeiKaYbgxp3z9wvZEnuGtJR2MCZvC5m5FN2hLUsC0GkzZnzsCNg2u3rmH+rL0pNVQ nFnf/rR4FK0Lt1cEPb1ZGxvgXPrv8POB8h8LaLiP76yW3nspUqrKdqsPekLkHZ53yRe78s JTaz0F9t+tsu1shcvuMoMUyxFdJGlEzJ91jl4+iWHY737bMLDuWUcJiBMoQM8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b2db0024aef90e7e264a7aac599b49cb1292ece3 commit b2db0024aef90e7e264a7aac599b49cb1292ece3 Author: Andrew Turner AuthorDate: 2021-11-23 18:28:28 +0000 Commit: Andrew Turner 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);