Files
staralien 0afc82cd6f security:dec:Enable DEC(Dynamic Enhance Control) control policy
---------------------------------------
DEC(Dynamic Enhance Control) is a dynamic file access enhancement mechanism. It resolves DAC interception and sharefs security risks, precisely controlling file access via a kernel permission database, ioctl interfaces and LSM framework.

DEC will bind the token ID of the application and the paths it can access. The user-level sandboxmanager module and appspawn module will configure the relevant policies. When the application accesses the control paths under the sharefs file system, DEC checks the:
	create,
	read,
	write,
	remove,
	rename,
	move,
	access
of files by the application.

Signed-off-by: staralien <chengxin@servicecenter-harmonytsc.com>
2026-01-21 21:32:28 +08:00

19 lines
571 B
C

// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
*/
#ifndef _DEC_LOG_H
#define _DEC_LOG_H
#include <linux/printk.h>
#define DEC_LOG_PREFIX "DEC: "
#define dec_logd(fmt, ...) pr_debug(DEC_LOG_PREFIX fmt, ##__VA_ARGS__)
#define dec_logi(fmt, ...) pr_info(DEC_LOG_PREFIX fmt, ##__VA_ARGS__)
#define dec_logw(fmt, ...) pr_warn(DEC_LOG_PREFIX fmt, ##__VA_ARGS__)
#define dec_loge(fmt, ...) pr_err(DEC_LOG_PREFIX fmt, ##__VA_ARGS__)
#define dec_logf(fmt, ...) pr_crit(DEC_LOG_PREFIX fmt, ##__VA_ARGS__)
#endif /* _DEC_LOG_H */