qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 677ff3: s390x/cpumodel: fix segmentation faul


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 677ff3: s390x/cpumodel: fix segmentation fault when baseli...
Date: Thu, 19 Jul 2018 06:47:02 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 677ff32db12bcd1bca3a3df733d2478896d6df96
      
https://github.com/qemu/qemu/commit/677ff32db12bcd1bca3a3df733d2478896d6df96
  Author: David Hildenbrand <address@hidden>
  Date:   2018-07-18 (Wed, 18 Jul 2018)

  Changed paths:
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  s390x/cpumodel: fix segmentation fault when baselining models

Usually, when baselining two CPU models, whereby one of them has base
CPU features disabled (e.g. z14-base,msa=off), we fallback to an older
model that did not have these features in the base model. We always try to
create a "sane" CPU model (as far as possible), and one part of it is that
removing base features is no good and to be avoided.

Now, if we disable base features that were part of a z900, we're out of
luck. We won't find a CPU model and QEMU will segfault. This is a
scenario that should never happen in real life, but it can be used to
crash QEMU.

So let's properly report an error if we baseline e.g.:

{ "execute": "query-cpu-model-baseline",
  "arguments" : { "modela": { "name": "z14-base", "props": {"esan3" : false}},
            "modelb": { "name": "z14"}} }

Instead of segfaulting.

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 771eab934943ecfd38e16eab39061d6c458deb6c
      
https://github.com/qemu/qemu/commit/771eab934943ecfd38e16eab39061d6c458deb6c
  Author: Peter Maydell <address@hidden>
  Date:   2018-07-19 (Thu, 19 Jul 2018)

  Changed paths:
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180719' into staging

don't segfault when trying to baseline an odd cpu model

# gpg: Signature made Thu 19 Jul 2018 12:39:05 BST
# gpg:                using RSA key DECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20180719:
  s390x/cpumodel: fix segmentation fault when baselining models

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/ea6abffa8a08...771eab934943
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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