linux/security/apparmor/include
Rae Moar b11e51dd70 apparmor: test: make static symbols visible during kunit testing
Use macros, VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT, to allow
static symbols to be conditionally set to be visible during
apparmor_policy_unpack_test, which removes the need to include the testing
file in the implementation file.

Change the namespace of the symbols that are now conditionally visible (by
adding the prefix aa_) to avoid confusion with symbols of the same name.

Allow the test to be built as a module and namespace the module name from
policy_unpack_test to apparmor_policy_unpack_test to improve clarity of
the module name.

Provide an example of how static symbols can be dealt with in testing.

Signed-off-by: Rae Moar <rmoar@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-12-12 14:13:48 -07:00
..
apparmor.h apparmor: make export of raw binary profile to userspace optional 2022-07-09 15:13:59 -07:00
apparmorfs.h apparmor: make export of raw binary profile to userspace optional 2022-07-09 15:13:59 -07:00
audit.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
capability.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
cred.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
crypto.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
domain.h exec: Factor security_bprm_creds_for_exec out of security_bprm_set_creds 2020-05-20 14:45:31 -05:00
file.h apparmor: extend policydb permission set by making use of the xbits 2022-07-19 02:57:15 -07:00
ipc.h apparmor: move ptrace mediation to more logical task.{h,c} 2022-07-19 04:14:22 -07:00
label.h apparmor: allow label to carry debug flags 2022-07-19 02:55:45 -07:00
lib.h apparmor: fix absroot causing audited secids to begin with = 2022-07-09 15:13:58 -07:00
match.h apparmor: add outofband transition and use it in xattr match 2020-01-21 06:00:20 -08:00
mount.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
net.h security: add const qualifier to struct sock in various places 2020-12-03 12:56:03 -08:00
path.h apparmor: allow label to carry debug flags 2022-07-19 02:55:45 -07:00
perms.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
policy_ns.h apparmor: add a kernel label to use on kernel objects 2022-07-13 16:37:21 -07:00
policy_unpack.h apparmor: test: make static symbols visible during kunit testing 2022-12-12 14:13:48 -07:00
policy.h apparmor: allow label to carry debug flags 2022-07-19 02:55:45 -07:00
procattr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
resource.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
secid.h apparmor: disable showing the mode as part of a secid to secctx 2022-07-13 17:18:29 -07:00
sig_names.h apparmor: audit unknown signal numbers 2018-02-09 11:30:01 -08:00
task.h apparmor: move ptrace mediation to more logical task.{h,c} 2022-07-19 04:14:22 -07:00