qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for 6.2 44/49] bsd-user: Refactor load_elf_sections and is_ta


From: Richard Henderson
Subject: Re: [PATCH for 6.2 44/49] bsd-user: Refactor load_elf_sections and is_target_elf_binary
Date: Tue, 10 Aug 2021 07:55:19 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/7/21 11:42 AM, Warner Losh wrote:
@@ -332,86 +329,25 @@ static abi_ulong load_elf_interp(struct elfhdr 
*interp_elf_ex,
           */
          error = target_mmap(0, INTERP_MAP_SIZE, PROT_NONE,
                  MAP_PRIVATE | MAP_ANON, -1, 0);
-        if (error == -1) {
+        if (rbase == -1) {
              perror("mmap");
              exit(-1);
          }

Replacement not greedy enough -- rbase is always 0.

+/* Check the elf header and see if this a target elf binary. */
+int is_target_elf_binary(int fd)

This doesn't appear to be used at all.
Which is good, because it's buggy.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]