)]}'
{
  "log": [
    {
      "commit": "395108880efff4a4ffa1ffa554477f7f5ba6a031",
      "tree": "7d5797145d54b6cd8752eb2a6b1fd934336a005f",
      "parents": [
        "2dfa4eeab0fc7e8633974f2770945311b31eedf6"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Tue Mar 31 15:24:23 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 01 08:59:20 2009 -0700"
      },
      "message": "epoll keyed wakeups: make eventfd use keyed wakeups\n\nIntroduce keyed event wakeups inside the eventfd code.\n\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: David Miller \u003cdavem@davemloft.net\u003e\nCc: William Lee Irwin III \u003cwli@movementarian.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bcd0b235bf3808dec5115c381cd55568f63b85f0",
      "tree": "d73c4aa83dcd5321d2c48e070020576098b9705e",
      "parents": [
        "4f0989dbfa8d18dd17c32120aac1eb3e906a62a2"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Tue Mar 31 15:24:18 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 01 08:59:20 2009 -0700"
      },
      "message": "eventfd: improve support for semaphore-like behavior\n\nPeople started using eventfd in a semaphore-like way where before they\nwere using pipes.\n\nThat is, counter-based resource access.  Where a \"wait()\" returns\nimmediately by decrementing the counter by one, if counter is greater than\nzero.  Otherwise will wait.  And where a \"post(count)\" will add count to\nthe counter releasing the appropriate amount of waiters.  If eventfd the\n\"post\" (write) part is fine, while the \"wait\" (read) does not dequeue 1,\nbut the whole counter value.\n\nThe problem with eventfd is that a read() on the fd returns and wipes the\nwhole counter, making the use of it as semaphore a little bit more\ncumbersome.  You can do a read() followed by a write() of COUNTER-1, but\nIMO it\u0027s pretty easy and cheap to make this work w/out extra steps.  This\npatch introduces a new eventfd flag that tells eventfd to only dequeue 1\nfrom the counter, allowing simple read/write to make it behave like a\nsemaphore.  Simple test here:\n\nhttp://www.xmailserver.org/eventfd-sem.c\n\nTo be back-compatible with earlier kernels, userspace applications should\nprobe for the availability of this feature via\n\n#ifdef EFD_SEMAPHORE\n\tfd \u003d eventfd2 (CNT, EFD_SEMAPHORE);\n\tif (fd \u003d\u003d -1 \u0026\u0026 errno \u003d\u003d EINVAL)\n\t\t\u003cfallback\u003e\n#else\n\t\t\u003cfallback\u003e\n#endif\n\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: \u003clinux-api@vger.kernel.org\u003e\nTested-by: Michael Kerrisk \u003cmtk.manpages@gmail.com\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d4e82042c4cfa87a7d51710b71f568fe80132551",
      "tree": "202c311b52f4e4db9fbbbd80607744e2aa2e5885",
      "parents": [
        "836f92adf121f806e9beb5b6b88bd5c9c4ea3f24"
      ],
      "author": {
        "name": "Heiko Carstens",
        "email": "heiko.carstens@de.ibm.com",
        "time": "Wed Jan 14 14:14:34 2009 +0100"
      },
      "committer": {
        "name": "Heiko Carstens",
        "email": "heiko.carstens@de.ibm.com",
        "time": "Wed Jan 14 14:15:31 2009 +0100"
      },
      "message": "[CVE-2009-0029] System call wrappers part 32\n\nSigned-off-by: Heiko Carstens \u003cheiko.carstens@de.ibm.com\u003e\n"
    },
    {
      "commit": "e38b36f325153eaadd1c2a7abc5762079233e540",
      "tree": "92cfc9855e41c5328d91456f5e373c00ecb8d383",
      "parents": [
        "510df2dd482496083e1c3b1a8c9b6afd5fa4c7d7"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:42 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:29 2008 -0700"
      },
      "message": "flag parameters: check magic constants\n\nThis patch adds test that ensure the boundary conditions for the various\nconstants introduced in the previous patches is met.  No code is generated.\n\n[akpm@linux-foundation.org: fix alpha]\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e7d476dfdf0bcfed478a207aecfdc84f81efecaf",
      "tree": "8adc7f4cf562cd0e283d4abdaa0633686a59d8b2",
      "parents": [
        "5fb5e04926a54bc1c22bba7ca166840f4476196f"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:38 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:29 2008 -0700"
      },
      "message": "flag parameters: NONBLOCK in eventfd\n\nThis patch adds support for the EFD_NONBLOCK flag to eventfd2.  The\nadditional changes needed are minimal.\n\nThe following test must be adjusted for architectures other than x86 and\nx86-64 and in case the syscall numbers changed.\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n#include \u003cfcntl.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003csys/syscall.h\u003e\n\n#ifndef __NR_eventfd2\n# ifdef __x86_64__\n#  define __NR_eventfd2 290\n# elif defined __i386__\n#  define __NR_eventfd2 328\n# else\n#  error \"need __NR_eventfd2\"\n# endif\n#endif\n\n#define EFD_NONBLOCK O_NONBLOCK\n\nint\nmain (void)\n{\n  int fd \u003d syscall (__NR_eventfd2, 1, 0);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(0) failed\");\n      return 1;\n    }\n  int fl \u003d fcntl (fd, F_GETFL);\n  if (fl \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if (fl \u0026 O_NONBLOCK)\n    {\n      puts (\"eventfd2(0) sets non-blocking mode\");\n      return 1;\n    }\n  close (fd);\n\n  fd \u003d syscall (__NR_eventfd2, 1, EFD_NONBLOCK);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(EFD_NONBLOCK) failed\");\n      return 1;\n    }\n  fl \u003d fcntl (fd, F_GETFL);\n  if (fl \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if ((fl \u0026 O_NONBLOCK) \u003d\u003d 0)\n    {\n      puts (\"eventfd2(EFD_NONBLOCK) does not set non-blocking mode\");\n      return 1;\n    }\n  close (fd);\n\n  puts (\"OK\");\n\n  return 0;\n}\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b087498eb5605673b0f260a7620d91818cd72304",
      "tree": "977d9dbcd326a9582dfc5ad000995d26886c872e",
      "parents": [
        "9deb27baedb79759c3ab9435a7d8b841842d56e9"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:25 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:27 2008 -0700"
      },
      "message": "flag parameters: eventfd\n\nThis patch adds the new eventfd2 syscall.  It extends the old eventfd\nsyscall by one parameter which is meant to hold a flag value.  In this\npatch the only flag support is EFD_CLOEXEC which causes the close-on-exec\nflag for the returned file descriptor to be set.\n\nA new name EFD_CLOEXEC is introduced which in this implementation must\nhave the same value as O_CLOEXEC.\n\nThe following test must be adjusted for architectures other than x86 and\nx86-64 and in case the syscall numbers changed.\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n#include \u003cfcntl.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003csys/syscall.h\u003e\n\n#ifndef __NR_eventfd2\n# ifdef __x86_64__\n#  define __NR_eventfd2 290\n# elif defined __i386__\n#  define __NR_eventfd2 328\n# else\n#  error \"need __NR_eventfd2\"\n# endif\n#endif\n\n#define EFD_CLOEXEC O_CLOEXEC\n\nint\nmain (void)\n{\n  int fd \u003d syscall (__NR_eventfd2, 1, 0);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(0) failed\");\n      return 1;\n    }\n  int coe \u003d fcntl (fd, F_GETFD);\n  if (coe \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if (coe \u0026 FD_CLOEXEC)\n    {\n      puts (\"eventfd2(0) sets close-on-exec flag\");\n      return 1;\n    }\n  close (fd);\n\n  fd \u003d syscall (__NR_eventfd2, 1, EFD_CLOEXEC);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(EFD_CLOEXEC) failed\");\n      return 1;\n    }\n  coe \u003d fcntl (fd, F_GETFD);\n  if (coe \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if ((coe \u0026 FD_CLOEXEC) \u003d\u003d 0)\n    {\n      puts (\"eventfd2(EFD_CLOEXEC) does not set close-on-exec flag\");\n      return 1;\n    }\n  close (fd);\n\n  puts (\"OK\");\n\n  return 0;\n}\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n[akpm@linux-foundation.org: add sys_ni stub]\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nCc: \u003clinux-arch@vger.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": "7d9dbca34240ebb6ff88d8a29c6c7bffd098f0c1",
      "tree": "7e3226a4d885f5e4444fbe01a08c51b0b33b2cc7",
      "parents": [
        "c019bbc612f6633ede7ed67725cbf68de45ae8a4"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:22 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:27 2008 -0700"
      },
      "message": "flag parameters: anon_inode_getfd extension\n\nThis patch just extends the anon_inode_getfd interface to take an additional\nparameter with a flag value.  The flag value is passed on to\nget_unused_fd_flags in anticipation for a use with the O_CLOEXEC flag.\n\nNo actual semantic changes here, the changed callers all pass 0 for now.\n\n[akpm@linux-foundation.org: KVM fix]\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2030a42cecd4dd1985a2ab03e25f3cd6106a5ca8",
      "tree": "7cb4710c3f7a4e034a20890f0df99bc42f9bbcee",
      "parents": [
        "9f3acc3140444a900ab280de942291959f0f615d"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Sat Feb 23 06:46:49 2008 -0500"
      },
      "committer": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Thu May 01 13:08:50 2008 -0400"
      },
      "message": "[PATCH] sanitize anon_inode_getfd()\n\na) none of the callers even looks at inode or file returned by anon_inode_getfd()\nb) any caller that would try to look at those would be racy, since by the time\nit returns we might have raced with close() from another thread and that\nfile would be pining for fjords.\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n"
    },
    {
      "commit": "7747cdb2f8302c2e1121f6d604b62a060fb04603",
      "tree": "c8d99c14aceea53f790e8769f0c60fc592b8de07",
      "parents": [
        "7ec37dfd4d282ce132dcb048398800951f6d11ef"
      ],
      "author": {
        "name": "Adrian Bunk",
        "email": "bunk@kernel.org",
        "time": "Wed Feb 06 01:36:49 2008 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed Feb 06 10:41:03 2008 -0800"
      },
      "message": "fs/eventfd.c should #include \u003clinux/syscalls.h\u003e\n\nEvery file should include the headers containing the prototypes for its global\nfunctions (in this case sys_eventfd()).\n\nSigned-off-by: Adrian Bunk \u003cbunk@kernel.org\u003e\nCc: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d48eb2331595224ffe89665e79721d44b40bb047",
      "tree": "b4e398ec71e0775a441329b60cb0771c43e92c54",
      "parents": [
        "347b4599dd6ffef27e18c227532d1ec66556000b"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Fri May 18 12:02:33 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri May 18 13:09:34 2007 -0700"
      },
      "message": "eventfd use waitqueue lock ...\n\nThe eventfd was using the unlocked waitqueue operations, but it was\nusing a different lock, so poll_wait() would race with it.\n\nThis makes eventfd directly use the waitqueue lock.\n\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e1ad7468c77ddb94b0615d5f50fa255525fde0f0",
      "tree": "856be1a028fece7e1fa10b7b585096839913fe2e",
      "parents": [
        "83f5d1266926c75890f1bc4678e49d79483cb573"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Thu May 10 22:23:19 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri May 11 08:29:36 2007 -0700"
      },
      "message": "signal/timer/event: eventfd core\n\nThis is a very simple and light file descriptor, that can be used as event\nwait/dispatch by userspace (both wait and dispatch) and by the kernel\n(dispatch only).  It can be used instead of pipe(2) in all cases where those\nwould simply be used to signal events.  Their kernel overhead is much lower\nthan pipes, and they do not consume two fds.  When used in the kernel, it can\noffer an fd-bridge to enable, for example, functionalities like KAIO or\nsyslets/threadlets to signal to an fd the completion of certain operations.\nBut more in general, an eventfd can be used by the kernel to signal readiness,\nin a POSIX poll/select way, of interfaces that would otherwise be incompatible\nwith it.  The API is:\n\nint eventfd(unsigned int count);\n\nThe eventfd API accepts an initial \"count\" parameter, and returns an eventfd\nfd.  It supports poll(2) (POLLIN, POLLOUT, POLLERR), read(2) and write(2).\n\nThe POLLIN flag is raised when the internal counter is greater than zero.\n\nThe POLLOUT flag is raised when at least a value of \"1\" can be written to the\ninternal counter.\n\nThe POLLERR flag is raised when an overflow in the counter value is detected.\n\nThe write(2) operation can never overflow the counter, since it blocks (unless\nO_NONBLOCK is set, in which case -EAGAIN is returned).\n\nBut the eventfd_signal() function can do it, since it\u0027s supposed to not sleep\nduring its operation.\n\nThe read(2) function reads the __u64 counter value, and reset the internal\nvalue to zero.  If the value read is equal to (__u64) -1, an overflow happened\non the internal counter (due to 2^64 eventfd_signal() posts that has never\nbeen retired - unlickely, but possible).\n\nThe write(2) call writes an __u64 count value, and adds it to the current\ncounter.  The eventfd fd supports O_NONBLOCK also.\n\nOn the kernel side, we have:\n\nstruct file *eventfd_fget(int fd);\nint eventfd_signal(struct file *file, unsigned int n);\n\nThe eventfd_fget() should be called to get a struct file* from an eventfd fd\n(this is an fget() + check of f_op being an eventfd fops pointer).\n\nThe kernel can then call eventfd_signal() every time it wants to post an event\nto userspace.  The eventfd_signal() function can be called from any context.\nAn eventfd() simple test and bench is available here:\n\nhttp://www.xmailserver.org/eventfd-bench.c\n\nThis is the eventfd-based version of pipetest-4 (pipe(2) based):\n\nhttp://www.xmailserver.org/pipetest-4.c\n\nNot that performance matters much in the eventfd case, but eventfd-bench\nshows almost as double as performance than pipetest-4.\n\n[akpm@linux-foundation.org: fix i386 build]\n[akpm@linux-foundation.org: add sys_eventfd to sys_ni.c]\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ]
}
