grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub2 resets machine when reading from an xfs filesystem


From: Marco Gerards
Subject: Re: grub2 resets machine when reading from an xfs filesystem
Date: Wed, 30 Jan 2008 13:08:20 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Bean <address@hidden> writes:

> 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.
>
> diff --git a/fs/xfs.c b/fs/xfs.c
> index b3154c7..0e5f323 100644
> --- a/fs/xfs.c
> +++ b/fs/xfs.c
> @@ -306,9 +306,9 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
>                               grub_fshelp_node_t node))
>  {
>    struct grub_fshelp_node *diro = (struct grub_fshelp_node *) dir;
> -  auto int call_hook (grub_uint64_t ino, char *filename);
> +  auto int __attribute__ ((regparm(1))) call_hook (grub_uint64_t ino,
> char *filename);
>
> -  int call_hook (grub_uint64_t ino, char *filename)
> +  int __attribute__ ((regparm(1))) call_hook (grub_uint64_t ino, char
> *filename)
>      {
>        struct grub_fshelp_node *fdiro;

Do you have a more generic solution to this?  Something that can be
compared with NESTED_FUNC_ATTR?  This is an i386 only bug...

Besides that, XFS is still not finished as BTrees are not yet
supported.  So big files/directories cannot be accessed yet :-/

--
Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]