Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 02/11/24 2:29 am, Segher Boessenkool wrote:
Hi!

On Sat, Nov 02, 2024 at 12:49:25AM +0530, Hari Bathini wrote:
For ppc64le, depending on the kernel configuration used, offset 16
from function start address can also be considered function entry.
Update the test case to accommodate such configurations.

(This is true for all ELfv2, not just LE.  For the kernel that is about
the same).

The LEP and GEP can differ by zero, one, two, four, eight, or sixteen
insns (where an insn is four bytes).  Four insns is common, yes, but
maybe you can support all?  See the function symbol's st_other field
to see what the offset is:
0, 1: zero insns, zero bytes
N = 2..6: 1 << (N-2) insns, i.e. 1<<N bytes
7: reserved

(This is the top 3 bits of st_other, the other bits have other meanings).

Four insns is common, yes, but by no means the only possibility.

Hi Segher,

Querying for function arguments is supported on kprobes only at function
entry. This is a negative test case where the offset is intentionally
set beyond function entry while querying for function arguments.
I guess, simply setting the offset to 20 (vfs_read is anyway
going to be beyond 5 instructions) instead of 8 for powerpc would
make all platforms and ABI variants happy?

Thanks
Hari




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux