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. */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to