Skip to content

Commit

Permalink
remove
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Jun 1, 2024
1 parent fec2b27 commit c512ada
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions kernel/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@
#define PT_REGS_SP(x) (__PT_REGS_CAST(x)->__PT_SP_REG)
#define PT_REGS_IP(x) (__PT_REGS_CAST(x)->__PT_IP_REG)

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
#define PT_REAL_REGS(regs) ((struct pt_regs *)PT_REGS_PARM1(regs))
#else
#define PT_REAL_REGS(regs) ((regs))
#endif

#endif
9 changes: 0 additions & 9 deletions kernel/sucompat.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,7 @@ int ksu_handle_devpts(struct inode *inode)
return 0;

if (ksu_devpts_sid) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
struct inode_security_struct *sec = selinux_inode(inode);
#else
struct inode_security_struct *sec =
(struct inode_security_struct *)inode->i_security;
#endif
if (sec) {
sec->sid = ksu_devpts_sid;
}
Expand Down Expand Up @@ -245,12 +240,8 @@ static struct kprobe execve_kp = {
static int pts_unix98_lookup_pre(struct kprobe *p, struct pt_regs *regs)
{
struct inode *inode;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
struct file *file = (struct file *)PT_REGS_PARM2(regs);
inode = file->f_path.dentry->d_inode;
#else
inode = (struct inode *)PT_REGS_PARM2(regs);
#endif

return ksu_handle_devpts(inode);
}
Expand Down
4 changes: 0 additions & 4 deletions kernel/throne_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,7 @@ FILLDIR_RETURN_TYPE my_actor(struct dir_context *ctx, const char *name,
} else {
if ((namelen == 8) && (strncmp(name, "base.apk", namelen) == 0)) {
struct apk_path_hash *pos, *n;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
unsigned int hash = full_name_hash(dirpath, strlen(dirpath));
#else
unsigned int hash = full_name_hash(NULL, dirpath, strlen(dirpath));
#endif
list_for_each_entry(pos, &apk_path_hash_list, list) {
if (hash == pos->hash) {
pos->exists = true;
Expand Down

0 comments on commit c512ada

Please sign in to comment.