)]}'
{
  "commit": "3fde3398341ba900ed2e1eaecf00799fda66686a",
  "tree": "f2c2a4e1d8883e4fa7ba236e9c3111017425d399",
  "parents": [
    "f1ee6f0fe443129448fc90c42aaafc869a9f636f"
  ],
  "author": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Mon Feb 10 07:58:45 2020 -0800"
  },
  "committer": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Mon Feb 10 08:10:49 2020 -0800"
  },
  "message": "i386: Properly pop restore token in signal frame\n\nLinux CET kernel places a restore token on shadow stack for signal\nhandler to enhance security.  The restore token is 8 byte and aligned\nto 8 bytes.  It is usually transparent to user programs since kernel\nwill pop the restore token when signal handler returns.  But when an\nexception is thrown from a signal handler, now we need to pop the\nrestore token from shadow stack.  For x86-64, we just need to treat\nthe signal frame as normal frame.  For i386, we need to search for\nthe restore token to check if the original shadow stack is 8 byte\naligned.  If the original shadow stack is 8 byte aligned, we just\nneed to pop 2 slots, one restore token, from shadow stack.  Otherwise,\nwe need to pop 3 slots, one restore token + 4 byte padding, from\nshadow stack.\n\nThis patch also includes 2 tests, one has a restore token with 4 byte\npadding and one without.\n\nTested on Linux/x86-64 CET machine with and without -m32.\n\nlibgcc/\n\n\tBackport from mainline\n\tPR libgcc/85334\n\t* config/i386/shadow-stack-unwind.h (_Unwind_Frames_Increment):\n\tNew.\n\ngcc/testsuite/\n\n\tBackport from mainline\n\tPR libgcc/85334\n\t* g++.target/i386/pr85334-1.C: New test.\n\t* g++.target/i386/pr85334-2.C: Likewise.\n\n(cherry picked from commit bf6465d0461234ccd45ae34d5e2375a0bee0081d)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "db7ffdf2de4117d6e451e79a47ce014d7474ee84",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/ChangeLog",
      "new_id": "31143d2ecbf02f7d9c6bc231d3cf0ff542ec7ae5",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/ChangeLog"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3c5ccad1714fcf5821f5d782638b2496415b8ce7",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.target/i386/pr85334-1.C"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e2b5afe78cb490f7c66041dd04a0875f19068be7",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.target/i386/pr85334-2.C"
    },
    {
      "type": "modify",
      "old_id": "66ce37a1fc17009a719c413f1b760b9f10a31075",
      "old_mode": 33188,
      "old_path": "libgcc/ChangeLog",
      "new_id": "7630d6ef81de7c7d6a7f7a9377a88b1cd29e8537",
      "new_mode": 33188,
      "new_path": "libgcc/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "c53c3fe5c63233a4572dd5bb9104e68891b96523",
      "old_mode": 33188,
      "old_path": "libgcc/config/i386/shadow-stack-unwind.h",
      "new_id": "129d6d19c37bc9a065a1314bddfef573bbc4a4ce",
      "new_mode": 33188,
      "new_path": "libgcc/config/i386/shadow-stack-unwind.h"
    }
  ]
}
