From patchwork Wed Jan 10 02:02:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liuhongt X-Patchwork-Id: 1884721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PbYP8GTI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T8rgr3CY0z1yPm for ; Wed, 10 Jan 2024 13:03:50 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 971383858283 for ; Wed, 10 Jan 2024 02:03:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by sourceware.org (Postfix) with ESMTPS id 8A5BE3858D33 for ; Wed, 10 Jan 2024 02:02:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A5BE3858D33 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 8A5BE3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.55.52.93 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704852166; cv=none; b=mX8Rpc8cl6MxXnj9DFlhJfVbrUkU/dwDYHOkxC8p4uwFI9/8V7Y/nJbYuLKFz6O9gpL0l+6O+0glsEIM0yd+r3iAP85DMbXBqOhfstb4/bRbtnCe15Q0Xeiu+hJx527zrb5kSch+cVXJHGozYeb4wwel1q+sk0KetJOi0BS7Js0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704852166; c=relaxed/simple; bh=aVBiaMUFIAw4Sq2DVh+IoRhIyljbn357izpwcf0qSWc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=t0HWBeOWzHyJduPmvlFWmTWkzXcdUuE6kzJFJGAvqVq7sBDFLZOsrav+IPTJBwL/Z2SRWgIKHjNCAv6agfK+dY8GItPlNgI1HYFT0aUzIsZTvJZZTvKpEvjjoF79QdNTLzGmf6+uZdPxANrJa8huRKo4fSBbY6sfTcW5QeB1WYA= 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=1704852134; x=1736388134; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=aVBiaMUFIAw4Sq2DVh+IoRhIyljbn357izpwcf0qSWc=; b=PbYP8GTIW5gCqm0SyUzIGsW1K6k/sqkLgKIWGRpK1jrUpnGcvA7v/FBv FxDhS94bUHYDDc1Tsr7Fe/jf/InGNkpYh7XG7QhrnAQ9HD6U+YnnjzdY8 pB4aSQKv/LRDvFUlrkhKREeO02TLDzs4Nauzu214Fn//H9xEdOVJ32W/n arLuFnoOfJS5Xl4WyGWFaOtfyadERYejoYUjcpd5Mk16OEAY5mfkpWLcP 2lW776+IsQSmFxJRul6YXNgPAobCH6meLlyz21lZ5UOjtvHpHb1k1KPrL kdrqt7mByhEIBjaJLYhQTOrtQspsMA1fJQxb8toO9Vi4oGuOw0ZPaONNJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="395539987" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="395539987" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 18:02:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="925469835" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="925469835" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmsmga001.fm.intel.com with ESMTP; 09 Jan 2024 18:02:11 -0800 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id CAF4F10079D5; Wed, 10 Jan 2024 10:02:10 +0800 (CST) From: liuhongt To: gcc-patches@gcc.gnu.org Cc: crazylht@gmail.com, hjl.tools@gmail.com Subject: [PATCH] Update documents for fcf-protection= Date: Wed, 10 Jan 2024 10:02:10 +0800 Message-Id: <20240110020210.2062140-1-hongtao.liu@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org After r14-2692-g1c6231c05bdcca, the option is defined as EnumSet and -fcf-protection=branch won't unset any others bits since they're in different groups. So to override -fcf-protection, an explicit -fcf-protection=none needs to be added and then with -fcf-protection=XXX Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/ChangeLog: * doc/invoke.texi (fcf-protection=): Update documents. --- gcc/doc/invoke.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 68d1f364ac0..d1e6fafb98c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -17734,6 +17734,9 @@ function. The value @code{full} is an alias for specifying both @code{branch} and @code{return}. The value @code{none} turns off instrumentation. +To override @option{-fcf-protection}, @option{-fcf-protection=none} +needs to be explicitly added and then with @option{-fcf-protection=xxx}. + The value @code{check} is used for the final link with link-time optimization (LTO). An error is issued if LTO object files are compiled with different @option{-fcf-protection} values. The