<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib, branch v5.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-01-24T17:27:34Z</updated>
<entry>
<title>lib: Reduce user_access_begin() boundaries in strncpy_from_user() and strnlen_user()</title>
<updated>2020-01-24T17:27:34Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@c-s.fr</email>
</author>
<published>2020-01-23T08:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab10ae1c3bef56c29bac61e1201c752221b87b41'/>
<id>urn:sha1:ab10ae1c3bef56c29bac61e1201c752221b87b41</id>
<content type='text'>
The range passed to user_access_begin() by strncpy_from_user() and
strnlen_user() starts at 'src' and goes up to the limit of userspace
although reads will be limited by the 'count' param.

On 32 bits powerpc (book3s/32) access has to be granted for each
256Mbytes segment and the cost increases with the number of segments to
unlock.

Limit the range with 'count' param.

Fixes: 594cc251fdd0 ("make 'user_access_begin()' do 'access_ok()'")
Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'xarray-5.5' of git://git.infradead.org/users/willy/linux-dax</title>
<updated>2020-01-23T19:37:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-01-23T19:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4703d9119972bf586d2cca76ec6438f819ffa30e'/>
<id>urn:sha1:4703d9119972bf586d2cca76ec6438f819ffa30e</id>
<content type='text'>
Pull XArray fixes from Matthew Wilcox:
 "Primarily bugfixes, mostly around handling index wrap-around
  correctly.

  A couple of doc fixes and adding missing APIs.

  I had an oops live on stage at linux.conf.au this year, and it turned
  out to be a bug in xas_find() which I can't prove isn't triggerable in
  the current codebase. Then in looking for the bug, I spotted two more
  bugs.

  The bots have had a few days to chew on this with no problems
  reported, and it passes the test-suite (which now has more tests to
  make sure these problems don't come back)"

* tag 'xarray-5.5' of git://git.infradead.org/users/willy/linux-dax:
  XArray: Add xa_for_each_range
  XArray: Fix xas_find returning too many entries
  XArray: Fix xa_find_after with multi-index entries
  XArray: Fix infinite loop with entry at ULONG_MAX
  XArray: Add wrappers for nested spinlocks
  XArray: Improve documentation of search marks
  XArray: Fix xas_pause at ULONG_MAX
</content>
</entry>
<entry>
<title>XArray: Fix xas_find returning too many entries</title>
<updated>2020-01-18T03:33:33Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2020-01-18T03:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c44aa5e8ab58b5f4cf473970ec784c3333496a2e'/>
<id>urn:sha1:c44aa5e8ab58b5f4cf473970ec784c3333496a2e</id>
<content type='text'>
If you call xas_find() with the initial index &gt; max, it should have
returned NULL but was returning the entry at index.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>XArray: Fix xa_find_after with multi-index entries</title>
<updated>2020-01-18T03:33:27Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2020-01-18T03:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19c30f4dd0923ef191f35c652ee4058e91e89056'/>
<id>urn:sha1:19c30f4dd0923ef191f35c652ee4058e91e89056</id>
<content type='text'>
If the entry is of an order which is a multiple of XA_CHUNK_SIZE,
the current detection of sibling entries does not work.  Factor out
an xas_sibling() function to make xa_find_after() a little more
understandable, and write a new implementation that doesn't suffer from
the same bug.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>XArray: Fix infinite loop with entry at ULONG_MAX</title>
<updated>2020-01-18T03:32:24Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2020-01-17T22:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=430f24f94c8a174d411a550d7b5529301922e67a'/>
<id>urn:sha1:430f24f94c8a174d411a550d7b5529301922e67a</id>
<content type='text'>
If there is an entry at ULONG_MAX, xa_for_each() will overflow the
'index + 1' in xa_find_after() and wrap around to 0.  Catch this case
and terminate the loop by returning NULL.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>lib/vdso: Make __cvdso_clock_getres() static</title>
<updated>2020-01-10T18:29:01Z</updated>
<author>
<name>Vincenzo Frascino</name>
<email>vincenzo.frascino@arm.com</email>
</author>
<published>2019-11-28T11:17:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ffd08731b2d632459428612431060cf902324a8d'/>
<id>urn:sha1:ffd08731b2d632459428612431060cf902324a8d</id>
<content type='text'>
Fix the following sparse warning in the generic vDSO library:

  linux/lib/vdso/gettimeofday.c:224:5: warning: symbol
  '__cvdso_clock_getres' was not declared. Should it be static?

Make it static and also mark it __maybe_unsed.

Fixes: 502a590a170b ("lib/vdso: Move fallback invocation to the callers")
Reported-by: Marc Gonzalez &lt;marc.w.gonzalez@free.fr&gt;
Signed-off-by: Vincenzo Frascino &lt;vincenzo.frascino@arm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20191128111719.8282-1-vincenzo.frascino@arm.com
</content>
</entry>
<entry>
<title>Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2019-12-23T01:00:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-12-23T01:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9efa3ed504edb1c1fc88dba96fd32168f50ab77c'/>
<id>urn:sha1:9efa3ed504edb1c1fc88dba96fd32168f50ab77c</id>
<content type='text'>
Pull vfs fixes from Al Viro:
 "Eric's s_inodes softlockup fixes + Jan's fix for recent regression
  from pipe rework"

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fs: call fsnotify_sb_delete after evict_inodes
  fs: avoid softlockups in s_inodes iterators
  pipe: Fix bogus dereference in iov_iter_alignment()
</content>
</entry>
<entry>
<title>Merge tag 'block-5.5-20191221' of git://git.kernel.dk/linux-block</title>
<updated>2019-12-22T18:36:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-12-22T18:36:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=44579f35c2d90dfac5ea27308261318c7750e9b5'/>
<id>urn:sha1:44579f35c2d90dfac5ea27308261318c7750e9b5</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "Let's try this one again, this time without the compat_ioctl changes.
  We've got those fixed up, but that can go out next week.

  This contains:

   - block queue flush lockdep annotation (Bart)

   - Type fix for bsg_queue_rq() (Bart)

   - Three dasd fixes (Stefan, Jan)

   - nbd deadlock fix (Mike)

   - Error handling bio user map fix (Yang)

   - iocost fix (Tejun)

   - sbitmap waitqueue addition fix that affects the kyber IO scheduler
     (David)"

* tag 'block-5.5-20191221' of git://git.kernel.dk/linux-block:
  sbitmap: only queue kyber's wait callback if not already active
  block: fix memleak when __blk_rq_map_user_iov() is failed
  s390/dasd: fix typo in copyright statement
  s390/dasd: fix memleak in path handling error case
  s390/dasd/cio: Interpret ccw_device_get_mdc return value correctly
  block: Fix a lockdep complaint triggered by request queue flushing
  block: Fix the type of 'sts' in bsg_queue_rq()
  block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT
  nbd: fix shutdown and recv work deadlock v2
  iocost: over-budget forced IOs should schedule async delay
</content>
</entry>
<entry>
<title>sbitmap: only queue kyber's wait callback if not already active</title>
<updated>2019-12-20T23:51:54Z</updated>
<author>
<name>David Jeffery</name>
<email>djeffery@redhat.com</email>
</author>
<published>2019-12-17T16:00:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df034c93f15ee71df231ff9fe311d27ff08a2a52'/>
<id>urn:sha1:df034c93f15ee71df231ff9fe311d27ff08a2a52</id>
<content type='text'>
Under heavy loads where the kyber I/O scheduler hits the token limits for
its scheduling domains, kyber can become stuck.  When active requests
complete, kyber may not be woken up leaving the I/O requests in kyber
stuck.

This stuck state is due to a race condition with kyber and the sbitmap
functions it uses to run a callback when enough requests have completed.
The running of a sbt_wait callback can race with the attempt to insert the
sbt_wait.  Since sbitmap_del_wait_queue removes the sbt_wait from the list
first then sets the sbq field to NULL, kyber can see the item as not on a
list but the call to sbitmap_add_wait_queue will see sbq as non-NULL. This
results in the sbt_wait being inserted onto the wait list but ws_active
doesn't get incremented.  So the sbitmap queue does not know there is a
waiter on a wait list.

Since sbitmap doesn't think there is a waiter, kyber may never be
informed that there are domain tokens available and the I/O never advances.
With the sbt_wait on a wait list, kyber believes it has an active waiter
so cannot insert a new waiter when reaching the domain's full state.

This race can be fixed by only adding the sbt_wait to the queue if the
sbq field is NULL.  If sbq is not NULL, there is already an action active
which will trigger the re-running of kyber.  Let it run and add the
sbt_wait to the wait list if still needing to wait.

Reviewed-by: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: David Jeffery &lt;djeffery@redhat.com&gt;
Reported-by: John Pittman &lt;jpittman@redhat.com&gt;
Tested-by: John Pittman &lt;jpittman@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lib/Kconfig.debug: fix some messed up configurations</title>
<updated>2019-12-18T04:59:59Z</updated>
<author>
<name>Changbin Du</name>
<email>changbin.du@gmail.com</email>
</author>
<published>2019-12-18T04:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=045f6d7942be248fbda6e85b2393f2735695ed39'/>
<id>urn:sha1:045f6d7942be248fbda6e85b2393f2735695ed39</id>
<content type='text'>
Some configuration items are messed up during conflict resolving.  For
example, STRICT_DEVMEM should not in testing menu, but kunit should.
This patch fixes all of them.

[akpm@linux-foundation.org: coding style fixes]
Link: http://lkml.kernel.org/r/20191209155653.7509-1-changbin.du@gmail.com
Signed-off-by: Changbin Du &lt;changbin.du@gmail.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>
</feed>
