[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 1/2] tools/firmware: fix setting of fcf-protection=none


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Mon, 4 Apr 2022 12:40:43 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OyBbGihEUGhAAN4xDkKaoxTfhhCkzCzAGn/Ff7r7+o4=; b=TPdjwmq2KC/9WWMCwZjdT7KfvXfz/1JzpKuaqv2duImQKy+7Uyn/634bK+rmZ1Ml7EC+sHvYvOmajWBo512S6P/0V43EFrHh2CibYDD1fLXQzvfdb+mAIXQgay4fZ6KL+PjKGLU7e8l447deAv5TIH4FOUBVrTrSOs9zAXpxZvgp6QF5yHw6fuf69a1N16Xeal0hTC9sx8atxmI5pu7S2+hxrR8USFe4MLaAkro5+yqCJ0qtAYdzFCfghZcl4bjDsJzeZBNIP7eHl2FAfQGM9PFFlYG99zZP1n9KhuLijPXi7vrC3TezYU/msfrmjykc1S90btjtpskCiLnqQ4aDtw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jFegkCdlijiqo34ncNwKI5oXINDJkEsts2JJyVvW98pqe2NawqCAExqLpPPIdrGVhL/2vIgMeTav9yWYMXTh2g5qLKIV7UV7JqzYn3TOSXAdW8R9x0kWPUfijMIrZ6DZy4VnBoJdtDHJIZxZou2rSDkDPm+3gsZRC2WQyJjZtrwSiXTzeGTER0KbKsH1AN1GA2nmQQ1A6SYsrlX5jmhLqlKCaRZLE3tenfvbLCGAKY8hJyPetnXNBGxrXAmu/BtnsFkdYPac3qRbnmeYehjQPcUzpv0pSHF7fL+5MTcfeV04pxTzcLZ8KLYU+6Wrwp0meb1lTO1BkoUQJmQ7RPGQJQ==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Mon, 04 Apr 2022 10:41:46 +0000
  • Ironport-data: A9a23:1qSQLKIYmf8AP2L+FE+Rq5UlxSXFcZb7ZxGr2PjKsXjdYENS1jxSn DROXGuGPPncZ2DxLtl/Odzn8EgAuJbXzd9nSFRlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA148IMsdoUg7wbRh3tY02YHR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 NJNicCyYBU5BbPJk78HShRcQjolbKITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBNPsM44F/Glp0BnSDOo8QICFSKLPjTNd9Glv1poTRqaOD yYfQRlkMyziUjRPBmUOIrcSvNyj11bEbhQN/Tp5ooJoujOOnWSdyoPFL979atGMA8JPkS6wt m/Aumj0HBweHNie0iaetGKhgPfVmiH2U55UE6e3nsOGm3XKmDZVUkdPEwLm/7/p0SZSRu6zN WQT+hZyr4Eg5He1S9KmRQS1pC+f5U8TDo84//IB1CmBza/d4gC8D2cCTyJcZNFOiPLaVQDGx XfSwYq3WGUHXKm9DCvEq+zK9W/a1T09dzdqWMMScecSDzAPSqkXhwmHcNtsGbXdYjbdSWCpm GDiQMTTatwuYS83O0eToAuvb9GE/MGhousJCuP/BD/NAuRRPtPNWmBQwQKHhcus1a7AJrV7g FAKmtKF8McFBoyXmSqGTY0lRe/1tq7faGGB3QUzQ/HNEghBHVb5IOi8Bxkkei9U3jssI2e1M Cc/RysPjHOsAJdaRfAuON/gYyjb5aPhCc7kRpjpgilmOfBMmPu81Hg2Pya4hjm1+GB1yP1XE crLIK6EUCdBYYw6nWXeegvo+eJyrszI7TiIHs6TItXO+ef2WUN5vp9eawTeNrlptfzcyOgXm v4GX/a3J9xkeLSWSgHc8JIJLEBMKn4+BJvsrNdQePLFKQ1jcFzNwdeIqV/9U+SJR5hoq9o=
  • Ironport-hdrordr: A9a23:qGCQg6oApj2Rrh42zxP6naUaV5vJL9V00zEX/kB9WHVpm5Oj+P xGzc526farslsssREb+OxpOMG7MBfhHPlOkPUs1NaZLXTbUQ6TQr2KgrGSpQEIdxeOlNK1kJ 0QCJSWa+eAfGSS7/yKmTVQeuxIqLLskNHKuQ6d9QYWcegDUdAf0+4TMHf9LqQZfngiOXJvf6 Dsmfav6gDQMUg/X4CePD0oTuLDr9rEmNbPZgMHPQcu7E2rgSmz4LD3PhCE1lNGOgk/i4sKwC zgqUjU96+ju/a0xlv10HLS1Y1fnJ/ExsFYDMKBp8AJInHHixquZq5mR7qe1QpF692H2RIPqp 3hsh0gN8N85zf4eXy0mwLk303a3DMn+xbZuCilqEqmhfa8aCMxCsJHi44cWADe8VAcsNZ117 8O936FtrJMZCmw0xjV1pztbVVHh0C0qX0tnao4lHpES7YTb7dXsMg24F5VKpEdByj3gbpXXN WGNPuspcq+TGnqL0ww5gJUsZ+RtzUIb1q7q3E5y4KoO2M8pgE686MarPZv6kvouqhNDqWs3N 60QZiApIs+PvP+UpgNdtvpOfHHclAlYSi8Rl56cm6XXZ3uBRr22uvKCfMOlaWXRKA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Setting the fcf-protection=none option in EMBEDDED_EXTRA_CFLAGS in the
Makefile doesn't get it propagated to the subdirectories, so instead
set the flag in firmware/Rules.mk, like it's done for other compiler
flags.

Fixes: 3667f7f8f7 ('x86: Introduce support for CET-IBT')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v1:
 - Add the option directly to CFLAGS using cc-option-add.
---
 tools/firmware/Makefile | 2 --
 tools/firmware/Rules.mk | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 53ed4f161e..345037b93b 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -6,8 +6,6 @@ TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 DEBG_DIR := $(DESTDIR)$(DEBUG_DIR)$(XENFIRMWAREDIR)
 
-EMBEDDED_EXTRA_CFLAGS += -fcf-protection=none
-
 SUBDIRS-y :=
 SUBDIRS-$(CONFIG_OVMF) += ovmf-dir
 SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk
index 9f78a7dec9..c227fe2524 100644
--- a/tools/firmware/Rules.mk
+++ b/tools/firmware/Rules.mk
@@ -15,6 +15,8 @@ CFLAGS += -Werror
 
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 
+$(call cc-option-add,CFLAGS,CC,-fcf-protection=none)
+
 # Extra CFLAGS suitable for an embedded type of environment.
 CFLAGS += -ffreestanding -msoft-float
 
-- 
2.35.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.