)]}'
{
  "commit": "600f1f769d06c961781ad9a4abbedee221c4558a",
  "tree": "5960c02e84e2b017e94a941e7e8f6a1966531c8d",
  "parents": [
    "680f2c1fff2d6484175485018b86e77c8d890fc5"
  ],
  "author": {
    "name": "Luis Chamberlain",
    "email": "mcgrof@kernel.org",
    "time": "Fri Mar 17 15:10:29 2023 -0700"
  },
  "committer": {
    "name": "Luis Chamberlain",
    "email": "mcgrof@kernel.org",
    "time": "Sun Mar 19 14:02:00 2023 -0700"
  },
  "message": "module: add a sanity check prior to allowing kernel module auto-loading\n\nrequest_module() is what we use for kernel-module autoloading. But\nthis today is pretty stupid, it just requests for the module without\neven checking if its needed. And so we bounce to userspace and hope\nfor the best.\n\nWe can instead do a simple check to see if the module is already\npresent. This will however contend the module_mutex, but it should\nnever be heavily contended. However, module auto-loading is a special\nuse case in the kernel and kernel/kmod already limits the amount of\nconcurrent requests from the kernel to 50 so we know the kernel can\nonly contend on the module_mutex for querying if a module exists 50\ntimes at any single point in time.\n\nThis work is only valuable if it proves useful for booting up large\nsystems where a lot of current kernel heuristics use many kernel\nmodule auto-loading features and they could benefit from this. There\nare no metrics yet to show, but at least this doesn\u0027t penalize much\nexisting systems.\n\nSigned-off-by: Luis Chamberlain \u003cmcgrof@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6ae29bb8836f89d79cf1754c8aab8fad6e4378b4",
      "old_mode": 33188,
      "old_path": "kernel/module/internal.h",
      "new_id": "cb00555780bd419e86a7f212e0873e4dc306c5eb",
      "new_mode": 33188,
      "new_path": "kernel/module/internal.h"
    },
    {
      "type": "modify",
      "old_id": "b717134ebe1700808ed56415eb7a8ed25da4ec6e",
      "old_mode": 33188,
      "old_path": "kernel/module/kmod.c",
      "new_id": "67efc6de902f64b05ef4bba13c902834edf5e69d",
      "new_mode": 33188,
      "new_path": "kernel/module/kmod.c"
    },
    {
      "type": "modify",
      "old_id": "32955b7819b3612e6edaf1a14cfd72c66ef85225",
      "old_mode": 33188,
      "old_path": "kernel/module/main.c",
      "new_id": "2a84d747865ad2a7046d755878ad0b7013845678",
      "new_mode": 33188,
      "new_path": "kernel/module/main.c"
    }
  ]
}
