)]}'
{
  "commit": "07cc2c931e8e1083a31f4c51d2244fe264af63bf",
  "tree": "1abb9ab286d6310e872dcb99448c65bd10a85748",
  "parents": [
    "92afc5329a5b23d876b215b783d200352d5aaea6"
  ],
  "author": {
    "name": "Zhen Lei",
    "email": "thunder.leizhen@huawei.com",
    "time": "Mon Jan 16 11:10:07 2023 +0100"
  },
  "committer": {
    "name": "Alexei Starovoitov",
    "email": "ast@kernel.org",
    "time": "Thu Jan 19 17:07:15 2023 -0800"
  },
  "message": "livepatch: Improve the search performance of module_kallsyms_on_each_symbol()\n\nCurrently we traverse all symbols of all modules to find the specified\nfunction for the specified module. But in reality, we just need to find\nthe given module and then traverse all the symbols in it.\n\nLet\u0027s add a new parameter \u0027const char *modname\u0027 to function\nmodule_kallsyms_on_each_symbol(), then we can compare the module names\ndirectly in this function and call hook \u0027fn\u0027 after matching. If \u0027modname\u0027\nis NULL, the symbols of all modules are still traversed for compatibility\nwith other usage cases.\n\nPhase1: mod1--\u003emod2..(subsequent modules do not need to be compared)\n                |\nPhase2:          --\u003ef1--\u003ef2--\u003ef3\n\nAssuming that there are m modules, each module has n symbols on average,\nthen the time complexity is reduced from O(m * n) to O(m) + O(n).\n\nReviewed-by: Petr Mladek \u003cpmladek@suse.com\u003e\nAcked-by: Song Liu \u003csong@kernel.org\u003e\nSigned-off-by: Zhen Lei \u003cthunder.leizhen@huawei.com\u003e\nSigned-off-by: Jiri Olsa \u003cjolsa@kernel.org\u003e\nAcked-by: Miroslav Benes \u003cmbenes@suse.cz\u003e\nReviewed-by: Luis Chamberlain \u003cmcgrof@kernel.org\u003e\nLink: https://lore.kernel.org/r/20230116101009.23694-2-jolsa@kernel.org\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8c5909c0076c6e1e75fde683574769085cef6cc5",
      "old_mode": 33188,
      "old_path": "include/linux/module.h",
      "new_id": "514bc81568c52205a3da8047505dd302b0a14e37",
      "new_mode": 33188,
      "new_path": "include/linux/module.h"
    },
    {
      "type": "modify",
      "old_id": "201f0c0482fb56dbaccb5c4eeb414c4dd3de9aba",
      "old_mode": 33188,
      "old_path": "kernel/livepatch/core.c",
      "new_id": "c973ed9e42f8177b116d22549bb348315f1edcd1",
      "new_mode": 33188,
      "new_path": "kernel/livepatch/core.c"
    },
    {
      "type": "modify",
      "old_id": "4523f99b03589e3cdfe20a80c57cb1fa589ca9de",
      "old_mode": 33188,
      "old_path": "kernel/module/kallsyms.c",
      "new_id": "ab2376a1be88e7e6960d9544e08fdb83a5cba484",
      "new_mode": 33188,
      "new_path": "kernel/module/kallsyms.c"
    },
    {
      "type": "modify",
      "old_id": "23ce498bca975bb317c5c0627533f8999575e893",
      "old_mode": 33188,
      "old_path": "kernel/trace/bpf_trace.c",
      "new_id": "095f7f8d34a1d7fd51fe5646ad954e3b316a9db7",
      "new_mode": 33188,
      "new_path": "kernel/trace/bpf_trace.c"
    },
    {
      "type": "modify",
      "old_id": "442438b93fe98040349ec5c33161c1d550212e5c",
      "old_mode": 33188,
      "old_path": "kernel/trace/ftrace.c",
      "new_id": "d249a55d9005765b8042669fd877c8c25dfaa241",
      "new_mode": 33188,
      "new_path": "kernel/trace/ftrace.c"
    }
  ]
}
