diff options
Diffstat (limited to 'meta/packages/qemu/qemu-0.9.1+svn/fix_brk.patch')
-rw-r--r-- | meta/packages/qemu/qemu-0.9.1+svn/fix_brk.patch | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/meta/packages/qemu/qemu-0.9.1+svn/fix_brk.patch b/meta/packages/qemu/qemu-0.9.1+svn/fix_brk.patch deleted file mode 100644 index f15e001dd6..0000000000 --- a/meta/packages/qemu/qemu-0.9.1+svn/fix_brk.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | Index: trunk/linux-user/syscall.c | ||
2 | =================================================================== | ||
3 | --- trunk.orig/linux-user/syscall.c 2008-04-24 20:16:24.000000000 +0100 | ||
4 | +++ trunk/linux-user/syscall.c 2008-04-24 20:16:32.000000000 +0100 | ||
5 | @@ -440,7 +440,7 @@ | ||
6 | if (!new_brk) | ||
7 | return target_brk; | ||
8 | if (new_brk < target_original_brk) | ||
9 | - return -TARGET_ENOMEM; | ||
10 | + return target_brk; | ||
11 | |||
12 | brk_page = HOST_PAGE_ALIGN(target_brk); | ||
13 | |||
14 | @@ -455,12 +455,11 @@ | ||
15 | mapped_addr = get_errno(target_mmap(brk_page, new_alloc_size, | ||
16 | PROT_READ|PROT_WRITE, | ||
17 | MAP_ANON|MAP_FIXED|MAP_PRIVATE, 0, 0)); | ||
18 | - if (is_error(mapped_addr)) { | ||
19 | - return mapped_addr; | ||
20 | - } else { | ||
21 | + | ||
22 | + if (!is_error(mapped_addr)) | ||
23 | target_brk = new_brk; | ||
24 | - return target_brk; | ||
25 | - } | ||
26 | + | ||
27 | + return target_brk; | ||
28 | } | ||
29 | |||
30 | static inline abi_long copy_from_user_fdset(fd_set *fds, | ||
31 | Index: trunk/linux-user/mmap.c | ||
32 | =================================================================== | ||
33 | --- trunk.orig/linux-user/mmap.c 2008-04-24 20:16:16.000000000 +0100 | ||
34 | +++ trunk/linux-user/mmap.c 2008-04-24 20:16:32.000000000 +0100 | ||
35 | @@ -264,6 +264,9 @@ | ||
36 | host_start += offset - host_offset; | ||
37 | start = h2g(host_start); | ||
38 | } else { | ||
39 | + int flg; | ||
40 | + target_ulong addr; | ||
41 | + | ||
42 | if (start & ~TARGET_PAGE_MASK) { | ||
43 | errno = EINVAL; | ||
44 | return -1; | ||
45 | @@ -271,6 +274,14 @@ | ||
46 | end = start + len; | ||
47 | real_end = HOST_PAGE_ALIGN(end); | ||
48 | |||
49 | + for(addr = real_start; addr < real_end; addr += TARGET_PAGE_SIZE) { | ||
50 | + flg = page_get_flags(addr); | ||
51 | + if( flg & PAGE_RESERVED ) { | ||
52 | + errno = ENXIO; | ||
53 | + return -1; | ||
54 | + } | ||
55 | + } | ||
56 | + | ||
57 | /* worst case: we cannot map the file because the offset is not | ||
58 | aligned, so we read it */ | ||
59 | if (!(flags & MAP_ANONYMOUS) && | ||