From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63268 invoked by alias); 13 Jul 2017 01:44:12 -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 63256 invoked by uid 89); 13 Jul 2017 01:44:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=12PM, 12pm, morning X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 01:44:11 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v6D1i62E010778; Wed, 12 Jul 2017 20:44:07 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id v6D1i6pQ010777; Wed, 12 Jul 2017 20:44:06 -0500 Date: Thu, 13 Jul 2017 01:44:00 -0000 From: Segher Boessenkool To: Jeff Law Cc: gcc-patches Subject: Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 Message-ID: <20170713014406.GX13471@gate.crashing.org> References: <8a9cdbc9-dc96-e793-0147-3f09af2a26fa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8a9cdbc9-dc96-e793-0147-3f09af2a26fa@gmail.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00628.txt.bz2 On Tue, Jul 11, 2017 at 03:20:12PM -0600, Jeff Law wrote: > * conifg/mips/mips.c (mips_expand_prologue): Likewise. Typo ("conifg"). > --- a/gcc/defaults.h > +++ b/gcc/defaults.h > @@ -1408,8 +1408,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see > #endif > > /* The default is not to move the stack pointer. */ > +/* The default is not to move the stack pointer, unless we are using > + stack clash prevention stack checking. */ > #ifndef STACK_CHECK_MOVING_SP > -#define STACK_CHECK_MOVING_SP 0 > +#define STACK_CHECK_MOVING_SP\ > + (flag_stack_check == STACK_CLASH_BUILTIN_STACK_CHECK) > #endif Missing space before that backslash. The documentation for STACK_CHECK_CONFIG_SP needs updating (its default is no longer zero, for one). I don't really see why this is so complicated, and why the rs6000 target changes (a later patch) are so big. Why isn't it just simple patches to allocate_stack (and the prologue thing), that check the flag and if it is set do some probes? I'll go sleep now, maybe I'll see it in the morning :-) Segher