From: Paul Moore <paul@paul-moore.com>
To: "Stephen Smalley" <stephen.smalley.work@gmail.com>,
"Christian Göttsche" <cgzones@googlemail.com>
Cc: selinux@vger.kernel.org, Eric Paris <eparis@parisplace.org>,
Ondrej Mosnacek <omosnace@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] selinux: simplify avtab slot calculation
Date: Wed, 13 Sep 2023 13:46:55 -0400 [thread overview]
Message-ID: <5ecaa60d383d75aebf266bf10850a791.paul@paul-moore.com> (raw)
In-Reply-To: <20230818151220.166215-3-cgzones@googlemail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 622 bytes --]
On Aug 18, 2023 Stephen Smalley <stephen.smalley.work@gmail.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@googlemail.com>
> Reviewed-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> ---
> security/selinux/ss/avtab.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
Much nicer, thanks. Merged into selinux/next.
--
paul-moore.com
next prev parent reply other threads:[~2023-09-13 17:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 15:12 [PATCH 2/6] selinux: dump statistics for more hash tables Christian Göttsche
2023-08-18 15:12 ` [PATCH 3/6] selinux: improve debug configuration Christian Göttsche
2023-09-08 16:08 ` Stephen Smalley
2023-09-13 17:46 ` Paul Moore
2023-08-18 15:12 ` [PATCH 4/6] selinux: simplify avtab slot calculation Christian Göttsche
2023-09-08 18:44 ` Stephen Smalley
2023-09-13 17:46 ` Paul Moore [this message]
2023-08-18 15:12 ` [PATCH 5/6] selinux: improve role transition hashing Christian Göttsche
2023-09-08 18:46 ` Stephen Smalley
2023-09-13 17:46 ` Paul Moore
2023-08-18 15:12 ` [PATCH 6/6] selinux: improve symtab string hashing Christian Göttsche
2023-09-07 17:44 ` Stephen Smalley
2023-09-13 17:46 ` Paul Moore
2023-09-08 18:49 ` Stephen Smalley
2023-08-18 15:12 ` [PATCH 1/6] selinux: print sum of chain lengths^2 for hash tables Christian Göttsche
2023-09-08 18:47 ` Stephen Smalley
2023-09-13 17:46 ` Paul Moore
2023-09-07 17:42 ` [PATCH 2/6] selinux: dump statistics for more " Stephen Smalley
2023-09-13 16:11 ` Paul Moore
2023-09-13 18:03 ` Stephen Smalley
2023-09-13 18:07 ` Paul Moore
2023-09-08 18:03 ` Stephen Smalley
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=5ecaa60d383d75aebf266bf10850a791.paul@paul-moore.com \
--to=paul@paul-moore.com \
--cc=cgzones@googlemail.com \
--cc=eparis@parisplace.org \
--cc=linux-kernel@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.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
all inboxes | Powered by JetHome®