lkml.org 
[lkml]   [2022]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] selinux: use int arrays for boolean values
On Tue, Aug 30, 2022 at 11:45 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Do not cast pointers of signed integers to pointers of unsigned integers
> and vice versa.
>
> It should currently not be an issue since they hold SELinux boolean
> values which should only contain either 0's or 1's, which should have
> the same representation.
>
> Reported by sparse:
>
> security/selinux/selinuxfs.c:1485:30: warning: incorrect type in assignment (different signedness)
> security/selinux/selinuxfs.c:1485:30: expected unsigned int *
> security/selinux/selinuxfs.c:1485:30: got int *[addressable] values
> security/selinux/selinuxfs.c:1402:48: warning: incorrect type in argument 3 (different signedness)
> security/selinux/selinuxfs.c:1402:48: expected int *values
> security/selinux/selinuxfs.c:1402:48: got unsigned int *bool_pending_values
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> ---
> Previous patch proposal: https://patchwork.kernel.org/project/selinux/patch/20220502135907.31035-1-cgzones@googlemail.com/
> ---
> security/selinux/selinuxfs.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)

Merged into selinux/next, thanks!

--
paul-moore.com

\
 
 \ /
  Last update: 2022-08-30 23:05    [W:0.305 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site