]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
arm64: fix db_read_bytes() for size == 8
authorMitchell Horne <mhorne@FreeBSD.org>
Wed, 17 Jan 2024 16:45:41 +0000 (12:45 -0400)
committerMitchell Horne <mhorne@FreeBSD.org>
Thu, 18 Jan 2024 17:00:07 +0000 (13:00 -0400)
commit2e297cbb4fc057e1872114ef8a37a41a6669dd5b
treeed9c67466d41555f76e5f7435a358a82261a4c56
parent13ccb04589e2c5c840e19b407a59e44cb70ac28e
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