[PATCH, i386, Pointer Bounds Checker 32/x] Pointer Bounds Checker hooks for i386 target

Ilya Enkovich enkovich.gnu@gmail.com
Fri Sep 19 12:16:00 GMT 2014


On 18 Sep 21:09, Jeff Law wrote:
> On 09/18/14 13:34, Uros Bizjak wrote:
> >2014-06-11 18:00 GMT+04:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
> >>Hi,
> >>
> >>This patch adds i386 target hooks for Pointer Bounds Checker.
> >>
> >>Bootstrapped and tested on linux-x86_64.
> >>
> >>Thanks,
> >>Ilya
> >>--
> >>gcc/
> >>
> >>2014-06-11  Ilya Enkovich  <ilya.enkovich@intel.com>
> >>
> >>         * config/i386/i386.c: Include tree-iterator.h.
> >>         (ix86_function_value_bounds): New.
> >>         (ix86_builtin_mpx_function): New.
> >>         (ix86_load_bounds): New.
> >>         (ix86_store_bounds): New.
> >>         (ix86_load_returned_bounds): New.
> >>         (ix86_store_returned_bounds): New.
> >>         (ix86_fn_abi_va_list_bounds_size): New.
> >>         (ix86_mpx_bound_mode): New.
> >>         (ix86_make_bounds_constant): New.
> >>         (ix86_initialize_bounds):
> >>         (TARGET_LOAD_BOUNDS_FOR_ARG): New.
> >>         (TARGET_STORE_BOUNDS_FOR_ARG): New.
> >>         (TARGET_LOAD_RETURNED_BOUNDS): New.
> >>         (TARGET_STORE_RETURNED_BOUNDS): New.
> >>         (TARGET_CHKP_BOUND_MODE): New.
> >>         (TARGET_BUILTIN_CHKP_FUNCTION): New.
> >>         (TARGET_FN_ABI_VA_LIST_BOUNDS_SIZE): New.
> >>         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
> >>         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
> >>         (TARGET_CHKP_INITIALIZE_BOUNDS): New.
> >
> >I have comments from the implementation side, but IMO Jeff (CC'd)
> >should give the final approval on the functionality and general
> >approach of the patch. I was not able to follow the meaning and logic
> >behind SLOT (which may be register ?), PTR, TO, and special BND
> >addresses.
> Most, if not all of the general principle has been approved,
> including the creation of the target hooks that Ilya wants to
> exploit in the x86 backend.
> 
> Given that we've got two folks (Uros & myself) that have really
> struggled wrapping our heads around the docs for the new hooks,
> particularly those related to passing parameters & their bounds, I'd
> like Ilya to make another attempt to clarify the docs around those
> hooks.

I recall I worked on documentation of target hooks used to load/store bounds and believe I made it much cleaner.  I didn't duplicate new descriptions for i386 implementations though.  Thus I suppose Uros read old less informative descriptions in i386.c rather than better ones in tm.texi.  I copy more informative descriptions now to i386.c and hope it will be more clear what these functions do.

Thanks,
Ilya

> 
> Uros, if you could go ahead and give your implementation side
> comments, it'd be appreciated.  I wouldn't expect major changes to
> the implementation to occur as a result of further iteration on the
> docs for the hooks.
> 
> Thanks,
> Jeff
> 



More information about the Gcc-patches mailing list