From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by sourceware.org (Postfix) with ESMTPS id E657D3858D37 for ; Wed, 27 Dec 2023 15:59:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E657D3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E657D3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703692749; cv=none; b=oAk6T01/BXdutse3yvr+1z0o0S1GkUcbiFwGsdyWp/OKcWzebCIyPBEHFJfqjLi+tSUrVdC7lDldDqxX6QaVXTF+DIfA7S6wt0vk7CC2M4dbiKi3nuJyEg1+OeE24KilrcqruhW+Icqz9fKFkdnQhxOewBcuZ8Vtgf35MYIQ850= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703692749; c=relaxed/simple; bh=Qmr/8VvcezTawXXpUdlX75outyZ2aoEdFnh144Cf9Do=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=FGdLLviM8jfy4PwWaI9HpYjXIrGV4Eg5UdoT858Hb8pf9y0835vnijXi2j4Ybpm0j2BkdguuNgEKl+o57Hee8q3x31Bj18uRhrrlMXOQeWezM4blv0FAGVm+qhLvuoQkRzBMA/aTA3nwAHA7yp2YabMM02kpp5MNx/Qm0CadqQ0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5e734251f48so39732247b3.1 for ; Wed, 27 Dec 2023 07:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703692747; x=1704297547; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Qpzt6Uv5AFfx7cOVAoZc8X5tqHhBPMh8pc3pIHfD/5E=; b=EmbSrXbmuZ8SrMYGb/FnKuNP43fxiwzfXzn6/2AAqz1w41SdfqXYBYn47iYU8Q8qSb Tx7/ATIEgtiiJsB9ZzHgKodwNmLoWnDspRFZ4SDjdFBUOhv2a+voc9wxM/VDrR9dUbNN TUmKJjaB4tZE7NJ0GEThLGm/cR31NHxWIdw7Ijm+4zF0Y/RWw5UYfXXRamxdSKfp5H6I tskEj9QQ6/716kFjgJNoRmffjrBafDnyx1KsJQzxjyvOnOztuqxXr5f42FwbAtHWJSGh VrqPJZ1dFEU8VMbD/euk3F4AjIwf0ELzT05CYe/7pqMmF/zXfGDqQ+1vF/9tpuMD1KP2 v9Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703692747; x=1704297547; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qpzt6Uv5AFfx7cOVAoZc8X5tqHhBPMh8pc3pIHfD/5E=; b=POCZQHJtQUeQzDpdrJ0HGiF4JJSDn0ob+GuWORdnIkp9wVBGBTWCj6iYPU7XddNGj9 6IjpUVdqSkAz+JF6F6VwD/yLQ7nSswR9df4XP4ObFuvCk/5wCxwtlWM3n2hQ3f2aya8h zU/1h68DleSL3CzFTe9ncElclLv1OO0PqEyMBePjcKh42DzA/xX5UfEAxiohAAS0Qyi5 uImlSa/nm+P/V4BS7EVfrJHC9J2xrE9T97WpGNlqR+N98QBEZxDZT5hrADNSOEBYt3aV lm0PSryO/YrggMDH/tu7ROcoiOu/4EHZe/vk0li8Usu+oxQOTtgWp5x5SfKY3yA0FzCE I0tg== X-Gm-Message-State: AOJu0YyMhG0szZC0k/VyYhLH1gGmD7DOpOOtGRBtlNDKjJ0iA6PXuKhN eWkQxbDLGPRtMWqLYyXfeuIG1EMMbK2tv9OORPKwp/mj X-Google-Smtp-Source: AGHT+IE5l8gc8b1RkzKxSGexJkxwk0o43D6VCzd2oM4rpLdgHUmApBxFbeLA4zcj0H+gqBz/GiJRyWavHVaX+rmpyMA= X-Received: by 2002:a05:690c:2d0c:b0:5ec:17a5:df8c with SMTP id eq12-20020a05690c2d0c00b005ec17a5df8cmr2216987ywb.25.1703692747215; Wed, 27 Dec 2023 07:59:07 -0800 (PST) MIME-Version: 1.0 References: <20231227141921.4159400-1-christina.schimpe@intel.com> In-Reply-To: <20231227141921.4159400-1-christina.schimpe@intel.com> From: "H.J. Lu" Date: Wed, 27 Dec 2023 07:58:31 -0800 Message-ID: Subject: Re: [PATCH 1/1] x86: Add NT_X86_SHSTK note To: "Schimpe, Christina" Cc: binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3021.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On Wed, Dec 27, 2023 at 6:20=E2=80=AFAM Schimpe, Christina wrote: > > 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_ty= pe) > 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 (0x20= 3). */ > + /* 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 > > OK. Thanks. --=20 H.J.