* [PATCH]fix xencomm_copy_{from, to}_guest.
@ 2007-01-05 3:19 Isaku Yamahata
2007-01-08 22:51 ` [XenPPC] " Hollis Blanchard
2007-01-09 19:24 ` Jerone Young
0 siblings, 2 replies; 4+ messages in thread
From: Isaku Yamahata @ 2007-01-05 3:19 UTC (permalink / raw)
To: xen-devel; +Cc: xen-ppc-devel, Hollis Blanchard, xen-ia64-devel
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
fix xencomm_copy_{from, to}_guest.
It should not call paddr_to_maddr() with invalid address.
Originally this issue was found in xen/ia64 xencomm code and
in fact I didn't test this patch because currently ia64 xencomm forked
from common code. They should be consolidated somehow.
--
yamahata
[-- Attachment #2: 13218_25cdcc5f21f8_fix_xencomm_copy_tofrom_guest.patch --]
[-- Type: text/plain, Size: 1254 bytes --]
# HG changeset patch
# User yamahata@valinux.co.jp
# Date 1167966417 -32400
# Node ID 25cdcc5f21f8147371aed5fb8f56d93479df0ca8
# Parent 338ceb7b1f0993bf9735c0c1c5d21e39c381cf2f
fix xencomm_copy_{from, to}_guest.
It should not call paddr_to_maddr() with invalid address.
PATCHNAME: fix_xencomm_copy_tofrom_guest
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
diff -r 338ceb7b1f09 -r 25cdcc5f21f8 xen/common/xencomm.c
--- a/xen/common/xencomm.c Thu Jan 04 10:58:01 2007 +0000
+++ b/xen/common/xencomm.c Fri Jan 05 12:06:57 2007 +0900
@@ -119,7 +119,7 @@ xencomm_copy_from_guest(void *to, const
chunksz -= chunk_skip;
skip -= chunk_skip;
- if (skip == 0) {
+ if (skip == 0 && chunksz > 0) {
unsigned long src_maddr;
unsigned long dest = (unsigned long)to + to_pos;
unsigned int bytes = min(chunksz, n - to_pos);
@@ -225,7 +225,7 @@ xencomm_copy_to_guest(void *to, const vo
chunksz -= chunk_skip;
skip -= chunk_skip;
- if (skip == 0) {
+ if (skip == 0 && chunksz > 0) {
unsigned long dest_maddr;
unsigned long source = (unsigned long)from + from_pos;
unsigned int bytes = min(chunksz, n - from_pos);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [XenPPC] [PATCH]fix xencomm_copy_{from, to}_guest.
2007-01-05 3:19 [PATCH]fix xencomm_copy_{from, to}_guest Isaku Yamahata
@ 2007-01-08 22:51 ` Hollis Blanchard
2007-01-08 23:15 ` Jerone Young
2007-01-09 19:24 ` Jerone Young
1 sibling, 1 reply; 4+ messages in thread
From: Hollis Blanchard @ 2007-01-08 22:51 UTC (permalink / raw)
To: Isaku Yamahata; +Cc: xen-ia64-devel, Jerone Young, xen-devel, xen-ppc-devel
On Fri, 2007-01-05 at 12:19 +0900, Isaku Yamahata wrote:
> fix xencomm_copy_{from, to}_guest.
> It should not call paddr_to_maddr() with invalid address.
Thanks Yamahata-san! I've asked Jerone (CCed) to give this a quick test.
> Originally this issue was found in xen/ia64 xencomm code and
> in fact I didn't test this patch because currently ia64 xencomm forked
> from common code. They should be consolidated somehow.
I couldn't agree more. I've posted comments on that before; please let
me know if anybody on the ia64 side has questions about it.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [XenPPC] [PATCH]fix xencomm_copy_{from, to}_guest.
2007-01-08 22:51 ` [XenPPC] " Hollis Blanchard
@ 2007-01-08 23:15 ` Jerone Young
0 siblings, 0 replies; 4+ messages in thread
From: Jerone Young @ 2007-01-08 23:15 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: xen-ia64-devel, Isaku Yamahata, xen-devel, xen-ppc-devel
Just quickly tried it out and my js20 blade boots without issue with
this patch.
On Mon, 2007-01-08 at 16:51 -0600, Hollis Blanchard wrote:
> On Fri, 2007-01-05 at 12:19 +0900, Isaku Yamahata wrote:
> > fix xencomm_copy_{from, to}_guest.
> > It should not call paddr_to_maddr() with invalid address.
>
> Thanks Yamahata-san! I've asked Jerone (CCed) to give this a quick test.
>
> > Originally this issue was found in xen/ia64 xencomm code and
> > in fact I didn't test this patch because currently ia64 xencomm forked
> > from common code. They should be consolidated somehow.
>
> I couldn't agree more. I've posted comments on that before; please let
> me know if anybody on the ia64 side has questions about it.
>
> --
> Hollis Blanchard
> IBM Linux Technology Center
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [XenPPC] [PATCH]fix xencomm_copy_{from, to}_guest.
2007-01-05 3:19 [PATCH]fix xencomm_copy_{from, to}_guest Isaku Yamahata
2007-01-08 22:51 ` [XenPPC] " Hollis Blanchard
@ 2007-01-09 19:24 ` Jerone Young
1 sibling, 0 replies; 4+ messages in thread
From: Jerone Young @ 2007-01-09 19:24 UTC (permalink / raw)
To: Isaku Yamahata; +Cc: xen-ia64-devel, xen-devel, Hollis Blanchard, xen-ppc-devel
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
Keir, can you commit this patch to the tree. It has been tested and does
not appear to cause any issues.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
On Fri, 2007-01-05 at 12:19 +0900, Isaku Yamahata wrote:
> fix xencomm_copy_{from, to}_guest.
> It should not call paddr_to_maddr() with invalid address.
>
> Originally this issue was found in xen/ia64 xencomm code and
> in fact I didn't test this patch because currently ia64 xencomm forked
> from common code. They should be consolidated somehow.
>
> --
> yamahata
> _______________________________________________
> Xen-ppc-devel mailing list
> Xen-ppc-devel@lists.xensource.com
> http://lists.xensource.com/xen-ppc-devel
[-- Attachment #2: 13218_25cdcc5f21f8_fix_xencomm_copy_tofrom_guest.patch --]
[-- Type: text/x-patch, Size: 1251 bytes --]
# HG changeset patch
# User yamahata@valinux.co.jp
# Date 1167966417 -32400
# Node ID 25cdcc5f21f8147371aed5fb8f56d93479df0ca8
# Parent 338ceb7b1f0993bf9735c0c1c5d21e39c381cf2f
fix xencomm_copy_{from, to}_guest.
It should not call paddr_to_maddr() with invalid address.
PATCHNAME: fix_xencomm_copy_tofrom_guest
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
diff -r 338ceb7b1f09 -r 25cdcc5f21f8 xen/common/xencomm.c
--- a/xen/common/xencomm.c Thu Jan 04 10:58:01 2007 +0000
+++ b/xen/common/xencomm.c Fri Jan 05 12:06:57 2007 +0900
@@ -119,7 +119,7 @@ xencomm_copy_from_guest(void *to, const
chunksz -= chunk_skip;
skip -= chunk_skip;
- if (skip == 0) {
+ if (skip == 0 && chunksz > 0) {
unsigned long src_maddr;
unsigned long dest = (unsigned long)to + to_pos;
unsigned int bytes = min(chunksz, n - to_pos);
@@ -225,7 +225,7 @@ xencomm_copy_to_guest(void *to, const vo
chunksz -= chunk_skip;
skip -= chunk_skip;
- if (skip == 0) {
+ if (skip == 0 && chunksz > 0) {
unsigned long dest_maddr;
unsigned long source = (unsigned long)from + from_pos;
unsigned int bytes = min(chunksz, n - from_pos);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-09 19:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-05 3:19 [PATCH]fix xencomm_copy_{from, to}_guest Isaku Yamahata
2007-01-08 22:51 ` [XenPPC] " Hollis Blanchard
2007-01-08 23:15 ` Jerone Young
2007-01-09 19:24 ` Jerone Young
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.