-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
81 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
MYKPM_VERSION := 6.0.7 | ||
MYKPM_VERSION := 6.0.8 | ||
|
||
ifndef KP_DIR | ||
KP_DIR = ../KernelPatch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// task_pid | ||
static inline pid_t task_pid(struct task_struct* task) { | ||
pid_t pid = *(pid_t*)((uintptr_t)task + task_struct_pid_offset); | ||
return pid; | ||
} | ||
// task_tgid | ||
static inline pid_t task_tgid(struct task_struct* task) { | ||
pid_t tgid = *(pid_t*)((uintptr_t)task + task_struct_tgid_offset); | ||
return tgid; | ||
} | ||
// task_jobctl | ||
static inline unsigned long task_jobctl(struct task_struct* task) { | ||
unsigned long jobctl = *(unsigned long*)((uintptr_t)task + task_struct_jobctl_offset); | ||
return jobctl; | ||
} | ||
// binder_proc_is_frozen | ||
static inline bool binder_proc_is_frozen(struct binder_proc* proc) { | ||
bool is_frozen = *(bool*)((uintptr_t)proc + binder_proc_is_frozen_offset); | ||
return is_frozen; | ||
} | ||
// binder_proc_alloc | ||
static inline struct binder_alloc* binder_proc_alloc(struct binder_proc* proc) { | ||
struct binder_alloc* alloc = (struct binder_alloc*)((uintptr_t)proc + binder_proc_alloc_offset); | ||
return alloc; | ||
} | ||
// binder_alloc_free_async_space | ||
static inline size_t binder_alloc_free_async_space(struct binder_alloc* alloc) { | ||
size_t free_async_space = *(size_t*)((uintptr_t)alloc + binder_alloc_free_async_space_offset); | ||
return free_async_space; | ||
} | ||
// binder_alloc_buffer_size | ||
static inline size_t binder_alloc_buffer_size(struct binder_alloc* alloc) { | ||
size_t buffer_size = *(size_t*)((uintptr_t)alloc + binder_alloc_buffer_size_offset); | ||
return buffer_size; | ||
} | ||
// binder_transaction_to_proc | ||
static inline struct binder_proc* binder_transaction_to_proc(struct binder_transaction* t) { | ||
struct binder_proc* to_proc = *(struct binder_proc**)((uintptr_t)t + binder_transaction_to_proc_offset); | ||
return to_proc; | ||
} | ||
// binder_transaction_buffer | ||
static inline struct binder_buffer* binder_transaction_buffer(struct binder_transaction* t) { | ||
struct binder_buffer* buffer = *(struct binder_buffer**)((uintptr_t)t + binder_transaction_buffer_offset); | ||
return buffer; | ||
} | ||
// binder_transaction_code | ||
static inline unsigned int binder_transaction_code(struct binder_transaction* t) { | ||
unsigned int code = *(unsigned int*)((uintptr_t)t + binder_transaction_code_offset); | ||
return code; | ||
} | ||
// binder_transaction_flags | ||
static inline unsigned int binder_transaction_flags(struct binder_transaction* t) { | ||
unsigned int flags = *(unsigned int*)((uintptr_t)t + binder_transaction_flags_offset); | ||
return flags; | ||
} |