From jidong.xiao@gmail.com Tue Mar 25 06:07:18 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 25 Mar 2008 06:07:28 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m2PD7IaC016930 for ; Tue, 25 Mar 2008 06:07:18 -0700 X-ASG-Debug-ID: 1206450470-3fe902150000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from po-out-1718.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id D7FE01262633 for ; Tue, 25 Mar 2008 06:07:50 -0700 (PDT) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.156]) by cuda.sgi.com with ESMTP id 4jSV2iFVrHBXFrbS for ; Tue, 25 Mar 2008 06:07:50 -0700 (PDT) Received: by po-out-1718.google.com with SMTP id y22so5146501pof.2 for ; Tue, 25 Mar 2008 06:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; bh=+aEsTzSssFEpK8CGA0uYc+eBGb/wcSd909+gLStVRc0=; b=MluHpt/g6luRl6j2u2LuStwbdXJFuQOjbc4Ghn36fpO7ijPlHTPyGzG3d+/4Ytp5PNcG8urBaY4+k6tZcxaNZJeBdFa7Pt54fWumGvlPrL5mCIHZEyOcmY8oB/tkT0dkZABIwklH01dIr1fjT1gpPE4R4svMmPRK8443H3W/8rI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=adclAaTiMCgtef80nExdzjl6KQF0LFe3vGFtEu0Fm8fQzUcGtqoQdVsFO2s//9nsrakH6Dbrw6GLlk7ExQJrd/JHFF6eIBbtKwprlEyWIFetSFdV86V2WwKghUlso9mJ5tlbvYcul2oZ7py2aqA6pg4VucMuM9rX7zS6zOc6xrg= Received: by 10.140.88.11 with SMTP id l11mr3242001rvb.237.1206450470359; Tue, 25 Mar 2008 06:07:50 -0700 (PDT) Received: by 10.140.174.9 with HTTP; Tue, 25 Mar 2008 06:07:49 -0700 (PDT) Message-ID: <4104961b0803250607q423fd367n11293b64a8f35249@mail.gmail.com> Date: Tue, 25 Mar 2008 21:07:49 +0800 From: "jidong xiao" To: KDB X-ASG-Orig-Subj: bb1 command fails on x86 Subject: bb1 command fails on x86 Cc: "Jay Lan" MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Barracuda-Connect: po-out-1718.google.com[72.14.252.156] X-Barracuda-Start-Time: 1206450472 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.45859 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1335 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jidong.xiao@gmail.com Precedence: bulk X-list: kdb Hi, I am using sles10sp2 beta kernel(x86_64) in which the new backtrace mechanism for x86 is used. I was attemptting to use bb1 command to analysis do_hypervisor_callback and evtchn_do_upcall. In SLES10Sp2, do_hypervisor_callback is defined in arch/x86_64/kernel/entry-xen.S, although there is no such a file in the mainline kernel, but I think this has nothing to do with the problem. below is the disassemble result of do_hypervisor_callback.(evtchn_do_upcall is called by do_hypervisor_callback). [0]kdb> id do_hypervisor_callback 0xffffffff8010ab7c do_hypervisor_callback: mov %rdi,%rsp 0xffffffff8010ab7f do_hypervisor_callback+0x3: incl %gs:0x20 0xffffffff8010ab87 do_hypervisor_callback+0xb: mov %rsp,%rbp 0xffffffff8010ab8a do_hypervisor_callback+0xe: cmove %gs:0x28,%rsp 0xffffffff8010ab94 do_hypervisor_callback+0x18: push %rbp 0xffffffff8010ab95 do_hypervisor_callback+0x19: callq 0xffffffff80281871 evtchn_do_upcall 0xffffffff8010ab9a do_hypervisor_callback+0x1e: pop %rsp 0xffffffff8010ab9b do_hypervisor_callback+0x1f: decl %gs:0x20 0xffffffff8010aba3 do_hypervisor_callback+0x27: jmpq 0xffffffff8010aaef error_exit 0xffffffff8010aba8 restore_all_enable_events: mov %gs:0x24,%rsi 0xffffffff8010abb1 restore_all_enable_events+0x9: shl $0x20,%rsi 0xffffffff8010abb5 restore_all_enable_events+0xd: shr $0x1a,%rsi 0xffffffff8010abb9 restore_all_enable_events+0x11: add 0xffffffff8039d628,%rsi 0xffffffff8010abc1 restore_all_enable_events+0x19: movb $0x0,0x1(%rsi) Here we see 0xffffffff8010ab9a is the exit point of evtchn_do_upcall. However bb1 command fails when I tried to give it this address. [0]kdb> bb1 0xffffffff8010ab9a bb_pass1: func_name do_hypervisor_callback func_start 0xffffffff8010ab7c func_end 0xffffffff8010aba8 bb_pass1: end bb[0] start 0xffffffff8010ab7c end 0xffffffff8010aba3 drop_through 0 bb_pass2: start bb_pass2_do_changed_blocks: allow_missing 0 bb[0] bb_reg_state ffffffff805153d8 rax = rax rbx = rbx rcx = rcx rdx = rdx rdi = rdi rsi = rsi rbp = rbp rsp = osp+0x0 r8 = r8 r9 = r9 r10 = r10 r11 = r11 r12 = r12 r13 = r13 r14 = r14 r15 = r15 '0xffffffff8010ab7c do_hypervisor_callback: mov %rdi,%rsp' opcode 'mov' matched by 'mov', usage 36 src R: %rdi base_rc 6 (rdi) dst R: %rsp base_rc 9 (rsp) rsp = rdi (rdi) '0xffffffff8010ab7f do_hypervisor_callback+0x3: incl %gs:0x20' opcode 'incl' matched by 'inc', usage 5 src M: %gs:0x20 '0xffffffff8010ab87 do_hypervisor_callback+0xb: mov %rsp,%rbp' opcode 'mov' matched by 'mov', usage 36 src R: %rsp base_rc 9 (rsp) dst R: %rbp base_rc 8 (rbp) rbp = rsp (rdi) '0xffffffff8010ab8a do_hypervisor_callback+0xe: cmove %gs:0x28,%rsp' opcode 'cmove' matched by 'cmov', usage 19 src M: %gs:0x28 dst R: %rsp base_rc 9 (rsp) '0xffffffff8010ab94 do_hypervisor_callback+0x18: push %rbp' opcode 'push' matched by 'push', usage 44 src R: %rbp base_rc 8 (rbp) push when BBRG_RSP is undefined? bb_pass2: end bb_reg_params 0 bb_memory_params 0 kdb_bb: 0xffffffff8010ab9a [kernel]do_hypervisor_callback failed at 0xffffffff8010ab94 It's very clear why this issue happens, since the first step of this function, rsp becomes no longer being referenced by osp. My question is, is there any way to fix this? Regards Jason --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.