<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/ipc, branch v4.12.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-07-15T11:09:03Z</updated>
<entry>
<title>mqueue: fix a use-after-free in sys_mq_notify()</title>
<updated>2017-07-15T11:09:03Z</updated>
<author>
<name>Cong Wang</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2017-07-09T20:19:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=34bfc894734d56cca6c5924b5889e6308eeb66e1'/>
<id>urn:sha1:34bfc894734d56cca6c5924b5889e6308eeb66e1</id>
<content type='text'>
commit f991af3daabaecff34684fd51fac80319d1baad1 upstream.

The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:

1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
   release the file refcnt

so we when retry but the fd has been just closed by user-space
during this small window, we end up calling netlink_detachskb()
on the error path which releases the sock again, later when
the user-space closes this socket a use-after-free could be
triggered.

Setting 'sock' to NULL here should be sufficient to fix it.

Reported-by: GeneBlue &lt;geneblue.mail@gmail.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mm: introduce kv[mz]alloc helpers</title>
<updated>2017-05-09T00:15:12Z</updated>
<author>
<name>Michal Hocko</name>
<email>mhocko@suse.com</email>
</author>
<published>2017-05-08T22:57:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a7c3e901a46ff54c016d040847eda598a9e3e653'/>
<id>urn:sha1:a7c3e901a46ff54c016d040847eda598a9e3e653</id>
<content type='text'>
Patch series "kvmalloc", v5.

There are many open coded kmalloc with vmalloc fallback instances in the
tree.  Most of them are not careful enough or simply do not care about
the underlying semantic of the kmalloc/page allocator which means that
a) some vmalloc fallbacks are basically unreachable because the kmalloc
part will keep retrying until it succeeds b) the page allocator can
invoke a really disruptive steps like the OOM killer to move forward
which doesn't sound appropriate when we consider that the vmalloc
fallback is available.

As it can be seen implementing kvmalloc requires quite an intimate
knowledge if the page allocator and the memory reclaim internals which
strongly suggests that a helper should be implemented in the memory
subsystem proper.

Most callers, I could find, have been converted to use the helper
instead.  This is patch 6.  There are some more relying on __GFP_REPEAT
in the networking stack which I have converted as well and Eric Dumazet
was not opposed [2] to convert them as well.

[1] http://lkml.kernel.org/r/20170130094940.13546-1-mhocko@kernel.org
[2] http://lkml.kernel.org/r/1485273626.16328.301.camel@edumazet-glaptop3.roam.corp.google.com

This patch (of 9):

Using kmalloc with the vmalloc fallback for larger allocations is a
common pattern in the kernel code.  Yet we do not have any common helper
for that and so users have invented their own helpers.  Some of them are
really creative when doing so.  Let's just add kv[mz]alloc and make sure
it is implemented properly.  This implementation makes sure to not make
a large memory pressure for &gt; PAGE_SZE requests (__GFP_NORETRY) and also
to not warn about allocation failures.  This also rules out the OOM
killer as the vmalloc is a more approapriate fallback than a disruptive
user visible action.

This patch also changes some existing users and removes helpers which
are specific for them.  In some cases this is not possible (e.g.
ext4_kvmalloc, libcfs_kvzalloc) because those seems to be broken and
require GFP_NO{FS,IO} context which is not vmalloc compatible in general
(note that the page table allocation is GFP_KERNEL).  Those need to be
fixed separately.

While we are at it, document that __vmalloc{_node} about unsupported gfp
mask because there seems to be a lot of confusion out there.
kvmalloc_node will warn about GFP_KERNEL incompatible (which are not
superset) flags to catch new abusers.  Existing ones would have to die
slowly.

[sfr@canb.auug.org.au: f2fs fixup]
  Link: http://lkml.kernel.org/r/20170320163735.332e64b7@canb.auug.org.au
Link: http://lkml.kernel.org/r/20170306103032.2540-2-mhocko@kernel.org
Signed-off-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Reviewed-by: Andreas Dilger &lt;adilger@dilger.ca&gt;	[ext4 part]
Acked-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Cc: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc/shm: some shmat cleanups</title>
<updated>2017-05-09T00:15:12Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2017-05-08T22:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f0cb88026f51a0d8c952cf5e09e1933ef10b50b4'/>
<id>urn:sha1:f0cb88026f51a0d8c952cf5e09e1933ef10b50b4</id>
<content type='text'>
Clean up early flag and address some minutia.

