Skip to content

user space ftrace support? #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Rtoax opened this issue Jul 24, 2022 · 1 comment
Open

user space ftrace support? #1

Rtoax opened this issue Jul 24, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request todo TODO

Comments

@Rtoax
Copy link
Owner

Rtoax commented Jul 24, 2022

No description provided.

@Rtoax Rtoax self-assigned this Jul 24, 2022
@Rtoax Rtoax added the enhancement New feature or request label Jul 24, 2022
@Rtoax Rtoax changed the title When support to user space ftrace? user space ftrace support? Jul 24, 2022
@Rtoax
Copy link
Owner Author

Rtoax commented Oct 8, 2022

You can check branch elfshow to see the backup, branch main is main line now. It's support user space ftrace right now, but now finish development. So, i just close this issue right now.

@Rtoax Rtoax closed this as completed Oct 8, 2022
Rtoax added a commit that referenced this issue Jan 9, 2024
Debug:

    $ gdb ultask
    (gdb) set args -p 18651 --auxv -v --log-level=9
    (gdb) r
    22:25:43 [ERROR][task.c load_task_auxv:1248] Not found AT_BASE in /proc/18651/auxv

    Program received signal SIGSEGV, Segmentation fault.
    0x000000000040b005 in free_task_vmas (task=0x5312a0) at /home/rongtao/Git/ulpatch/src/utils/task.c:1134
    1134		list_for_each_entry_safe(vma, tmpvma, &task->vma_list, node_list) {
    (gdb) bt
    #0  0x000000000040b005 in free_task_vmas (task=0x5312a0) at /home/rongtao/Git/ulpatch/src/utils/task.c:1134
    #1  0x000000000040c1a5 in free_task (task=0x5312a0) at /home/rongtao/Git/ulpatch/src/utils/task.c:1492
    #2  0x000000000040bdf4 in open_task (pid=18651, flag=-1) at /home/rongtao/Git/ulpatch/src/utils/task.c:1418
    #3  0x000000000040579d in main (argc=6, argv=0x7fffffffd898) at /home/rongtao/Git/ulpatch/src/ultask.c:302
    (gdb) frame 0
    #0  0x000000000040b005 in free_task_vmas (task=0x5312a0) at /home/rongtao/Git/ulpatch/src/utils/task.c:1134
    1134		list_for_each_entry_safe(vma, tmpvma, &task->vma_list, node_list) {
    (gdb) list
    1129
    1130	int free_task_vmas(struct task *task)
    1131	{
    1132		struct vma_struct *vma, *tmpvma;
    1133
    1134		list_for_each_entry_safe(vma, tmpvma, &task->vma_list, node_list) {
    1135			unlink_vma(task, vma);
    1136			free_vma(vma);
    1137		}
    1138
    (gdb) p task->vma_list
    $1 = {next = 0x0, prev = 0x0}

Signed-off-by: Rong Tao <[email protected]>
@Rtoax Rtoax reopened this Feb 19, 2024
Rtoax added a commit that referenced this issue Sep 19, 2024
    (gdb) bt
    #0  0x0000000000413969 in task_load_vma_elf_syms (vma=0x3538bf60) at /home/rongtao/Git/ulpatch/src/utils/task-symbol.c:426
    #1  0x0000000000411136 in open_task (pid=95830, flag=-33) at /home/rongtao/Git/ulpatch/src/utils/task.c:1404
    #2  0x00000000004051ce in show_task_patch_info (pid=95830) at /home/rongtao/Git/ulpatch/src/ulpinfo.c:120
    #3  0x000000000040558b in main (argc=3, argv=0x7fffabb17518) at /home/rongtao/Git/ulpatch/src/ulpinfo.c:189
    (gdb) frame 0
    #0  0x0000000000413969 in task_load_vma_elf_syms (vma=0x3538bf60) at /home/rongtao/Git/ulpatch/src/utils/task-symbol.c:426
    426
    (gdb) p *vma
    $1 = {vm_start = 4214784, vm_end = 4218880, vm_pgoff = 0, major = 0, minor = 42, inode = 22959,
      name_ = "/tmp/ulpatch/95830/map_files/ulp-EmyOMc", '\000' <repeats 4056 times>, perms = "rwxs", prot = 7,
      type = VMA_ULPATCH, is_elf = true, is_share_lib = false, {is_matched_phdr = false, phdr = {p_type = 0, p_flags = 0,
          p_offset = 0, p_vaddr = 0, p_paddr = 0, p_filesz = 0, p_memsz = 0, p_align = 0}}, vma_elf = 0x0,
      elf_file = 0x353c53e0, bfd_elf_file = 0x353c7250, ulp = 0x353b8770, task = 0x353862a0, node_list = {next = 0x3538e108,
        prev = 0x3538bf08}, node_rb = {__rb_parent_color = 892907033, rb_right = 0x3538e118, rb_left = 0x3538bf18},
      leader = 0x3538bf60, siblings = {next = 0x3538d038, prev = 0x3538d038}, voffset = 0}
    (gdb) p vma->vma_elf
    $2 = (struct vma_elf_mem *) 0x0

Signed-off-by: Rong Tao <[email protected]>
Rtoax added a commit that referenced this issue Sep 20, 2024
    $ ultask --info
    System
      OS: Linux 6.10.10-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:26:09 UTC 2024
      Arch: x86_64
      Glibc: 2.39-stable
    Build
      version: v0.5.9-1-g917f-dirty
      GNUC: 14.2.1
      ULP version: 3

Signed-off-by: Rong Tao <[email protected]>
Rtoax added a commit that referenced this issue Sep 22, 2024
$ ultask --info
System
  OS: Linux 6.10.10-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:26:09 UTC 2024
  Arch: x86_64
  Glibc: 2.39-stable

Build
  version: v0.5.9-4-g5fbb-dirty
  GNUC(GCC): 14.2.1
  ULP version: 3
  Support: capstone libunwind bfd

Signed-off-by: Rong Tao <[email protected]>
Rtoax added a commit that referenced this issue Sep 23, 2024
    $ ultask --info
    System
      OS: Linux 6.10.10-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:26:09 UTC 2024
      Arch: x86_64
      Glibc: 2.39-stable

    Build
      version: v0.5.9-9-g5689-dirty
      build time: 2024/09/23 08:57:55
      GNUC(GCC): 14.2.1
      Support: capstone libunwind bfd

    ULPatch
      ULP patch version: 3

Signed-off-by: Rong Tao <[email protected]>
Rtoax added a commit that referenced this issue Sep 26, 2024
System
  OS: Linux 6.10.10-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:26:09 UTC 2024
  Arch: x86_64
  Glibc: 2.39-stable /usr/lib64/libc.so.6

Signed-off-by: Rong Tao <[email protected]>
Rtoax added a commit that referenced this issue Oct 13, 2024
    $ ./src/ultask -vvvv --info
    System
      OS: Linux 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024
      Arch: x86_64
      Glibc: 2.28-stable (null)

    Build
      version: v0.5.10-8-gc1ea-dirty
      build time: 2024/10/13 11:28:17
      GNUC(GCC): 8.5.0
      Support:
           bfd yes
           libunwind yes, version 1.3.1
           capstone yes, version 4.0.2

    ULPatch
      ULP patch version: 3

    Run
      Verbose 4

Signed-off-by: Rong Tao <[email protected]>
Rtoax added a commit that referenced this issue Oct 14, 2024
ultask --info
System
  OS: Linux 6.10.6+bpo-rt-amd64 #1 SMP PREEMPT_RT Debian 6.10.6-1~bpo12+1 (2024-08-26)
  Arch: x86_64
  Glibc: 2.36-stable (null)

Build
  version: v0.5.10-15-ga718-dirty
  build time: 2024/10/13 21:29:05
  OS: Debian GNU/Linux 12 (bookworm)
  GNUC(GCC): 12.2.0
  GNU(GLibc): 2.36

Support:
  bfd yes
  libunwind yes (build version 1.6.2)
  capstone yes (build version 4.0.2)

ULPatch
  ULP patch version: 3

Run
  Verbose 0

Signed-off-by: Rong Tao <[email protected]>
Rtoax added a commit that referenced this issue Oct 29, 2024
    ulpinfo --info
    System
      OS: Linux 6.11.4-201.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Oct 20 15:04:22 UTC 2024
      Arch: x86_64
      Glibc: 2.39-stable (null)

    Build
      version: v0.5.10-27-ged66
      build time: 2024/10/29 17:32:06
      OS: Fedora Linux 40 (Server Edition)
      GNUC(GCC): 14.2.1
      GNU(GLibc): 2.39

    Support
      bfd yes
      libunwind yes (buildtime version 1.8.0)
      capstone yes (buildtime version 5.0.1, runtime version 5.0)

    ULPatch
      ULP patch version: 3
      ulftrace yes
      ultask yes
      testing yes
      man yes

    Run
      Verbose 0

Signed-off-by: Rong Tao <[email protected]>
@Rtoax Rtoax added the todo TODO label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request todo TODO
Projects
None yet
Development

No branches or pull requests

1 participant