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

Re: [Xen-devel] [PATCH] x86/EDD: check MBR for BIOS magic before considering signature valid


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Wed, 30 May 2012 17:48:00 +0100
  • Delivery-date: Wed, 30 May 2012 16:48:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac0+g/jV6j8ViW8y006DTPDhOUFN+g==
  • Thread-topic: [Xen-devel] [PATCH] x86/EDD: check MBR for BIOS magic before considering signature valid

On 30/05/2012 16:36, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> Signed-off-by: Jan Beulich <JBeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- a/xen/arch/x86/boot/edd.S
> +++ b/xen/arch/x86/boot/edd.S
> @@ -53,12 +53,16 @@ edd_mbr_sig_read:
>          jc      edd_mbr_sig_done                # on failure, we're done.
>          cmpb    $0, %ah                         # some BIOSes do not set CF
>          jne     edd_mbr_sig_done                # on failure, we're done.
> +        cmpw    $0xaa55, bootsym(boot_edd_info)+0x1fe
> +        jne     .Ledd_mbr_sig_next
>          movl    bootsym(boot_edd_info)+EDD_MBR_SIG_OFFSET,%eax
>          movb    %dl, (%bx)                      # store BIOS drive number
>          movl    %eax, 4(%bx)                    # store signature from MBR
>          incb    bootsym(boot_mbr_signature_nr)  # note that we stored
> something
> -        incb    %dl                             # increment to next device
>          addw    $8, %bx                         # increment sig buffer ptr
> +.Ledd_mbr_sig_next:
> +        incb    %dl                             # increment to next device
> +        jz      edd_mbr_sig_done
>          cmpb    $EDD_MBR_SIG_MAX,bootsym(boot_mbr_signature_nr)
>          jb      edd_mbr_sig_read
>  edd_mbr_sig_done:
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



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


 


Rackspace

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