ioctl callchain cut short

Open
#73 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
devtools

Research direction

Start by reproducing the two semcode queries for kvm_vcpu_ioctl and vfs_ioctl, using the call sites and function-pointer locations listed in the issue as the expected trace. Compare why caller discovery reaches vfs_ioctl indirectly while callee discovery reports no calls; done means the ioctl call chain can be followed in both directions consistently.

Written by the indexing model from the issue text.

Description

The ioctl call chain can be followed in only one direction, not in the other.

semcode> callers kvm_vcpu_ioctl
Finding all functions that call: kvm_vcpu_ioctl

=== Direct Callers ===
1 functions directly call 'kvm_vcpu_ioctl':

  1. kvm_vcpu_compat_ioctl

=== Indirect Callers ===
4 call sites can reach it through a function pointer:

  1. compat_ptr_ioctl at fs/ioctl.c:634 [member_arrow]
    installed in file_operations::unlocked_ioctl at virt/kvm/kvm_main.c:4101 (receiver type matches)
  2. ecryptfs_unlocked_ioctl at fs/ecryptfs/file.c:379 [member_arrow]
    installed in file_operations::unlocked_ioctl at virt/kvm/kvm_main.c:4101 (receiver type matches)
  3. v4l2_compat_ioctl32 at drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1197 [member_arrow]
    installed in file_operations::unlocked_ioctl at virt/kvm/kvm_main.c:4101 (receiver type matches)
  4. vfs_ioctl at fs/ioctl.c:51 [member_arrow]
    installed in file_operations::unlocked_ioctl at virt/kvm/kvm_main.c:4101 (receiver type matches)
    semcode> calls vfs_ioctl
    Finding all functions called by: vfs_ioctl
    Info: Function 'vfs_ioctl' doesn't call any other functions
Dominant language
Rust
Stars
171
Forks
40
Avg merge
4h 24m
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from facebookexperimental/semcode

All issues in facebookexperimental/semcode

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.