From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22381 invoked by alias); 19 Sep 2014 03:10:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22341 invoked by uid 89); 19 Sep 2014 03:09:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 19 Sep 2014 03:09:58 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8J39uV7004101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 18 Sep 2014 23:09:56 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-30.phx2.redhat.com [10.3.113.30]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8J39uP4007323; Thu, 18 Sep 2014 23:09:56 -0400 Message-ID: <541B9E83.4060802@redhat.com> Date: Fri, 19 Sep 2014 03:10:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Uros Bizjak , "gcc-patches@gcc.gnu.org" CC: Ilya Enkovich Subject: Re: [PATCH, i386, Pointer Bounds Checker 32/x] Pointer Bounds Checker hooks for i386 target References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg01582.txt.bz2 On 09/18/14 13:34, Uros Bizjak wrote: > 2014-06-11 18:00 GMT+04:00 Ilya Enkovich : >> 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 >> >> * 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. 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