projects/linux·blob master · refs

44 lines · 1.1 KiB

1/* SPDX-License-Identifier: GPL-2.0-only */
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
14struct landlock_hierarchy;
15struct landlock_request;
16
17#ifdef CONFIG_TRACEPOINTS
18
19void landlock_trace_free_domain(
20 const struct landlock_hierarchy *const hierarchy);
21
22void 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 /* CONFIG_TRACEPOINTS */
28
29static inline void
30landlock_trace_free_domain(const struct landlock_hierarchy *const hierarchy)
31{
32}
33
34static inline void
35landlock_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 /* CONFIG_TRACEPOINTS */
43
44#endif /* _SECURITY_LANDLOCK_TRACE_H */