All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/kdd: work around gcc 8.1 bug
@ 2018-08-06 10:35 Wei Liu
  2018-08-20 10:38 ` Ian Jackson
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Liu @ 2018-08-06 10:35 UTC (permalink / raw)
  To: xen-devel; +Cc: Tim Deegan, Wei Liu, Ian Jackson

Gcc 8.1 has a bug that causes kdd fail to build. Rewrite the code to
work around that bug.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86827

Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/debugger/kdd/kdd.c |  9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
index 5a019a0..fb8c645 100644
--- a/tools/debugger/kdd/kdd.c
+++ b/tools/debugger/kdd/kdd.c
@@ -687,11 +687,10 @@ static void kdd_handle_read_ctrl(kdd_state *s)
         }
     } else {
         /* 32-bit control-register space starts at 0x[2]cc, for 84 bytes */
-        uint32_t offset = addr;
-        if (offset > 0x200)
-            offset -= 0x200;
-        offset -= 0xcc;
-        if (offset > sizeof ctrl.c32 || offset + len > sizeof ctrl.c32) {
+        uint32_t offset = addr - 0xcc;
+        if (offset > sizeof ctrl.c32)
+            offset -= 0x2cc;
+        if (offset > sizeof ctrl.c32 || len > sizeof ctrl.c32 - offset) {
             KDD_LOG(s, "Request outside of known control space\n");
             len = 0;
         } else {

base-commit: e752f28409678ce3ade49986b39309178fb2a6d6
-- 
git-series 0.9.1

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/kdd: work around gcc 8.1 bug
  2018-08-06 10:35 [PATCH] tools/kdd: work around gcc 8.1 bug Wei Liu
@ 2018-08-20 10:38 ` Ian Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2018-08-20 10:38 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Tim Deegan

Wei Liu writes ("[PATCH] tools/kdd: work around gcc 8.1 bug"):
> Gcc 8.1 has a bug that causes kdd fail to build. Rewrite the code to
> work around that bug.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2018-08-20 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-06 10:35 [PATCH] tools/kdd: work around gcc 8.1 bug Wei Liu
2018-08-20 10:38 ` 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.