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: 910480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-92293-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="hhK0ILZS"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40gWfh5zGlz9s37 for ; Wed, 9 May 2018 06:43:40 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=ufbUuhohe+QgKuAI9P6NPgXycq3TG/P l34wFC1SkrhLc32voyyz1XJ8rEBXQhbUHWh798F2YRpxrPAan90Giq75lVTAIZxl 2D3plyA9PLWUBghjI1zvkncfOsuycWSn0Rci/gGFUUw0SZw69cKaFyJCMbbeTnQ5 iNGlusQ12yjE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=yoTesEj4UQtV+mt5CdVVgm5d4zA=; b=hhK0I LZSRgRg7q2XjYKkK2Fc3tCkS/x1xquUDyNgVnC+fYcAA/oTMbJQvQUtOf6PBKQrq asakC7U0IzCTSbs75TEP4aubh59Os6U8oTuAPSOR21XpGdXwTorA2ljyAinNrCyY gvL7Zp/UvF8L6OiRSPZUjIKcBhcp2mkqHV0BLk= 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