Signed-off-by: carmincol <changchen6@huawei.com>

Change-Id: Ie5534f77631977c6bc347a783de3315f5ec4536f
This commit is contained in:
carmincol
2024-02-07 11:06:29 +08:00
parent 98683275f9
commit eac9160048
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -13,10 +13,10 @@
#define JIT_MEMORY_ERROR_TAG "E"
#define jit_memory_log_info(fmt, args...) \
pr_info("[%s/%s]%s: " fmt "\n", JIT_MEMORY_INFO_TAG, JIT_MEMORY_TAG, \
pr_info("[%s/%s]%s: JITINFO " fmt "\n", JIT_MEMORY_INFO_TAG, JIT_MEMORY_TAG, \
__func__, ##args)
#define jit_memory_log_error(fmt, args...) \
pr_err("[%s/%s]%s: " fmt "\n", JIT_MEMORY_ERROR_TAG, JIT_MEMORY_TAG, \
pr_err("[%s/%s]%s: JITERROR " fmt "\n", JIT_MEMORY_ERROR_TAG, JIT_MEMORY_TAG, \
__func__, ##args)
#endif /* _JIT_MEMORY_LOG_H */
+1 -2
View File
@@ -51,7 +51,7 @@ void check_jit_memory(struct task_struct *task, unsigned long cookie, unsigned l
unsigned long start = *err;
if (prot & PROT_EXEC) {
jit_memory_log_info("JITINFO can not apply prot_exec");
jit_memory_log_info("can not apply prot_exec");
*err = -EACCES;
vm_munmap(start, size);
return;
@@ -75,7 +75,6 @@ void delete_jit_memory(struct task_struct *task, unsigned long start, unsigned l
{
if (!jit_avc_has_perm(SECCLASS_JIT_MEMORY, JIT_MEMORY__EXEC_MEM_CTRL, task))
return;
jit_memory_log_info("JITINFO delete jit memory");
struct list_head *head = (find_process_jit_space(&root_tree, task->pid).head);
if (head != NULL) {