Re: [PATCH] selinux: fix sparse warnings in policydb.c

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

 



On Thu, Jan 16, 2020 at 5:10 PM Stephen Smalley <sds@xxxxxxxxxxxxx> wrote:
> On 1/16/20 11:08 AM, Stephen Smalley wrote:
> > On 1/16/20 8:19 AM, Ondrej Mosnacek wrote:
> >> Two places used u32 where there should have been __le32.
> >>
> >> Fixes sparse warnings:
> >>    CHECK   [...]/security/selinux/ss/services.c
> >> [...]/security/selinux/ss/policydb.c:2669:16: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2669:16:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2669:16:    got restricted __le32
> >> [usertype]
> >> [...]/security/selinux/ss/policydb.c:2674:24: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2674:24:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2674:24:    got restricted __le32
> >> [usertype]
> >> [...]/security/selinux/ss/policydb.c:2675:24: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2675:24:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2675:24:    got restricted __le32
> >> [usertype]
> >> [...]/security/selinux/ss/policydb.c:2676:24: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2676:24:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2676:24:    got restricted __le32
> >> [usertype]
> >> [...]/security/selinux/ss/policydb.c:2681:32: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2681:32:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2681:32:    got restricted __le32
> >> [usertype]
> >> [...]/security/selinux/ss/policydb.c:2701:16: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2701:16:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2701:16:    got restricted __le32
> >> [usertype]
> >> [...]/security/selinux/ss/policydb.c:2706:24: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2706:24:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2706:24:    got restricted __le32
> >> [usertype]
> >> [...]/security/selinux/ss/policydb.c:2707:24: warning: incorrect type
> >> in assignment (different base types)
> >> [...]/security/selinux/ss/policydb.c:2707:24:    expected unsigned int
> >> [...]/security/selinux/ss/policydb.c:2707:24:    got restricted __le32
> >> [usertype]
> >>
> >> Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx>
> >
> > Reviewed-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
>
> However, note that checkpatch doesn't like your subject line.
> WARNING: A patch subject line should describe the change not the tool
> that found it

Hm, I run checkpatch.pl from a pre-commit git hook, so it likely only
looks at the diff itself... I'll see if I can tweak the hook to check
a full patch generated from the commit.

It has a good point, though. I'll reword the subject.

-- 
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.




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

  Powered by Linux