Skip to contentSkip to conversation

kprobe string arg does not return proper value

DISCUSSION Masami Hiramatsu 1 participant 1 message Jan 30, 2019 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · On Tue, 29 Jan 2019 16:53:27 +0100 Heiko Carstens <[email protected]>…
Quoted 6 lines
Quoted 5 lines

And if I'm correct it is not easy to "fix". _If_ this functionality is desired then the kprobes interface must probably be changed so that it would be possible to specify the address space from where something should be copied. Or.. maybe the "__user" annotation in the kernel code can be instrumented(?).

Quoted 7 lines
Quoted 2 lines

No, I don't want to "fix" this. Describing in a document will be OK, but this is a limitation comes from its design.

It could be fixed if e.g. a new ustring fetcharg type would be supported, where we don't switch to KERNEL_DS. It would still fault when the page isn't mapped, but would access the correct address space.

Ah, I got it, so the user space will be mapped somewhere.

Quoted 2 lines

I don't know if it is really worth to implement this.. since I'm afraid this will cause "some" problems ;)

If someone (who can work on s390) is interested in, feel free to expand string copy function, but I don't like introducing "ustring", since it is highly depending on arch and anyway we can not guarantee to fetch the string when the page is not mapped..

Thank you,

Signature · 1 line
Masami Hiramatsu <[email protected]>