| 1 |
|
| 2 | |
| 3 | * Landlock - Tracepoint helpers
|
| 4 | *
|
| 5 | * Copyright © 2025 Microsoft Corporation
|
| 6 | * Copyright © 2026 Cloudflare, Inc.
|
| 7 |
|
| 8 |
|
| 9 | #ifndef _SECURITY_LANDLOCK_TRACE_H
|
| 10 | #define _SECURITY_LANDLOCK_TRACE_H
|
| 11 |
|
| 12 | #include "access.h"
|
| 13 |
|
| 14 | struct landlock_hierarchy;
|
| 15 | struct landlock_request;
|
| 16 |
|
| 17 | #ifdef CONFIG_TRACEPOINTS
|
| 18 |
|
| 19 | void landlock_trace_free_domain(
|
| 20 | const struct landlock_hierarchy *const hierarchy);
|
| 21 |
|
| 22 | void landlock_trace_denial(
|
| 23 | const struct landlock_request *const request,
|
| 24 | const struct landlock_hierarchy *const youngest_denied,
|
| 25 | const access_mask_t missing, const bool same_exec, const bool logged);
|
| 26 |
|
| 27 | #else
|
| 28 |
|
| 29 | static inline void
|
| 30 | landlock_trace_free_domain(const struct landlock_hierarchy *const hierarchy)
|
| 31 | {
|
| 32 | }
|
| 33 |
|
| 34 | static inline void
|
| 35 | landlock_trace_denial(const struct landlock_request *const request,
|
| 36 | const struct landlock_hierarchy *const youngest_denied,
|
| 37 | const access_mask_t missing, const bool same_exec,
|
| 38 | const bool logged)
|
| 39 | {
|
| 40 | }
|
| 41 |
|
| 42 | #endif
|
| 43 |
|
| 44 | #endif
|