This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: prevent module unloading
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Arkady <arkady dot miasnikov at gmail dot com>
- Cc: Daniel Doron <danielmeirdoron at gmail dot com>, systemtap at sourceware dot org
- Date: Wed, 18 Oct 2017 18:05:51 -0400
- Subject: Re: prevent module unloading
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fche at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BDD4A33A163
- References: <CAFwN=+wZ+EKbzYMxnrk_63McdiMdCA-vKn1_CAcrT30Rh1xV4w@mail.gmail.com> <CANA-60p-qAgF6zPV735gxewAEiRqLADvXCL=meU4QZeABUD-Fg@mail.gmail.com>
arkady.miasnikov wrote:
> Modifying syscall arguments in the SystemTap probe will not impact the
> system call itself. [...]
I'm not sure under in what context you mean. We can definitely modify
system call parameters (or local variables generally) by writing to the
$context variables carrying function parameters via code like in
https://sourceware.org/systemtap/examples/#process/noptrace.stp :
[...]
probe syscall.ptrace {
[...]
# changing it to an invalid request number works too
$request=0xbeef # anything invalid should do
[...]
}
[...]
If you were referring to the script-level variables:
% stap -L syscall.ptrace
syscall.ptrace name:string request:long pid:long addr:long data:long
argstr:string $request:long int $pid:long int $addr:long int $data:long int
Then yes, modifying "name" or "request" won't do anything. But the
underyling $context variables - yeah!
- FChE