This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: proc_mem modification to allow use in timer probes


Mark Wielaard <mjw@redhat.com> writes:

> [...] Attached is a patch that adds proc_mem function variants that take a
> task (as returned by one of the task.stp tapset functions). [...]

(It's unfortunate to require even one embedded-c function for this.)

> I made the new functions /* pure */, since they return the same value
> when called from the same context, but not /* unprivileged */ since they
> could "leak" information about processes you don't own.

Sure.

> Although it seems /proc/<anypid>/statm is readable for anybody, so
> maybe they could be marked unprivileged? I would be slightly
> concerned that @cast/kread() could be fed an arbitrary address, that
> happens to look like a task struct, but in reality isn't and so
> would provide an information leak. [...]

When running in unprivileged mode, deref() (which @cast/kread
ultimately uses) is constrained at run time to user-space addresses.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]