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

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


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Fri, 1 Apr 2022 15:50:00 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 01 Apr 2022 14:50:09 +0000
  • Ironport-data: A9a23:ha+W4qN5gQbi1yXvrR3Nl8FynXyQoLVcMsEvi/4bfWQNrUp0hmYPy 2FMUGyAM6qOa2r3LdEkPoW18RgH7JGDn9FqSwto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZl2tcw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zk f8RjKS+cAQTOaz0qsJFeTgJUCxGMvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gQQqmBP pVJMVKDajzOOy8eNU88Wahmt+2whVj2SyFA+RWK8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u13T0BFQWOcKSzRKB82mwnanfkCXjQoUQGbaksPlwjzWuKnc7UUNMEwHh+L/g1xD4C4k3x 1EoFjQG9IJuzXSld9rHWByAkljclD9NGNdoHLhvgO2S8Zb87wGcD2kCazdObt06qcM7LQAXO k+1c8DBXmI27uDMIZ6J3vLN9G7pZ3BJRYMXTXVcJTbp9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/HmZw ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Apr 01, 2022 at 04:37:18PM +0200, Roger Pau Monne wrote:
> 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>
> ---
>  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..efbbc73a45 100644
> --- a/tools/firmware/Rules.mk
> +++ b/tools/firmware/Rules.mk
> @@ -13,6 +13,8 @@ endif
>  
>  CFLAGS += -Werror
>  
> +EMBEDDED_EXTRA_CFLAGS += -fcf-protection=none
> +

I think making modification to $(EMBEDDED_EXTRA_CFLAGS) outside of
"Config.mk" is confusing and would be better be avoided.

Could you instead call $(cc-option-add ) just for that extra CFLAGS?

>  $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
>  
>  # Extra CFLAGS suitable for an embedded type of environment.

Thanks,

-- 
Anthony PERARD



 


Rackspace

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