[PATCH] xen/include: compat/xlat.h may change with .config changes

Jan Beulich posted 1 patch 3 years, 3 months ago
Test env passed
Test gitlab-ci passed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/2bd62f36-e878-8a0b-6e64-d25f5818331c@suse.com
[PATCH] xen/include: compat/xlat.h may change with .config changes
Posted by Jan Beulich 3 years, 3 months ago
$(xlat-y) getting derived from $(headers-y) means its contents may
change with changes to .config. The individual files $(xlat-y) refers
to, otoh, may not change, and hence not trigger rebuilding of xlat.h.
(Note that the issue was already present before the commit referred to
below, but it was far more limited in affecting only changes to
CONFIG_XSM_FLASK.)

Fixes: 2c8fabb2232d ("x86: only generate compat headers actually needed")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -81,7 +81,7 @@ compat/.xlat/%.lst: xlat.lst Makefile
 xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:blank:]]+[^[:blank:]]+[[:blank:]]+,,p' xlat.lst | uniq)
 xlat-y := $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y))
 
-compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) Makefile
+compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) config/auto.conf Makefile
 	cat $(filter %.h,$^) >$@.new
 	mv -f $@.new $@
 

Re: [PATCH] xen/include: compat/xlat.h may change with .config changes
Posted by Andrew Cooper 3 years, 3 months ago
On 25/01/2021 11:03, Jan Beulich wrote:
> $(xlat-y) getting derived from $(headers-y) means its contents may
> change with changes to .config. The individual files $(xlat-y) refers
> to, otoh, may not change, and hence not trigger rebuilding of xlat.h.
> (Note that the issue was already present before the commit referred to
> below, but it was far more limited in affecting only changes to
> CONFIG_XSM_FLASK.)
>
> Fixes: 2c8fabb2232d ("x86: only generate compat headers actually needed")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>