Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-08-03 Thread Wei Liu
On Fri, Aug 03, 2018 at 10:54:19AM +0100, Tim Deegan wrote: > Hi, > > Apologies for the delay. Several of my other hats were on fire. > > > > I suspect the address, from which offset is derived, is bounded. But I > > > haven't found the spec for KD. > > > > I don’t think there is one. > > Inde

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-08-03 Thread Tim Deegan
Hi, Apologies for the delay. Several of my other hats were on fire. > > I suspect the address, from which offset is derived, is bounded. But I > > haven't found the spec for KD. > > I don’t think there is one. Indeed not. The official way to extend windbg &c is to write a plugin that runs on

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-08-02 Thread Wei Liu
After some back and forth discussion on gcc-help, it is suggested this is a bug in gcc and I'm asked to open a bug report. Here is the bug report for reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86827 Wei. ___ Xen-devel mailing list Xen-dev

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-07-27 Thread Wei Liu
One interesting observation is that if I revert 2de2b10b225 which turns the type of offset from uint32_t back to uint64_t, kdd.c will build with 32 bit, but then of course 64 bit build is broken. :-/ Wei. ___ Xen-devel mailing list Xen-devel@lists.xenpr

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-07-27 Thread Wei Liu
On Thu, Jul 26, 2018 at 01:37:45PM +0100, Ian Jackson wrote: > Wei Liu writes ("[PATCH RFC] tools/kdd: avoid adversarial optimisation > hazard"): > > There have been two attempts to fix kdd build with gcc 8.1 > > (437e00fe and 2de2b10b), but building with gcc 8.1 32 bit non-debug > > build still y

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-07-26 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Wei Liu > Sent: 26 July 2018 13:54 > To: Ian Jackson > Cc: Xen-devel ; Wei Liu > ; Marek Marczykowski > ; Jan Beulich ; Tim > (Xen.org) > Subject: Re: [Xe

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-07-26 Thread Wei Liu
On Thu, Jul 26, 2018 at 01:37:45PM +0100, Ian Jackson wrote: > Wei Liu writes ("[PATCH RFC] tools/kdd: avoid adversarial optimisation > hazard"): > > There have been two attempts to fix kdd build with gcc 8.1 > > (437e00fe and 2de2b10b), but building with gcc 8.1 32 bit non-debug > > build still y

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-07-26 Thread Ian Jackson
Wei Liu writes ("[PATCH RFC] tools/kdd: avoid adversarial optimisation hazard"): > There have been two attempts to fix kdd build with gcc 8.1 > (437e00fe and 2de2b10b), but building with gcc 8.1 32 bit non-debug > build still yields the same error as in 437e00fe. > > Ian wrote about adversarial op

[Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-07-26 Thread Wei Liu
There have been two attempts to fix kdd build with gcc 8.1 (437e00fe and 2de2b10b), but building with gcc 8.1 32 bit non-debug build still yields the same error as in 437e00fe. Ian wrote about adversarial optimisation in [0], one of the key points is that computing an out-of-bounds pointer is UB.