)]}'
{
  "commit": "82499ec33af4fc63709a7f89d897361501098d84",
  "tree": "2567c6fd2622775cc9564316213e7352c2870f8f",
  "parents": [
    "b2e13b327de3fc5af3a5b7d065107ec95dffed56"
  ],
  "author": {
    "name": "Mark Brown",
    "email": "broonie@kernel.org",
    "time": "Wed Oct 18 23:09:49 2023 +0100"
  },
  "committer": {
    "name": "Mark Brown",
    "email": "broonie@kernel.org",
    "time": "Wed Dec 17 12:17:00 2025 +0000"
  },
  "message": "selftests/clone3: Test shadow stack support\n\nAdd basic test coverage for specifying the shadow stack for a newly\ncreated thread via clone3(), including coverage of the newly extended\nargument structure.  We check that a user specified shadow stack can be\nprovided, and that invalid combinations of parameters are rejected.\n\nIn order to facilitate testing on systems without userspace shadow stack\nsupport we manually enable shadow stacks on startup, this is architecture\nspecific due to the use of an arch_prctl() on x86. Due to interactions with\npotential userspace locking of features we actually detect support for\nshadow stacks on the running system by attempting to allocate a shadow\nstack page during initialisation using map_shadow_stack(), warning if this\nsucceeds when the enable failed.\n\nIn order to allow testing of user configured shadow stacks on\narchitectures with that feature we need to ensure that we do not return\nfrom the function where the clone3() syscall is called in the child\nprocess, doing so would trigger a shadow stack underflow.  To do this we\nuse inline assembly rather than the standard syscall wrapper to call\nclone3().  In order to avoid surprises we also use a syscall rather than\nthe libc exit() function., this should be overly cautious.\n\nAcked-by: Shuah Khan \u003cskhan@linuxfoundation.org\u003e\nTested-by: Rick Edgecombe \u003crick.p.edgecombe@intel.com\u003e\nSigned-off-by: Mark Brown \u003cbroonie@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "932cc64e9ae4dc371d693e012efbab389f29a3be",
      "old_mode": 33188,
      "old_path": "tools/testing/selftests/clone3/clone3.c",
      "new_id": "829f0d1268c88b34c0b6eef1af2841ec4395cc5a",
      "new_mode": 33188,
      "new_path": "tools/testing/selftests/clone3/clone3.c"
    },
    {
      "type": "modify",
      "old_id": "a7ab2f1cccda39badda30d47924eafa95e6bab32",
      "old_mode": 33188,
      "old_path": "tools/testing/selftests/clone3/clone3_selftests.h",
      "new_id": "97d98d07fb782ee047c85766d8e496923e21093f",
      "new_mode": 33188,
      "new_path": "tools/testing/selftests/clone3/clone3_selftests.h"
    }
  ]
}
