On
19.07.2021 12:47, Anthony PERARD wrote:
On Mon, Jul 19, 2021 at 09:37:06AM +0200, Jan Beulich wrote:
On 16.07.2021 14:38, Anthony PERARD wrote:
+export HAS_CHECKPOLICY := $(call success,$(CHECKPOLICY) -h 2>&1 | grep -q xen)
While the setting indeed gets obtained in a Makefile now, ...
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -235,8 +235,8 @@ config XSM_FLASK_AVC_STATS
config XSM_FLASK_POLICY
bool "Compile Xen with a built-in FLASK security policy"
- default y if "$(XEN_HAS_CHECKPOLICY)" = "y"
- depends on XSM_FLASK
+ default y
+ depends on XSM_FLASK && "$(HAS_CHECKPOLICY)"
... it's still used as a Kconfig dependency. This in particular
does not address George's concern about a setting silently getting
turned off behind the back of the person having enabled it (and
This patch v2 wasn't meant to address George's concern which didn't
exist at the time this v2 was sent... I was trying to address yours.
But it seems that "George's concern" is part of your issues with
Kconfig too, which I missed when trying to right this v2.
Anyway, those two patches are the only way I'm going to try to fix the
random build failure in the GitLab CI, I'm not going to try to fix
issues with the use of Kconfig for now. In the mean time either v1 or v2
is committed, or will just keep getting random build failure in the
GitLab CI.
Fair
enough. I actually think that randconfig shouldn't act quite as
randomly
as it does.
It sounds like randconfig currently works appropriately for how KConfig is meant to work. That is, for good or for ill, KConfig seems designed to silently discard options with missing dependencies (either internal or external); so generating a config
with missing dependencies to hand to it is “sensible”.
But
what's sensible as behavior there really
depends
heavily on the future intentions with .config. If we follow
Linux'es
model (which Andrew advocates for), its randomness would be
limited
by options which could get randomly set getting further
altered
by environmental conditions. Hence that would limit what can
actually
be tested, but it would avoid failures resulting from the
environment
not matching the chose settings.
Otoh
with our current model (largely, leaving aside the few
environment
checks we've already got) what is being asked for is
what
is going to get built. But failure from environmental
constraints
shouldn't be treated the same as failure from bad
interaction
of options; it's (aiui) the latter which randconfig is
supposed
to point out.
Right; so another solution to the ‘randconfig CI loop’ issue would be to have the pipeline pass (or some non-pass non-fail state if possible) when then build failed because there were missing dependencies. Maybe one way of doing that would be to have a “make
check-dependencies” target that would run first.
That said, since it’s basically known that “silently disabling things it can’t build" is a quirk of Kconfig, I’m less inclined to object to v1 of the patch.
-George
|