[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHC9VhRm468n-OEmBztymAi+ADHd1bnKNYXvt2-0S4oNk9OCAw@mail.gmail.com>
Date: Tue, 30 Aug 2022 17:16:09 -0400
From: Paul Moore <paul@...l-moore.com>
To: Christian Göttsche <cgzones@...glemail.com>
Cc: selinux@...r.kernel.org,
Stephen Smalley <stephen.smalley.work@...il.com>,
Eric Paris <eparis@...isplace.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selinux: declare read-only parameters const
On Tue, Aug 30, 2022 at 11:53 AM Christian Göttsche
<cgzones@...glemail.com> wrote:
>
> Declare ebitmap, mls_level and mls_context parameters const where they
> are only read from. This allows callers to supply pointers to const
> as arguments and increases readability.
>
> Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
> ---
> This patch is similar to userspace commits ("libsepol: mark read-only
> parameters of ebitmap interfaces const") [1] and ("libsepol: mark
> immutable mls and context parameter const") [2].
> Pointers to const are for example used in the (for now userspace only)
> policy validation code.
>
> [1]: https://github.com/SELinuxProject/selinux/commit/390ec54d278a14d9c29b80cc4fc5cb9ba504ed13
> [2]: https://github.com/SELinuxProject/selinux/commit/6359946633507db1d98b24638cf22eb5afdcd272
> ---
> security/selinux/ss/context.h | 17 +++++++++--------
> security/selinux/ss/ebitmap.c | 21 +++++++++++----------
> security/selinux/ss/ebitmap.h | 18 +++++++++---------
> security/selinux/ss/mls_types.h | 4 ++--
> 4 files changed, 31 insertions(+), 29 deletions(-)
Merged into selinux/next, thanks!
--
paul-moore.com
Powered by blists - more mailing lists