Add samsung specific changes

This commit is contained in:
2025-08-11 14:29:00 +02:00
parent c66122e619
commit 4d134a1294
2688 changed files with 1127995 additions and 11475 deletions

View File

@@ -100,7 +100,6 @@
#include <linux/user_events.h>
#include <linux/iommu.h>
#include <linux/cpufreq_times.h>
#include <linux/task_integrity.h>
#include <asm/pgalloc.h>
#include <linux/uaccess.h>
@@ -120,10 +119,6 @@
#include <linux/kdp.h>
#endif
#ifdef CONFIG_SECURITY_DEFEX
#include <linux/defex.h>
#endif
/*
* Minimum number of threads to boot the kernel
*/
@@ -2008,57 +2003,6 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
task->signal->pids[type] = pid;
}
#ifdef CONFIG_FIVE
static int dup_task_integrity(unsigned long clone_flags,
struct task_struct *tsk)
{
int ret = 0;
if (clone_flags & CLONE_VM) {
task_integrity_get(TASK_INTEGRITY(current));
task_integrity_assign(tsk, TASK_INTEGRITY(current));
} else {
task_integrity_assign(tsk, task_integrity_alloc());
if (!TASK_INTEGRITY(tsk))
ret = -ENOMEM;
}
return ret;
}
static inline void task_integrity_cleanup(struct task_struct *tsk)
{
task_integrity_put(TASK_INTEGRITY(tsk));
}
static inline int task_integrity_apply(unsigned long clone_flags,
struct task_struct *tsk)
{
int ret = 0;
if (!(clone_flags & CLONE_VM))
ret = five_fork(current, tsk);
return ret;
}
#else
static inline int dup_task_integrity(unsigned long clone_flags,
struct task_struct *tsk)
{
return 0;
}
static inline void task_integrity_cleanup(struct task_struct *tsk)
{
}
static inline int task_integrity_apply(unsigned long clone_flags,
struct task_struct *tsk)
{
return 0;
}
#endif
static inline void rcu_copy_process(struct task_struct *p)
{
#ifdef CONFIG_PREEMPT_RCU
@@ -2577,14 +2521,9 @@ __latent_entropy struct task_struct *copy_process(
goto bad_fork_cleanup_perf;
/* copy all the process information */
shm_init_task(p);
retval = dup_task_integrity(clone_flags, p);
retval = security_task_alloc(p, clone_flags);
if (retval)
goto bad_fork_cleanup_audit;
retval = security_task_alloc(p, clone_flags);
if (retval) {
task_integrity_cleanup(p);
goto bad_fork_cleanup_audit;
}
retval = copy_semundo(clone_flags, p);
if (retval)
goto bad_fork_cleanup_security;
@@ -2763,10 +2702,6 @@ __latent_entropy struct task_struct *copy_process(
goto bad_fork_cancel_cgroup;
}
retval = task_integrity_apply(clone_flags, p);
if (retval)
goto bad_fork_cancel_cgroup;
/* No more failure paths after this point. */
/*
@@ -3034,9 +2969,6 @@ pid_t kernel_clone(struct kernel_clone_args *args)
pid = get_task_pid(p, PIDTYPE_PID);
nr = pid_vnr(pid);
#ifdef CONFIG_SECURITY_DEFEX
task_defex_zero_creds(p);
#endif
if (clone_flags & CLONE_PARENT_SETTID)
put_user(nr, args->parent_tid);