From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30151 invoked by alias); 11 Oct 2007 23:02:09 -0000 Received: (qmail 29951 invoked by uid 48); 11 Oct 2007 23:01:53 -0000 Date: Thu, 11 Oct 2007 23:02:00 -0000 Message-ID: <20071011230153.29950.qmail@sourceware.org> From: "jkenisto at us dot ibm dot com" To: systemtap@sources.redhat.com In-Reply-To: <20071011150936.5163.fche@redhat.com> References: <20071011150936.5163.fche@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug uprobes/5163] tweak uprobes.ko build process X-Bugzilla-Reason: AssignedTo Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00123.txt.bz2 ------- Additional Comments From jkenisto at us dot ibm dot com 2007-10-11 23:01 ------- (In reply to comment #0) These are valid concerns, but I think the solutions need further thought. See below. One thing to keep in mind is that we don't expect uprobes.ko to be insmod-ed and rmmod-ed every time somebody runs a stap script. Rather, once uprobes is in the kernel, it stays there. (As mentioned in bugs #5079 and #5083, sometimes uprobes has to hang around long after the last unregister.) The typical scenario is that when it's time to insmod a stap-generated module, uprobes is already in the kernel (which we can detect becauses the uprobes symbols show up in /proc/kallsyms). We can certainly handle somebody rmmod-ing uprobes (in which case we automatically rebuild it and/or re-insmod it as necessary), but that's not the typical situation. The only times we try to build uprobes.ko are: 1. we're stopping after pass 4 (in case uprobes.ko is needed in the environment where the script will eventually be run); or 2. we're proceeding to pass 5 and we don't see uprobes in the kernel... ... and the script needs uprobes, of course. > We need to tweak some of the uprobes.ko build steps from bug #5079. > Several problems: /usr/share/systemtap/runtime/uprobes is the wrong place > to build an object file into; /usr could be read-only; And a user from group stapdev doesn't have write access to the directory where stap currently tries to build uprobes.ko. You'd have to run stap as root for the build to succeed. > the file may not be > easily accessible to staprun except in the local/immediate probing scenario; Yes, if you move the stap-generated module to another system, you may need to bring uprobes.ko with it. > uprobes.ko is kernel-version/arch. dependent, just like the systemtap probe > module. > > Let's investigate building the uprobes.ko more similarly to probe modules. > > It could be stored in the module cache directory ($SYSTEMTAP_DIR/uprobes/). Since each stap user has his/her own cache directory (by default), this would mean multiple copies of uprobes.ko (and possibly the uprobes source). > It could be given a name that encodes the version/architecture parameters > (so the cache directory itself can be shared between machines). Instead > of passing just "-u" to staprun and have it find uprobes.ko someplace, > pass "UPROBEFILENAME.ko" itself in addition ot the "PROBEFILE.ko". > "stap -p4" could itself print out both needed modules. Jim -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED http://sourceware.org/bugzilla/show_bug.cgi?id=5163 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.