From patchwork Tue May 8 20:40:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 27176 Received: (qmail 78162 invoked by alias); 8 May 2018 20:40:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 76888 invoked by uid 89); 8 May 2018 20:40:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=D*PLT X-HELO: mga03.intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: Carlos O'Donell Subject: [PATCH 23/23] x86-64: Add endbr64 to tst-quadmod[12].S Date: Tue, 8 May 2018 13:40:21 -0700 Message-Id: <20180508204021.31845-24-hjl.tools@gmail.com> In-Reply-To: <20180508204021.31845-1-hjl.tools@gmail.com> References: <20180508204021.31845-1-hjl.tools@gmail.com> Add endbr64 to tst-quadmod1.S and tst-quadmod2.S so that func and foo can be called indirectly. * sysdeps/x86_64/tst-quadmod1.S (func): Add endbr64 if IBT is enabled. (foo): Likewise. * sysdeps/x86_64/tst-quadmod2.S (func) : Likewise. (foo): Likewise. --- sysdeps/x86_64/tst-quadmod1.S | 6 ++++++ sysdeps/x86_64/tst-quadmod2.S | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/sysdeps/x86_64/tst-quadmod1.S b/sysdeps/x86_64/tst-quadmod1.S index 26f2f1b599..c60f9dc89d 100644 --- a/sysdeps/x86_64/tst-quadmod1.S +++ b/sysdeps/x86_64/tst-quadmod1.S @@ -28,6 +28,9 @@ .type func, @function func: .cfi_startproc +#if defined __CET__ && (__CET__ & 1) != 0 + endbr64 +#endif xorl %edi, %edi jmp exit@PLT .cfi_endproc @@ -37,6 +40,9 @@ func: foo: .cfi_startproc .cfi_def_cfa_register 6 +#if defined __CET__ && (__CET__ & 1) != 0 + endbr64 +#endif movq .Ljmp(%rip), %rax subq $BIAS, %rax jmp *%rax diff --git a/sysdeps/x86_64/tst-quadmod2.S b/sysdeps/x86_64/tst-quadmod2.S index e923adf672..af03444d4f 100644 --- a/sysdeps/x86_64/tst-quadmod2.S +++ b/sysdeps/x86_64/tst-quadmod2.S @@ -27,6 +27,9 @@ .type func, @function func: .cfi_startproc +#if defined __CET__ && (__CET__ & 1) != 0 + endbr64 +#endif xorl %edi, %edi jmp exit@PLT .cfi_endproc @@ -36,6 +39,9 @@ func: foo: .cfi_startproc .cfi_def_cfa_register 6 +#if defined __CET__ && (__CET__ & 1) != 0 + endbr64 +#endif movq .Ljmp(%rip), %rax subq $BIAS, %rax jmp *%rax