qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Viktor Prutyanov <viktor.prutyanov@phystech.edu>,
	Roman Kagan <rkagan@virtuozzo.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] contrib/elf2dmp: add kernel start address checking
Date: Sat, 9 Mar 2019 08:49:04 +0100	[thread overview]
Message-ID: <1d4754e8-fd06-f3b8-93f7-743e8606ad9c@redhat.com> (raw)
In-Reply-To: <CAFEAcA-vMz=2XNkZ7n1WUBj6sMXk4Ffe_-3=tO1-2rowD0O0KQ@mail.gmail.com>

On 08/03/19 18:55, Peter Maydell wrote:
> On Wed, 20 Feb 2019 at 11:30, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 19/02/19 22:19, Viktor Prutyanov wrote:
>>> Before this patch, if elf2dmp failed to find NT kernel PE magic in
>>> allowed virtual address range, then it assumes NULL as NT kernel
>>> address and cause segfault.
>>>
>>> This patch fix the problem described above by checking NT kernel address
>>> before futher processing.
>>>
>>> Signed-off-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
>>> ---
>>>  contrib/elf2dmp/main.c | 6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
>>> index 1a45eaf565..1bfeb89ba7 100644
>>> --- a/contrib/elf2dmp/main.c
>>> +++ b/contrib/elf2dmp/main.c
>>> @@ -524,6 +524,12 @@ int main(int argc, char *argv[])
>>>          }
>>>      }
>>>
>>> +    if (!nt_start_addr) {
>>> +        eprintf("Failed to find NT kernel image\n");
>>> +        err = 1;
>>> +        goto out_ps;
>>> +    }
>>> +
>>>      printf("KernBase = 0x%016"PRIx64", signature is \'%.2s\'\n", KernBase,
>>>              (char *)nt_start_addr);
>>>
>>>
>>
>> Queued, thanks.
> 
> Hi Paolo -- I noticed this fix wasn't in master yet -- is it in
> a tree you're planning on sending a pullreq for soon?

Yep, I just wanted to flush kconfig and qgraph before everybody starts
sending pull requests for soft freeze.

Paolo

      reply	other threads:[~2019-03-09  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 21:19 [Qemu-devel] [PATCH] contrib/elf2dmp: add kernel start address checking Viktor Prutyanov
2019-02-20 11:30 ` Paolo Bonzini
2019-03-08 17:55   ` Peter Maydell
2019-03-09  7:49     ` Paolo Bonzini [this message]

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=1d4754e8-fd06-f3b8-93f7-743e8606ad9c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rkagan@virtuozzo.com \
    --cc=viktor.prutyanov@phystech.edu \
    /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).