)]}'
{
  "commit": "b2767d97f5ff758250cf28684aaa48bbfd34145f",
  "tree": "da398a432a5a0fb9dc1e18b57bf93bef5db1d121",
  "parents": [
    "f3964599c22f70c37544c06b6b232c42746b940b"
  ],
  "author": {
    "name": "Jann Horn",
    "email": "jannh@google.com",
    "time": "Sat Oct 17 16:14:15 2020 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Sun Oct 18 09:27:09 2020 -0700"
  },
  "message": "binfmt_elf: take the mmap lock around find_extend_vma()\n\ncreate_elf_tables() runs after setup_new_exec(), so other tasks can\nalready access our new mm and do things like process_madvise() on it.  (At\nthe time I\u0027m writing this commit, process_madvise() is not in mainline\nyet, but has been in akpm\u0027s tree for some time.)\n\nWhile I believe that there are currently no APIs that would actually allow\nanother process to mess up our VMA tree (process_madvise() is limited to\nMADV_COLD and MADV_PAGEOUT, and uring and userfaultfd cannot reach an mm\nunder which no syscalls have been executed yet), this seems like an\naccident waiting to happen.\n\nLet\u0027s make sure that we always take the mmap lock around GUP paths as long\nas another process might be able to see the mm.\n\n(Yes, this diff looks suspicious because we drop the lock before doing\nanything with `vma`, but that\u0027s because we actually don\u0027t do anything with\nit apart from the NULL check.)\n\nSigned-off-by: Jann Horn \u003cjannh@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nAcked-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: \"Eric W . Biederman\" \u003cebiederm@xmission.com\u003e\nCc: Jason Gunthorpe \u003cjgg@nvidia.com\u003e\nCc: John Hubbard \u003cjhubbard@nvidia.com\u003e\nCc: Mauro Carvalho Chehab \u003cmchehab@kernel.org\u003e\nCc: Sakari Ailus \u003csakari.ailus@linux.intel.com\u003e\nLink: https://lkml.kernel.org/r/CAG48ez1-PBCdv3y8pn-Ty-b+FmBSLwDuVKFSt8h7wARLy0dF-Q@mail.gmail.com\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e7e9d0cde51acb49666bd718f61128a4ef697b10",
      "old_mode": 33188,
      "old_path": "fs/binfmt_elf.c",
      "new_id": "b6b3d052ca86dee2084da5d806d7848e80cac1c1",
      "new_mode": 33188,
      "new_path": "fs/binfmt_elf.c"
    }
  ]
}
