Merge tag 'apparmor-pr-2019-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / security / apparmor / include / policy_unpack.h
index 46aefae918f5e9262ce1ef6528447312a96a3d86..e0e1ca7ebc380f1e9ddfc342cbc4d772f284f627 100644 (file)
@@ -41,6 +41,7 @@ enum {
        AAFS_LOADDATA_REVISION,
        AAFS_LOADDATA_HASH,
        AAFS_LOADDATA_DATA,
+       AAFS_LOADDATA_COMPRESSED_SIZE,
        AAFS_LOADDATA_DIR,              /* must be last actual entry */
        AAFS_LOADDATA_NDENTS            /* count of entries */
 };
@@ -61,11 +62,16 @@ struct aa_loaddata {
        struct dentry *dents[AAFS_LOADDATA_NDENTS];
        struct aa_ns *ns;
        char *name;
-       size_t size;
+       size_t size;                    /* the original size of the payload */
+       size_t compressed_size;         /* the compressed size of the payload */
        long revision;                  /* the ns policy revision this caused */
        int abi;
        unsigned char *hash;
 
+       /* Pointer to payload. If @compressed_size > 0, then this is the
+        * compressed version of the payload, else it is the uncompressed
+        * version (with the size indicated by @size).
+        */
        char *data;
 };