* [PATCH] x86/traps: Fix typo in do_entry_CP()
@ 2021-09-28 21:00 Andrew Cooper
2021-09-29 8:07 ` Jan Beulich
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2021-09-28 21:00 UTC (permalink / raw)
To: Xen-devel
Cc: Andrew Cooper, Jan Beulich, Roger Pau Monné,
Wei Liu, Bobby Eshleman
The call to debugger_trap_entry() should pass the correct vector. The
break-for-gdbsx logic is in practice unreachable because PV guests can't
generate #CP, but it will interfere with anyone inserting custom debugging
into debugger_trap_entry().
Fixes: 5ad05b9c2490 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
CC: Bobby Eshleman <bobby.eshleman@gmail.com>
---
xen/arch/x86/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index c2e2603c394b..63676b0a68ff 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -2047,7 +2047,7 @@ void do_entry_CP(struct cpu_user_regs *regs)
const char *err = "??";
unsigned int ec = regs->error_code;
- if ( debugger_trap_entry(TRAP_debug, regs) )
+ if ( debugger_trap_entry(X86_EXC_CP, regs) )
return;
/* Decode ec if possible */
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/traps: Fix typo in do_entry_CP()
2021-09-28 21:00 [PATCH] x86/traps: Fix typo in do_entry_CP() Andrew Cooper
@ 2021-09-29 8:07 ` Jan Beulich
2021-11-03 12:56 ` Andrew Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2021-09-29 8:07 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Roger Pau Monné, Wei Liu, Bobby Eshleman, Xen-devel
On 28.09.2021 23:00, Andrew Cooper wrote:
> The call to debugger_trap_entry() should pass the correct vector. The
> break-for-gdbsx logic is in practice unreachable because PV guests can't
> generate #CP, but it will interfere with anyone inserting custom debugging
> into debugger_trap_entry().
>
> Fixes: 5ad05b9c2490 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/traps: Fix typo in do_entry_CP()
2021-09-29 8:07 ` Jan Beulich
@ 2021-11-03 12:56 ` Andrew Cooper
2021-11-03 16:02 ` Ian Jackson
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2021-11-03 12:56 UTC (permalink / raw)
To: Jan Beulich, Ian Jackson
Cc: Roger Pau Monné, Wei Liu, Bobby Eshleman, Xen-devel
On 29/09/2021 09:07, Jan Beulich wrote:
> On 28.09.2021 23:00, Andrew Cooper wrote:
>> The call to debugger_trap_entry() should pass the correct vector. The
>> break-for-gdbsx logic is in practice unreachable because PV guests can't
>> generate #CP, but it will interfere with anyone inserting custom debugging
>> into debugger_trap_entry().
>>
>> Fixes: 5ad05b9c2490 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks")
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>
It turns out that I forgot to commit this patch, and it now needs a
Release Ack to go in.
It is very safe and obvious. It is passing the wrong constant into a
debug function.
Luckily the impact is benign due to other properties of the logic, and
would only cause problems for people adding manual debug logic.
~Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/traps: Fix typo in do_entry_CP()
2021-11-03 12:56 ` Andrew Cooper
@ 2021-11-03 16:02 ` Ian Jackson
0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2021-11-03 16:02 UTC (permalink / raw)
To: Andrew Cooper
Cc: Jan Beulich, Ian Jackson, Roger Pau Monné,
Wei Liu, Bobby Eshleman, Xen-devel
Andrew Cooper writes ("Re: [PATCH] x86/traps: Fix typo in do_entry_CP()"):
> It turns out that I forgot to commit this patch, and it now needs a
> Release Ack to go in.
>
> It is very safe and obvious. It is passing the wrong constant into a
> debug function.
>
> Luckily the impact is benign due to other properties of the logic, and
> would only cause problems for people adding manual debug logic.
Thanks,
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-03 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 21:00 [PATCH] x86/traps: Fix typo in do_entry_CP() Andrew Cooper
2021-09-29 8:07 ` Jan Beulich
2021-11-03 12:56 ` Andrew Cooper
2021-11-03 16:02 ` Ian Jackson
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.