]> xenbits.xensource.com Git - people/royger/xen.git/commit
tools/kdd: don't use a pointer to an unaligned field.
authorTim Deegan <tim@xen.org>
Fri, 10 Mar 2017 10:10:57 +0000 (10:10 +0000)
committerWei Liu <wei.liu2@citrix.com>
Wed, 15 Mar 2017 10:57:00 +0000 (10:57 +0000)
commitbfd9a2095f1882e8c074b2d911bcb07d12cf6cf5
treea41a4747328d73316fb1c6569795bbcf14c51ebc
parent327f54ed7f8cc87a797ce120cd54dc688f5782ce
tools/kdd: don't use a pointer to an unaligned field.

The 'val' field in the packet is byte-aligned (because it is part of a
packed struct), but the pointer argument to kdd_rdmsr() has the normal
alignment constraints for a uint64_t *.  Use a local variable to make sure
the passed pointer has the correct alignment.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com>
tools/debugger/kdd/kdd.c