• Jon Tourville's avatar
    apparmor: use zstd compression for profile data · f4d6b94b
    Jon Tourville authored
    Change the algorithm used by apparmor to compress profile data from
    zlib to zstd, using the new zstd API introduced in 5.16.
    
    Zstd provides a larger range of compression levels than zlib and
    significantly better performance at the default level (for a relatively
    small increase in compressed size).
    
    The apparmor module parameter raw_data_compression_level is now clamped
    to the minimum and maximum compression levels reported by the zstd
    library. A compression level of 0 retains the previous behavior of
    disabling policy compression instead of using zstd's behavior, which is
    to use the default compression level.
    Signed-off-by: default avatarJon Tourville <jon.tourville@canonical.com>
    Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
    f4d6b94b
apparmorfs.c 64.8 KB