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

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small



>>> On 26.08.16 at 11:09, <s.munaut@xxxxxxxxxxxxxxxxxxxx> wrote:
> --- a/xen/arch/x86/boot/head.S
> +++ b/xen/arch/x86/boot/head.S
> @@ -108,6 +108,8 @@ __start:
>          shl     $10-4,%edx
>          cmp     %eax,%edx           /* compare with BDA value */
>          cmovb   %edx,%eax           /* and use the smaller */
> +        cmp     $0x1000,%eax        /* or if the BDA value is too small */
> +        cmovb   %edx,%eax           /* (and probably not valid) */

Considering there is a bounds check of the EBDA values a few
lines up from here (against 0x4000) I don't think I see how this
code can help, assuming the given explanation is applicable.

In any event is bounding by 0x1000 likely not enough, as placing
the trampoline at address zero is unlikely to be a good idea.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.