aboutsummaryrefslogtreecommitdiff
path: root/scripts/tracetool/backend/simple.py
diff options
context:
space:
mode:
authorRoy Hopkins <roy.hopkins@randomman.co.uk>2025-07-03 16:31:58 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2025-07-12 15:28:21 +0200
commitb0e8986668426dbd2bb3eee4c6e14fe6262ca34e (patch)
treed896dedff8464a6fead9545a79722e67fad57c08 /scripts/tracetool/backend/simple.py
parent224e807f90a008dac1e4ba52e1bebc93b00472dd (diff)
downloadqemu-b0e8986668426dbd2bb3eee4c6e14fe6262ca34e.zip
qemu-b0e8986668426dbd2bb3eee4c6e14fe6262ca34e.tar.gz
qemu-b0e8986668426dbd2bb3eee4c6e14fe6262ca34e.tar.bz2
target/i386: Allow setting of R_LDTR and R_TR with cpu_x86_load_seg_cache()
The x86 segment registers are identified by the X86Seg enumeration which includes LDTR and TR as well as the normal segment registers. The function 'cpu_x86_load_seg_cache()' uses the enum to determine which segment to set. However, specifying R_LDTR or R_TR results in an out-of-bounds access of the segment array. Possibly by coincidence, the function does correctly set LDTR or TR in this case as the structures for these registers immediately follow the array which is accessed out of bounds. This patch adds correct handling for R_LDTR and R_TR in the function. Signed-off-by: Roy Hopkins <roy.hopkins@randomman.co.uk> Acked-by: Gerd Hoffman <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Link: https://lore.kernel.org/r/95c69253ea4f91107625872d5e3f0c586376771d.1751554099.git.roy.hopkins@randomman.co.uk Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/tracetool/backend/simple.py')
0 files changed, 0 insertions, 0 deletions