linux-stable/security/apparmor
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
..
include apparmor: test: make static symbols visible during kunit testing 2022-12-12 14:13:48 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kconfig apparmor: test: make static symbols visible during kunit testing 2022-12-12 14:13:48 -07:00
Makefile apparmor: test: make static symbols visible during kunit testing 2022-12-12 14:13:48 -07:00
apparmorfs.c apparmor: move ptrace mediation to more logical task.{h,c} 2022-07-19 04:14:22 -07:00
audit.c apparmor: fix quiet_denied for file rules 2022-07-09 15:13:59 -07:00
capability.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
crypto.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
domain.c apparmor: fix overlapping attachment computation 2022-07-19 02:52:36 -07:00
file.c apparmor: handle idmapped mounts 2021-01-24 14:27:20 +01:00
ipc.c apparmor: move ptrace mediation to more logical task.{h,c} 2022-07-19 04:14:22 -07:00
label.c apparmor: allow label to carry debug flags 2022-07-19 02:55:45 -07:00
lib.c apparmor: extend policydb permission set by making use of the xbits 2022-07-19 02:57:15 -07:00
lsm.c ->getprocattr(): attribute name is const char *, TYVM... 2022-09-01 17:34:39 -04:00
match.c apparmor: ensure that dfa state tables have entries 2020-04-08 04:42:48 -07:00
mount.c apparmor: extend policydb permission set by making use of the xbits 2022-07-19 02:57:15 -07:00
net.c apparmor: add a kernel label to use on kernel objects 2022-07-13 16:37:21 -07:00
nulldfa.in
path.c security: apparmor: delete repeated words in comments 2021-02-07 04:15:46 -08:00
policy.c apparmor: make export of raw binary profile to userspace optional 2022-07-09 15:13:59 -07:00
policy_ns.c apparmor: Fix some kernel-doc comments 2022-07-19 02:39:15 -07:00
policy_unpack.c apparmor: test: make static symbols visible during kunit testing 2022-12-12 14:13:48 -07:00
policy_unpack_test.c apparmor: test: make static symbols visible during kunit testing 2022-12-12 14:13:48 -07:00
procattr.c apparmor: Fix kernel-doc 2022-07-09 15:13:59 -07:00
resource.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
secid.c apparmor: disable showing the mode as part of a secid to secctx 2022-07-13 17:18:29 -07:00
stacksplitdfa.in
task.c apparmor: move ptrace mediation to more logical task.{h,c} 2022-07-19 04:14:22 -07:00