Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset bb1b44e in mainline


Ignore:
Timestamp:
2012-03-29T21:41:34Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
38384ae, d4d74dc, d9faae91
Parents:
b31f735
Message:

Make sure to run inflate() on non-overlapping source and destination
regions in ia64's boot.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/ia64/src/main.c

    rb31f735 rbb1b44e  
    189189        printf("\nInflating components ... ");
    190190       
     191        /*
     192         * We will use the next available address for a copy of each component to
     193         * make sure that inflate() works with disjunctive memory regions.
     194         */
     195        top = ALIGN_UP(top, PAGE_SIZE);
     196
    191197        for (i = cnt; i > 0; i--) {
    192198                printf("%s ", components[i - 1].name);
    193199               
    194                 int err = inflate(components[i - 1].start, components[i - 1].size,
     200                /*
     201                 * Copy the component to a location which is guaranteed not to
     202                 * overlap with the destination for inflate().
     203                 */
     204                memmove((void *) top, components[i - 1].start, components[i - 1].size);
     205               
     206                int err = inflate((void *) top, components[i - 1].size,
    195207                    dest[i - 1], components[i - 1].inflated);
    196208               
Note: See TracChangeset for help on using the changeset viewer.