-
Notifications
You must be signed in to change notification settings - Fork 92
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
mips: problem accessing string arguments #85
Comments
I tried reverting 17864b9 and the filepath strings seems to be printed on x86_64 kernel v5.10.175. This is for the ply |
Also works for kernel v5.15.58. Wasn't working before. |
Sorry for the long delay on this. Could you try two changes to your script:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(this takes over discussion/tracking from #80 (comment))
I was able to package and build
ply
under OpenWrt, then began testing across various MIPS archs and ARM32 by following posted examples from bothply
andbpftrace
. Most of the basics work, but on MIPS I'm not able to access and print string args.I see the string/arg issue on mips32be, mips32le and mips64le, which seems to discount an endian or word-size bug as I first suspected. None of these problems appear on ARM32 however. The relevant kernel code and some logs illustrating the problem are below.
Kernel Code: (https://elixir.bootlin.com/linux/v5.15.83/source/fs/open.c#L1195)
ARMVIRT32: (good)
MIPS32BE: (bad)
Could you please have a think about these symptoms? I suspect they may ring a bell given your familiarity with internals. I'd also appreciate if you could suggest other useful test cases e.g. printing chars from arrays, dumping the the pt_regs struct, testing the core
str()
function, etc.A further point I'll note is that I'm running BTF-enabled builds after contributing this to OpenWrt, and the various
struct pt_regs
look as expected:MIPS32BE:
MIPS64LE:
After further testing I find that things work fine on LTS kernel 5.10 for MIPS32BE, MIPS32LE and MIPS64LE. For example, MIPS32BE:
It's possible something broke in the kernel between 5.10 and 5.15, or something was deliberately changed which
ply
does not accommodate. Looking next at upstream kernel and ply git histories...The text was updated successfully, but these errors were encountered: