gdb: register access corrupts rbx and x87 state

Đang mở
#1,971 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
operating-systems

Hướng nghiên cứu

Start with src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs, especially the read_registers and write_registers locations linked in the issue. Trace how GDB register slots map to the x86_64 register state, including the FPU state. The fix is complete when reading and writing registers preserves the correct rbx and x87 values and reports the x87 and segment registers.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

C-bug S-confirmed
  • read_registers puts rbp in GDB slot 1, which is rbx (x86_64_target.rs#L202). gdb shows the wrong rbx. Any register write sends that value back, so set $rax = 1 also sets rbx to rbp.
  • write_registers builds CommonFpu with ..Default::default() (x86_64_target.rs#L272). Any register write resets ST0-7, FSW and FTW. read_registers also never reports x87 or segment registers.
Ngôn ngữ chính
Rust
Star
4.8k
Fork
222
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
60

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của hyperlight-dev/hyperlight

Tất cả issue của hyperlight-dev/hyperlight

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.