<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs, branch v4.6-rc3</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Revert "ext4: allow readdir()'s of large empty directories to be interrupted"</title>
<updated>2016-04-10T23:52:24+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-10T23:52:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9f2394c9be47a754bae9e4b6d382bdd4d77d0a11'/>
<id>9f2394c9be47a754bae9e4b6d382bdd4d77d0a11</id>
<content type='text'>
This reverts commit 1028b55bafb7611dda1d8fed2aeca16a436b7dff.

It's broken: it makes ext4 return an error at an invalid point, causing
the readdir wrappers to write the the position of the last successful
directory entry into the position field, which means that the next
readdir will now return that last successful entry _again_.

You can only return fatal errors (that terminate the readdir directory
walk) from within the filesystem readdir functions, the "normal" errors
(that happen when the readdir buffer fills up, for example) happen in
the iterorator where we know the position of the actual failing entry.

I do have a very different patch that does the "signal_pending()"
handling inside the iterator function where it is allowable, but while
that one passes all the sanity checks, I screwed up something like four
times while emailing it out, so I'm not going to commit it today.

So my track record is not good enough, and the stars will have to align
better before that one gets committed.  And it would be good to get some
review too, of course, since celestial alignments are always an iffy
debugging model.

IOW, let's just revert the commit that caused the problem for now.

Reported-by: Greg Thelen &lt;gthelen@google.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1028b55bafb7611dda1d8fed2aeca16a436b7dff.

It's broken: it makes ext4 return an error at an invalid point, causing
the readdir wrappers to write the the position of the last successful
directory entry into the position field, which means that the next
readdir will now return that last successful entry _again_.

You can only return fatal errors (that terminate the readdir directory
walk) from within the filesystem readdir functions, the "normal" errors
(that happen when the readdir buffer fills up, for example) happen in
the iterorator where we know the position of the actual failing entry.

I do have a very different patch that does the "signal_pending()"
handling inside the iterator function where it is allowable, but while
that one passes all the sanity checks, I screwed up something like four
times while emailing it out, so I'm not going to commit it today.

So my track record is not good enough, and the stars will have to align
better before that one gets committed.  And it would be good to get some
review too, of course, since celestial alignments are always an iffy
debugging model.

IOW, let's just revert the commit that caused the problem for now.

Reported-by: Greg Thelen &lt;gthelen@google.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2016-04-09T17:41:34+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-09T17:41:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=839a3f765728cdca0057a12e2dc0bf669ac1c22e'/>
<id>839a3f765728cdca0057a12e2dc0bf669ac1c22e</id>
<content type='text'>
Pull btrfs fixes from Chris Mason:
 "These are bug fixes, including a really old fsync bug, and a few trace
  points to help us track down problems in the quota code"

* 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: fix file/data loss caused by fsync after rename and new inode
  btrfs: Reset IO error counters before start of device replacing
  btrfs: Add qgroup tracing
  Btrfs: don't use src fd for printk
  btrfs: fallback to vmalloc in btrfs_compare_tree
  btrfs: handle non-fatal errors in btrfs_qgroup_inherit()
  btrfs: Output more info for enospc_debug mount option
  Btrfs: fix invalid reference in replace_path
  Btrfs: Improve FL_KEEP_SIZE handling in fallocate
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull btrfs fixes from Chris Mason:
 "These are bug fixes, including a really old fsync bug, and a few trace
  points to help us track down problems in the quota code"

* 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: fix file/data loss caused by fsync after rename and new inode
  btrfs: Reset IO error counters before start of device replacing
  btrfs: Add qgroup tracing
  Btrfs: don't use src fd for printk
  btrfs: fallback to vmalloc in btrfs_compare_tree
  btrfs: handle non-fatal errors in btrfs_qgroup_inherit()
  btrfs: Output more info for enospc_debug mount option
  Btrfs: fix invalid reference in replace_path
  Btrfs: Improve FL_KEEP_SIZE handling in fallocate
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux</title>
<updated>2016-04-09T17:33:58+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-09T17:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6759212640fda202d0da5ce2f75dd261f1b879cc'/>
<id>6759212640fda202d0da5ce2f75dd261f1b879cc</id>
<content type='text'>
Pull orangefs fixes from Mike Marshall:
 "Orangefs cleanups and a strncpy vulnerability fix.

  Cleanups:
   - remove an unused variable from orangefs_readdir.
   - clean up printk wrapper used for ofs "gossip" debugging.
   - clean up truncate ctime and mtime setting in inode.c
   - remove a useless null check found by coccinelle.
   - optimize some memcpy/memset boilerplate code.
   - remove some useless sanity checks from xattr.c

  Fix:
   - fix a potential strncpy vulnerability"

* tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: remove unused variable
  orangefs: Add KERN_&lt;LEVEL&gt; to gossip_&lt;level&gt; macros
  orangefs: strncpy -&gt; strscpy
  orangefs: clean up truncate ctime and mtime setting
  Orangefs: fix ifnullfree.cocci warnings
  Orangefs: optimize boilerplate code.
  Orangefs: xattr.c cleanup
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull orangefs fixes from Mike Marshall:
 "Orangefs cleanups and a strncpy vulnerability fix.

  Cleanups:
   - remove an unused variable from orangefs_readdir.
   - clean up printk wrapper used for ofs "gossip" debugging.
   - clean up truncate ctime and mtime setting in inode.c
   - remove a useless null check found by coccinelle.
   - optimize some memcpy/memset boilerplate code.
   - remove some useless sanity checks from xattr.c

  Fix:
   - fix a potential strncpy vulnerability"

* tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: remove unused variable
  orangefs: Add KERN_&lt;LEVEL&gt; to gossip_&lt;level&gt; macros
  orangefs: strncpy -&gt; strscpy
  orangefs: clean up truncate ctime and mtime setting
  Orangefs: fix ifnullfree.cocci warnings
  Orangefs: optimize boilerplate code.
  Orangefs: xattr.c cleanup
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: remove unused variable</title>
<updated>2016-04-08T19:50:44+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-04-04T20:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e56f49814250f4ca4b66ec7d3a71152846761d1b'/>
<id>e56f49814250f4ca4b66ec7d3a71152846761d1b</id>
<content type='text'>
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: Add KERN_&lt;LEVEL&gt; to gossip_&lt;level&gt; macros</title>
<updated>2016-04-08T18:10:45+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2016-03-27T21:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1917a6932870062778e3099eb432795d45918fc3'/>
<id>1917a6932870062778e3099eb432795d45918fc3</id>
<content type='text'>
Emit the logging messages at the appropriate levels.

Miscellanea:

o Change format to fmt
o Use the more common ##__VA_ARGS__

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Emit the logging messages at the appropriate levels.

Miscellanea:

o Change format to fmt
o Use the more common ##__VA_ARGS__

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: strncpy -&gt; strscpy</title>
<updated>2016-04-08T18:10:34+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-04-08T17:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2eacea74cc465edc23ce5a4dd5c2213008ac3a05'/>
<id>2eacea74cc465edc23ce5a4dd5c2213008ac3a05</id>
<content type='text'>
It would have been possible for a rogue client-core to send in a symlink
target which is not NUL terminated. This returns EIO if the client-core
gives us corrupt data.

Leave debugfs and superblock code as is for now.

Other dcache.c and namei.c strncpy instances are safe because
ORANGEFS_NAME_MAX = NAME_MAX + 1; there is always enough space for a
name plus a NUL byte.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It would have been possible for a rogue client-core to send in a symlink
target which is not NUL terminated. This returns EIO if the client-core
gives us corrupt data.

Leave debugfs and superblock code as is for now.

Other dcache.c and namei.c strncpy instances are safe because
ORANGEFS_NAME_MAX = NAME_MAX + 1; there is always enough space for a
name plus a NUL byte.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: clean up truncate ctime and mtime setting</title>
<updated>2016-04-08T18:10:31+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-04-04T20:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f83140c1467e22ba9ee9389bc4e6c3e117f2296e'/>
<id>f83140c1467e22ba9ee9389bc4e6c3e117f2296e</id>
<content type='text'>
The ctime and mtime are always updated on a successful ftruncate and
only updated on a successful truncate where the size changed.

We handle the ``if the size changed'' bit.

This matches FUSE's behavior.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ctime and mtime are always updated on a successful ftruncate and
only updated on a successful truncate where the size changed.

We handle the ``if the size changed'' bit.

This matches FUSE's behavior.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Orangefs: fix ifnullfree.cocci warnings</title>
<updated>2016-04-08T18:08:38+00:00</updated>
<author>
<name>kbuild test robot</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2016-03-26T18:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2fa37fd71396b8eff72d23cafc8c583dd8eb928c'/>
<id>2fa37fd71396b8eff72d23cafc8c583dd8eb928c</id>
<content type='text'>
fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Orangefs: optimize boilerplate code.</title>
<updated>2016-04-08T18:08:27+00:00</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2016-04-06T15:19:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a9bb3ba81fba1750139654360cb716ab093103b0'/>
<id>a9bb3ba81fba1750139654360cb716ab093103b0</id>
<content type='text'>
Suggested by David Binderman &lt;dcb314@hotmail.com&gt;
The former can potentially be a performance win over the latter.

memcpy(d, s, len);
memset(d+len, c, size-len);

memset(d, c, size);
memcpy(d, s, len);

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested by David Binderman &lt;dcb314@hotmail.com&gt;
The former can potentially be a performance win over the latter.

memcpy(d, s, len);
memset(d+len, c, size-len);

memset(d, c, size);
memcpy(d, s, len);

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Orangefs: xattr.c cleanup</title>
<updated>2016-04-08T18:08:27+00:00</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2016-04-06T14:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2d09a2ca6a6c66d765458df2653f888c4a481c81'/>
<id>2d09a2ca6a6c66d765458df2653f888c4a481c81</id>
<content type='text'>
1. It is nonsense to test for negative size_t, suggested by
   David Binderman &lt;dcb314@hotmail.com&gt;

2. By the time Orangefs gets called, the vfs has ensured that
   name != NULL, and that buffer and size are sane.

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. It is nonsense to test for negative size_t, suggested by
   David Binderman &lt;dcb314@hotmail.com&gt;

2. By the time Orangefs gets called, the vfs has ensured that
   name != NULL, and that buffer and size are sane.

Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
