NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/47128: 32-bit kdump/ktruss fail on 64-bit kernel
>Number: 47128
>Category: bin
>Synopsis: 32-bit kdump/ktruss fail on 64-bit kernel
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 26 09:10:00 +0000 2012
>Originator: Alan Barrett
>Release: NetBSD 6.99.14
>Organization:
Not much
>Description:
struct ktr_header includes some fields whose size changes
between 64-bit and 32-bit machines.
If you run an i386 version of ktruss under an amd64 kernel, or
if you ask an i386 version of kdump to parse a dump file that
was created under an amd64 kernel, then it doesn't work.
>How-To-Repeat:
See Description.
>Fix:
struct ktr_header is used for data on disk, so it really should
be machine independent; a new version of the struct is needed
for this. However, the old version should still be supported.
1) Add several compat versions of struct ktr_header to match all
possible combinations of sizeof short/int/long in the existing
truct ktr_header on all existing NetSBD machines. For example,
change "short ktr_type" to "int16_t ktr_type", change "long
tv_usec" to "int32_t tv_usec" in one version of the compat
struct, and change it to "int64_t tv_usec" in another verison of
the compat struct.
2) Teach ktruss and kdump to analyse the input data to figure
out the format, and to handle all known formats.
3) Add a completely new version of struct ktr_header that
uses fixed width types throughout (with the same types on all
machines). (TBD: big-endian or native machine endian?)
Add support for it to the kernel, ktruss, and kdump.
>Unformatted:
NetBSD-6.99.14/i386 kdump and ktruss
NetBSD-6.99.14/amd64 kernel
Home |
Main Index |
Thread Index |
Old Index