git: libnvmm(3): Fix RIP-relative addressing in store_to_gva()

Aaron LI aly at crater.dragonflybsd.org
Wed Feb 11 17:43:15 PST 2026


commit dfc90adc050b0778c5259c8b5ee5c82d2d32d292
Author: Aaron LI <aly at aaronly.me>
Date:   Tue Feb 10 17:46:58 2026 +0800

    libnvmm(3): Fix RIP-relative addressing in store_to_gva()
    
    RIP-relative addressing uses the start address of the *next* instruction
    as the base, rather than the *current* one.  Adjust RIP by the
    instruction length when computing the effective address.
    
    NOTE: This bug does not affect memory assists:
    - The MMIO exits handled by assist_mem_single() do not call
      store_to_gva().  In addition, assist_mem_single() does not compute
      RIP-relative addresses, as the effective GPA is already provided in
      'exit->u.mem.gpa'.
    - Other MMIO exits handled by assist_mem_double_movs() do call
      store_to_gva(), but only for RSI/RDI-based operands.
    
    Credit: Claude Sonnet 4.5 (https://claude.ai/)

Summary of changes:
 lib/libnvmm/libnvmm_x86.c | 5 +++++
 1 file changed, 5 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/dfc90adc050b0778c5259c8b5ee5c82d2d32d292


-- 
DragonFly BSD source repository


More information about the Commits mailing list