From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JKDFV-0006yq-42 for mharc-grub-devel@gnu.org; Wed, 30 Jan 2008 08:45:09 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKDFU-0006ye-5G for grub-devel@gnu.org; Wed, 30 Jan 2008 08:45:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKDFP-0006vM-2I for grub-devel@gnu.org; Wed, 30 Jan 2008 08:45:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKDFO-0006vI-V2 for grub-devel@gnu.org; Wed, 30 Jan 2008 08:45:02 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JKDFO-0000k8-G0 for grub-devel@gnu.org; Wed, 30 Jan 2008 08:45:02 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JKDFL-000483-Kj for grub-devel@gnu.org; Wed, 30 Jan 2008 14:45:01 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JKDDg-0004C6-Hc for grub-devel@gnu.org; Wed, 30 Jan 2008 14:43:16 +0100 Date: Wed, 30 Jan 2008 14:43:16 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080130134316.GA15861@thorin> References: <20080129144733.GF18831@tufnell.london.poggs.net> <20080129151529.GB3869@thorin> <20080129155021.GG18831@tufnell.london.poggs.net> <20080129183005.GC12993@thorin> <479F8A02.9050901@poggs.co.uk> <20080129212257.GA4487@thorin> <479F9B60.1080509@poggs.co.uk> <20080129213911.GA4954@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: grub2 resets machine when reading from an xfs filesystem X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2008 13:45:08 -0000 On Wed, Jan 30, 2008 at 06:17:18PM +0800, Bean wrote: > I figure it out, the problem is caused by nested function: > > int call_hook (grub_uint64_t ino, char *filename) > > it would take 3 registry to pass the parameter ! (2 for ino), so %ecx > will be overwritten agian. > > NESTED_FUNC_ATTR doesn't help, because there is only 2 parameters > here, so you need to use __attribute__ ((regparm (1))) explicitly. Cool. I wonder, how do you manage to catch this kind of things. Do you use a debugger in qemu, or just read the code and then you see it :-) ? -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)