Re: [PATCH 4/6] selinux: simplify avtab slot calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 18, 2023 at 11:12 AM Christian Göttsche
<cgzones@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>

Reviewed-by: Stephen Smalley <stephen.smalley.work@xxxxxxxxx>




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux