From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by sourceware.org (Postfix) with ESMTPS id C439D3858D32 for ; Wed, 27 Dec 2023 14:25:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C439D3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C439D3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.12 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703687118; cv=none; b=YnLW0YnXdE++v/nQvulaQRsslWpifoK6fHWnRXgPG4KelgEQ3kmrfoJHQPwZiZTtbwk6m4xTk7s4D60+kOmrw4E3Jc0fLOWOfizzGcuFb5rbj8ja5lL9e3YzXxctiqf8fo9Zu0otHDtjSnnykbp2OCjVm4KgcFIsBrT2W5f9BWM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703687118; c=relaxed/simple; bh=E3jqxcdjIQI6WqTy2zrVgltEMaT3KBMyciaC/CI3mSA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=NAuKtcrg+tX3hteIKU1WgGYJGroeA1A4gIC2OU9Ohgc9IV4AsmYsaGoV+RAA+NJoOXH/J8clDlNfBwP53mtX31Hu7iMNw6K371SymIT4eLM8ShKfK0DZHz6G9feRyyji+QPTRAG5+bsdjRsQxLGjtWlbn384rKnwdfsDBogdQL4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703687115; x=1735223115; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E3jqxcdjIQI6WqTy2zrVgltEMaT3KBMyciaC/CI3mSA=; b=Renxjy+YvtU8xuxFlQl0zRgOVh1QXhMP64HEQZDE9O/gW4TZUurk7EXU oWQHlkXsrWjuV8btGWoT1/3G4EJ0RlH0uqjcGK7NBhL+FAWjAxl8mVFuV Kvji2VHMtEib4Ew2L/G40OzWSNFESuprD24ITASqgtlSPnceUxOSjZdJy 633kvlaktrOTcWu3lCL/4wBIH/6mu1v6MJoVepY1S2L4Gio1bKsIHkjfZ s20LcAOPAl2PEXtq3QGAK67gY7kmSwtx+3AN/qFPxRXgTmKtV7et+2ZnI 0DlwEb6O5goMbcL2UuSvP91PzH4I76pQW6Q4ubs8lyxoCl/rkKc8jqN6h w==; X-IronPort-AV: E=McAfee;i="6600,9927,10936"; a="3750007" X-IronPort-AV: E=Sophos;i="6.04,309,1695711600"; d="scan'208";a="3750007" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2023 06:20:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10936"; a="1025403643" X-IronPort-AV: E=Sophos;i="6.04,309,1695711600"; d="scan'208";a="1025403643" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2023 06:20:56 -0800 From: "Schimpe, Christina" To: binutils@sourceware.org Cc: hjl.tools@gmail.com Subject: [PATCH 1/1] x86: Add NT_X86_SHSTK note Date: Wed, 27 Dec 2023 14:19:21 +0000 Message-Id: <20231227141921.4159400-1-christina.schimpe@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Define NT_X86_SHSTK which is the note for x86 Shadow Stack (SHSTK) to support Intel SHSTK in Linux kernel. For now only userspace shadow stack and kernel IBT are supported by the linux kernel. This note should be used instead of NT_X86_CET introduced in the commit "x86: Add NT_X86_CET note", as it is outdated and only used by old binutils versions. --- binutils/readelf.c | 2 ++ include/elf/common.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/binutils/readelf.c b/binutils/readelf.c index 775106fb99c..a464692e1b7 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -20079,6 +20079,8 @@ get_note_type (Filedata * filedata, unsigned e_type) return _("NT_X86_XSTATE (x86 XSAVE extended state)"); case NT_X86_CET: return _("NT_X86_CET (x86 CET state)"); + case NT_X86_SHSTK: + return _("NT_X86_SHSTK (x86 SHSTK state)"); case NT_S390_HIGH_GPRS: return _("NT_S390_HIGH_GPRS (s390 upper register halves)"); case NT_S390_TIMER: diff --git a/include/elf/common.h b/include/elf/common.h index 244b13361e5..690d78010c4 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -645,6 +645,9 @@ /* note name must be "LINUX". */ #define NT_X86_CET 0x203 /* x86 CET state. */ /* note name must be "LINUX". */ +#define NT_X86_SHSTK 0x204 /* x86 SHSTK state. */ + /* This replaces NT_X86_CET (0x203). */ + /* note name must be "LINUX". */ #define NT_S390_HIGH_GPRS 0x300 /* S/390 upper halves of GPRs */ /* note name must be "LINUX". */ #define NT_S390_TIMER 0x301 /* S390 timer */ -- 2.34.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928