Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A809CC64ED6 for ; Wed, 1 Mar 2023 15:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbjCAP0Y (ORCPT ); Wed, 1 Mar 2023 10:26:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbjCAP0X (ORCPT ); Wed, 1 Mar 2023 10:26:23 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEA986A55 for ; Wed, 1 Mar 2023 07:25:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677684335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QpD2SbgTDtTZwWZG/3p3wgldChvS7P9t3TDCh4URJZw=; b=eqM79woNhX6ejpQcSdOtLk3z4aARGkEfV4Qr8QrEhirbe3kKrzS1Bh08vBQitVPLhMihIc sFz1KMvLwFGMK+pXLu/zz9TEf5k6GF5jhzzgm1ca1Ull+fRmBUuaTCCOpReU6XNauB0cXs lC3NANsuoLoymWWVIqeWr792pNxdJX4= Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-138-sLRKvNAwNC-Q9d3eNKeC6Q-1; Wed, 01 Mar 2023 10:25:29 -0500 X-MC-Unique: sLRKvNAwNC-Q9d3eNKeC6Q-1 Received: by mail-pf1-f200.google.com with SMTP id n17-20020a056a000d5100b005e5e662a4ccso7045795pfv.4 for ; Wed, 01 Mar 2023 07:25:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QpD2SbgTDtTZwWZG/3p3wgldChvS7P9t3TDCh4URJZw=; b=14RVPa2xxgda2AU/JdHbYQnqpUM4igxls6EfDuPgVE+fWa7D9rGnHtBcOPSARWtoR7 rDpvMnx/D/KuLJkEmA9LO52GMzxQ15ZxjVvLMl+Y2kf5G7czIp/yqE3mLyubxJRYZKz4 7ZS7G7TeO3RQuj/P7fqMLWNy1P+HuNELjzq7mdYDgK4kWNnDIILekUF1FehWMv8HAJsQ XBvk9M7hHxcL21tCqZWg/gy063X6t/S4Sefyh0wXCGDoxIsxgMyOvQ3xvn/HmjZE9XGf I7Meq4ppwGojn1P/CW6cEonwAlme1dDi+F8qqwEvYejLzthUHhBNODyIy+oky+ORXIAr DP1Q== X-Gm-Message-State: AO0yUKUEOhp2dbiZ5XvJK42sbz2M+0a95JggAuOeFdltjnId239XCSA+ 7E2E07AJfLi36HEWAYvXnK9axgxuZFVlTmyUHhzHpleCnCP3P/OihaKCMgMScbI9ZfZHONt3aKx dvb43NWPWawZXF//pP21Bz9R3Axm6se5vJy1VUuT+lggfXR+0OA/+bv37kw== X-Received: by 2002:a65:6b81:0:b0:503:130c:ac9f with SMTP id d1-20020a656b81000000b00503130cac9fmr2606236pgw.4.1677684328497; Wed, 01 Mar 2023 07:25:28 -0800 (PST) X-Google-Smtp-Source: AK7set//CyQsW9OanVY7NUN7kjAJJMZHB8Dj6OPYRMUFkHO1poFOljSJpPEtOK/qJ2FTmpWQ6ppd7aaKhH2/0UU0ldA= X-Received: by 2002:a65:6b81:0:b0:503:130c:ac9f with SMTP id d1-20020a656b81000000b00503130cac9fmr2606220pgw.4.1677684328032; Wed, 01 Mar 2023 07:25:28 -0800 (PST) MIME-Version: 1.0 References: <20230228141247.626736-1-omosnace@redhat.com> <20230228141247.626736-3-omosnace@redhat.com> In-Reply-To: From: Ondrej Mosnacek Date: Wed, 1 Mar 2023 16:25:16 +0100 Message-ID: Subject: Re: [PATCH testsuite 2/3] policy: allow test_ibpkey_access_t to use RDMA netlink sockets To: Paul Moore Cc: Chris PeBenito , selinux@vger.kernel.org, selinux-refpolicy@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On Tue, Feb 28, 2023 at 6:01=E2=80=AFPM Paul Moore wr= ote: > On Tue, Feb 28, 2023 at 9:13=E2=80=AFAM Ondrej Mosnacek wrote: > > > > ibv_get_device_list(3) first tries to get the device list via netlink > > and if that fails it falls back to getting it from sysfs. Currently the > > policy denies getting it from netlink, generating some denials. Allow > > test_ibpkey_access_t the necessary permissions so it can do it the > > preferred way and doesn't generate audit AVC noise. > > > > Signed-off-by: Ondrej Mosnacek > > --- > > policy/test_ibpkey.te | 1 + > > 1 file changed, 1 insertion(+) > > Similar to the other policy issue, it seems like this is a general > problem and not specifically a selinux-testsuite issue, right? If > that is the case should we fix this in refpol? I think it's okay to > put a temporary fix in the test suite, but we should also push to fix > this in refpol. Basically the same as I said in the first paragraph of my reply under patch 1 applies here, just in this case we are talking about users of ibv_get_device_list(3) instead of ibv_create_cq(3). --=20 Ondrej Mosnacek Senior Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.