Files
xen/tools/libfsimage/common.mk
T
Alejandro Vallejo 7d85c70431 libfsimage/xfs: Add compile-time check to libfsimage
Adds the common tools include folder to the -I compile flags
of libfsimage. This allows us to use:
  xen-tools/common-macros.h:BUILD_BUG_ON()

With it, statically assert a sanitized "blocklog - SECTOR_BITS" cannot
underflow.

This is part of XSA-443 / CVE-2023-34325

Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2023-10-11 06:36:50 +01:00

12 lines
343 B
Makefile

include $(XEN_ROOT)/tools/Rules.mk
FSDIR := $(libdir)/xenfsimage
CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ $(CFLAGS_xeninclude) -DFSIMAGE_FSDIR=\"$(FSDIR)\"
CFLAGS += -D_GNU_SOURCE
LDFLAGS += -L../common/
PIC_OBJS = $(patsubst %.c,%.opic,$(LIB_SRCS-y))
clean distclean::
rm -f $(PIC_OBJS) $(TARGETS) $(DEPS_RM)