]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selinux: avoid using types indicating user space interaction
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 16 Dec 2024 16:40:00 +0000 (17:40 +0100)
committerPaul Moore <paul@paul-moore.com>
Wed, 8 Jan 2025 04:14:38 +0000 (23:14 -0500)
Integer types starting with a double underscore, like __u32, are
intended for usage of variables interacting with user-space.

Just use the plain variant.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c
security/selinux/ss/policydb.h

index 617f54abb640297b99b90fb4f13acabdf3daf874..7b2e2c60f0f411f9c1d2dd71f458e0e1cb6e105e 100644 (file)
@@ -3135,7 +3135,7 @@ static int selinux_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
        const struct cred *cred = current_cred();
        struct inode *inode = d_backing_inode(dentry);
        unsigned int ia_valid = iattr->ia_valid;
-       __u32 av = FILE__WRITE;
+       u32 av = FILE__WRITE;
 
        /* ATTR_FORCE is just used for ATTR_KILL_S[UG]ID. */
        if (ia_valid & ATTR_FORCE) {
index 4bba386264a3d0500c1daadf5c559418b39a7d09..5c11069121d38ae2e7c19dcbde0ba47a1393ffb4 100644 (file)
@@ -144,7 +144,7 @@ struct range_trans {
 
 /* Boolean data type */
 struct cond_bool_datum {
-       __u32 value; /* internal type value */
+       u32 value; /* internal type value */
        int state;
 };