Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kernel/compat/defex.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ void defex_jb_init(void)
return;

if (ksu_rkp_branch_patch(&defex_enforce_fn, &new_fn)) {
pr_warn("KSU: DEFEX patch failed\n");
pr_warn("defex: patch failed\n");
return;
}
pr_info("KSU: Samsung DEFEX detected\n");
pr_info("defex: Samsung DEFEX detected\n");
}
4 changes: 2 additions & 2 deletions kernel/compat/kdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void __nocfi kdp_commit_worker(struct work_struct *work)
ksu_put_cred(old_cred);
cw->result = 0;

pr_info("KSU: KDP cred install pid=%d uid=%u euid=%u\n", task_pid_nr(cw->target), __kuid_val(ro_cred->uid),
pr_info("kdp: cred install pid=%d uid=%u euid=%u\n", task_pid_nr(cw->target), __kuid_val(ro_cred->uid),
__kuid_val(ro_cred->euid));
out:
complete(&cw->completion);
Expand Down Expand Up @@ -177,7 +177,7 @@ void kdp_jb_init(void)
return;
#endif
static_branch_enable(&ksu_kdp_key);
pr_info("KSU: Samsung KDP detected\n");
pr_info("kdp: Samsung KDP detected\n");
}

void kdp_jb_exit(void)
Expand Down
20 changes: 10 additions & 10 deletions kernel/compat/rkp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void rkp_jb_init(void)
{
if (find_kernel_symbol_exact("rkp_started")) {
static_branch_enable(&ksu_rkp_key);
pr_info("Samsung RKP detected\n");
pr_info("rkp: Samsung RKP detected\n");
}
}

Expand Down Expand Up @@ -128,20 +128,20 @@ int ksu_rkp_branch_patch(void *dst, void *src)
ret = aarch64_insn_patch_text(&restore_addr, &insn_at_patch, 1);
if (ret) {
mutex_unlock(&ksu_site_lock);
pr_err("ksu: branch site restore failed at %pS: %d\n", current_fn, ret);
pr_err("rkp: branch site restore failed at %pS: %d\n", current_fn, ret);
return ret;
}
if (site->insn_at_fn0) {
u32 insn_fn0 = site->insn_at_fn0;
ret = aarch64_insn_patch_text(&current_fn, &insn_fn0, 1);
if (ret) {
mutex_unlock(&ksu_site_lock);
pr_err("ksu: branch site fn+0 restore failed at %pS: %d\n", current_fn, ret);
pr_err("rkp: branch site fn+0 restore failed at %pS: %d\n", current_fn, ret);
return ret;
}
}
*site = ksu_sites[--ksu_site_count];
pr_info("ksu: branch site removed at %pS\n", current_fn);
pr_info("rkp: branch site removed at %pS\n", current_fn);
if (new_fn == current_fn) {
mutex_unlock(&ksu_site_lock);
return 0;
Expand All @@ -155,7 +155,7 @@ int ksu_rkp_branch_patch(void *dst, void *src)

if (ksu_site_count >= KSU_MAX_BRANCH_SITES) {
mutex_unlock(&ksu_site_lock);
pr_err("ksu: branch site table full\n");
pr_err("rkp: branch site table full\n");
return -ENOMEM;
}

Expand All @@ -175,7 +175,7 @@ int ksu_rkp_branch_patch(void *dst, void *src)

if (ksu_stub_next >= (int)(PAGE_SIZE / KSU_STUB_SIZE)) {
mutex_unlock(&ksu_site_lock);
pr_err("ksu: stub page full\n");
pr_err("rkp: stub page full\n");
return -ENOMEM;
}

Expand All @@ -196,7 +196,7 @@ int ksu_rkp_branch_patch(void *dst, void *src)

if (ksu_insn_is_pc_relative(insn_at_patch)) {
mutex_unlock(&ksu_site_lock);
pr_err("ksu: %pS: insn at +%d is PC-relative, cannot install\n", current_fn, preamble_skip * 4);
pr_err("rkp: %pS: insn at +%d is PC-relative, cannot install\n", current_fn, preamble_skip * 4);
return -EINVAL;
}

Expand All @@ -211,7 +211,7 @@ int ksu_rkp_branch_patch(void *dst, void *src)
branch_b = ksu_encode_b(patch_addr, new_fn);
if (!branch_b) {
mutex_unlock(&ksu_site_lock);
pr_err("ksu: %pS: branch to %pS out of ±128MB range\n", patch_addr, new_fn);
pr_err("rkp: %pS: branch to %pS out of ±128MB range\n", patch_addr, new_fn);
return -ERANGE;
}

Expand All @@ -223,7 +223,7 @@ int ksu_rkp_branch_patch(void *dst, void *src)
if (!b_resume) {
ksu_stub_next--;
mutex_unlock(&ksu_site_lock);
pr_err("ksu: stub → %pS resume branch out of range\n", current_fn);
pr_err("rkp: stub → %pS resume branch out of range\n", current_fn);
return -ERANGE;
}

Expand Down Expand Up @@ -259,7 +259,7 @@ int ksu_rkp_branch_patch(void *dst, void *src)
.stub_idx = stub_idx,
.preamble_skip = preamble_skip,
};
pr_info("ksu: branch site installed: %pS → %pS (stub[%d])\n", current_fn, new_fn, stub_idx);
pr_info("rkp: branch site installed: %pS → %pS (stub[%d])\n", current_fn, new_fn, stub_idx);

mutex_unlock(&ksu_site_lock);
return 0;
Expand Down