From: Jens Axboe <axboe@kernel.dk>
To: Alistair Delva <adelva@google.com>, linux-kernel@vger.kernel.org
Cc: Khazhismel Kumykov <khazhy@google.com>,
Bart Van Assche <bvanassche@acm.org>,
Serge Hallyn <serge@hallyn.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Paul Moore <paul@paul-moore.com>,
selinux@vger.kernel.org, linux-security-module@vger.kernel.org,
kernel-team@android.com, stable@vger.kernel.org
Subject: Re: [PATCH] block: Check ADMIN before NICE for IOPRIO_CLASS_RT
Date: Mon, 15 Nov 2021 11:04:55 -0700 [thread overview]
Message-ID: <74179f08-3529-7502-db33-2ea18cab3f58@kernel.dk> (raw)
In-Reply-To: <20211115173850.3598768-1-adelva@google.com>
On 11/15/21 10:38 AM, Alistair Delva wrote:
> Booting to Android userspace on 5.14 or newer triggers the following
> SELinux denial:
>
> avc: denied { sys_nice } for comm="init" capability=23
> scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=capability
> permissive=0
>
> Init is PID 0 running as root, so it already has CAP_SYS_ADMIN. For
> better compatibility with older SEPolicy, check ADMIN before NICE.
Seems a bit wonky to me, but the end result is the same. In any case,
this warrants a comment above it detailing why the ordering is
seemingly important.
--
Jens Axboe
next prev parent reply other threads:[~2021-11-16 1:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 17:38 [PATCH] block: Check ADMIN before NICE for IOPRIO_CLASS_RT Alistair Delva
2021-11-15 18:04 ` Jens Axboe [this message]
2021-11-15 18:17 ` Alistair Delva
2021-11-15 19:04 ` Ondrej Mosnacek
2021-11-15 19:08 ` Alistair Delva
2021-11-15 21:01 ` Dominick Grift
2021-11-15 21:42 ` Casey Schaufler
2021-11-16 8:21 ` Greg Kroah-Hartman
2021-11-16 9:30 ` David Laight
2021-11-16 13:36 ` Serge E. Hallyn
2021-11-15 19:31 ` Greg Kroah-Hartman
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=74179f08-3529-7502-db33-2ea18cab3f58@kernel.dk \
--to=axboe@kernel.dk \
--cc=adelva@google.com \
--cc=bvanassche@acm.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=khazhy@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=stable@vger.kernel.org \
/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 NNTP newsgroup(s).