qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>,
	Alexander Graf <agraf@suse.de>,
	Paul Burton <paul.burton@imgtec.com>,
	Alistair Francis <alistair.francis@xilinx.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Yongbok Kim <yongbok.kim@imgtec.com>
Subject: Re: [Qemu-devel] [PATCH qemu] Revert "elf-loader: warn about invalid endianness"
Date: Wed, 26 Jul 2017 13:47:45 +1000	[thread overview]
Message-ID: <2a9bdf93-a902-3e7f-b403-32f1fb784da8@ozlabs.ru> (raw)
In-Reply-To: <2fee7ab1-7b77-50bb-21fe-c192d43ec8e5@amsat.org>

On 21/07/17 18:05, Philippe Mathieu-Daudé wrote:
> On 07/21/2017 04:30 AM, Alexey Kardashevskiy wrote:
>> On 21/07/17 16:48, Philippe Mathieu-Daudé wrote:
>>> I submitted this patch because I spent some time debugging while QEMU was
>>> failing silently using a MIPS kernel image which used to work, after
>>> realizing I was in an incorrect build_dir using qemu-system-mipsel to load
>>> a big endian image and felt stupid [1]. This dumb error can happen to other
>>> people so I added this warning here.
>>
>> Been there too. This is why we try loading images twice in pseries.
>>
>>> I was not aware of the ELF_LOAD_WRONG_ENDIAN related code, and at least the
>>> MIPS arch is not using it.
>>> As I can see in MAINTAINERS, sPAPR is "Supported" meaning "Someone is
>>> actually paid to look after this", while there is no such paid person for
>>> the MIPS part.
>>> It seems each arch had a different way to load images and hw/core/loader.c
>>> was an effort to merge common code but mostly "Supported" arch are using
>>> it.
>>
>> afaict MIPS calls load_elf() in 4 places, each checks for the return value
>> and already prints the message, how come that that message is not enough?
>> What would probably make sense here is if MIPS also printed the return code
>> from load_elf() but in any case it is easily visible from gdb.
>>
>>
>>> While your revert does fixes your sPAPR warning issue, looking at the
>>> problem roots I think the correct fix is to improve the MIPS port and
>>> eventually the less loved archs to unify the loader.c calls and avoid such
>>> problems.
>>> I don't object reverting this patch for 2.10 and improve the loader.c usage
>>> during 2.11 cycle, I only wonder if this is another corporate/hobbyist>
>>> conflict of interest with corporate crushing on hobbyist instead of
>>
>> Come on mate...
> 
> https://www.quora.com/Why-do-the-French-complain-all-the-time
> 
> :D

Good one :)


What about the reverting patch, is it going anywhere? Thanks.


> 
>>
>>
>>> helping, motivating contribution improving common code usage.
>>>
>>> Cc'ed MIPS and loader.c maintainers (both "Maintained" and not
>>> "Supported").
>>>
>>> Phil.
>>>
>>> [1] http://lists.nongnu.org/archive/html/qemu-devel/2017-06/msg05926.html


-- 
Alexey

  reply	other threads:[~2017-07-26  3:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21  4:19 [Qemu-devel] [PATCH qemu] Revert "elf-loader: warn about invalid endianness" Alexey Kardashevskiy
2017-07-21  4:55 ` no-reply
2017-07-21  6:06   ` Philippe Mathieu-Daudé
2017-07-21  6:48 ` Philippe Mathieu-Daudé
2017-07-21  7:30   ` Alexey Kardashevskiy
2017-07-21  8:05     ` Philippe Mathieu-Daudé
2017-07-26  3:47       ` Alexey Kardashevskiy [this message]
2017-07-26 15:48         ` Philippe Mathieu-Daudé
2017-07-26 23:56     ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a9bdf93-a902-3e7f-b403-32f1fb784da8@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=alistair.francis@xilinx.com \
    --cc=aurelien@aurel32.net \
    --cc=david@gibson.dropbear.id.au \
    --cc=f4bug@amsat.org \
    --cc=paul.burton@imgtec.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=yongbok.kim@imgtec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).