From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75423 invoked by alias); 2 Aug 2018 12:59:38 -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 75401 invoked by uid 89); 2 Aug 2018 12:59:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:stackprotectexplicit2.C, sk:stackpr X-HELO: mail-oi0-f65.google.com Received: from mail-oi0-f65.google.com (HELO mail-oi0-f65.google.com) (209.85.218.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Aug 2018 12:59:35 +0000 Received: by mail-oi0-f65.google.com with SMTP id w126-v6so3775420oie.7 for ; Thu, 02 Aug 2018 05:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tn2NCCb0ycVGDy+hNfLbsmMzIq8TDP0juS+n4IiucX0=; b=iXNZi9m8KNWp1MfpBiB+OcmPL3TKuNe5Wnto2o5fW5AQ7kNtwTJVAp0CiU82zB4Znx 6AgAPNI/kMfgY/R0CtjU+q4wVc/NHAOk2DgQX4U0s2O7Uyodq5IonBqBI9T4GX4wcm8g lsaWJI3cdS69vnk7jDFDceTyGe4OlsElgUZRSTdJW5pE99gN8VOGnmT/LA+Yc12V31DJ A91LXn21eA745FaC9QxxWkC1ktSXm3psllgDikYmPa7oCyGPp1L5ROpddjz+0ghMfcff CGI1dmdWN6jkKTA/QoyIKL3YkixnJRj7ArAI7XTt7dl0DlavfQ9pakGbD+9zdn1H4Qx2 T4Mw== MIME-Version: 1.0 Received: by 2002:a4a:2145:0:0:0:0:0 with HTTP; Thu, 2 Aug 2018 05:59:33 -0700 (PDT) In-Reply-To: <5B6065E2.2030203@foss.arm.com> References: <8ba1a628-50de-f87a-0b83-5067d5178c22@redhat.com> <5B506FBE.1050701@foss.arm.com> <5B6065E2.2030203@foss.arm.com> From: "H.J. Lu" Date: Thu, 02 Aug 2018 12:59:00 -0000 Message-ID: Subject: Re: [PATCH, ARM] PR85434: Prevent spilling of stack protector guard's address on ARM To: Kyrill Tkachov Cc: Thomas Preudhomme , Ramana Radhakrishnan , Richard Earnshaw , GCC Patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00182.txt.bz2 On Tue, Jul 31, 2018 at 6:36 AM, Kyrill Tkachov wrote: > Hi Thomas, > > > On 25/07/18 14:28, Thomas Preudhomme wrote: >> >> Hi Kyrill, >> >> Using memory_operand worked, the issues I encountered when using it in >> earlier versions of the patch must have been due to the missing test >> on address_operand in the preparation statements which I added later. >> Please find an updated patch in attachment. ChangeLog entry is as >> follows: >> >> *** gcc/ChangeLog *** >> >> 2018-07-05 Thomas Preud'homme >> >> * target-insns.def (stack_protect_combined_set): Define new standard >> pattern name. >> (stack_protect_combined_test): Likewise. >> * cfgexpand.c (stack_protect_prologue): Try new >> stack_protect_combined_set pattern first. >> * function.c (stack_protect_epilogue): Try new >> stack_protect_combined_test pattern first. >> * config/arm/arm.c (require_pic_register): Add pic_reg and >> compute_now >> parameters to control which register to use as PIC register and force >> reloading PIC register respectively. Insert in the stream of insns >> if >> possible. >> (legitimize_pic_address): Expose above new parameters in prototype >> and >> adapt recursive calls accordingly. >> (arm_legitimize_address): Adapt to new legitimize_pic_address >> prototype. >> (thumb_legitimize_address): Likewise. >> (arm_emit_call_insn): Adapt to new require_pic_register prototype. >> * config/arm/arm-protos.h (legitimize_pic_address): Adapt to >> prototype >> change. >> * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address >> prototype change. >> (stack_protect_combined_set): New insn_and_split pattern. >> (stack_protect_set): New insn pattern. >> (stack_protect_combined_test): New insn_and_split pattern. >> (stack_protect_test): New insn pattern. >> * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec. >> (UNSPEC_SP_TEST): Likewise. >> * doc/md.texi (stack_protect_combined_set): Document new standard >> pattern name. >> (stack_protect_set): Clarify that the operand for guard's address is >> legal. >> (stack_protect_combined_test): Document new standard pattern name. >> (stack_protect_test): Clarify that the operand for guard's address is >> legal. >> >> *** gcc/testsuite/ChangeLog *** >> >> 2018-07-05 Thomas Preud'homme >> >> * gcc.target/arm/pr85434.c: New test. >> >> Bootstrapped again for Arm and Thumb-2 and regtested with and without >> -fstack-protector-all without any regression. > > > This looks ok to me now. > Thank you for your patience and addressing my comments from before. > This breaks x86: FAIL: gcc.dg/fstack-protector-strong.c (internal compiler error) FAIL: gcc.dg/fstack-protector-strong.c (test for excess errors) FAIL: gcc.dg/fstack-protector-strong.c (test for warnings, line 109) FAIL: gcc.dg/pr71585-3.c (internal compiler error) FAIL: gcc.dg/pr71585-3.c (test for excess errors) FAIL: gcc.dg/pr71585.c (internal compiler error) FAIL: gcc.dg/pr71585.c (test for excess errors) FAIL: gcc.target/i386/pr37275.c (internal compiler error) FAIL: gcc.target/i386/pr37275.c (test for excess errors) FAIL: gcc.target/i386/pr47780.c (internal compiler error) FAIL: gcc.target/i386/pr47780.c (test for excess errors) FAIL: gcc.target/i386/pr50788.c (internal compiler error) FAIL: gcc.target/i386/pr50788.c (test for excess errors) FAIL: gcc.target/i386/pr68680.c (internal compiler error) FAIL: gcc.target/i386/pr68680.c (test for excess errors) FAIL: gcc.target/i386/stack-prot-guard.c (internal compiler error) FAIL: gcc.target/i386/stack-prot-guard.c (test for excess errors) FAIL: gcc.target/i386/stack-prot-sym.c (internal compiler error) FAIL: gcc.target/i386/stack-prot-sym.c (test for excess errors) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++11 (internal compiler error) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++11 (test for excess errors) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++14 (internal compiler error) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++14 (test for excess errors) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++98 (internal compiler error) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++98 (test for excess errors) FAIL: g++.dg/pr65032.C (internal compiler error) FAIL: g++.dg/pr65032.C (test for excess errors) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++11 (internal compiler error) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++11 (test for excess errors) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++14 (internal compiler error) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++14 (test for excess errors) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++98 (internal compiler error) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++98 (test for excess errors) -- H.J.