qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/10] target/i386/tcg: Use DPL-level accesses for interrupts


From: Richard Henderson
Subject: Re: [PATCH 07/10] target/i386/tcg: Use DPL-level accesses for interrupts and call gates
Date: Wed, 10 Jul 2024 08:57:20 -0700
User-agent: Mozilla Thunderbird

On 7/9/24 23:29, Paolo Bonzini wrote:
This fixes a bug wherein i386/tcg assumed an interrupt return using
the CALL or JMP instructions were always going from kernel or user mode to
kernel mode, when using a call gate. This assumption is violated if
the call gate has a DPL that is greater than 0.

In addition, the stack accesses should count as explicit, not implicit
("kernel" in QEMU code), so that SMAP is not applied if DPL=3.

Analyzed-by: Robert R. Henry<rrh.henry@gmail.com>
Resolves:https://gitlab.com/qemu-project/qemu/-/issues/249
Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
---
  target/i386/tcg/seg_helper.c | 13 ++++++-------
  1 file changed, 6 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]