)]}'
{
  "commit": "7e63488ba4010c4555cc83dd1db337f86b5d9bca",
  "tree": "ece050992706322332542e161756501bd1787ed1",
  "parents": [
    "d641f8d74688290f4c7185c042b6973032ce2f37"
  ],
  "author": {
    "name": "Jack Rosenthal",
    "email": "jrosenth@chromium.org",
    "time": "Wed Sep 09 23:47:21 2020"
  },
  "committer": {
    "name": "Commit Bot",
    "email": "commit-bot@chromium.org",
    "time": "Mon Sep 14 16:19:02 2020"
  },
  "message": "crossystem: allow last nvdata entry to be filled\n\nMosys used to have code (below), which led me to believe that we\nalways try and leave the last entry unfilled:\n\n        memset(blank, 0xff, VBNV_BLOCK_SIZE);\n        for (index \u003d 0; index \u003c len / VBNV_BLOCK_SIZE; index++) {\n                unsigned int offset \u003d index * VBNV_BLOCK_SIZE;\n                if (!memcmp(blank, \u0026data[offset], VBNV_BLOCK_SIZE))\n                        break;\n        }\n\n        if (index \u003d\u003d 0) {\n                lprintf(LOG_ERR, \"VBNV is uninitialized\\n\");\n                return -1;\n        } else if (index \u003e\u003d len) {  \u003c---- SEE NOTE\n                lprintf(LOG_ERR, \"VBNV is full\\n\");   \u003c--- unreachable\n                return -1;\n        } else {\n                return index - 1;\n        }\n\nThe statement at \"SEE NOTE\" will always be false, so this code fooled\nme to believe that we consider VBNV without a row of 0xFF*16 to be\nempty.\n\nAnd so I implemented and wrote unit tests for what I believed the\ncorrect behavior to be :/\n\nAnyway, this is causing us issues since AP firmware does not implement\nit that way.  So allow the last row to be filled.\n\nBUG\u003dchromium:1112578\nBRANCH\u003dnone\nTEST\u003dunit tests\n\nSigned-off-by: Jack Rosenthal \u003cjrosenth@chromium.org\u003e\nChange-Id: Ib3da78eddef69a688d081cdb5391a25000dac9d3\nReviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2402385\nReviewed-by: Hung-Te Lin \u003chungte@chromium.org\u003e\n(cherry picked from commit 176e01ded3bcefb6cb8baa984a158d42562bb1e9)\nReviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2410559\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "63f20c42d3f6c98684d4dd1523738ead978e98e3",
      "old_mode": 33188,
      "old_path": "host/lib/crossystem.c",
      "new_id": "59acc0d2a4036e8e79d927e2f45564dbd3ff61a3",
      "new_mode": 33188,
      "new_path": "host/lib/crossystem.c"
    },
    {
      "type": "modify",
      "old_id": "7a1478564f135b6ada7f24d6d6e3331c57b0df5c",
      "old_mode": 33188,
      "old_path": "tests/vb2_host_nvdata_flashrom_tests.c",
      "new_id": "33b435d99f00340d35049d25c47e2b4987f7e226",
      "new_mode": 33188,
      "new_path": "tests/vb2_host_nvdata_flashrom_tests.c"
    }
  ]
}
