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

Re: [XEN PATCH v2] xen: allow XSM_FLASK_POLICY only if checkpolicy binary is available


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 19 Jul 2021 13:04:50 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-SenderADCheck; bh=X3QRHyTLIPbbl9/ex5tYKBenjeuZAkm67gjqeX8SRCc=; b=RysW2yUd4PZ/zKp8NvCdtt4noQiPim5wFkN6hag2r8bVeT14aW7XCXDhCTAvE/R5BSldKABsRwnTN3v8A0+wnzGMdZ4tNBD93h+BfGdU/ty9F2zaiFFTA1EbLMAFLzaBK0LxKAZMACYnJulj01vtCR7l2OZIxkTlmUZhQCIalQnZsFr7naa4AY+HMK0esR/Ms7Bau3eJCkqRjBE7J7FC81cdq/axw/JUY2PZS1KOmS/qBxZ4bSRHdwHxhjvgdoGQP46moIQe+EX024AlNITjAQA8gjnLjgQ8YtJAYsM2KKWXvQSI4g2jkAu+qLbLTtAZFin71EJCXIsLAcZcUDHkJQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y3WvNTio2+w8f5Vi8vhxDVnICuEwTqU+Ij/ut/Y9S8+Yxzz/1df5paRU0btbq+npfILSTKRRaksn32fE1/orXxoR13vegbGfmj9JR7pl1pAstCHcHaYpz8TJVxaZQvARxwV5EFuC76KQ4TTPzhOQ+LnEIwaZvE5efp8WtAHa6mVryqpJ8Szw13iemUt67r28jckv5Omw75ZqOF029BlKvtGbdoAvJ88hKyvFvFQL6QN46EXGHE1KTNAlKU+cVS3jkjemBjPfBld04illn4JxnTxDrMwjVPErCuUBr4N+4RSKeAZDoIRy+kQr2j6r1FaunxoMt4ue2bTymLwgC1wmjw==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 19 Jul 2021 11:05:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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. 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.

Jan




 


Rackspace

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