)]}'
{
  "commit": "d565f58b38424e9a390a7ea33ff7477bab693fda",
  "tree": "068257463cff4c42eb06e08fcfcfa0dcff1d3c0a",
  "parents": [
    "ac64ebbecf80f6bc764d120f85fe9fa28fbd9e85"
  ],
  "author": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Mon Apr 24 16:19:19 2023 +0100"
  },
  "committer": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Tue May 02 15:47:40 2023 +0100"
  },
  "message": "hw/net/msf2-emac: Don\u0027t modify descriptor in-place in emac_store_desc()\n\nThe msf2-emac ethernet controller has functions emac_load_desc() and\nemac_store_desc() which read and write the in-memory descriptor\nblocks and handle conversion between guest and host endianness.\n\nAs currently written, emac_store_desc() does the endianness\nconversion in-place; this means that it effectively consumes the\ninput EmacDesc struct, because on a big-endian host the fields will\nbe overwritten with the little-endian versions of their values.\nUnfortunately, in all the callsites the code continues to access\nfields in the EmacDesc struct after it has called emac_store_desc()\n-- specifically, it looks at the d.next field.\n\nThe effect of this is that on a big-endian host networking doesn\u0027t\nwork because the address of the next descriptor is corrupted.\n\nWe could fix this by making the callsite avoid using the struct; but\nit\u0027s more robust to have emac_store_desc() leave its input alone.\n\n(emac_load_desc() also does an in-place conversion, but here this is\nfine, because the function is supposed to be initializing the\nstruct.)\n\nCc: qemu-stable@nongnu.org\nSigned-off-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\nReviewed-by: Thomas Huth \u003cthuth@redhat.com\u003e\nMessage-id: 20230424151919.1333299-1-peter.maydell@linaro.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7ccd3e5142718749de6e1f30f25aa41cf9379d91",
      "old_mode": 33188,
      "old_path": "hw/net/msf2-emac.c",
      "new_id": "db3a04deb19d2a2259f0f330b167b708e5dfc7e7",
      "new_mode": 33188,
      "new_path": "hw/net/msf2-emac.c"
    }
  ]
}
