* [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules
@ 2016-09-30 10:01 Andrew Cooper
2016-09-30 10:01 ` [PATCH 2/2] x86/emulate: Resolve MISSING_BREAK issue in x86_decode() Andrew Cooper
2016-09-30 10:15 ` [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules Wei Liu
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cooper @ 2016-09-30 10:01 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Boris Ostrovsky, Ian Jackson, Wei Liu
Spotted by Coverity
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
tools/libxc/xc_dom_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index 5326d36..e177667 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -1119,6 +1119,7 @@ static int xc_dom_load_acpi(struct xc_dom_image *dom)
}
memcpy(ptr, dom->acpi_modules[i].data, dom->acpi_modules[i].length);
+ munmap(ptr, XC_PAGE_SIZE * num_pages);
free(extents);
i++;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] x86/emulate: Resolve MISSING_BREAK issue in x86_decode()
2016-09-30 10:01 [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules Andrew Cooper
@ 2016-09-30 10:01 ` Andrew Cooper
2016-09-30 10:06 ` Jan Beulich
2016-09-30 10:15 ` [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules Wei Liu
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2016-09-30 10:01 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich
Coverity doesn't appear to be able to spot that this is a terminal error path,
but leave a comment to "fix" MISSING_BREAK.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
This issue is newly exposed since splitting x86_decode() away from
x86_emulate(). I seem to recall that Coverity has an upper bound of
paths-per-function which it will tolerate (to avoid infinite loops), and the
split allows double the exploration space.
---
xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 78b23a0..32e8b69 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -1891,7 +1891,7 @@ x86_decode(
switch ( def_ad_bytes )
{
default:
- BUG();
+ BUG(); /* Shouldn't be possible. */
case 2:
if ( in_realmode(ctxt, ops) || (state->regs->eflags & EFLG_VM) )
break;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] x86/emulate: Resolve MISSING_BREAK issue in x86_decode()
2016-09-30 10:01 ` [PATCH 2/2] x86/emulate: Resolve MISSING_BREAK issue in x86_decode() Andrew Cooper
@ 2016-09-30 10:06 ` Jan Beulich
2016-09-30 11:20 ` Wei Liu
0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2016-09-30 10:06 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Xen-devel
>>> On 30.09.16 at 12:01, <andrew.cooper3@citrix.com> wrote:
> Coverity doesn't appear to be able to spot that this is a terminal error path,
> but leave a comment to "fix" MISSING_BREAK.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules
2016-09-30 10:01 [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules Andrew Cooper
2016-09-30 10:01 ` [PATCH 2/2] x86/emulate: Resolve MISSING_BREAK issue in x86_decode() Andrew Cooper
@ 2016-09-30 10:15 ` Wei Liu
1 sibling, 0 replies; 5+ messages in thread
From: Wei Liu @ 2016-09-30 10:15 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Wei Liu, Boris Ostrovsky, Ian Jackson, Xen-devel
On Fri, Sep 30, 2016 at 11:01:03AM +0100, Andrew Cooper wrote:
> Spotted by Coverity
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
> tools/libxc/xc_dom_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
> index 5326d36..e177667 100644
> --- a/tools/libxc/xc_dom_core.c
> +++ b/tools/libxc/xc_dom_core.c
> @@ -1119,6 +1119,7 @@ static int xc_dom_load_acpi(struct xc_dom_image *dom)
> }
>
> memcpy(ptr, dom->acpi_modules[i].data, dom->acpi_modules[i].length);
> + munmap(ptr, XC_PAGE_SIZE * num_pages);
>
> free(extents);
> i++;
> --
> 2.1.4
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] x86/emulate: Resolve MISSING_BREAK issue in x86_decode()
2016-09-30 10:06 ` Jan Beulich
@ 2016-09-30 11:20 ` Wei Liu
0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2016-09-30 11:20 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andrew Cooper, Wei Liu, Xen-devel
On Fri, Sep 30, 2016 at 04:06:57AM -0600, Jan Beulich wrote:
> >>> On 30.09.16 at 12:01, <andrew.cooper3@citrix.com> wrote:
> > Coverity doesn't appear to be able to spot that this is a terminal error path,
> > but leave a comment to "fix" MISSING_BREAK.
> >
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Acked-by: Jan Beulich <jbeulich@suse.com>
>
Series pushed.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-30 11:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 10:01 [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules Andrew Cooper
2016-09-30 10:01 ` [PATCH 2/2] x86/emulate: Resolve MISSING_BREAK issue in x86_decode() Andrew Cooper
2016-09-30 10:06 ` Jan Beulich
2016-09-30 11:20 ` Wei Liu
2016-09-30 10:15 ` [PATCH 1/2] tools/libxc: Don't leak foreign mappings when loading modules Wei Liu
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.