GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: function entry is second addr · initzhu/SKRoot-linuxKernelRoot@a687e71

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • find_kernel_func
    • 3rdparty
      • find_xrefs.h
    • find_cred_has_capability
      • find_cred_has_capability.exe
    • find_do_execve
      • find_do_execve.exe
    • find_proc_pid_status
      • find_proc_pid_status.exe
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎find_kernel_func/3rdparty/find_xrefs.h‎

Copy file name to clipboardExpand all lines: find_kernel_func/3rdparty/find_xrefs.h
+2-11Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@ bool check_code_block_is_func_head(const std::vector<code_line>& v_code_block) {
3131
return stp_cnt >= 3 ? true : false;
3232
}
3333

34-
uint64_t get_code_block_func_start_sub_location(const std::vector<code_line>& v_code_block) {
35-
for (size_t x = 0; x < v_code_block.size(); x++) {
36-
if (v_code_block[x].mnemonic == "stp" && v_code_block[x].op_str.find("x29, x30, [sp, #") != -1) {
37-
return v_code_block[x].addr;
38-
}
39-
}
40-
return 0;
41-
}
42-
4334
void parse_code_block_adrp(uint64_t last_function_start_addr,
4435
const std::vector<code_line>& v_code_block,
4536
std::map<std::tuple<std::string, size_t>, std::shared_ptr<std::vector<xrefs_info>>>& result_map) {
@@ -89,7 +80,7 @@ void parse_code_block_with_xrefs(const std::string& group_name,
8980
return;
9081
}
9182
if (check_code_block_is_func_head(v_code_block)) {
92-
last_function_start_addr = get_code_block_func_start_sub_location(v_code_block);
83+
last_function_start_addr = v_code_block[0].addr;
9384
}
9485
parse_code_block_adrp(last_function_start_addr, v_code_block, result_map);
9586
}
@@ -102,7 +93,7 @@ void parse_code_block_with_func_haed(const std::string& group_name,
10293
return;
10394
}
10495
if (check_code_block_is_func_head(v_code_block)) {
105-
last_function_start_addr = get_code_block_func_start_sub_location(v_code_block);
96+
last_function_start_addr = v_code_block[0].addr;
10697
}
10798

10899
for (auto iter = result_map.begin(); iter != result_map.end(); iter++) {
Collapse file

‎find_kernel_func/find_cred_has_capability/find_cred_has_capability.exe‎

Copy file name to clipboard
-1.5 KB
Binary file not shown.
Collapse file

‎find_kernel_func/find_do_execve/find_do_execve.exe‎

Copy file name to clipboard
-1 KB
Binary file not shown.
Collapse file

‎find_kernel_func/find_proc_pid_status/find_proc_pid_status.exe‎

Copy file name to clipboard
-512 Bytes
Binary file not shown.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.