Merge branch 'gnu' into sync

This commit is contained in:
David Michael 2017-04-27 12:05:22 -07:00
commit f89e1cf69a
63 changed files with 884 additions and 310 deletions

View file

@ -73,14 +73,22 @@ VARIABLE(grub_relocator64_rsp)
movq %rax, %rsp
#ifdef GRUB_MACHINE_EFI
jmp LOCAL(skip_efi_stack_align)
/*
* Here is grub_relocator64_efi_start() entry point.
* Following code is shared between grub_relocator64_efi_start()
* Here is grub_relocator64_efi_start() entry point. Most of the
* code below is shared between grub_relocator64_efi_start()
* and grub_relocator64_start().
*
* Think twice before changing anything below!!!
* Think twice before changing anything there!!!
*/
VARIABLE(grub_relocator64_efi_start)
/* Align the stack as UEFI spec requires. */
andq $~15, %rsp
LOCAL(skip_efi_stack_align):
#endif
/* mov imm64, %rax */
.byte 0x48
.byte 0xb8
@ -128,8 +136,10 @@ LOCAL(jump_addr):
VARIABLE(grub_relocator64_rip)
.quad 0
#ifdef GRUB_MACHINE_EFI
/* Here grub_relocator64_efi_start() ends. Ufff... */
VARIABLE(grub_relocator64_efi_end)
#endif
#ifndef __x86_64__
.p2align 4

View file

@ -128,7 +128,7 @@ VARIABLE(grub_relocator_xen_start)
VARIABLE(grub_relocator_xen_remapper_virt2)
.long 0
movl %eax, %edi
movl %eax, %ebx
xorl %ecx, %ecx /* Invalid pte */
xorl %edx, %edx

View file

@ -1044,6 +1044,8 @@ enum xz_ret xz_dec_lzma2_run(
s->lzma2.sequence = SEQ_LZMA_PREPARE;
/* Fall through */
case SEQ_LZMA_PREPARE:
if (s->lzma2.compressed < RC_INIT_BYTES)
return XZ_DATA_ERROR;
@ -1054,6 +1056,8 @@ enum xz_ret xz_dec_lzma2_run(
s->lzma2.compressed -= RC_INIT_BYTES;
s->lzma2.sequence = SEQ_LZMA_RUN;
/* Fall through */
case SEQ_LZMA_RUN:
/*
* Set dictionary limit to indicate how much we want

View file

@ -750,6 +750,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
s->sequence = SEQ_BLOCK_START;
/* FALLTHROUGH */
case SEQ_BLOCK_START:
/* We need one byte of input to continue. */
if (b->in_pos == b->in_size)
@ -773,6 +774,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
s->temp.pos = 0;
s->sequence = SEQ_BLOCK_HEADER;
/* FALLTHROUGH */
case SEQ_BLOCK_HEADER:
if (!fill_temp(s, b))
return XZ_OK;
@ -783,6 +785,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
s->sequence = SEQ_BLOCK_UNCOMPRESS;
/* FALLTHROUGH */
case SEQ_BLOCK_UNCOMPRESS:
ret = dec_block(s, b);
if (ret != XZ_STREAM_END)
@ -810,6 +813,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
s->sequence = SEQ_BLOCK_CHECK;
/* FALLTHROUGH */
case SEQ_BLOCK_CHECK:
ret = hash_validate(s, b, 0);
if (ret != XZ_STREAM_END)
@ -858,6 +862,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
s->sequence = SEQ_INDEX_CRC32;
/* FALLTHROUGH */
case SEQ_INDEX_CRC32:
ret = hash_validate(s, b, 1);
if (ret != XZ_STREAM_END)
@ -866,6 +871,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
s->temp.size = STREAM_HEADER_SIZE;
s->sequence = SEQ_STREAM_FOOTER;
/* FALLTHROUGH */
case SEQ_STREAM_FOOTER:
if (!fill_temp(s, b))
return XZ_OK;