From patchwork Sat Jul 21 14:20:25 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: 947357 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-94551-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (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="Q0Oz/Buc"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aLbZ4auP"; 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 41Xqfn09ytz9s3Z for ; Sun, 22 Jul 2018 00:20:48 +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=PLoOQr21h6YSJhQHdmhlk7QEirHkovm +fnT9zfqZ16iCiW/fC7hKy0lTWTBa1LuxsvBwHLdLE9VAOmJox8Ol/VPzhpwmGto H6Ub+FtOUGm8rOSIjGqLxDQ4NF5iZIgrK0A2PQzjsezWWKc8Eh8/nOAT3kWQUKY9 KQkrIBZosWlA= 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=0sQ+qJ04cuLswUx8FRxgHOC1isM=; b=Q0Oz/ BucD5oXy/90ihTrDfmrJTzdkzvnO6KwgKJpnEUjDh/eT9ZArH10hgVx5+ljAfqh0 TEehlKn4NamgVb5sQOu6OSb9TQ7zQGf3Q0Cq1aY9plmFXUo0WypW0CkVS+Id/4NE 2PGtmQ0w1WhxIfGT6RqO4feC6b+YCnbumZjwM4= Received: (qmail 81708 invoked by alias); 21 Jul 2018 14:20:40 -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 81664 invoked by uid 89); 21 Jul 2018 14:20:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:sk:101-v6m, HX-Received:46e, HX-HELO:sk:mail-pl, Hx-spam-relays-external:sk:mail-pl X-HELO: mail-pl0-f49.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ir3+FBVoJRiorDY0PFHRN8VwM6mzyJ3M85GNuSxY0Gk=; b=aLbZ4auPdxm5+S7k5+utisNBhPlpFtvdK9BkrAuyW98MzmGi403MFDxzskCCZyUYLq 2kwnBoVDfGnoAckbEaIeWWW8hClKe2B6QRwQ21breikyvdSS78JmTSHFoeE6DhzpeYLP XbsMcne/rm0g+RbJfpI3DHaEwfxNxUI/aDegF7qKc9kBd2XOE+GPw8V18pHbxM0QL2tC oOW5D0pqO2wz6cPJkbq3Wmm7NonwLv6L4S7nNWXZ4HRAF17W9IrnP2KwLasufTdlWFZI Vwmer1oXi2uaa2QmqCWZBJfiHchuPa7AgiLelzC3wODIoZzH5axxwxlrxj8FLZ5CAFA2 NAjg== From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: Carlos O'Donell Subject: [PATCH 02/12] x86-64: Add endbr64 to tst-quadmod[12].S Date: Sat, 21 Jul 2018 07:20:25 -0700 Message-Id: <20180721142035.21059-3-hjl.tools@gmail.com> In-Reply-To: <20180721142035.21059-1-hjl.tools@gmail.com> References: <20180721142035.21059-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. Reviewed-by: Carlos O'Donell --- 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