From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10777 invoked from network); 19 Oct 2020 22:41:19 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 19 Oct 2020 22:41:19 -0000 Received: (qmail 1743 invoked by uid 550); 19 Oct 2020 22:40:55 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1524 invoked from network); 19 Oct 2020 22:40:53 -0000 IronPort-SDR: bXcwOgagT1z+XhI/JKkyIAOJ2jKmdJiAlVhdX7NDDCcu9MzNRzvNU786EtFhbEZIAfhIzzlgh9 Y5sLXmummBnw== X-IronPort-AV: E=McAfee;i="6000,8403,9779"; a="231313843" X-IronPort-AV: E=Sophos;i="5.77,395,1596524400"; d="scan'208";a="231313843" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False IronPort-SDR: m5bAlNmo0h/voXFaMuLa7Ny/69myZiEXLZnUCu8EsDY/ucDxsZCVoX5p0ZTwG2Rq0VJA4GnkFU zl1k8ARDj6ew== X-IronPort-AV: E=Sophos;i="5.77,395,1596524400"; d="scan'208";a="465692041" From: Joao Moreira To: musl@lists.openwall.com Date: Mon, 19 Oct 2020 15:43:40 -0700 Message-Id: <20201019224342.53303-3-joao.moreira@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201019224342.53303-1-joao.moreira@intel.com> References: <20201019224342.53303-1-joao.moreira@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [musl] [PATCH 2/4] Add ENDBRANCH64 and ENDBRANCH32 macro definitions Define ENDBRANCH64 and ENDBRANCH32 macros to endbr64 and endbr32 instructions, respectively, in case the flag CET_IBT is set. If the flag is not set, the macros are defined to nothing. These macros will later be used to properly add endbranch instruction to x86 and i386 assembly functions. Signed-off-by: Joao Moreira --- src/include/ibt.s | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/include/ibt.s diff --git a/src/include/ibt.s b/src/include/ibt.s new file mode 100644 index 00000000..2f16006f --- /dev/null +++ b/src/include/ibt.s @@ -0,0 +1,13 @@ +.ifdef CET_IBT + .macro ENDBRANCH64 + endbr64 + .endm + .macro ENDBRANCH32 + endbr32 + .endm +.else + .macro ENDBRANCH64 + .endm + .macro ENDBRANCH32 + .endm +.endif -- 2.27.0