)]}'
{
  "commit": "33eff5c84d52e7186e0882ea5ee9ac5501c3deea",
  "tree": "f127de03a2fa46871da587c1d82eee76d9c427b7",
  "parents": [
    "caa0e960979eada7518eeadc3757a0d2fb9765f6"
  ],
  "author": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Thu Oct 16 15:54:07 2025 +0100"
  },
  "committer": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Thu Oct 23 14:13:38 2025 +0100"
  },
  "message": "hw/net/rocker: Don\u0027t overflow in of_dpa_mask2prefix()\n\nIn of_dpa_mask2prefix() we do \"(2 \u003c\u003c i)\" for a loop where i can go up\nto 31.  At i \u003d\u003d 31 we shift off the top end of an integer.  This\ndoesn\u0027t actually calculate the wrong value in practice, because we\ncalculate 0 - 1 which is the 0xffffffff mask we wanted (and for QEMU\nshifting off the top of a signed integer is not UB); but it makes\nCoverity complain.\n\nWe could fix this simply by using \"2ULL\" (where the \"(2ULL \u003c\u003c i) - 1\"\nexpression also evaluates to 0xffffffff for i \u003d\u003d 31), but in fact\nthis function is a slow looping implementation of counting the number\nof trailing zeroes in the (network-order) input mask:\n\n 0bxxxxxxxxx1 \u003d\u003e 32\n 0bxxxxxxxx10 \u003d\u003e 31\n 0bxxxxxxx100 \u003d\u003e 30\n ...\n 0bx100000000 \u003d\u003e 2\n 0b1000000000 \u003d\u003e 1\n 0b0000000000 \u003d\u003e 0\n\nReplace the implementation with 32 - ctz32().\n\nCoverity: CID 1547602\nSuggested-by: Philippe Mathieu-Daudé \u003cphilmd@linaro.org\u003e\nSigned-off-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\nReviewed-by: Philippe Mathieu-Daudé \u003cphilmd@linaro.org\u003e\nMessage-id: 20251016145407.781978-1-peter.maydell@linaro.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4aed17875666987a7eb988072458951a55583de9",
      "old_mode": 33188,
      "old_path": "hw/net/rocker/rocker_of_dpa.c",
      "new_id": "16b9bc7a4b8f54494273a5c7a517531abb5b9c7e",
      "new_mode": 33188,
      "new_path": "hw/net/rocker/rocker_of_dpa.c"
    }
  ]
}
