* [PATCH] x86/hvm: Correct error message in check_segment()
@ 2020-10-02 11:30 Andrew Cooper
2020-10-02 12:09 ` Jan Beulich
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2020-10-02 11:30 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich, Roger Pau Monné, Wei Liu
The error message is wrong (given AMD's older interpretation of what a NUL
segment should contain, attribute wise), and actively unhelpful because you
only get it in response to a hypercall where the one piece of information you
cannot provide is the segment selector.
Fix the message to talk about segment attributes, rather than the selector.
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>
---
xen/arch/x86/hvm/domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/domain.c b/xen/arch/x86/hvm/domain.c
index 8e3375265c..ffe952c2df 100644
--- a/xen/arch/x86/hvm/domain.c
+++ b/xen/arch/x86/hvm/domain.c
@@ -39,7 +39,7 @@ static int check_segment(struct segment_register *reg, enum x86_segment seg)
{
if ( seg != x86_seg_ds && seg != x86_seg_es )
{
- gprintk(XENLOG_ERR, "Null selector provided for CS, SS or TR\n");
+ gprintk(XENLOG_ERR, "Empty segment attributes for CS, SS or TR\n");
return -EINVAL;
}
return 0;
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/hvm: Correct error message in check_segment()
2020-10-02 11:30 [PATCH] x86/hvm: Correct error message in check_segment() Andrew Cooper
@ 2020-10-02 12:09 ` Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2020-10-02 12:09 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Xen-devel, Roger Pau Monné, Wei Liu
On 02.10.2020 13:30, Andrew Cooper wrote:
> The error message is wrong (given AMD's older interpretation of what a NUL
> segment should contain, attribute wise), and actively unhelpful because you
> only get it in response to a hypercall where the one piece of information you
> cannot provide is the segment selector.
>
> Fix the message to talk about segment attributes, rather than the selector.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
albeit ...
> --- a/xen/arch/x86/hvm/domain.c
> +++ b/xen/arch/x86/hvm/domain.c
> @@ -39,7 +39,7 @@ static int check_segment(struct segment_register *reg, enum x86_segment seg)
> {
> if ( seg != x86_seg_ds && seg != x86_seg_es )
> {
> - gprintk(XENLOG_ERR, "Null selector provided for CS, SS or TR\n");
> + gprintk(XENLOG_ERR, "Empty segment attributes for CS, SS or TR\n");
... may I suggest "Null" or "Zero" instead of "Empty"?
Jan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-02 12:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 11:30 [PATCH] x86/hvm: Correct error message in check_segment() Andrew Cooper
2020-10-02 12:09 ` Jan Beulich
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.