Skip to content

Commit

Permalink
1. su command: compat compat-syscall for 32-bits. 2. fix: hook input_…
Browse files Browse the repository at this point in the history
…handle_event (#83)

* su command: compat compat-syscall for 32-bits

* fix: hook input_handle_event

* maintain pt_regs offset

---------

Co-authored-by: bmax <[email protected]>
  • Loading branch information
bmax121 and bmax authored May 1, 2024
1 parent edc8642 commit 57f87f2
Show file tree
Hide file tree
Showing 12 changed files with 330 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25b
ndk-version: r26b
add-to-path: true

- name: Make hdr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25b
ndk-version: r26b
add-to-path: true

- name: Make hdr
Expand Down
9 changes: 9 additions & 0 deletions kernel/include/preset.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ struct patch_symbol
uint64_t __cfi_slowpath;
uint64_t copy_process;
uint64_t cgroup_post_fork;
uint64_t do_execveat_common;
uint64_t __do_execve_file;
uint64_t do_execve_common;
uint64_t do_faccessat;
uint64_t sys_faccessat;
uint64_t sys_faccessat2;
uint64_t sys_newfstatat;
uint64_t vfs_statx;
uint64_t vfs_fstatat;
uint64_t avc_denied;
uint64_t slow_avc_audit;
uint64_t input_handle_event;
Expand Down
2 changes: 1 addition & 1 deletion kernel/linux/arch/arm64/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static inline void forget_syscall(struct pt_regs *regs)

static inline unsigned long user_stack_pointer(struct pt_regs *regs)
{
// if (compat_user_mode(regs)) return regs->compat_sp;
if (compat_user_mode(regs)) return regs->compat_sp;
return regs->sp;
}

Expand Down
Loading

0 comments on commit 57f87f2

Please sign in to comment.