From owner-dev-commits-src-branches@freebsd.org Tue Jan 26 14:48:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 84AF64F1C85; Tue, 26 Jan 2021 14:48:58 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DQ8kf3H0xz4TLd; Tue, 26 Jan 2021 14:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6398B30C6; Tue, 26 Jan 2021 14:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10QEmwVi078352; Tue, 26 Jan 2021 14:48:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10QEmwkg078351; Tue, 26 Jan 2021 14:48:58 GMT (envelope-from git) Date: Tue, 26 Jan 2021 14:48:58 GMT Message-Id: <202101261448.10QEmwkg078351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f56d7f838f5b - stable/12 - elfctl: prefix disable flags with "no" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f56d7f838f5b3aa0f55b10406eaa7eb760a3ba18 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2021 14:48:58 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f56d7f838f5b3aa0f55b10406eaa7eb760a3ba18 commit f56d7f838f5b3aa0f55b10406eaa7eb760a3ba18 Author: Ed Maste AuthorDate: 2021-01-13 18:08:31 +0000 Commit: Ed Maste CommitDate: 2021-01-26 14:48:14 +0000 elfctl: prefix disable flags with "no" Some ELF feature flags indicate a request to opt-out of some feature, for example NT_FREEBSD_FCTL_ASLR_DISABLE indicates that ASLR should be disabled for the tagged binary. Using "aslr" as the short name for the flag is confusing as it seems to indicate a request for ASLR to be enabled. Rename "noaslr", and make a similar change for other opt-out flags. Reviewed by: bapt, manu, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28139 (cherry picked from commit c763f99d11fdc9641308124c4a030c90b6a7fdbb) --- usr.bin/elfctl/elfctl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c index 15b35a5fec4b..205be39fadc7 100644 --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -65,15 +65,16 @@ struct ControlFeatures { }; static struct ControlFeatures featurelist[] = { - { "aslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" }, - { "protmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, + { "noaslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" }, + { "noprotmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, "Disable implicit PROT_MAX" }, - { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, + { "nostackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, { "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" }, #ifdef NT_FREEBSD_FCTL_LA48 { "la48", NT_FREEBSD_FCTL_LA48, "amd64: Limit user VA to 48bit" }, #endif - { "aslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE, "Disable ASLR stack gap" }, + { "noaslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE, + "Disable ASLR stack gap" }, }; static struct option long_opts[] = {