)]}'
{
  "commit": "651910874633a75f4a726d44e449be0a56b4b2e0",
  "tree": "55adac70473da5618042f65dd652fcec0965732c",
  "parents": [
    "93ded9b8fd42abe2c3607097963d8de6ad9117eb"
  ],
  "author": {
    "name": "John Reiser",
    "email": "jreiser@BitWagon.com",
    "time": "Mon Jul 21 14:21:32 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Jul 22 09:59:40 2008 -0700"
  },
  "message": "execve filename: document and export via auxiliary vector\n\nThe Linux kernel puts the filename argument of execve() into the new\naddress space.  Many developers are surprised to learn this.  Those who\nknow and could use it, object \"But it\u0027s not documented.\"\n\nThose who want to use it dislike the expression\n  (char *)(1+ strlen(env[-1+ n_env]) + env[-1+ n_env])\nbecause it requires locating the last original environment variable,\nand assumes that the filename follows the characters.\n\nThis patch documents the insertion of the filename, and makes it easier\nto find by adding a new tag AT_EXECFN in the ElfXX_auxv_t; see \u003celf.h\u003e.\n\nIn many cases readlink(\"/proc/self/exe\",) gives the same answer.  But if\nall the original pages get unmapped, then the kernel erases the symlink\nfor /proc/self/exe.  This can happen when a program decompressor does a\ngood job of cleaning up after uncompressing directly to memory, so that\nthe address space of the target program looks the same as if compression\nhad never happened.  One example is http://upx.sourceforge.net .\n\nOne notable use of the underlying concept (what path containED the\nexecutable) is glibc expanding $ORIGIN in DT_RUNPATH.  In practice for\nthe near term, it may be a good idea for user-mode code to use both\n/proc/self/exe and AT_EXECFN as fall-back methods for each other.\n/proc/self/exe can fail due to unmapping, AT_EXECFN can fail because it\nwon\u0027t be present on non-new systems.  The auxvec or {AT_EXECFN}.d_val\nalso can get overwritten, although in nearly all cases this would be the\nresult of a bug.\n\nThe runtime cost is one NEW_AUX_ENT using two words of stack space.  The\nunderlying value is maintained already as bprm-\u003eexec; setup_arg_pages()\nin fs/exec.c slides it for stack_shift, etc.\n\nSigned-off-by: John Reiser \u003cjreiser@BitWagon.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nCc: Jakub Jelinek \u003cjakub@redhat.com\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.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": "d48ff5f370f4e5122c3402ed44889564366ad317",
      "old_mode": 33188,
      "old_path": "fs/binfmt_elf.c",
      "new_id": "639d2d8b57106ac6e524c4ab7c940ea2fad895da",
      "new_mode": 33188,
      "new_path": "fs/binfmt_elf.c"
    },
    {
      "type": "modify",
      "old_id": "ad895455ab72cebf26a218910433a34edd53e30d",
      "old_mode": 33188,
      "old_path": "include/linux/auxvec.h",
      "new_id": "0da17d14fd139f548cc18c3076a8390a8089918f",
      "new_mode": 33188,
      "new_path": "include/linux/auxvec.h"
    }
  ]
}
