Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Dec 2013 08:31:01 +0800
From:      Howard Su <howard0su@gmail.com>
To:        Justin Hibbits <jhibbits@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r259668 - head/sys/cddl/dev/fbt
Message-ID:  <CAAvnz_ps7yopHJZAKwzppjqmaunkM9zKOrrmGGCMNcVapD=4Kw@mail.gmail.com>
In-Reply-To: <201312202318.rBKNIFbS097430@svn.freebsd.org>
References:  <201312202318.rBKNIFbS097430@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, December 21, 2013, Justin Hibbits wrote:

> Author: jhibbits
> Date: Fri Dec 20 23:18:14 2013
> New Revision: 259668
> URL: http://svnweb.freebsd.org/changeset/base/259668
>
> Log:
>   Fix a couple bugs in FBT PowerPC.  Clamp the size to a 'instruction
> size' not
>   'byte size', and fix a typo.
>
>   MFC after:    2 weeks
>
> Modified:
>   head/sys/cddl/dev/fbt/fbt_powerpc.c
>
> Modified: head/sys/cddl/dev/fbt/fbt_powerpc.c
>
> ==============================================================================
> --- head/sys/cddl/dev/fbt/fbt_powerpc.c Fri Dec 20 21:31:50 2013
>  (r259667)
> +++ head/sys/cddl/dev/fbt/fbt_powerpc.c Fri Dec 20 23:18:14 2013
>  (r259668)
> @@ -219,7 +219,7 @@ fbt_provide_module_function(linker_file_
>                 return (0);
>
>         instr = (u_int32_t *) symval->value;
> -       limit = (u_int32_t *) (symval->value + symval->size);
> +       limit = (u_int32_t *) (symval->value + symval->size /
> sizeof(u_int32_t));
>
> This change doesn't look right to me. symval->value is caddr_t (char*).
why add instruction size to it?

>         for (; instr < limit; instr++)
>                 if (*instr == FBT_MFLR_R0)
> @@ -278,7 +278,7 @@ again:
>         instr++;
>
>         for (j = 0; j < 12 && instr < limit; j++, instr++) {
> -               if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) |
> +               if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) ||
>                     FBT_IS_JUMP(*instr))
>                         break;
>         }
> _______________________________________________
> svn-src-head@freebsd.org <javascript:;> mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org<javascript:;>
> "
>


-- 
-Howard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAvnz_ps7yopHJZAKwzppjqmaunkM9zKOrrmGGCMNcVapD=4Kw>