)]}'
{
  "commit": "e9714acf8c439688884234dcac2bfc38bb607d38",
  "tree": "2e21c88f855a9f5168a143fa9948141140ff02a2",
  "parents": [
    "2dd8ad81e31d0d36a5d448329c646ab43eb17788"
  ],
  "author": {
    "name": "Konstantin Khlebnikov",
    "email": "khlebnikov@openvz.org",
    "time": "Mon Oct 08 16:28:54 2012 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Oct 09 16:22:18 2012 +0900"
  },
  "message": "mm: kill vma flag VM_EXECUTABLE and mm-\u003enum_exe_file_vmas\n\nCurrently the kernel sets mm-\u003eexe_file during sys_execve() and then tracks\nnumber of vmas with VM_EXECUTABLE flag in mm-\u003enum_exe_file_vmas, as soon\nas this counter drops to zero kernel resets mm-\u003eexe_file to NULL.  Plus it\nresets mm-\u003eexe_file at last mmput() when mm-\u003emm_users drops to zero.\n\nVMA with VM_EXECUTABLE flag appears after mapping file with flag\nMAP_EXECUTABLE, such vmas can appears only at sys_execve() or after vma\nsplitting, because sys_mmap ignores this flag.  Usually binfmt module sets\nmm-\u003eexe_file and mmaps executable vmas with this file, they hold\nmm-\u003eexe_file while task is running.\n\ncomment from v2.6.25-6245-g925d1c4 (\"procfs task exe symlink\"),\nwhere all this stuff was introduced:\n\n\u003e The kernel implements readlink of /proc/pid/exe by getting the file from\n\u003e the first executable VMA.  Then the path to the file is reconstructed and\n\u003e reported as the result.\n\u003e\n\u003e Because of the VMA walk the code is slightly different on nommu systems.\n\u003e This patch avoids separate /proc/pid/exe code on nommu systems.  Instead of\n\u003e walking the VMAs to find the first executable file-backed VMA we store a\n\u003e reference to the exec\u0027d file in the mm_struct.\n\u003e\n\u003e That reference would prevent the filesystem holding the executable file\n\u003e from being unmounted even after unmapping the VMAs.  So we track the number\n\u003e of VM_EXECUTABLE VMAs and drop the new reference when the last one is\n\u003e unmapped.  This avoids pinning the mounted filesystem.\n\nexe_file\u0027s vma accounting is hooked into every file mmap/unmmap and vma\nsplit/merge just to fix some hypothetical pinning fs from umounting by mm,\nwhich already unmapped all its executable files, but still alive.\n\nSeems like currently nobody depends on this behaviour.  We can try to\nremove this logic and keep mm-\u003eexe_file until final mmput().\n\nmm-\u003eexe_file is still protected with mm-\u003emmap_sem, because we want to\nchange it via new sys_prctl(PR_SET_MM_EXE_FILE).  Also via this syscall\ntask can change its mm-\u003eexe_file and unpin mountpoint explicitly.\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Carsten Otte \u003ccotte@de.ibm.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nCc: Cyrill Gorcunov \u003cgorcunov@openvz.org\u003e\nCc: Eric Paris \u003ceparis@redhat.com\u003e\nCc: H. Peter Anvin \u003chpa@zytor.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: James Morris \u003cjames.l.morris@oracle.com\u003e\nCc: Jason Baron \u003cjbaron@redhat.com\u003e\nCc: Kentaro Takeda \u003ctakedakn@nttdata.co.jp\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Robert Richter \u003crobert.richter@amd.com\u003e\nCc: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nCc: Tetsuo Handa \u003cpenguin-kernel@I-love.SAKURA.ne.jp\u003e\nCc: Venkatesh Pallipadi \u003cvenki@google.com\u003e\nAcked-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "44d3fc25f55652b8d3c6b0fa7ba3e1ca88e26699",
      "old_mode": 33188,
      "old_path": "include/linux/mm.h",
      "new_id": "25ef49c1f2bd553f00f4357d6c515baaebf9623a",
      "new_mode": 33188,
      "new_path": "include/linux/mm.h"
    },
    {
      "type": "modify",
      "old_id": "bf7867200b95b488fd960c95f7200af5837286bb",
      "old_mode": 33188,
      "old_path": "include/linux/mm_types.h",
      "new_id": "58d3173eb365d42ec7e7ce1cc0e00d52b01e7d5e",
      "new_mode": 33188,
      "new_path": "include/linux/mm_types.h"
    },
    {
      "type": "modify",
      "old_id": "8b74e9b1d0ad53911cd15e31891be149bc7932af",
      "old_mode": 33188,
      "old_path": "include/linux/mman.h",
      "new_id": "77cec2f45cb77d54c19b049f086d51c2db3a980b",
      "new_mode": 33188,
      "new_path": "include/linux/mman.h"
    },
    {
      "type": "modify",
      "old_id": "a57a993681edfe9943dc86ba814804238fdeaa0d",
      "old_mode": 33188,
      "old_path": "kernel/fork.c",
      "new_id": "ec667f797af3af674c0b9fe6146f91bfb73b494b",
      "new_mode": 33188,
      "new_path": "kernel/fork.c"
    },
    {
      "type": "modify",
      "old_id": "d0686d3551134516de31462181e44ac4d1d5c91a",
      "old_mode": 33188,
      "old_path": "mm/mmap.c",
      "new_id": "c1ad2e78ea5877616ec92e06194be2264f0ae838",
      "new_mode": 33188,
      "new_path": "mm/mmap.c"
    },
    {
      "type": "modify",
      "old_id": "98318dcff742e63463b8d4a8a02e4c52625b7e8b",
      "old_mode": 33188,
      "old_path": "mm/nommu.c",
      "new_id": "9c4a7b63a4dfe582dff7825bcdcb0d3c81da5f7e",
      "new_mode": 33188,
      "new_path": "mm/nommu.c"
    }
  ]
}
