From owner-svn-src-head@freebsd.org Wed Apr 1 15:40:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9343B2BF011; Wed, 1 Apr 2020 15:40:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sr5269nZz4Hcj; Wed, 1 Apr 2020 15:40:54 +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 5F282278E4; Wed, 1 Apr 2020 15:34:11 +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 031FYB4E086144; Wed, 1 Apr 2020 15:34:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031FYBT1086143; Wed, 1 Apr 2020 15:34:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004011534.031FYBT1086143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Apr 2020 15:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359513 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359513 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: Wed, 01 Apr 2020 15:40:56 -0000 Author: emaste Date: Wed Apr 1 15:34:10 2020 New Revision: 359513 URL: https://svnweb.freebsd.org/changeset/base/359513 Log: elf.5: add definitions of FreeBSD notes I hope to extend this with some more detail in the future but it gives a good starting point. Thanks to 0mp for assistance with markup. Reviewed by: jkoshy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23982 Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 ============================================================================== --- head/share/man/man5/elf.5 Wed Apr 1 15:25:16 2020 (r359512) +++ head/share/man/man5/elf.5 Wed Apr 1 15:34:10 2020 (r359513) @@ -1296,6 +1296,32 @@ fields are padded to ensure 4-byte alignemnt. and .Va descsz specify the unpadded length. +.Pp +.Fx +defines the following ELF note types +.Po with corresponding interpretation of +.Va desc Pc : +.Bl -tag -width 4n +.It Dv NT_FREEBSD_ABI_TAG Pq Value: 1 +Indicates the OS ABI version in a form of a 32-bit integer containing expected +ABI version +.Po i.e., +.Dv __FreeBSD_version Pc . +.It Dv NT_FREEBSD_NOINIT_TAG Pq Value: 2 +Indicates that crt does not call init. +.Va desc +is ignored. +.It Dv NT_FREEBSD_ARCH_TAG Pq Value: 3 +.It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4 +Contains a bitmask of mitigations and features to enable: +.Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" +.Sy Name Ta Sy Value Ta Sy Description +.It NT_FREEBSD_FCTL_ASLR_DISABLE Ta 0x01 Ta Disable ASLR +.It NT_FREEBSD_FCTL_PROTMAX_DISABLE Ta 0x02 Ta Disable implicit PROT_MAX +.It NT_FREEBSD_FCTL_STKGAP_DISABLE Ta 0x04 Ta Disable stack gap +.It NT_FREEBSD_FCTL_WXNEEDED Ta 0x08 Ta Binary makes W+X mappings +.El +.El .Sh SEE ALSO .Xr as 1 , .Xr gdb 1 ,