Link: http://lkml.kernel.org/r/1486673582-6979-3-git-send-email-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace</title>
<updated>2017-05-05T18:08:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-05-05T18:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e579dde654fc2c6b0d3e4b77a9a4b2d2405c510e'/>
<id>urn:sha1:e579dde654fc2c6b0d3e4b77a9a4b2d2405c510e</id>
<content type='text'>
Pull namespace updates from Eric Biederman:
 "This is a set of small fixes that were mostly stumbled over during
  more significant development. This proc fix and the fix to
  posix-timers are the most significant of the lot.

  There is a lot of good development going on but unfortunately it
  didn't quite make the merge window"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  proc: Fix unbalanced hard link numbers
  signal: Make kill_proc_info static
  rlimit: Properly call security_task_setrlimit
  signal: Remove unused definition of sig_user_definied
  ia64: Remove unused IA64_TASK_SIGHAND_OFFSET and IA64_SIGHAND_SIGLOCK_OFFSET
  ipc: Remove unused declaration of recompute_msgmni
  posix-timers: Correct sanity check in posix_cpu_nsleep
  sysctl: Remove dead register_sysctl_root
</content>
</entry>
<entry>
<title>ipc: Remove unused declaration of recompute_msgmni</title>
<updated>2017-04-18T02:53:07Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2016-08-08T14:34:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2bcb9883664590867c87c19667e8738a0f675bf2'/>
<id>urn:sha1:2bcb9883664590867c87c19667e8738a0f675bf2</id>
<content type='text'>
The function recompute_msgmni was removed a while ago
but it is still declared in a header file remove it.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>kernel-api.rst: fix a series of errors when parsing C files</title>
<updated>2017-04-02T20:31:49Z</updated>
<author>
<name>mchehab@s-opensource.com</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2017-03-30T20:11:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e056eb5530da802c07f080d6bbd43c50e799efd'/>
<id>urn:sha1:0e056eb5530da802c07f080d6bbd43c50e799efd</id>
<content type='text'>
./lib/string.c:134: WARNING: Inline emphasis start-string without end-string.
./mm/filemap.c:522: WARNING: Inline interpreted text or phrase reference start-string without end-string.
./mm/filemap.c:1283: ERROR: Unexpected indentation.
./mm/filemap.c:3003: WARNING: Inline interpreted text or phrase reference start-string without end-string.
./mm/vmalloc.c:1544: WARNING: Inline emphasis start-string without end-string.
./mm/page_alloc.c:4245: ERROR: Unexpected indentation.
./ipc/util.c:676: ERROR: Unexpected indentation.
./drivers/pci/irq.c:35: WARNING: Block quote ends without a blank line; unexpected unindent.
./security/security.c:109: ERROR: Unexpected indentation.
./security/security.c:110: WARNING: Definition list ends without a blank line; unexpected unindent.
./block/genhd.c:275: WARNING: Inline strong start-string without end-string.
./block/genhd.c:283: WARNING: Inline strong start-string without end-string.
./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string.
./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string.
./ipc/util.c:477: ERROR: Unknown target name: "s".

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2017-03-03T18:16:38Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-03-03T18:16:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1827adb11ad26b2290dc9fe2aaf54976b2439865'/>
<id>urn:sha1:1827adb11ad26b2290dc9fe2aaf54976b2439865</id>
<content type='text'>
Pull sched.h split-up from Ingo Molnar:
 "The point of these changes is to significantly reduce the
  &lt;linux/sched.h&gt; header footprint, to speed up the kernel build and to
  have a cleaner header structure.

  After these changes the new &lt;linux/sched.h&gt;'s typical preprocessed
  size goes down from a previous ~0.68 MB (~22K lines) to ~0.45 MB (~15K
  lines), which is around 40% faster to build on typical configs.

  Not much changed from the last version (-v2) posted three weeks ago: I
  eliminated quirks, backmerged fixes plus I rebased it to an upstream
  SHA1 from yesterday that includes most changes queued up in -next plus
  all sched.h changes that were pending from Andrew.

  I've re-tested the series both on x86 and on cross-arch defconfigs,
  and did a bisectability test at a number of random points.

  I tried to test as many build configurations as possible, but some
  build breakage is probably still left - but it should be mostly
  limited to architectures that have no cross-compiler binaries
  available on kernel.org, and non-default configurations"

