162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* audit.h -- Auditing support 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. 562306a36Sopenharmony_ci * All Rights Reserved. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Written by Rickard E. (Rik) Faith <faith@redhat.com> 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci#ifndef _LINUX_AUDIT_H_ 1062306a36Sopenharmony_ci#define _LINUX_AUDIT_H_ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include <linux/sched.h> 1362306a36Sopenharmony_ci#include <linux/ptrace.h> 1462306a36Sopenharmony_ci#include <linux/audit_arch.h> 1562306a36Sopenharmony_ci#include <uapi/linux/audit.h> 1662306a36Sopenharmony_ci#include <uapi/linux/netfilter/nf_tables.h> 1762306a36Sopenharmony_ci#include <uapi/linux/fanotify.h> 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#define AUDIT_INO_UNSET ((unsigned long)-1) 2062306a36Sopenharmony_ci#define AUDIT_DEV_UNSET ((dev_t)-1) 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_cistruct audit_sig_info { 2362306a36Sopenharmony_ci uid_t uid; 2462306a36Sopenharmony_ci pid_t pid; 2562306a36Sopenharmony_ci char ctx[]; 2662306a36Sopenharmony_ci}; 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_cistruct audit_buffer; 2962306a36Sopenharmony_cistruct audit_context; 3062306a36Sopenharmony_cistruct inode; 3162306a36Sopenharmony_cistruct netlink_skb_parms; 3262306a36Sopenharmony_cistruct path; 3362306a36Sopenharmony_cistruct linux_binprm; 3462306a36Sopenharmony_cistruct mq_attr; 3562306a36Sopenharmony_cistruct mqstat; 3662306a36Sopenharmony_cistruct audit_watch; 3762306a36Sopenharmony_cistruct audit_tree; 3862306a36Sopenharmony_cistruct sk_buff; 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_cistruct audit_krule { 4162306a36Sopenharmony_ci u32 pflags; 4262306a36Sopenharmony_ci u32 flags; 4362306a36Sopenharmony_ci u32 listnr; 4462306a36Sopenharmony_ci u32 action; 4562306a36Sopenharmony_ci u32 mask[AUDIT_BITMASK_SIZE]; 4662306a36Sopenharmony_ci u32 buflen; /* for data alloc on list rules */ 4762306a36Sopenharmony_ci u32 field_count; 4862306a36Sopenharmony_ci char *filterkey; /* ties events to rules */ 4962306a36Sopenharmony_ci struct audit_field *fields; 5062306a36Sopenharmony_ci struct audit_field *arch_f; /* quick access to arch field */ 5162306a36Sopenharmony_ci struct audit_field *inode_f; /* quick access to an inode field */ 5262306a36Sopenharmony_ci struct audit_watch *watch; /* associated watch */ 5362306a36Sopenharmony_ci struct audit_tree *tree; /* associated watched tree */ 5462306a36Sopenharmony_ci struct audit_fsnotify_mark *exe; 5562306a36Sopenharmony_ci struct list_head rlist; /* entry in audit_{watch,tree}.rules list */ 5662306a36Sopenharmony_ci struct list_head list; /* for AUDIT_LIST* purposes only */ 5762306a36Sopenharmony_ci u64 prio; 5862306a36Sopenharmony_ci}; 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci/* Flag to indicate legacy AUDIT_LOGINUID unset usage */ 6162306a36Sopenharmony_ci#define AUDIT_LOGINUID_LEGACY 0x1 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_cistruct audit_field { 6462306a36Sopenharmony_ci u32 type; 6562306a36Sopenharmony_ci union { 6662306a36Sopenharmony_ci u32 val; 6762306a36Sopenharmony_ci kuid_t uid; 6862306a36Sopenharmony_ci kgid_t gid; 6962306a36Sopenharmony_ci struct { 7062306a36Sopenharmony_ci char *lsm_str; 7162306a36Sopenharmony_ci void *lsm_rule; 7262306a36Sopenharmony_ci }; 7362306a36Sopenharmony_ci }; 7462306a36Sopenharmony_ci u32 op; 7562306a36Sopenharmony_ci}; 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_cienum audit_ntp_type { 7862306a36Sopenharmony_ci AUDIT_NTP_OFFSET, 7962306a36Sopenharmony_ci AUDIT_NTP_FREQ, 8062306a36Sopenharmony_ci AUDIT_NTP_STATUS, 8162306a36Sopenharmony_ci AUDIT_NTP_TAI, 8262306a36Sopenharmony_ci AUDIT_NTP_TICK, 8362306a36Sopenharmony_ci AUDIT_NTP_ADJUST, 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci AUDIT_NTP_NVALS /* count */ 8662306a36Sopenharmony_ci}; 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#ifdef CONFIG_AUDITSYSCALL 8962306a36Sopenharmony_cistruct audit_ntp_val { 9062306a36Sopenharmony_ci long long oldval, newval; 9162306a36Sopenharmony_ci}; 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_cistruct audit_ntp_data { 9462306a36Sopenharmony_ci struct audit_ntp_val vals[AUDIT_NTP_NVALS]; 9562306a36Sopenharmony_ci}; 9662306a36Sopenharmony_ci#else 9762306a36Sopenharmony_cistruct audit_ntp_data {}; 9862306a36Sopenharmony_ci#endif 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_cienum audit_nfcfgop { 10162306a36Sopenharmony_ci AUDIT_XT_OP_REGISTER, 10262306a36Sopenharmony_ci AUDIT_XT_OP_REPLACE, 10362306a36Sopenharmony_ci AUDIT_XT_OP_UNREGISTER, 10462306a36Sopenharmony_ci AUDIT_NFT_OP_TABLE_REGISTER, 10562306a36Sopenharmony_ci AUDIT_NFT_OP_TABLE_UNREGISTER, 10662306a36Sopenharmony_ci AUDIT_NFT_OP_CHAIN_REGISTER, 10762306a36Sopenharmony_ci AUDIT_NFT_OP_CHAIN_UNREGISTER, 10862306a36Sopenharmony_ci AUDIT_NFT_OP_RULE_REGISTER, 10962306a36Sopenharmony_ci AUDIT_NFT_OP_RULE_UNREGISTER, 11062306a36Sopenharmony_ci AUDIT_NFT_OP_SET_REGISTER, 11162306a36Sopenharmony_ci AUDIT_NFT_OP_SET_UNREGISTER, 11262306a36Sopenharmony_ci AUDIT_NFT_OP_SETELEM_REGISTER, 11362306a36Sopenharmony_ci AUDIT_NFT_OP_SETELEM_UNREGISTER, 11462306a36Sopenharmony_ci AUDIT_NFT_OP_GEN_REGISTER, 11562306a36Sopenharmony_ci AUDIT_NFT_OP_OBJ_REGISTER, 11662306a36Sopenharmony_ci AUDIT_NFT_OP_OBJ_UNREGISTER, 11762306a36Sopenharmony_ci AUDIT_NFT_OP_OBJ_RESET, 11862306a36Sopenharmony_ci AUDIT_NFT_OP_FLOWTABLE_REGISTER, 11962306a36Sopenharmony_ci AUDIT_NFT_OP_FLOWTABLE_UNREGISTER, 12062306a36Sopenharmony_ci AUDIT_NFT_OP_SETELEM_RESET, 12162306a36Sopenharmony_ci AUDIT_NFT_OP_RULE_RESET, 12262306a36Sopenharmony_ci AUDIT_NFT_OP_INVALID, 12362306a36Sopenharmony_ci}; 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ciextern int __init audit_register_class(int class, unsigned *list); 12662306a36Sopenharmony_ciextern int audit_classify_syscall(int abi, unsigned syscall); 12762306a36Sopenharmony_ciextern int audit_classify_arch(int arch); 12862306a36Sopenharmony_ci/* only for compat system calls */ 12962306a36Sopenharmony_ciextern unsigned compat_write_class[]; 13062306a36Sopenharmony_ciextern unsigned compat_read_class[]; 13162306a36Sopenharmony_ciextern unsigned compat_dir_class[]; 13262306a36Sopenharmony_ciextern unsigned compat_chattr_class[]; 13362306a36Sopenharmony_ciextern unsigned compat_signal_class[]; 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_ci/* audit_names->type values */ 13662306a36Sopenharmony_ci#define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ 13762306a36Sopenharmony_ci#define AUDIT_TYPE_NORMAL 1 /* a "normal" audit record */ 13862306a36Sopenharmony_ci#define AUDIT_TYPE_PARENT 2 /* a parent audit record */ 13962306a36Sopenharmony_ci#define AUDIT_TYPE_CHILD_DELETE 3 /* a child being deleted */ 14062306a36Sopenharmony_ci#define AUDIT_TYPE_CHILD_CREATE 4 /* a child being created */ 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci/* maximized args number that audit_socketcall can process */ 14362306a36Sopenharmony_ci#define AUDITSC_ARGS 6 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci/* bit values for ->signal->audit_tty */ 14662306a36Sopenharmony_ci#define AUDIT_TTY_ENABLE BIT(0) 14762306a36Sopenharmony_ci#define AUDIT_TTY_LOG_PASSWD BIT(1) 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_cistruct filename; 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci#define AUDIT_OFF 0 15262306a36Sopenharmony_ci#define AUDIT_ON 1 15362306a36Sopenharmony_ci#define AUDIT_LOCKED 2 15462306a36Sopenharmony_ci#ifdef CONFIG_AUDIT 15562306a36Sopenharmony_ci/* These are defined in audit.c */ 15662306a36Sopenharmony_ci /* Public API */ 15762306a36Sopenharmony_ciextern __printf(4, 5) 15862306a36Sopenharmony_civoid audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, 15962306a36Sopenharmony_ci const char *fmt, ...); 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ciextern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type); 16262306a36Sopenharmony_ciextern __printf(2, 3) 16362306a36Sopenharmony_civoid audit_log_format(struct audit_buffer *ab, const char *fmt, ...); 16462306a36Sopenharmony_ciextern void audit_log_end(struct audit_buffer *ab); 16562306a36Sopenharmony_ciextern bool audit_string_contains_control(const char *string, 16662306a36Sopenharmony_ci size_t len); 16762306a36Sopenharmony_ciextern void audit_log_n_hex(struct audit_buffer *ab, 16862306a36Sopenharmony_ci const unsigned char *buf, 16962306a36Sopenharmony_ci size_t len); 17062306a36Sopenharmony_ciextern void audit_log_n_string(struct audit_buffer *ab, 17162306a36Sopenharmony_ci const char *buf, 17262306a36Sopenharmony_ci size_t n); 17362306a36Sopenharmony_ciextern void audit_log_n_untrustedstring(struct audit_buffer *ab, 17462306a36Sopenharmony_ci const char *string, 17562306a36Sopenharmony_ci size_t n); 17662306a36Sopenharmony_ciextern void audit_log_untrustedstring(struct audit_buffer *ab, 17762306a36Sopenharmony_ci const char *string); 17862306a36Sopenharmony_ciextern void audit_log_d_path(struct audit_buffer *ab, 17962306a36Sopenharmony_ci const char *prefix, 18062306a36Sopenharmony_ci const struct path *path); 18162306a36Sopenharmony_ciextern void audit_log_key(struct audit_buffer *ab, 18262306a36Sopenharmony_ci char *key); 18362306a36Sopenharmony_ciextern void audit_log_path_denied(int type, 18462306a36Sopenharmony_ci const char *operation); 18562306a36Sopenharmony_ciextern void audit_log_lost(const char *message); 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ciextern int audit_log_task_context(struct audit_buffer *ab); 18862306a36Sopenharmony_ciextern void audit_log_task_info(struct audit_buffer *ab); 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ciextern int audit_update_lsm_rules(void); 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci /* Private API (for audit.c only) */ 19362306a36Sopenharmony_ciextern int audit_rule_change(int type, int seq, void *data, size_t datasz); 19462306a36Sopenharmony_ciextern int audit_list_rules_send(struct sk_buff *request_skb, int seq); 19562306a36Sopenharmony_ci 19662306a36Sopenharmony_ciextern int audit_set_loginuid(kuid_t loginuid); 19762306a36Sopenharmony_ci 19862306a36Sopenharmony_cistatic inline kuid_t audit_get_loginuid(struct task_struct *tsk) 19962306a36Sopenharmony_ci{ 20062306a36Sopenharmony_ci return tsk->loginuid; 20162306a36Sopenharmony_ci} 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_cistatic inline unsigned int audit_get_sessionid(struct task_struct *tsk) 20462306a36Sopenharmony_ci{ 20562306a36Sopenharmony_ci return tsk->sessionid; 20662306a36Sopenharmony_ci} 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ciextern u32 audit_enabled; 20962306a36Sopenharmony_ci 21062306a36Sopenharmony_ciextern int audit_signal_info(int sig, struct task_struct *t); 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci#else /* CONFIG_AUDIT */ 21362306a36Sopenharmony_cistatic inline __printf(4, 5) 21462306a36Sopenharmony_civoid audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, 21562306a36Sopenharmony_ci const char *fmt, ...) 21662306a36Sopenharmony_ci{ } 21762306a36Sopenharmony_cistatic inline struct audit_buffer *audit_log_start(struct audit_context *ctx, 21862306a36Sopenharmony_ci gfp_t gfp_mask, int type) 21962306a36Sopenharmony_ci{ 22062306a36Sopenharmony_ci return NULL; 22162306a36Sopenharmony_ci} 22262306a36Sopenharmony_cistatic inline __printf(2, 3) 22362306a36Sopenharmony_civoid audit_log_format(struct audit_buffer *ab, const char *fmt, ...) 22462306a36Sopenharmony_ci{ } 22562306a36Sopenharmony_cistatic inline void audit_log_end(struct audit_buffer *ab) 22662306a36Sopenharmony_ci{ } 22762306a36Sopenharmony_cistatic inline void audit_log_n_hex(struct audit_buffer *ab, 22862306a36Sopenharmony_ci const unsigned char *buf, size_t len) 22962306a36Sopenharmony_ci{ } 23062306a36Sopenharmony_cistatic inline void audit_log_n_string(struct audit_buffer *ab, 23162306a36Sopenharmony_ci const char *buf, size_t n) 23262306a36Sopenharmony_ci{ } 23362306a36Sopenharmony_cistatic inline void audit_log_n_untrustedstring(struct audit_buffer *ab, 23462306a36Sopenharmony_ci const char *string, size_t n) 23562306a36Sopenharmony_ci{ } 23662306a36Sopenharmony_cistatic inline void audit_log_untrustedstring(struct audit_buffer *ab, 23762306a36Sopenharmony_ci const char *string) 23862306a36Sopenharmony_ci{ } 23962306a36Sopenharmony_cistatic inline void audit_log_d_path(struct audit_buffer *ab, 24062306a36Sopenharmony_ci const char *prefix, 24162306a36Sopenharmony_ci const struct path *path) 24262306a36Sopenharmony_ci{ } 24362306a36Sopenharmony_cistatic inline void audit_log_key(struct audit_buffer *ab, char *key) 24462306a36Sopenharmony_ci{ } 24562306a36Sopenharmony_cistatic inline void audit_log_path_denied(int type, const char *operation) 24662306a36Sopenharmony_ci{ } 24762306a36Sopenharmony_cistatic inline int audit_log_task_context(struct audit_buffer *ab) 24862306a36Sopenharmony_ci{ 24962306a36Sopenharmony_ci return 0; 25062306a36Sopenharmony_ci} 25162306a36Sopenharmony_cistatic inline void audit_log_task_info(struct audit_buffer *ab) 25262306a36Sopenharmony_ci{ } 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_cistatic inline kuid_t audit_get_loginuid(struct task_struct *tsk) 25562306a36Sopenharmony_ci{ 25662306a36Sopenharmony_ci return INVALID_UID; 25762306a36Sopenharmony_ci} 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_cistatic inline unsigned int audit_get_sessionid(struct task_struct *tsk) 26062306a36Sopenharmony_ci{ 26162306a36Sopenharmony_ci return AUDIT_SID_UNSET; 26262306a36Sopenharmony_ci} 26362306a36Sopenharmony_ci 26462306a36Sopenharmony_ci#define audit_enabled AUDIT_OFF 26562306a36Sopenharmony_ci 26662306a36Sopenharmony_cistatic inline int audit_signal_info(int sig, struct task_struct *t) 26762306a36Sopenharmony_ci{ 26862306a36Sopenharmony_ci return 0; 26962306a36Sopenharmony_ci} 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci#endif /* CONFIG_AUDIT */ 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ci#ifdef CONFIG_AUDIT_COMPAT_GENERIC 27462306a36Sopenharmony_ci#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT)) 27562306a36Sopenharmony_ci#else 27662306a36Sopenharmony_ci#define audit_is_compat(arch) false 27762306a36Sopenharmony_ci#endif 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci#define AUDIT_INODE_PARENT 1 /* dentry represents the parent */ 28062306a36Sopenharmony_ci#define AUDIT_INODE_HIDDEN 2 /* audit record should be hidden */ 28162306a36Sopenharmony_ci#define AUDIT_INODE_NOEVAL 4 /* audit record incomplete */ 28262306a36Sopenharmony_ci 28362306a36Sopenharmony_ci#ifdef CONFIG_AUDITSYSCALL 28462306a36Sopenharmony_ci#include <asm/syscall.h> /* for syscall_get_arch() */ 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci/* These are defined in auditsc.c */ 28762306a36Sopenharmony_ci /* Public API */ 28862306a36Sopenharmony_ciextern int audit_alloc(struct task_struct *task); 28962306a36Sopenharmony_ciextern void __audit_free(struct task_struct *task); 29062306a36Sopenharmony_ciextern void __audit_uring_entry(u8 op); 29162306a36Sopenharmony_ciextern void __audit_uring_exit(int success, long code); 29262306a36Sopenharmony_ciextern void __audit_syscall_entry(int major, unsigned long a0, unsigned long a1, 29362306a36Sopenharmony_ci unsigned long a2, unsigned long a3); 29462306a36Sopenharmony_ciextern void __audit_syscall_exit(int ret_success, long ret_value); 29562306a36Sopenharmony_ciextern struct filename *__audit_reusename(const __user char *uptr); 29662306a36Sopenharmony_ciextern void __audit_getname(struct filename *name); 29762306a36Sopenharmony_ciextern void __audit_inode(struct filename *name, const struct dentry *dentry, 29862306a36Sopenharmony_ci unsigned int flags); 29962306a36Sopenharmony_ciextern void __audit_file(const struct file *); 30062306a36Sopenharmony_ciextern void __audit_inode_child(struct inode *parent, 30162306a36Sopenharmony_ci const struct dentry *dentry, 30262306a36Sopenharmony_ci const unsigned char type); 30362306a36Sopenharmony_ciextern void audit_seccomp(unsigned long syscall, long signr, int code); 30462306a36Sopenharmony_ciextern void audit_seccomp_actions_logged(const char *names, 30562306a36Sopenharmony_ci const char *old_names, int res); 30662306a36Sopenharmony_ciextern void __audit_ptrace(struct task_struct *t); 30762306a36Sopenharmony_ci 30862306a36Sopenharmony_cistatic inline void audit_set_context(struct task_struct *task, struct audit_context *ctx) 30962306a36Sopenharmony_ci{ 31062306a36Sopenharmony_ci task->audit_context = ctx; 31162306a36Sopenharmony_ci} 31262306a36Sopenharmony_ci 31362306a36Sopenharmony_cistatic inline struct audit_context *audit_context(void) 31462306a36Sopenharmony_ci{ 31562306a36Sopenharmony_ci return current->audit_context; 31662306a36Sopenharmony_ci} 31762306a36Sopenharmony_ci 31862306a36Sopenharmony_cistatic inline bool audit_dummy_context(void) 31962306a36Sopenharmony_ci{ 32062306a36Sopenharmony_ci void *p = audit_context(); 32162306a36Sopenharmony_ci return !p || *(int *)p; 32262306a36Sopenharmony_ci} 32362306a36Sopenharmony_cistatic inline void audit_free(struct task_struct *task) 32462306a36Sopenharmony_ci{ 32562306a36Sopenharmony_ci if (unlikely(task->audit_context)) 32662306a36Sopenharmony_ci __audit_free(task); 32762306a36Sopenharmony_ci} 32862306a36Sopenharmony_cistatic inline void audit_uring_entry(u8 op) 32962306a36Sopenharmony_ci{ 33062306a36Sopenharmony_ci /* 33162306a36Sopenharmony_ci * We intentionally check audit_context() before audit_enabled as most 33262306a36Sopenharmony_ci * Linux systems (as of ~2021) rely on systemd which forces audit to 33362306a36Sopenharmony_ci * be enabled regardless of the user's audit configuration. 33462306a36Sopenharmony_ci */ 33562306a36Sopenharmony_ci if (unlikely(audit_context() && audit_enabled)) 33662306a36Sopenharmony_ci __audit_uring_entry(op); 33762306a36Sopenharmony_ci} 33862306a36Sopenharmony_cistatic inline void audit_uring_exit(int success, long code) 33962306a36Sopenharmony_ci{ 34062306a36Sopenharmony_ci if (unlikely(audit_context())) 34162306a36Sopenharmony_ci __audit_uring_exit(success, code); 34262306a36Sopenharmony_ci} 34362306a36Sopenharmony_cistatic inline void audit_syscall_entry(int major, unsigned long a0, 34462306a36Sopenharmony_ci unsigned long a1, unsigned long a2, 34562306a36Sopenharmony_ci unsigned long a3) 34662306a36Sopenharmony_ci{ 34762306a36Sopenharmony_ci if (unlikely(audit_context())) 34862306a36Sopenharmony_ci __audit_syscall_entry(major, a0, a1, a2, a3); 34962306a36Sopenharmony_ci} 35062306a36Sopenharmony_cistatic inline void audit_syscall_exit(void *pt_regs) 35162306a36Sopenharmony_ci{ 35262306a36Sopenharmony_ci if (unlikely(audit_context())) { 35362306a36Sopenharmony_ci int success = is_syscall_success(pt_regs); 35462306a36Sopenharmony_ci long return_code = regs_return_value(pt_regs); 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ci __audit_syscall_exit(success, return_code); 35762306a36Sopenharmony_ci } 35862306a36Sopenharmony_ci} 35962306a36Sopenharmony_cistatic inline struct filename *audit_reusename(const __user char *name) 36062306a36Sopenharmony_ci{ 36162306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 36262306a36Sopenharmony_ci return __audit_reusename(name); 36362306a36Sopenharmony_ci return NULL; 36462306a36Sopenharmony_ci} 36562306a36Sopenharmony_cistatic inline void audit_getname(struct filename *name) 36662306a36Sopenharmony_ci{ 36762306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 36862306a36Sopenharmony_ci __audit_getname(name); 36962306a36Sopenharmony_ci} 37062306a36Sopenharmony_cistatic inline void audit_inode(struct filename *name, 37162306a36Sopenharmony_ci const struct dentry *dentry, 37262306a36Sopenharmony_ci unsigned int aflags) { 37362306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 37462306a36Sopenharmony_ci __audit_inode(name, dentry, aflags); 37562306a36Sopenharmony_ci} 37662306a36Sopenharmony_cistatic inline void audit_file(struct file *file) 37762306a36Sopenharmony_ci{ 37862306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 37962306a36Sopenharmony_ci __audit_file(file); 38062306a36Sopenharmony_ci} 38162306a36Sopenharmony_cistatic inline void audit_inode_parent_hidden(struct filename *name, 38262306a36Sopenharmony_ci const struct dentry *dentry) 38362306a36Sopenharmony_ci{ 38462306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 38562306a36Sopenharmony_ci __audit_inode(name, dentry, 38662306a36Sopenharmony_ci AUDIT_INODE_PARENT | AUDIT_INODE_HIDDEN); 38762306a36Sopenharmony_ci} 38862306a36Sopenharmony_cistatic inline void audit_inode_child(struct inode *parent, 38962306a36Sopenharmony_ci const struct dentry *dentry, 39062306a36Sopenharmony_ci const unsigned char type) { 39162306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 39262306a36Sopenharmony_ci __audit_inode_child(parent, dentry, type); 39362306a36Sopenharmony_ci} 39462306a36Sopenharmony_civoid audit_core_dumps(long signr); 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_cistatic inline void audit_ptrace(struct task_struct *t) 39762306a36Sopenharmony_ci{ 39862306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 39962306a36Sopenharmony_ci __audit_ptrace(t); 40062306a36Sopenharmony_ci} 40162306a36Sopenharmony_ci 40262306a36Sopenharmony_ci /* Private API (for audit.c only) */ 40362306a36Sopenharmony_ciextern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); 40462306a36Sopenharmony_ciextern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); 40562306a36Sopenharmony_ciextern void __audit_bprm(struct linux_binprm *bprm); 40662306a36Sopenharmony_ciextern int __audit_socketcall(int nargs, unsigned long *args); 40762306a36Sopenharmony_ciextern int __audit_sockaddr(int len, void *addr); 40862306a36Sopenharmony_ciextern void __audit_fd_pair(int fd1, int fd2); 40962306a36Sopenharmony_ciextern void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr); 41062306a36Sopenharmony_ciextern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec64 *abs_timeout); 41162306a36Sopenharmony_ciextern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification); 41262306a36Sopenharmony_ciextern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); 41362306a36Sopenharmony_ciextern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, 41462306a36Sopenharmony_ci const struct cred *new, 41562306a36Sopenharmony_ci const struct cred *old); 41662306a36Sopenharmony_ciextern void __audit_log_capset(const struct cred *new, const struct cred *old); 41762306a36Sopenharmony_ciextern void __audit_mmap_fd(int fd, int flags); 41862306a36Sopenharmony_ciextern void __audit_openat2_how(struct open_how *how); 41962306a36Sopenharmony_ciextern void __audit_log_kern_module(char *name); 42062306a36Sopenharmony_ciextern void __audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar); 42162306a36Sopenharmony_ciextern void __audit_tk_injoffset(struct timespec64 offset); 42262306a36Sopenharmony_ciextern void __audit_ntp_log(const struct audit_ntp_data *ad); 42362306a36Sopenharmony_ciextern void __audit_log_nfcfg(const char *name, u8 af, unsigned int nentries, 42462306a36Sopenharmony_ci enum audit_nfcfgop op, gfp_t gfp); 42562306a36Sopenharmony_ci 42662306a36Sopenharmony_cistatic inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) 42762306a36Sopenharmony_ci{ 42862306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 42962306a36Sopenharmony_ci __audit_ipc_obj(ipcp); 43062306a36Sopenharmony_ci} 43162306a36Sopenharmony_cistatic inline void audit_fd_pair(int fd1, int fd2) 43262306a36Sopenharmony_ci{ 43362306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 43462306a36Sopenharmony_ci __audit_fd_pair(fd1, fd2); 43562306a36Sopenharmony_ci} 43662306a36Sopenharmony_cistatic inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode) 43762306a36Sopenharmony_ci{ 43862306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 43962306a36Sopenharmony_ci __audit_ipc_set_perm(qbytes, uid, gid, mode); 44062306a36Sopenharmony_ci} 44162306a36Sopenharmony_cistatic inline void audit_bprm(struct linux_binprm *bprm) 44262306a36Sopenharmony_ci{ 44362306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 44462306a36Sopenharmony_ci __audit_bprm(bprm); 44562306a36Sopenharmony_ci} 44662306a36Sopenharmony_cistatic inline int audit_socketcall(int nargs, unsigned long *args) 44762306a36Sopenharmony_ci{ 44862306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 44962306a36Sopenharmony_ci return __audit_socketcall(nargs, args); 45062306a36Sopenharmony_ci return 0; 45162306a36Sopenharmony_ci} 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_cistatic inline int audit_socketcall_compat(int nargs, u32 *args) 45462306a36Sopenharmony_ci{ 45562306a36Sopenharmony_ci unsigned long a[AUDITSC_ARGS]; 45662306a36Sopenharmony_ci int i; 45762306a36Sopenharmony_ci 45862306a36Sopenharmony_ci if (audit_dummy_context()) 45962306a36Sopenharmony_ci return 0; 46062306a36Sopenharmony_ci 46162306a36Sopenharmony_ci for (i = 0; i < nargs; i++) 46262306a36Sopenharmony_ci a[i] = (unsigned long)args[i]; 46362306a36Sopenharmony_ci return __audit_socketcall(nargs, a); 46462306a36Sopenharmony_ci} 46562306a36Sopenharmony_ci 46662306a36Sopenharmony_cistatic inline int audit_sockaddr(int len, void *addr) 46762306a36Sopenharmony_ci{ 46862306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 46962306a36Sopenharmony_ci return __audit_sockaddr(len, addr); 47062306a36Sopenharmony_ci return 0; 47162306a36Sopenharmony_ci} 47262306a36Sopenharmony_cistatic inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr) 47362306a36Sopenharmony_ci{ 47462306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 47562306a36Sopenharmony_ci __audit_mq_open(oflag, mode, attr); 47662306a36Sopenharmony_ci} 47762306a36Sopenharmony_cistatic inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec64 *abs_timeout) 47862306a36Sopenharmony_ci{ 47962306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 48062306a36Sopenharmony_ci __audit_mq_sendrecv(mqdes, msg_len, msg_prio, abs_timeout); 48162306a36Sopenharmony_ci} 48262306a36Sopenharmony_cistatic inline void audit_mq_notify(mqd_t mqdes, const struct sigevent *notification) 48362306a36Sopenharmony_ci{ 48462306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 48562306a36Sopenharmony_ci __audit_mq_notify(mqdes, notification); 48662306a36Sopenharmony_ci} 48762306a36Sopenharmony_cistatic inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) 48862306a36Sopenharmony_ci{ 48962306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 49062306a36Sopenharmony_ci __audit_mq_getsetattr(mqdes, mqstat); 49162306a36Sopenharmony_ci} 49262306a36Sopenharmony_ci 49362306a36Sopenharmony_cistatic inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, 49462306a36Sopenharmony_ci const struct cred *new, 49562306a36Sopenharmony_ci const struct cred *old) 49662306a36Sopenharmony_ci{ 49762306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 49862306a36Sopenharmony_ci return __audit_log_bprm_fcaps(bprm, new, old); 49962306a36Sopenharmony_ci return 0; 50062306a36Sopenharmony_ci} 50162306a36Sopenharmony_ci 50262306a36Sopenharmony_cistatic inline void audit_log_capset(const struct cred *new, 50362306a36Sopenharmony_ci const struct cred *old) 50462306a36Sopenharmony_ci{ 50562306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 50662306a36Sopenharmony_ci __audit_log_capset(new, old); 50762306a36Sopenharmony_ci} 50862306a36Sopenharmony_ci 50962306a36Sopenharmony_cistatic inline void audit_mmap_fd(int fd, int flags) 51062306a36Sopenharmony_ci{ 51162306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 51262306a36Sopenharmony_ci __audit_mmap_fd(fd, flags); 51362306a36Sopenharmony_ci} 51462306a36Sopenharmony_ci 51562306a36Sopenharmony_cistatic inline void audit_openat2_how(struct open_how *how) 51662306a36Sopenharmony_ci{ 51762306a36Sopenharmony_ci if (unlikely(!audit_dummy_context())) 51862306a36Sopenharmony_ci __audit_openat2_how(how); 51962306a36Sopenharmony_ci} 52062306a36Sopenharmony_ci 52162306a36Sopenharmony_cistatic inline void audit_log_kern_module(char *name) 52262306a36Sopenharmony_ci{ 52362306a36Sopenharmony_ci if (!audit_dummy_context()) 52462306a36Sopenharmony_ci __audit_log_kern_module(name); 52562306a36Sopenharmony_ci} 52662306a36Sopenharmony_ci 52762306a36Sopenharmony_cistatic inline void audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar) 52862306a36Sopenharmony_ci{ 52962306a36Sopenharmony_ci if (!audit_dummy_context()) 53062306a36Sopenharmony_ci __audit_fanotify(response, friar); 53162306a36Sopenharmony_ci} 53262306a36Sopenharmony_ci 53362306a36Sopenharmony_cistatic inline void audit_tk_injoffset(struct timespec64 offset) 53462306a36Sopenharmony_ci{ 53562306a36Sopenharmony_ci /* ignore no-op events */ 53662306a36Sopenharmony_ci if (offset.tv_sec == 0 && offset.tv_nsec == 0) 53762306a36Sopenharmony_ci return; 53862306a36Sopenharmony_ci 53962306a36Sopenharmony_ci if (!audit_dummy_context()) 54062306a36Sopenharmony_ci __audit_tk_injoffset(offset); 54162306a36Sopenharmony_ci} 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_cistatic inline void audit_ntp_init(struct audit_ntp_data *ad) 54462306a36Sopenharmony_ci{ 54562306a36Sopenharmony_ci memset(ad, 0, sizeof(*ad)); 54662306a36Sopenharmony_ci} 54762306a36Sopenharmony_ci 54862306a36Sopenharmony_cistatic inline void audit_ntp_set_old(struct audit_ntp_data *ad, 54962306a36Sopenharmony_ci enum audit_ntp_type type, long long val) 55062306a36Sopenharmony_ci{ 55162306a36Sopenharmony_ci ad->vals[type].oldval = val; 55262306a36Sopenharmony_ci} 55362306a36Sopenharmony_ci 55462306a36Sopenharmony_cistatic inline void audit_ntp_set_new(struct audit_ntp_data *ad, 55562306a36Sopenharmony_ci enum audit_ntp_type type, long long val) 55662306a36Sopenharmony_ci{ 55762306a36Sopenharmony_ci ad->vals[type].newval = val; 55862306a36Sopenharmony_ci} 55962306a36Sopenharmony_ci 56062306a36Sopenharmony_cistatic inline void audit_ntp_log(const struct audit_ntp_data *ad) 56162306a36Sopenharmony_ci{ 56262306a36Sopenharmony_ci if (!audit_dummy_context()) 56362306a36Sopenharmony_ci __audit_ntp_log(ad); 56462306a36Sopenharmony_ci} 56562306a36Sopenharmony_ci 56662306a36Sopenharmony_cistatic inline void audit_log_nfcfg(const char *name, u8 af, 56762306a36Sopenharmony_ci unsigned int nentries, 56862306a36Sopenharmony_ci enum audit_nfcfgop op, gfp_t gfp) 56962306a36Sopenharmony_ci{ 57062306a36Sopenharmony_ci if (audit_enabled) 57162306a36Sopenharmony_ci __audit_log_nfcfg(name, af, nentries, op, gfp); 57262306a36Sopenharmony_ci} 57362306a36Sopenharmony_ci 57462306a36Sopenharmony_ciextern int audit_n_rules; 57562306a36Sopenharmony_ciextern int audit_signals; 57662306a36Sopenharmony_ci#else /* CONFIG_AUDITSYSCALL */ 57762306a36Sopenharmony_cistatic inline int audit_alloc(struct task_struct *task) 57862306a36Sopenharmony_ci{ 57962306a36Sopenharmony_ci return 0; 58062306a36Sopenharmony_ci} 58162306a36Sopenharmony_cistatic inline void audit_free(struct task_struct *task) 58262306a36Sopenharmony_ci{ } 58362306a36Sopenharmony_cistatic inline void audit_uring_entry(u8 op) 58462306a36Sopenharmony_ci{ } 58562306a36Sopenharmony_cistatic inline void audit_uring_exit(int success, long code) 58662306a36Sopenharmony_ci{ } 58762306a36Sopenharmony_cistatic inline void audit_syscall_entry(int major, unsigned long a0, 58862306a36Sopenharmony_ci unsigned long a1, unsigned long a2, 58962306a36Sopenharmony_ci unsigned long a3) 59062306a36Sopenharmony_ci{ } 59162306a36Sopenharmony_cistatic inline void audit_syscall_exit(void *pt_regs) 59262306a36Sopenharmony_ci{ } 59362306a36Sopenharmony_cistatic inline bool audit_dummy_context(void) 59462306a36Sopenharmony_ci{ 59562306a36Sopenharmony_ci return true; 59662306a36Sopenharmony_ci} 59762306a36Sopenharmony_cistatic inline void audit_set_context(struct task_struct *task, struct audit_context *ctx) 59862306a36Sopenharmony_ci{ } 59962306a36Sopenharmony_cistatic inline struct audit_context *audit_context(void) 60062306a36Sopenharmony_ci{ 60162306a36Sopenharmony_ci return NULL; 60262306a36Sopenharmony_ci} 60362306a36Sopenharmony_cistatic inline struct filename *audit_reusename(const __user char *name) 60462306a36Sopenharmony_ci{ 60562306a36Sopenharmony_ci return NULL; 60662306a36Sopenharmony_ci} 60762306a36Sopenharmony_cistatic inline void audit_getname(struct filename *name) 60862306a36Sopenharmony_ci{ } 60962306a36Sopenharmony_cistatic inline void audit_inode(struct filename *name, 61062306a36Sopenharmony_ci const struct dentry *dentry, 61162306a36Sopenharmony_ci unsigned int aflags) 61262306a36Sopenharmony_ci{ } 61362306a36Sopenharmony_cistatic inline void audit_file(struct file *file) 61462306a36Sopenharmony_ci{ 61562306a36Sopenharmony_ci} 61662306a36Sopenharmony_cistatic inline void audit_inode_parent_hidden(struct filename *name, 61762306a36Sopenharmony_ci const struct dentry *dentry) 61862306a36Sopenharmony_ci{ } 61962306a36Sopenharmony_cistatic inline void audit_inode_child(struct inode *parent, 62062306a36Sopenharmony_ci const struct dentry *dentry, 62162306a36Sopenharmony_ci const unsigned char type) 62262306a36Sopenharmony_ci{ } 62362306a36Sopenharmony_cistatic inline void audit_core_dumps(long signr) 62462306a36Sopenharmony_ci{ } 62562306a36Sopenharmony_cistatic inline void audit_seccomp(unsigned long syscall, long signr, int code) 62662306a36Sopenharmony_ci{ } 62762306a36Sopenharmony_cistatic inline void audit_seccomp_actions_logged(const char *names, 62862306a36Sopenharmony_ci const char *old_names, int res) 62962306a36Sopenharmony_ci{ } 63062306a36Sopenharmony_cistatic inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) 63162306a36Sopenharmony_ci{ } 63262306a36Sopenharmony_cistatic inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, 63362306a36Sopenharmony_ci gid_t gid, umode_t mode) 63462306a36Sopenharmony_ci{ } 63562306a36Sopenharmony_cistatic inline void audit_bprm(struct linux_binprm *bprm) 63662306a36Sopenharmony_ci{ } 63762306a36Sopenharmony_cistatic inline int audit_socketcall(int nargs, unsigned long *args) 63862306a36Sopenharmony_ci{ 63962306a36Sopenharmony_ci return 0; 64062306a36Sopenharmony_ci} 64162306a36Sopenharmony_ci 64262306a36Sopenharmony_cistatic inline int audit_socketcall_compat(int nargs, u32 *args) 64362306a36Sopenharmony_ci{ 64462306a36Sopenharmony_ci return 0; 64562306a36Sopenharmony_ci} 64662306a36Sopenharmony_ci 64762306a36Sopenharmony_cistatic inline void audit_fd_pair(int fd1, int fd2) 64862306a36Sopenharmony_ci{ } 64962306a36Sopenharmony_cistatic inline int audit_sockaddr(int len, void *addr) 65062306a36Sopenharmony_ci{ 65162306a36Sopenharmony_ci return 0; 65262306a36Sopenharmony_ci} 65362306a36Sopenharmony_cistatic inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr) 65462306a36Sopenharmony_ci{ } 65562306a36Sopenharmony_cistatic inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, 65662306a36Sopenharmony_ci unsigned int msg_prio, 65762306a36Sopenharmony_ci const struct timespec64 *abs_timeout) 65862306a36Sopenharmony_ci{ } 65962306a36Sopenharmony_cistatic inline void audit_mq_notify(mqd_t mqdes, 66062306a36Sopenharmony_ci const struct sigevent *notification) 66162306a36Sopenharmony_ci{ } 66262306a36Sopenharmony_cistatic inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) 66362306a36Sopenharmony_ci{ } 66462306a36Sopenharmony_cistatic inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, 66562306a36Sopenharmony_ci const struct cred *new, 66662306a36Sopenharmony_ci const struct cred *old) 66762306a36Sopenharmony_ci{ 66862306a36Sopenharmony_ci return 0; 66962306a36Sopenharmony_ci} 67062306a36Sopenharmony_cistatic inline void audit_log_capset(const struct cred *new, 67162306a36Sopenharmony_ci const struct cred *old) 67262306a36Sopenharmony_ci{ } 67362306a36Sopenharmony_cistatic inline void audit_mmap_fd(int fd, int flags) 67462306a36Sopenharmony_ci{ } 67562306a36Sopenharmony_ci 67662306a36Sopenharmony_cistatic inline void audit_openat2_how(struct open_how *how) 67762306a36Sopenharmony_ci{ } 67862306a36Sopenharmony_ci 67962306a36Sopenharmony_cistatic inline void audit_log_kern_module(char *name) 68062306a36Sopenharmony_ci{ 68162306a36Sopenharmony_ci} 68262306a36Sopenharmony_ci 68362306a36Sopenharmony_cistatic inline void audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar) 68462306a36Sopenharmony_ci{ } 68562306a36Sopenharmony_ci 68662306a36Sopenharmony_cistatic inline void audit_tk_injoffset(struct timespec64 offset) 68762306a36Sopenharmony_ci{ } 68862306a36Sopenharmony_ci 68962306a36Sopenharmony_cistatic inline void audit_ntp_init(struct audit_ntp_data *ad) 69062306a36Sopenharmony_ci{ } 69162306a36Sopenharmony_ci 69262306a36Sopenharmony_cistatic inline void audit_ntp_set_old(struct audit_ntp_data *ad, 69362306a36Sopenharmony_ci enum audit_ntp_type type, long long val) 69462306a36Sopenharmony_ci{ } 69562306a36Sopenharmony_ci 69662306a36Sopenharmony_cistatic inline void audit_ntp_set_new(struct audit_ntp_data *ad, 69762306a36Sopenharmony_ci enum audit_ntp_type type, long long val) 69862306a36Sopenharmony_ci{ } 69962306a36Sopenharmony_ci 70062306a36Sopenharmony_cistatic inline void audit_ntp_log(const struct audit_ntp_data *ad) 70162306a36Sopenharmony_ci{ } 70262306a36Sopenharmony_ci 70362306a36Sopenharmony_cistatic inline void audit_ptrace(struct task_struct *t) 70462306a36Sopenharmony_ci{ } 70562306a36Sopenharmony_ci 70662306a36Sopenharmony_cistatic inline void audit_log_nfcfg(const char *name, u8 af, 70762306a36Sopenharmony_ci unsigned int nentries, 70862306a36Sopenharmony_ci enum audit_nfcfgop op, gfp_t gfp) 70962306a36Sopenharmony_ci{ } 71062306a36Sopenharmony_ci 71162306a36Sopenharmony_ci#define audit_n_rules 0 71262306a36Sopenharmony_ci#define audit_signals 0 71362306a36Sopenharmony_ci#endif /* CONFIG_AUDITSYSCALL */ 71462306a36Sopenharmony_ci 71562306a36Sopenharmony_cistatic inline bool audit_loginuid_set(struct task_struct *tsk) 71662306a36Sopenharmony_ci{ 71762306a36Sopenharmony_ci return uid_valid(audit_get_loginuid(tsk)); 71862306a36Sopenharmony_ci} 71962306a36Sopenharmony_ci 72062306a36Sopenharmony_ci#endif 721