From owner-svn-src-head@freebsd.org Fri Nov 2 19:02:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4197A10D7458; Fri, 2 Nov 2018 19:02:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E74A479C93; Fri, 2 Nov 2018 19:02:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C86E56F46; Fri, 2 Nov 2018 19:02:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA2J232s097128; Fri, 2 Nov 2018 19:02:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA2J2393097127; Fri, 2 Nov 2018 19:02:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201811021902.wA2J2393097127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 2 Nov 2018 19:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340076 - in head: contrib/elftoolchain/readelf sys/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: contrib/elftoolchain/readelf sys/sys X-SVN-Commit-Revision: 340076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2018 19:02:04 -0000 Author: emaste Date: Fri Nov 2 19:02:03 2018 New Revision: 340076 URL: https://svnweb.freebsd.org/changeset/base/340076 Log: Define NT_FREEBSD_FEATURE_CTL ELF note type This ELF note will be used to allow binaries to opt out of, or in to, upcoming vulnerability mitigation and other features. Committing the definition and readelf change separately to allow independent MFC. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c head/sys/sys/elf_common.h Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Nov 2 18:40:01 2018 (r340075) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Nov 2 19:02:03 2018 (r340076) @@ -1121,6 +1121,7 @@ note_type_freebsd(unsigned int nt) case 1: return "NT_FREEBSD_ABI_TAG"; case 2: return "NT_FREEBSD_NOINIT_TAG"; case 3: return "NT_FREEBSD_ARCH_TAG"; + case 4: return "NT_FREEBSD_FEATURE_CTL"; default: return (note_type_unknown(nt)); } } Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Fri Nov 2 18:40:01 2018 (r340075) +++ head/sys/sys/elf_common.h Fri Nov 2 19:02:03 2018 (r340076) @@ -759,6 +759,7 @@ typedef struct { #define NT_FREEBSD_ABI_TAG 1 #define NT_FREEBSD_NOINIT_TAG 2 #define NT_FREEBSD_ARCH_TAG 3 +#define NT_FREEBSD_FEATURE_CTL 4 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */