On Fri, Jun 12, 2020 at 8:34 AM Necip Yildiran <
ne...@noogler.google.com> wrote:
>
> Good Morning!
>
> I have a few questions regarding linux kernel code, specifically about qualcomm IPC router. If the answers are not trivial, we can delay the discussion to our meeting today.
>
> Q1: In the list, Qualcomm IPC Router link is to a specific line at /net/qrtr/tun.c, where qrtr_tun_ops is defined. I believe it is because file_operations struct is used as an interface and this definition is a good hint to understand what functions to fuzz (i.e., focus on open, poll, read_iter, write_iter, release). Also, for the fuzzing point of view, I should be focusing on how the networking goes with this common interface instead of how it is implemented for Qualcomm IPC Router. Do these interpretations look accurate to you?
+syzkaller mailing list as it may be useful for other people adding
descriptions and for future reference
+Hande FYI
Hi Necip,
Yes, file_operations, if present, is always something to look for.
Open and poll callbacks may be not so interesting, but ioctl, write,
mmap are always interesting.
There are other types of such "anchor entry points". E.g. for netlink
it would be netlink argument policy definition and command list.
What exactly do you mean by "networking"?
Internal implementation details that do not affect the interface are
not very interesting for us.
Interfaces (with userspace and any remote parties, if present and
accessible) is what we are usually interested in.
> Q2: What would be a good resource to understand how this interface is used (i.e., typical scenarios)?
Well, there is no general answer for all subsystems. Sometimes there
is nothing besides the source code :) What may help:
- searching internet for the subsystem name and/or some unique constants
- grepping Documentation/ dir in the kernel
- searching tools/testing/ dir in the kernel
- looking for large comment blocks in the source code
- finding commit that added it via git blame/log and reading the
commit description
> Thanks in advance!
> Best regards,
> Necip