Summary: | arm64 ddb: x/hx truncates value to 32bit | ||
---|---|---|---|
Product: | Base System | Reporter: | dfr |
Component: | kern | Assignee: | Mitchell Horne <mhorne> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | mhorne |
Priority: | --- | ||
Version: | 14.0-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
dfr
2024-01-17 16:13:42 UTC
I managed to find the issue fairly quickly. Thanks for the report. https://reviews.freebsd.org/D43479 A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2e297cbb4fc057e1872114ef8a37a41a6669dd5b commit 2e297cbb4fc057e1872114ef8a37a41a6669dd5b Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-01-17 16:45:41 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-01-18 17:00:07 +0000 arm64: fix db_read_bytes() for size == 8 There is a mistake in the cast, resulting in a truncated read to tmp64. Switch from int to uint64_t, and adjust the other casts for clarity. Add a comment explaining why we do this at all. Reported by: dfr Reviewed by: dfr, mmel, emaste, jhb (all a previous version) PR: 276406 MFC after: 3 days Fixes: a67687fcd8f5 ("Use native-sized accesses when accessing memory from kdb") sys/arm64/arm64/db_interface.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2e1a54f71a399fc4645c4b8bed044705629143 commit 9c2e1a54f71a399fc4645c4b8bed044705629143 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-01-17 16:45:41 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-01-18 17:20:42 +0000 arm64: fix db_read_bytes() for size == 8 There is a mistake in the cast, resulting in a truncated read to tmp64. Switch from int to uint64_t, and adjust the other casts for clarity. Add a comment explaining why we do this at all. Reported by: dfr Reviewed by: dfr, mmel, emaste, jhb (all a previous version) PR: 276406 MFC after: 3 days Fixes: a67687fcd8f5 ("Use native-sized accesses when accessing memory from kdb") Differential Revision: https://reviews.freebsd.org/D43479 sys/arm64/arm64/db_interface.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c738eac52e05204e443841cf1ae6cce32c6a7525 commit c738eac52e05204e443841cf1ae6cce32c6a7525 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-01-17 16:45:41 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-01-22 18:04:26 +0000 arm64: fix db_read_bytes() for size == 8 There is a mistake in the cast, resulting in a truncated read to tmp64. Switch from int to uint64_t, and adjust the other casts for clarity. Add a comment explaining why we do this at all. Reported by: dfr Reviewed by: dfr, mmel, emaste, jhb (all a previous version) PR: 276406 Fixes: a67687fcd8f5 ("Use native-sized accesses when accessing memory from kdb") Differential Revision: https://reviews.freebsd.org/D43479 (cherry picked from commit 9c2e1a54f71a399fc4645c4b8bed044705629143) sys/arm64/arm64/db_interface.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4057fb12a1d7147b85062ad9f3916138c3956cf3 commit 4057fb12a1d7147b85062ad9f3916138c3956cf3 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-01-17 16:45:41 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-01-22 18:05:27 +0000 arm64: fix db_read_bytes() for size == 8 There is a mistake in the cast, resulting in a truncated read to tmp64. Switch from int to uint64_t, and adjust the other casts for clarity. Add a comment explaining why we do this at all. Reported by: dfr Reviewed by: dfr, mmel, emaste, jhb (all a previous version) PR: 276406 Fixes: a67687fcd8f5 ("Use native-sized accesses when accessing memory from kdb") Differential Revision: https://reviews.freebsd.org/D43479 (cherry picked from commit 9c2e1a54f71a399fc4645c4b8bed044705629143) sys/arm64/arm64/db_interface.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) |