From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23312 invoked by alias); 25 Nov 2005 05:50:11 -0000 Received: (qmail 23306 invoked by uid 22791); 25 Nov 2005 05:50:10 -0000 X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_POST X-Spam-Check-By: sourceware.org Received: from fmr19.intel.com (HELO orsfmr004.jf.intel.com) (134.134.136.18) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 25 Nov 2005 05:50:09 +0000 Received: from orsfmr101.jf.intel.com (orsfmr101.jf.intel.com [10.7.209.17]) by orsfmr004.jf.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id jAP5nrvF016107; Fri, 25 Nov 2005 05:49:53 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by orsfmr101.jf.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id jAP5nSdT023529; Fri, 25 Nov 2005 05:49:52 GMT Received: from pdsmsx331.ccr.corp.intel.com ([172.16.12.58]) by pdsmsxvs01.pd.intel.com (SAVSMTP 3.1.7.47) with SMTP id M2005112513495124821 ; Fri, 25 Nov 2005 13:49:51 +0800 Received: from pdsmsx405.ccr.corp.intel.com ([172.16.12.95]) by pdsmsx331.ccr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 25 Nov 2005 13:49:50 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: module function probe Date: Fri, 25 Nov 2005 05:50:00 -0000 Message-ID: <9FBCE015AF479F46B3B410499F3AE05B0897D8@pdsmsx405> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: module function probe Thread-Index: AcXxhAzME8mUK7uDTx6Y4pVG5YLKLg== From: "Mao, Bibo" To: Cc: "Frank Ch. Eigler" , "Keshavamurthy, Anil S" , "Zhang, Yanmin" X-OriginalArrivalTime: 25 Nov 2005 05:49:51.0142 (UTC) FILETIME=[0D529460:01C5F184] X-Scanned-By: MIMEDefang 2.52 on 10.7.209.17 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2005-q4/txt/msg00271.txt.bz2 Hi, I wrote one module named probed.ko after compiled, and the other is kprobe module named probing.ko which is to probe some function defined in probed.ko module.=20 And then I executed the follow command so that some function can be probed. #insmod probed.ko #insmod probing.ko But when I undelete module in such order kernel will crash #rmmod probed.ko (system is ok) #rmmod probing.ko (system will crash) The reason is that when unregister kprobe it will restore original instruction, but when probed module exits, its instruction address space is freed, so when restore original instruction it will crash. Regards Bibo,mao