)]}'
{
  "commit": "27e82ad68b5eead610aabaf0e60335cc65cbd738",
  "tree": "c3d2afa19d4a85358da5f185093ba15abff0b70d",
  "parents": [
    "86bb38cee9399c4092e6fc5f280d296fab7e3327"
  ],
  "author": {
    "name": "Christina Schimpe",
    "email": "christina.schimpe@intel.com",
    "time": "Wed Aug 10 08:50:37 2022 +0200"
  },
  "committer": {
    "name": "Schimpe, Christina",
    "email": "christina.schimpe@intel.com",
    "time": "Mon Nov 18 13:36:16 2024 +0000"
  },
  "message": "LAM: Enable tagged pointer support for watchpoints.\n\nThe Intel (R) linear address masking (LAM) feature modifies the checking\napplied to 64-bit linear addresses.  With this so-called \"modified\ncanonicality check\" the processor masks the metadata bits in a pointer\nbefore using it as a linear address.  LAM supports two different modes that\ndiffer regarding which pointer bits are masked and can be used for\nmetadata: LAM 48 resulting in a LAM width of 15 and LAM 57 resulting in a\nLAM width of 6.\n\nThis patch adjusts watchpoint addresses based on the currently enabled\nLAM mode using the untag mask provided in the /proc/\u003cpid\u003e/status file.\nAs LAM can be enabled at runtime or as the configuration may change\nwhen entering an enclave, GDB checks enablement state each time a watchpoint\nis updated.\n\nIn contrast to the patch implemented for ARM\u0027s Top Byte Ignore \"Clear\nnon-significant bits of address on memory access\", it is not necessary to\nadjust addresses before they are passed to the target layer cache, as\nfor LAM tagged pointers are supported by the system call to read memory.\nAdditionally, LAM applies only to addresses used for data accesses.\nThus, it is sufficient to mask addresses used for watchpoints.\n\nThe following examples are based on a LAM57 enabled program.\nBefore this patch tagged pointers were not supported for watchpoints:\n~~~\n(gdb) print pi_tagged\n$2 \u003d (int *) 0x10007ffffffffe004\n(gdb) watch *pi_tagged\nHardware watchpoint 2: *pi_tagged\n(gdb) c\nContinuing.\nCouldn\u0027t write debug register: Invalid argument.\n~~~~\n\nOnce LAM 48 or LAM 57 is enabled for the current program, GDB can now\nspecify watchpoints for tagged addresses with LAM width 15 or 6,\nrespectively.\n\nApproved-By: Felix Willgerodt \u003cfelix.willgerodt@intel.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "964183910dce028d2fd1ddb6270902f8b484859e",
      "old_mode": 33188,
      "old_path": "gdb/NEWS",
      "new_id": "046daad0eae5fe8d853beb6cb0bb751ee6f23a77",
      "new_mode": 33188,
      "new_path": "gdb/NEWS"
    },
    {
      "type": "modify",
      "old_id": "77de8211d860505c29c271de5abf5ada49d2b6e5",
      "old_mode": 33188,
      "old_path": "gdb/amd64-linux-tdep.c",
      "new_id": "2c76a1de5a8f7a322f1d7e9fe7e0aba5d32e1e97",
      "new_mode": 33188,
      "new_path": "gdb/amd64-linux-tdep.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0fe2bc6c2ad1ba8f7bf080aa53db0033c3b5b412",
      "new_mode": 33261,
      "new_path": "gdb/testsuite/gdb.arch/amd64-lam.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0bcbb639b660074f6083a7fedd3f47112c7a5624",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.arch/amd64-lam.exp"
    },
    {
      "type": "modify",
      "old_id": "410f99e3350ff5fd8bf573efdb744eed0e030f57",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/lib/gdb.exp",
      "new_id": "5d4d9db3ea4e74fb7a75a2b9391a2a176c835655",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/lib/gdb.exp"
    }
  ]
}
