All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/i386: fix shadowed variable pasto
@ 2023-10-11 13:53 Paolo Bonzini
  2023-10-11 14:03 ` Philippe Mathieu-Daudé
  2023-10-11 14:57 ` Markus Armbruster
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2023-10-11 13:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru

Commit a908985971a ("target/i386/seg_helper: introduce tss_set_busy",
2023-09-26) failed to use the tss_selector argument of the new function,
which was therefore unused.

This shows up as a #GP fault when booting old versions of 32-bit
Linux.

Fixes: a908985971a ("target/i386/seg_helper: introduce tss_set_busy", 2023-09-26)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/seg_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c
index 2b92aee2073..eb29a1fd4e7 100644
--- a/target/i386/tcg/seg_helper.c
+++ b/target/i386/tcg/seg_helper.c
@@ -229,7 +229,7 @@ static void tss_load_seg(CPUX86State *env, X86Seg seg_reg, int selector,
 static void tss_set_busy(CPUX86State *env, int tss_selector, bool value,
                          uintptr_t retaddr)
 {
-    target_ulong ptr = env->gdt.base + (env->tr.selector & ~7);
+    target_ulong ptr = env->gdt.base + (tss_selector & ~7);
     uint32_t e2 = cpu_ldl_kernel_ra(env, ptr + 4, retaddr);
 
     if (value) {
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] target/i386: fix shadowed variable pasto
  2023-10-11 13:53 [PATCH] target/i386: fix shadowed variable pasto Paolo Bonzini
@ 2023-10-11 14:03 ` Philippe Mathieu-Daudé
  2023-10-11 14:57 ` Markus Armbruster
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-11 14:03 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: armbru

On 11/10/23 15:53, Paolo Bonzini wrote:
> Commit a908985971a ("target/i386/seg_helper: introduce tss_set_busy",
> 2023-09-26) failed to use the tss_selector argument of the new function,
> which was therefore unused.
> 
> This shows up as a #GP fault when booting old versions of 32-bit
> Linux.
> 
> Fixes: a908985971a ("target/i386/seg_helper: introduce tss_set_busy", 2023-09-26)
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   target/i386/tcg/seg_helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] target/i386: fix shadowed variable pasto
  2023-10-11 13:53 [PATCH] target/i386: fix shadowed variable pasto Paolo Bonzini
  2023-10-11 14:03 ` Philippe Mathieu-Daudé
@ 2023-10-11 14:57 ` Markus Armbruster
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2023-10-11 14:57 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

Paolo Bonzini <pbonzini@redhat.com> writes:

> Commit a908985971a ("target/i386/seg_helper: introduce tss_set_busy",
> 2023-09-26) failed to use the tss_selector argument of the new function,
> which was therefore unused.
>
> This shows up as a #GP fault when booting old versions of 32-bit
> Linux.
>
> Fixes: a908985971a ("target/i386/seg_helper: introduce tss_set_busy", 2023-09-26)
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Queued.  Thanks!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-11 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 13:53 [PATCH] target/i386: fix shadowed variable pasto Paolo Bonzini
2023-10-11 14:03 ` Philippe Mathieu-Daudé
2023-10-11 14:57 ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.