)]}'
{
  "log": [
    {
      "commit": "a477097d9c37c1cf289c7f0257dffcfa42d50197",
      "tree": "9c8a0b2ec1de35ae01c807c8da603f1868f86885",
      "parents": [
        "dc329442b9fd365bec95718013586c07ff600c34"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 04 13:41:14 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 04 16:58:45 2008 -0700"
      },
      "message": "mlock() fix return values\n\nHalesh says:\n\nPlease find the below testcase provide to test mlock.\n\nTest Case :\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n#include \u003csys/resource.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003csys/stat.h\u003e\n#include \u003csys/types.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003csys/mman.h\u003e\n#include \u003cfcntl.h\u003e\n#include \u003cerrno.h\u003e\n#include \u003cstdlib.h\u003e\n\nint main(void)\n{\n  int fd,ret, i \u003d 0;\n  char *addr, *addr1 \u003d NULL;\n  unsigned int page_size;\n  struct rlimit rlim;\n\n  if (0 !\u003d geteuid())\n  {\n   printf(\"Execute this pgm as root\\n\");\n   exit(1);\n  }\n\n  /* create a file */\n  if ((fd \u003d open(\"mmap_test.c\",O_RDWR|O_CREAT,0755)) \u003d\u003d -1)\n  {\n   printf(\"cant create test file\\n\");\n   exit(1);\n  }\n\n  page_size \u003d sysconf(_SC_PAGE_SIZE);\n\n  /* set the MEMLOCK limit */\n  rlim.rlim_cur \u003d 2000;\n  rlim.rlim_max \u003d 2000;\n\n  if ((ret \u003d setrlimit(RLIMIT_MEMLOCK,\u0026rlim)) !\u003d 0)\n  {\n   printf(\"Cant change limit values\\n\");\n   exit(1);\n  }\n\n  addr \u003d 0;\n  while (1)\n  {\n  /* map a page into memory each time*/\n  if ((addr \u003d (char *) mmap(addr,page_size, PROT_READ |\nPROT_WRITE,MAP_SHARED,fd,0)) \u003d\u003d MAP_FAILED)\n  {\n   printf(\"cant do mmap on file\\n\");\n   exit(1);\n  }\n\n  if (0 \u003d\u003d i)\n    addr1 \u003d addr;\n  i++;\n  errno \u003d 0;\n  /* lock the mapped memory pagewise*/\n  if ((ret \u003d mlock((char *)addr, 1500)) \u003d\u003d -1)\n  {\n   printf(\"errno value is %d\\n\", errno);\n   printf(\"cant lock maped region\\n\");\n   exit(1);\n  }\n  addr \u003d addr + page_size;\n }\n}\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nThis testcase results in an mlock() failure with errno 14 that is EFAULT,\nbut it has nowhere been specified that mlock() will return EFAULT.  When I\ntested the same on older kernels like 2.6.18, I got the correct result i.e\nerrno 12 (ENOMEM).\n\nI think in source code mlock(2), setting errno ENOMEM has been missed in\ndo_mlock() , on mlock_fixup() failure.\n\nSUSv3 requires the following behavior frmo mlock(2).\n\n[ENOMEM]\n    Some or all of the address range specified by the addr and\n    len arguments does not correspond to valid mapped pages\n    in the address space of the process.\n\n[EAGAIN]\n    Some or all of the memory identified by the operation could not\n    be locked when the call was made.\n\nThis rule isn\u0027t so nice and slighly strange.  but many people think\nPOSIX/SUS compliance is important.\n\nReported-by: Halesh Sadashiv \u003chalesh.sadashiv@ap.sony.com\u003e\nTested-by: Halesh Sadashiv \u003chalesh.sadashiv@ap.sony.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.25.x, 2.6.26.x]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5ed44a401ddfc60e11c3484e86f0c8285051139a",
      "tree": "96a44aac2853fc38aac801b3b628fb58adada2fb",
      "parents": [
        "84a01c2f8ea9bf210b961c6301e8e870a46505a6"
      ],
      "author": {
        "name": "Herbert van den Bergh",
        "email": "Herbert.van.den.Bergh@oracle.com",
        "time": "Sun Jul 15 23:38:25 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Mon Jul 16 09:05:37 2007 -0700"
      },
      "message": "do not limit locked memory when RLIMIT_MEMLOCK is RLIM_INFINITY\n\nFix a bug in mm/mlock.c on 32-bit architectures that prevents a user from\nlocking more than 4GB of shared memory, or allocating more than 4GB of\nshared memory in hugepages, when rlim[RLIMIT_MEMLOCK] is set to\nRLIM_INFINITY.\n\nSigned-off-by: Herbert van den Bergh \u003cherbert.van.den.bergh@oracle.com\u003e\nAcked-by: Chris Mason \u003cchris.mason@oracle.com\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e8edc6e03a5c8562dc70a6d969f732bdb355a7e7",
      "tree": "fc86c863655128a7041dfe613d14393d761fa7b9",
      "parents": [
        "ff1be9ad61e3e17ba83702d8ed0b534e5b8ee15c"
      ],
      "author": {
        "name": "Alexey Dobriyan",
        "email": "adobriyan@gmail.com",
        "time": "Mon May 21 01:22:52 2007 +0400"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Mon May 21 09:18:19 2007 -0700"
      },
      "message": "Detach sched.h from mm.h\n\nFirst thing mm.h does is including sched.h solely for can_do_mlock() inline\nfunction which has \"current\" dereference inside. By dealing with can_do_mlock()\nmm.h can be detached from sched.h which is good. See below, why.\n\nThis patch\na) removes unconditional inclusion of sched.h from mm.h\nb) makes can_do_mlock() normal function in mm/mlock.c\nc) exports can_do_mlock() to not break compilation\nd) adds sched.h inclusions back to files that were getting it indirectly.\ne) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were\n   getting them indirectly\n\nNet result is:\na) mm.h users would get less code to open, read, preprocess, parse, ... if\n   they don\u0027t need sched.h\nb) sched.h stops being dependency for significant number of files:\n   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,\n   after patch it\u0027s only 3744 (-8.3%).\n\nCross-compile tested on\n\n\tall arm defconfigs, all mips defconfigs, all powerpc defconfigs,\n\talpha alpha-up\n\tarm\n\ti386 i386-up i386-defconfig i386-allnoconfig\n\tia64 ia64-up\n\tm68k\n\tmips\n\tparisc parisc-up\n\tpowerpc powerpc-up\n\ts390 s390-up\n\tsparc sparc-up\n\tsparc64 sparc64-up\n\tum-x86_64\n\tx86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig\n\nas well as my two usual configs.\n\nSigned-off-by: Alexey Dobriyan \u003cadobriyan@gmail.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a3eea484f7a1aadb70ed6665338026a09ad6ce85",
      "tree": "95bf0a3d1bc65d00b4cb26e5cf2a419f13ac5814",
      "parents": [
        "8fb4fc68ca391862b061b3d358a288ccf6abed39"
      ],
      "author": {
        "name": "Rik Bobbaers",
        "email": "Rik.Bobbaers@cc.kuleuven.be",
        "time": "Wed Dec 06 20:32:25 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.osdl.org",
        "time": "Thu Dec 07 08:39:22 2006 -0800"
      },
      "message": "[PATCH] mlock cleanup\n\nmm is defined as vma-\u003evm_mm, so use that.\n\nAcked-by: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "c59ede7b78db329949d9cdcd7064e22d357560ef",
      "tree": "f9dc9d464fdad5bfd464d983e77c1af031389dda",
      "parents": [
        "e16885c5ad624a6efe1b1bf764e075d75f65a788"
      ],
      "author": {
        "name": "Randy.Dunlap",
        "email": "rdunlap@xenotime.net",
        "time": "Wed Jan 11 12:17:46 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Wed Jan 11 18:42:13 2006 -0800"
      },
      "message": "[PATCH] move capable() to capability.h\n\n- Move capable() from sched.h to capability.h;\n\n- Use \u003clinux/capability.h\u003e where capable() is used\n\t(in include/, block/, ipc/, kernel/, a few drivers/,\n\tmm/, security/, \u0026 sound/;\n\tmany more drivers/ to go)\n\nSigned-off-by: Randy Dunlap \u003crdunlap@xenotime.net\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
      "tree": "0bba044c4ce775e45a88a51686b5d9f90697ea9d",
      "parents": [],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@ppc970.osdl.org",
        "time": "Sat Apr 16 15:20:36 2005 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@ppc970.osdl.org",
        "time": "Sat Apr 16 15:20:36 2005 -0700"
      },
      "message": "Linux-2.6.12-rc2\n\nInitial git repository build. I\u0027m not bothering with the full history,\neven though we have it. We can create a separate \"historical\" git\narchive of that later if we want to, and in the meantime it\u0027s about\n3.2GB when imported into git - space that would just make the early\ngit days unnecessarily complicated, when we don\u0027t have a lot of good\ninfrastructure for it.\n\nLet it rip!\n"
    }
  ]
}
