fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #systemtap
ton31337 has joined #systemtap
<ton31337>
hi folks, is it possible to catch all putenv/getenv() calls with stap?
<invano>
my 2 cents. you can instrument putenv/setenv in libc and then use uprobes.
<ton31337>
+1
mjw has joined #systemtap
<invano>
Have there been any modifications to the @cast operator recently? I remember in the past I was able to do "euid = @cast(new_cred, "cred", "kernel<linux/cred.h>")->euid->val" for example. It doesn't work anymore. Getting "semantic error: unresolved struct {...}: operator '->' at ".
mjw has quit [Quit: Leaving]
mjw has joined #systemtap
ton31337 has quit [Quit: leaving]
<fche>
could more likely relate to changes in the kernel header; maybe the struct got moved
<invano>
mmhhh I can see struct cred in linux/cred.h
<fche>
if in doubt, run with more -v verbosity
<fche>
at some point it should be clear what's up ... my guess is maybe that header has some new prereqs (other headers you may need to manually enumerate) before stap/gcc can process it in isolation
brolley has joined #systemtap
<invano>
yeah I tried both with -v and -vv wihtout anything that could help. I try again with triple v
<fche>
more and more
<fche>
at some point you should see the gcc invocation stap makes for that @cast() operator
mjw has quit [Quit: Leaving]
mjw has joined #systemtap
mjw has quit [Quit: Leaving]
orivej has quit [Ping timeout: 265 seconds]
mjw has joined #systemtap
<invano>
-vvv nothing helpful. more than three v stap segfaults with a null pointer deref :)
<fche>
ooh hey that's no good!
<fche>
is that current stap? bad bad boy
<invano>
I found the code segfaulting it
<invano>
stap release 3.3
<fche>
gdb -args stap -vvvv .... and see what's up with that?
<invano>
let's switch to pvt
<mjw>
pvt?
<fche>
secret double-encrypted pigeon mail :)
<invano>
no no fine
<invano>
problem is in staptree.h in "template <typename T> void replace (T*& src, bool clearok=false)"
<invano>
stap segfaults on new_src->print(std::clog) and that's triggered when verbosity > 3
<fche>
new_src being null I assume
<invano>
require(src, clearok) return NULL without any checks
<invano>
yes
<fche>
what fun. ok, can you fpaste your script just in case the problem reproduces here?
<invano>
I think there is a typo in require(). there should be "if (src == NULL)" instead of "if (src != NULL)"
<invano>
no bullshit
<fche>
where, staptree.h line 1254 ?
<fche>
I don't think so kemosabe
<fche>
line 1256 would segv right away
<fche>
maybe you're talking about another spot, please give its coordinates
<invano>
yes yes I was on the wrong place that was bullshit
<fche>
hm you probably mean line 1293/1295 in staptree.h
<fche>
t
<invano>
line 1254 if it's NULL it jumps directly to return
<fche>
those guys should null-check the old_src / new_src
<fche>
before printing them
<fche>
(but I'd be curious under what conditions those input pointers are null)
<fche>
invano, you will have better luck getting a -vvvv trace with that. But the @cast stuff should appear earlier in the logs than this part, most likely
mjw has joined #systemtap
pwithnall has joined #systemtap
pwithnall has quit [Remote host closed the connection]
pwithnall has joined #systemtap
pwithnall has quit [Remote host closed the connection]
pwithnall has joined #systemtap
pwithnall has quit [Remote host closed the connection]
pwithnall has joined #systemtap
pwithnall has quit [Ping timeout: 265 seconds]
tromey has quit [Quit: ERC (IRC client for Emacs 26.1.50)]
mjw has quit [Ping timeout: 240 seconds]
mjw has joined #systemtap
<irker559>
systemtap: juddin systemtap.git:refs/heads/master * release-3.3-92-g7906889 / : PR23160,PR14690: adapt 22 more syscalls for 4.17 __ARCH_sys_FOO and sys_enter/exit http://tinyurl.com/yabyjh5c
mjw has quit [Quit: Leaving]
Miron7 has joined #systemtap
<Miron7>
This channel has been hacked by Australia's #1 hacker Simon 'eVestigator' Smith https://evestigatorsucks.com/
<Miron7>
With our IRC ad service you can reach a global audience of entrepreneurs and fentanyl addicts with extraordinary engagement rates! https://williampitcock.com/
<Miron7>
I thought you guys might be interested in this blog by freenode staff member Bryan 'kloeri' Ostergaard https://bryanostergaard.com/