From: Paul Moore <paul@paul-moore.com>
To: Ondrej Mosnacek <omosnace@redhat.com>,
Chris PeBenito <pebenito@ieee.org>
Cc: selinux@vger.kernel.org, Mimi Zohar <zohar@linux.ibm.com>,
selinux-refpolicy@vger.kernel.org
Subject: Re: [PATCH testsuite 1/3] policy: make sure test_ibpkey_access_t can lock enough memory
Date: Tue, 28 Feb 2023 11:51:00 -0500 [thread overview]
Message-ID: <CAHC9VhQnCchbn+kgZQ4cxUQKWCKd=H02R++qeKtqR75BpZETxQ@mail.gmail.com> (raw)
In-Reply-To: <20230228141247.626736-2-omosnace@redhat.com>
On Tue, Feb 28, 2023 at 9:13 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
>
> The ibv_create_cq() operation requires the caller to be able to lock
> enough memory (RLIMIT_MEMLOCK). In some environments (such as RHEL-8)
> the default resource limits may not be enough, requiring CAP_IPC_LOCK to
> go above the limit. To make sure the test works also under stricter
> resource limits, grant CAP_IPC_LOCK to test_ibpkey_access_t.
>
> Reported-by: Mimi Zohar <zohar@linux.ibm.com>
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
> ---
> policy/test_ibpkey.te | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/policy/test_ibpkey.te b/policy/test_ibpkey.te
> index 863ff16..97f0c3c 100644
> --- a/policy/test_ibpkey.te
> +++ b/policy/test_ibpkey.te
> @@ -10,6 +10,8 @@ type test_ibpkey_access_t;
> testsuite_domain_type(test_ibpkey_access_t)
> typeattribute test_ibpkey_access_t ibpkeydomain;
>
> +allow test_ibpkey_access_t self:capability ipc_lock;
FWIW, I brought this up back in 2019 and have been carrying a local
selinux-testsuite patch for this ever since (it's the only way to get
a clean run of the IB tests). While it can be fixed in the
selinux-testsuite policy, I believe this is a more general problem and
should probably be fixed in refpol.
https://lore.kernel.org/selinux/CAHC9VhTuYi+W0RukEV4WNrP5X_AFeouaWMsdbgxSL1v04mouWw@mail.gmail.com/
> dev_rw_infiniband_dev(test_ibpkey_access_t)
> dev_rw_sysfs(test_ibpkey_access_t)
>
> --
> 2.39.2
--
paul-moore.com
next parent reply other threads:[~2023-02-28 16:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230228141247.626736-1-omosnace@redhat.com>
[not found] ` <20230228141247.626736-2-omosnace@redhat.com>
2023-02-28 16:51 ` Paul Moore [this message]
2023-02-28 20:12 ` [PATCH testsuite 1/3] policy: make sure test_ibpkey_access_t can lock enough memory Mimi Zohar
2023-03-01 15:21 ` Ondrej Mosnacek
2023-03-01 18:48 ` Paul Moore
2023-03-03 12:29 ` Ondrej Mosnacek
2023-03-06 13:51 ` Paul Moore
[not found] ` <20230228141247.626736-3-omosnace@redhat.com>
2023-02-28 17:01 ` [PATCH testsuite 2/3] policy: allow test_ibpkey_access_t to use RDMA netlink sockets Paul Moore
2023-03-01 15:25 ` Ondrej Mosnacek
2023-03-01 18:49 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHC9VhQnCchbn+kgZQ4cxUQKWCKd=H02R++qeKtqR75BpZETxQ@mail.gmail.com' \
--to=paul@paul-moore.com \
--cc=omosnace@redhat.com \
--cc=pebenito@ieee.org \
--cc=selinux-refpolicy@vger.kernel.org \
--cc=selinux@vger.kernel.org \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).