Compare commits

..
Author SHA1 Message Date
Vladimir Serbinenko efff615f36 xen: Fix parsing of XZ kernel.
In case of xz, the uncompressed size is appended to xz data which confuses
our xz decompressor. Trim it.
2017-02-07 00:47:23 +01:00
Vladimir Serbinenko 8a96fc4093 xen: Fix handling of GRUB chainloading.
In case of GRUB we put remapper after domain pages and not at 0x0.
In this case we use max_addr to put remapper. Unfortunately we increment
max_addr as well in this case resulting in virt mapping mapping page
at old max_addr and trying to boot using new max_addr.

Closes 46014.
2017-02-07 00:42:43 +01:00
Vladimir Serbinenko f3df8f961f linguas: Don't skip ko.po.
Translation project doesn't require copyright disclaimers. They're independant
from us. They're responsible for their copyright story.
2017-02-04 00:06:57 +01:00
3 changed files with 26 additions and 10 deletions

No files matched your search

+1 -3
View File
@@ -419,8 +419,6 @@ grub_xen_pt_alloc (void)
try_virt_end = ALIGN_UP (xen_state.xen_inf.virt_base +
page2offset (nr_need_pages) +
ADDITIONAL_SIZE + STACK_SIZE, ALIGN_SIZE);
if (!xen_state.xen_inf.virt_base)
try_virt_end += PAGE_SIZE;
err = get_pgtable_size (xen_state.xen_inf.virt_base, try_virt_end,
nr_info_pages);
@@ -433,7 +431,7 @@ grub_xen_pt_alloc (void)
if (xen_state.xen_inf.virt_base)
err = get_pgtable_size (0, PAGE_SIZE, nr_need_pages);
else
err = get_pgtable_size (try_virt_end - PAGE_SIZE, try_virt_end,
err = get_pgtable_size (try_virt_end, try_virt_end + PAGE_SIZE,
nr_need_pages);
if (err)
return err;
+24 -6
View File
@@ -26,6 +26,8 @@ grub_xen_file (grub_file_t file)
grub_elf_t elf;
struct linux_kernel_header lh;
grub_file_t off_file;
grub_uint32_t payload_offset, payload_length;
grub_uint8_t magic[6];
elf = grub_elf_file (file, file->name);
if (elf)
@@ -46,20 +48,36 @@ grub_xen_file (grub_file_t file)
return NULL;
}
if (lh.payload_length < 4)
payload_length = lh.payload_length;
payload_offset = (lh.setup_sects + 1) * 512
+ lh.payload_offset;
if (payload_length < sizeof (magic))
{
grub_error (GRUB_ERR_BAD_OS, "payload too short");
return NULL;
}
grub_dprintf ("xen", "found bzimage payload 0x%llx-0x%llx\n",
(unsigned long long) (lh.setup_sects + 1) * 512
+ lh.payload_offset,
(unsigned long long) payload_offset,
(unsigned long long) lh.payload_length);
off_file = grub_file_offset_open (file, (lh.setup_sects + 1) * 512
+ lh.payload_offset,
lh.payload_length);
grub_file_seek (file, payload_offset);
if (grub_file_read (file, &magic, sizeof (magic)) != sizeof (magic))
{
if (!grub_errno)
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
file->name);
goto fail;
}
/* Kernel suffixes xz payload with their uncompressed size.
Trim it. */
if (grub_memcmp (magic, "\3757zXZ\0", 6) == 0)
payload_length -= 4;
off_file = grub_file_offset_open (file, payload_offset,
payload_length);
if (!off_file)
goto fail;
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh
rsync -Lrtvz --exclude=ko.po translationproject.org::tp/latest/grub/ po
rsync -Lrtvz translationproject.org::tp/latest/grub/ po
autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"