[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ecaa60d383d75aebf266bf10850a791.paul@paul-moore.com>
Date: Wed, 13 Sep 2023 13:46:55 -0400
From: Paul Moore <paul@...l-moore.com>
To: Stephen Smalley <stephen.smalley.work@...il.com>,
Christian Göttsche <cgzones@...glemail.com>
Cc: selinux@...r.kernel.org, Eric Paris <eparis@...isplace.org>,
Ondrej Mosnacek <omosnace@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] selinux: simplify avtab slot calculation
On Aug 18, 2023 Stephen Smalley <stephen.smalley.work@...il.com> wrote:
>
> Instead of dividing by 8 and then performing log2 by hand, use a more
> readable calculation.
>
> The behavior of rounddown_pow_of_two() for an input of 0 is undefined,
> so handle that case and small values manually to achieve the same
> results.
>
> Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
> Reviewed-by: Stephen Smalley <stephen.smalley.work@...il.com>
> ---
> security/selinux/ss/avtab.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
Much nicer, thanks. Merged into selinux/next.
--
paul-moore.com
Powered by blists - more mailing lists