This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

kprobes-systemtap validation on AArch64


Changed the subject since old mail chain has grown too large(>60 threads!)
>>> Hi Will, Petr,
>>>
>>> I have fixed the issue and now able to get proper function return
>>> values. (Earlier, trampoline was not installed at correct location, so
>>> used to carry wrong register context to handler)
>>> Updated patches are at:
>>> https://git.linaro.org/gitweb?p=people/sandeepa.prabhu/linux-aarch64.git;a=shortlog;h=refs/heads/arm64-kprobes-devel
>>>
>>> Please switch to my devel branch:
>>> "git://git.linaro.org/people/sandeepa.prabhu/linux-aarch64.git
>>> Branch: arm64-kprobes-devel"     and let me know how this work.
>> [ Also, please ignore the code comment and commit descriptions, I will
>> change them when publishing v3 patchset, but before that, want to
>> conduct more test and find as many bugs as possible ]
>
> Hi Sandeepa,
>
> I have switched to the arm64-kprobes-devel branch, pulled in the msalters uefi patches (armv8-uefi-lates branch of https://github.com/mosalter/linux), and started building a new kernel. The simulator is slow, so it will take a while for a new kernel to be available.
>
> I have pushed the aarch64 print_reg() support into the systemtap git repository to make it easier to test out aarch64 support include the kprobes and kretprobes.  So on the aarch64 simulator something like the following to get a systemtap that has support for aarch64:
>
> # get the elfutils sources
> cd ~
> git clone git://git.fedorahosted.org/git/elfutils.git
> cd elfutils
> git checkout aarch64
> # get systemtap
> cd ~
> mkdir systemtap_write
> cd systemtap_write
> git clone git://sourceware.org/git/systemtap.git
> cd systemtap
> ./configure --disable-docs --prefix=~/systemtap_write/install --with-elfutils=~/elfutils
> make
> make install

Thanks, I am yet to take these packages, relied mostly on sample
kernel modules to simulate various test cases so far.
>
> I noticed for the 32-bit arm uprobes that there are some test to make sure that the uprobes simulate the instructions properly.  How are the various instructions emulation/fixups for the arm64 being tested?  The code for the 32-bit arm uprobes testing is at:

32-bit arm kprobes/uprobes simulate/emulate all the instructions since
there is no stepping in architecture. So, in test cases they could
make use of the decode table to generate test cases in kernel.  But,
on ARM64, our implementation uses very simple decode tables as only
few instructions -Branching and Literal access- are simulated in C,
rest of the (around 90%) ISA is single-stepped using v8 debug monitor,
so writing a coverage test as on arm32 is difficult. I am having a
sample test module that places probe on given address/instruction and
run test and verified all branching literal instruction simulations,
as well as basic data/load-store.
I am starting with a coverage test, would share when ready.

>
> https://github.com/rabinv/uprobes-test
>
>
> -Will
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]