mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-01 15:15:19 -04:00
apparmor: Fix undefined references to zstd_ symbols
Unfortunately the switch to using zstd compression did not properly ifdef all the code that uses zstd_ symbols. So that if exporting of binary policy is disabled in the config the compile will fail with the following errors security/apparmor/lsm.c:1545: undefined reference to `zstd_min_clevel' aarch64-linux-ld: security/apparmor/lsm.c:1545: undefined reference to `zstd_max_clevel' Reported-by: kernel test robot <lkp@intel.com> Fixes: 52ccc20c652b ("apparmor: use zstd compression for profile data") Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Jon Tourville <jon.tourville@canonical.com>
This commit is contained in:
@@ -51,4 +51,15 @@ extern bool aa_g_logsyscall;
|
||||
extern bool aa_g_paranoid_load;
|
||||
extern unsigned int aa_g_path_max;
|
||||
|
||||
#ifdef CONFIG_SECURITY_APPARMOR_EXPORT_BINARY
|
||||
#define AA_MIN_CLEVEL zstd_min_clevel()
|
||||
#define AA_MAX_CLEVEL zstd_max_clevel()
|
||||
#define AA_DEFAULT_CLEVEL ZSTD_CLEVEL_DEFAULT
|
||||
#else
|
||||
#define AA_MIN_CLEVEL 0
|
||||
#define AA_MAX_CLEVEL 0
|
||||
#define AA_DEFAULT_CLEVEL 0
|
||||
#endif /* CONFIG_SECURITY_APPARMOR_EXPORT_BINARY */
|
||||
|
||||
|
||||
#endif /* __APPARMOR_H */
|
||||
|
||||
Reference in New Issue
Block a user