* 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (146 commits)
  sched/headers: Clean up &lt;linux/sched.h&gt;
  sched/headers: Remove #ifdefs from &lt;linux/sched.h&gt;
  sched/headers: Remove the &lt;linux/topology.h&gt; include from &lt;linux/sched.h&gt;
  sched/headers, hrtimer: Remove the &lt;linux/wait.h&gt; include from &lt;linux/hrtimer.h&gt;
  sched/headers, x86/apic: Remove the &lt;linux/pm.h&gt; header inclusion from &lt;asm/apic.h&gt;
  sched/headers, timers: Remove the &lt;linux/sysctl.h&gt; include from &lt;linux/timer.h&gt;
  sched/headers: Remove &lt;linux/magic.h&gt; from &lt;linux/sched/task_stack.h&gt;
  sched/headers: Remove &lt;linux/sched.h&gt; from &lt;linux/sched/init.h&gt;
  sched/core: Remove unused prefetch_stack()
  sched/headers: Remove &lt;linux/rculist.h&gt; from &lt;linux/sched.h&gt;
  sched/headers: Remove the 'init_pid_ns' prototype from &lt;linux/sched.h&gt;
  sched/headers: Remove &lt;linux/signal.h&gt; from &lt;linux/sched.h&gt;
  sched/headers: Remove &lt;linux/rwsem.h&gt; from &lt;linux/sched.h&gt;
  sched/headers: Remove the runqueue_is_locked() prototype
  sched/headers: Remove &lt;linux/sched.h&gt; from &lt;linux/sched/hotplug.h&gt;
  sched/headers: Remove &lt;linux/sched.h&gt; from &lt;linux/sched/debug.h&gt;
  sched/headers: Remove &lt;linux/sched.h&gt; from &lt;linux/sched/nohz.h&gt;
  sched/headers: Remove &lt;linux/sched.h&gt; from &lt;linux/sched/stat.h&gt;
  sched/headers: Remove the &lt;linux/gfp.h&gt; include from &lt;linux/sched.h&gt;
  sched/headers: Remove &lt;linux/rtmutex.h&gt; from &lt;linux/sched.h&gt;
  ...
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2017-03-02T23:20:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-03-02T23:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=94e877d0fb43bec0540d6a37d49cb4f7f05a5348'/>
<id>urn:sha1:94e877d0fb43bec0540d6a37d49cb4f7f05a5348</id>
<content type='text'>
Pull vfs pile two from Al Viro:

 - orangefs fix

 - series of fs/namei.c cleanups from me

 - VFS stuff coming from overlayfs tree

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  orangefs: Use RCU for destroy_inode
  vfs: use helper for calling f_op-&gt;fsync()
  mm: use helper for calling f_op-&gt;mmap()
  vfs: use helpers for calling f_op-&gt;{read,write}_iter()
  vfs: pass type instead of fn to do_{loop,iter}_readv_writev()
  vfs: extract common parts of {compat_,}do_readv_writev()
  vfs: wrap write f_ops with file_{start,end}_write()
  vfs: deny copy_file_range() for non regular files
  vfs: deny fallocate() on directory
  vfs: create vfs helper vfs_tmpfile()
  namei.c: split unlazy_walk()
  namei.c: fold the check for DCACHE_OP_REVALIDATE into d_revalidate()
  lookup_fast(): clean up the logics around the fallback to non-rcu mode
  namei: fold unlazy_link() into its sole caller
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'ovl/for-viro' into for-linus</title>
<updated>2017-03-02T11:41:22Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-03-02T11:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=653a7746fa2f5369985f5368ffc162b6510db6c8'/>
<id>urn:sha1:653a7746fa2f5369985f5368ffc162b6510db6c8</id>
<content type='text'>
Overlayfs-related series from Miklos and Amir
</content>
</entry>
<entry>
<title>sched/headers: Move the wake-queue types and interfaces from sched.h into &lt;linux/sched/wake_q.h&gt;</title>
<updated>2017-03-02T07:42:42Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-01T16:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eb61baf69871b9836783a81bc451189edb0d9de2'/>
<id>urn:sha1:eb61baf69871b9836783a81bc451189edb0d9de2</id>
<content type='text'>
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
