From patchwork Thu Mar 7 12:11:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schimpe, Christina" X-Patchwork-Id: 86924 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E24493857836 for ; Thu, 7 Mar 2024 12:11:50 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by sourceware.org (Postfix) with ESMTPS id 54B0B3858D35 for ; Thu, 7 Mar 2024 12:11:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 54B0B3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 54B0B3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709813487; cv=none; b=YXyKGmw3W5hh1/gNIci7kGmR35DCqczpSGm/nu2n8qM6ubxBuMhWvF2YYY664bJfO0y48dWtUyljAWj5gVF1LDt0IcaXI77UJflWme0JBwmu34vV5DpkwfnYOiz7uQAGrHnMxyUXOVfXIylT4tE5PR7yZEstVPU1nS4tVxsB1ss= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709813487; c=relaxed/simple; bh=jaaRweVQFOsmhxpmlJnkGiuawuInbNeOoEnfc1AEGq4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=p8DBLRmjzjxmnjwWz8qodg1ILeh/+r8VPUJa3/E5kk78LPrIt3YI8iTPcG5N6lPPDjNF0cib1dIRNWCvnkrGprJlC/t/XiNnvudXh+dgePVr6M0zeoy8Wggps9ghiJ0sapeajM3+bC6+V7s38WaADaza0Dothp+okofMLx8nbwo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709813485; x=1741349485; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=jaaRweVQFOsmhxpmlJnkGiuawuInbNeOoEnfc1AEGq4=; b=mYpjPhfdFc0K99aLQjoGv6EH1vPqS4q73BVxHhqAJWINLLaMvzwKo1Cl GfAVYwlUnrJ2jFsuoYiQJheJjcWzRMJV8lnGckvfitvWmRUuJf95Pqefa 75IY+NhI0lCpV2FA7aOLIj6wJaQ68YAWXiCxHjdnU4snAlZNid02d3Hho OUGj0e1YZrKftfzdq6FmKMlQAZ3Rd3xsDj7eWpybU2CM0IjB8sVvq6Y81 arJ6Ebs9l5bDpxLiwyR0COJKaa0rMJQJSE+IJ7b7YJVViimB3NUbRpn7i KUInnMX4KwUeKlUmvLU6jOEEfGPtDPPius514PXVjIHQrHQq6nhEGnib1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4648068" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="4648068" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 04:11:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="40982340" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 04:11:23 -0800 From: "Schimpe, Christina" To: gdb-patches@sourceware.org Subject: [PATCH 1/1] gdb: Deprecate MPX commands. Date: Thu, 7 Mar 2024 12:11:11 +0000 Message-Id: <20240307121111.2010241-1-christina.schimpe@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org This patch deprecates the MPX commands "show/set mpx bound". Intel listed Intel(R) Memory Protection Extensions (MPX) as removed in 2019. Following gcc v9.1, the linux kernel v5.6 and glibc v2.35, deprecate MPX in GDB. Reviewed-By: Eli Zaretskii --- gdb/NEWS | 3 +++ gdb/doc/gdb.texinfo | 3 +++ gdb/i386-tdep.c | 6 ++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS index 2638b3e0d9c..d8ac0bb06a7 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -3,6 +3,9 @@ *** Changes since GDB 14 +* The MPX commands "show/set mpx bound" have been deprecated, as Intel + listed MPX as removed in 2019. + * Building GDB and GDBserver now requires a C++17 compiler. For example, GCC 9 or later. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 34cd567f811..6099d125a60 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -26652,6 +26652,9 @@ whose bounds are to be changed, @var{lbound} and @var{ubound} are new values for lower and upper bounds respectively. @end table +Both commands are deprecated and will be removed in future versions of +@value{GDBN}. MPX itself was listed as removed by Intel in 2019. + When you call an inferior function on an Intel MPX enabled program, GDB sets the inferior's bound registers to the init (disabled) state before calling the function. As a consequence, bounds checks for the diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index b487a3f7478..0d4e30b9a4e 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -9132,17 +9132,19 @@ is \"default\"."), /* Add "bound" command for the show mpx commands list. */ - add_cmd ("bound", no_class, i386_mpx_info_bounds, + cmd_list_element *c = add_cmd ("bound", no_class, i386_mpx_info_bounds, "Show the memory bounds for a given array/pointer storage\ in the bound table.", &mpx_show_cmdlist); + deprecate_cmd (c, nullptr); /* Add "bound" command for the set mpx commands list. */ - add_cmd ("bound", no_class, i386_mpx_set_bounds, + c = add_cmd ("bound", no_class, i386_mpx_set_bounds, "Set the memory bounds for a given array/pointer storage\ in the bound table.", &mpx_set_cmdlist); + deprecate_cmd (c, nullptr); gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_SVR4, i386_svr4_init_abi);