<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs, branch v3.18.67</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.67</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.67'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-08-16T20:35:32Z</updated>
<entry>
<title>pnfs/blocklayout: require 64-bit sector_t</title>
<updated>2017-08-16T20:35:32Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-08-05T08:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c3b14bec02738cebce342847e298e4ea8ba345b9'/>
<id>urn:sha1:c3b14bec02738cebce342847e298e4ea8ba345b9</id>
<content type='text'>
commit 8a9d6e964d318533ba3d2901ce153ba317c99a89 upstream.

The blocklayout code does not compile cleanly for a 32-bit sector_t,
and also has no reliable checks for devices sizes, which makes it
unsafe to use with a kernel that doesn't support large block devices.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: initialize the flock flag in fuse_file on allocation</title>
<updated>2017-08-16T20:35:30Z</updated>
<author>
<name>Mateusz Jurczyk</name>
<email>mjurczyk@google.com</email>
</author>
<published>2017-06-07T10:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9bba1b1b9fa1b4c8b95caafa84acb8634bbaddd0'/>
<id>urn:sha1:9bba1b1b9fa1b4c8b95caafa84acb8634bbaddd0</id>
<content type='text'>
commit 68227c03cba84a24faf8a7277d2b1a03c8959c2c upstream.

Before the patch, the flock flag could remain uninitialized for the
lifespan of the fuse_file allocation. Unless set to true in
fuse_file_flock(), it would remain in an indeterminate state until read in
an if statement in fuse_release_common(). This could consequently lead to
taking an unexpected branch in the code.

The bug was discovered by a runtime instrumentation designed to detect use
of uninitialized memory in the kernel.

Signed-off-by: Mateusz Jurczyk &lt;mjurczyk@google.com&gt;
Fixes: 37fb3a30b462 ("fuse: fix flock")
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>f2fs: sanity check checkpoint segno and blkoff</title>
<updated>2017-08-11T16:30:14Z</updated>
<author>
<name>Jin Qian</name>
<email>jinqian@google.com</email>
</author>
<published>2017-05-15T17:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=64133595b549c1036ffe8598f4c53aa355d9e3f1'/>
<id>urn:sha1:64133595b549c1036ffe8598f4c53aa355d9e3f1</id>
<content type='text'>
commit 15d3042a937c13f5d9244241c7a9c8416ff6e82a upstream.

Make sure segno and blkoff read from raw image are valid.

Cc: stable@vger.kernel.org
Signed-off-by: Jin Qian &lt;jinqian@google.com&gt;
[Jaegeuk Kim: adjust minor coding style]
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
[AmitP: Found in Android Security bulletin for Aug'17, fixes CVE-2017-10663]
Signed-off-by: Amit Pundir &lt;amit.pundir@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ext4: fix overflow caused by missing cast in ext4_resize_fs()</title>
<updated>2017-08-11T16:30:14Z</updated>
<author>
<name>Jerry Lee</name>
<email>jerrylee@qnap.com</email>
</author>
<published>2017-08-06T05:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=df5ef7a044433cc99e7e86e937f26519afc70d80'/>
<id>urn:sha1:df5ef7a044433cc99e7e86e937f26519afc70d80</id>
<content type='text'>
commit aec51758ce10a9c847a62a48a168f8c804c6e053 upstream.

On a 32-bit platform, the value of n_blcoks_count may be wrong during
the file system is resized to size larger than 2^32 blocks.  This may
caused the superblock being corrupted with zero blocks count.

Fixes: 1c6bd7173d66
Signed-off-by: Jerry Lee &lt;jerrylee@qnap.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix SEEK_HOLE/SEEK_DATA for blocksize &lt; pagesize</title>
<updated>2017-08-11T16:30:13Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2017-08-05T21:43:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8a3a235bac007057f1ca51206899287019b88369'/>
<id>urn:sha1:8a3a235bac007057f1ca51206899287019b88369</id>
<content type='text'>
commit fcf5ea10992fbac3c7473a1db33d56a139333cd1 upstream.

ext4_find_unwritten_pgoff() does not properly handle a situation when
starting index is in the middle of a page and blocksize &lt; pagesize. The
following command shows the bug on filesystem with 1k blocksize:

  xfs_io -f -c "falloc 0 4k" \
            -c "pwrite 1k 1k" \
            -c "pwrite 3k 1k" \
            -c "seek -a -r 0" foo

In this example, neither lseek(fd, 1024, SEEK_HOLE) nor lseek(fd, 2048,
SEEK_DATA) will return the correct result.

Fix the problem by neglecting buffers in a page before starting offset.

Reported-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pstore: Use dynamic spinlock initializer</title>
<updated>2017-08-11T16:30:11Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-06T06:08:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=77ba7f02ae77233c5780bff35d79aa3f7da15f70'/>
<id>urn:sha1:77ba7f02ae77233c5780bff35d79aa3f7da15f70</id>
<content type='text'>
commit e9a330c4289f2ba1ca4bf98c2b430ab165a8931b upstream.

The per-prz spinlock should be using the dynamic initializer so that
lockdep can correctly track it. Without this, under lockdep, we get a
warning at boot that the lock is in non-static memory.

Fixes: 109704492ef6 ("pstore: Make spinlock per zone instead of global")
Fixes: 76d5692a5803 ("pstore: Correctly initialize spinlock and flags")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pstore: Correctly initialize spinlock and flags</title>
<updated>2017-08-11T16:30:11Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-02-09T23:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=78bfdaabd972468476d2f178e50a2cf7f15df9a8'/>
<id>urn:sha1:78bfdaabd972468476d2f178e50a2cf7f15df9a8</id>
<content type='text'>
commit 76d5692a58031696e282384cbd893832bc92bd76 upstream.

The ram backend wasn't always initializing its spinlock correctly. Since
it was coming from kzalloc memory, though, it was harmless on
architectures that initialize unlocked spinlocks to 0 (at least x86 and
ARM). This also fixes a possibly ignored flag setting too.

When running under CONFIG_DEBUG_SPINLOCK, the following Oops was visible:

[    0.760836] persistent_ram: found existing buffer, size 29988, start 29988
[    0.765112] persistent_ram: found existing buffer, size 30105, start 30105
[    0.769435] persistent_ram: found existing buffer, size 118542, start 118542
[    0.785960] persistent_ram: found existing buffer, size 0, start 0
[    0.786098] persistent_ram: found existing buffer, size 0, start 0
[    0.786131] pstore: using zlib compression
[    0.790716] BUG: spinlock bad magic on CPU#0, swapper/0/1
[    0.790729]  lock: 0xffffffc0d1ca9bb0, .magic: 00000000, .owner: &lt;none&gt;/-1, .owner_cpu: 0
[    0.790742] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-rc2+ #913
[    0.790747] Hardware name: Google Kevin (DT)
[    0.790750] Call trace:
[    0.790768] [&lt;ffffff900808ae88&gt;] dump_backtrace+0x0/0x2bc
[    0.790780] [&lt;ffffff900808b164&gt;] show_stack+0x20/0x28
[    0.790794] [&lt;ffffff9008460ee0&gt;] dump_stack+0xa4/0xcc
[    0.790809] [&lt;ffffff9008113cfc&gt;] spin_dump+0xe0/0xf0
[    0.790821] [&lt;ffffff9008113d3c&gt;] spin_bug+0x30/0x3c
[    0.790834] [&lt;ffffff9008113e28&gt;] do_raw_spin_lock+0x50/0x1b8
[    0.790846] [&lt;ffffff9008a2d2ec&gt;] _raw_spin_lock_irqsave+0x54/0x6c
[    0.790862] [&lt;ffffff90083ac3b4&gt;] buffer_size_add+0x48/0xcc
[    0.790875] [&lt;ffffff90083acb34&gt;] persistent_ram_write+0x60/0x11c
[    0.790888] [&lt;ffffff90083aab1c&gt;] ramoops_pstore_write_buf+0xd4/0x2a4
[    0.790900] [&lt;ffffff90083a9d3c&gt;] pstore_console_write+0xf0/0x134
[    0.790912] [&lt;ffffff900811c304&gt;] console_unlock+0x48c/0x5e8
[    0.790923] [&lt;ffffff900811da18&gt;] register_console+0x3b0/0x4d4
[    0.790935] [&lt;ffffff90083aa7d0&gt;] pstore_register+0x1a8/0x234
[    0.790947] [&lt;ffffff90083ac250&gt;] ramoops_probe+0x6b8/0x7d4
[    0.790961] [&lt;ffffff90085ca548&gt;] platform_drv_probe+0x7c/0xd0
[    0.790972] [&lt;ffffff90085c76ac&gt;] driver_probe_device+0x1b4/0x3bc
[    0.790982] [&lt;ffffff90085c7ac8&gt;] __device_attach_driver+0xc8/0xf4
[    0.790996] [&lt;ffffff90085c4bfc&gt;] bus_for_each_drv+0xb4/0xe4
[    0.791006] [&lt;ffffff90085c7414&gt;] __device_attach+0xd0/0x158
[    0.791016] [&lt;ffffff90085c7b18&gt;] device_initial_probe+0x24/0x30
[    0.791026] [&lt;ffffff90085c648c&gt;] bus_probe_device+0x50/0xe4
[    0.791038] [&lt;ffffff90085c35b8&gt;] device_add+0x3a4/0x76c
[    0.791051] [&lt;ffffff90087d0e84&gt;] of_device_add+0x74/0x84
[    0.791062] [&lt;ffffff90087d19b8&gt;] of_platform_device_create_pdata+0xc0/0x100
[    0.791073] [&lt;ffffff90087d1a2c&gt;] of_platform_device_create+0x34/0x40
[    0.791086] [&lt;ffffff900903c910&gt;] of_platform_default_populate_init+0x58/0x78
[    0.791097] [&lt;ffffff90080831fc&gt;] do_one_initcall+0x88/0x160
[    0.791109] [&lt;ffffff90090010ac&gt;] kernel_init_freeable+0x264/0x31c
[    0.791123] [&lt;ffffff9008a25bd0&gt;] kernel_init+0x18/0x11c
[    0.791133] [&lt;ffffff9008082ec0&gt;] ret_from_fork+0x10/0x50
[    0.793717] console [pstore-1] enabled
[    0.797845] pstore: Registered ramoops as persistent store backend
[    0.804647] ramoops: attached 0x100000@0xf7edc000, ecc: 0/0

Fixes: 663deb47880f ("pstore: Allow prz to control need for locking")
Fixes: 109704492ef6 ("pstore: Make spinlock per zone instead of global")
Reported-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pstore: Allow prz to control need for locking</title>
<updated>2017-08-11T16:30:11Z</updated>
<author>
<name>Joel Fernandes</name>
<email>joelaf@google.com</email>
</author>
<published>2016-10-20T07:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fc7e1a12dd5936544a1bf0f3b5e60e3087865b44'/>
<id>urn:sha1:fc7e1a12dd5936544a1bf0f3b5e60e3087865b44</id>
<content type='text'>
commit 663deb47880f2283809669563c5a52ac7c6aef1a upstream.

In preparation of not locking at all for certain buffers depending on if
there's contention, make locking optional depending on the initialization
of the prz.

Signed-off-by: Joel Fernandes &lt;joelaf@google.com&gt;
[kees: moved locking flag into prz instead of via caller arguments]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dentry name snapshots</title>
<updated>2017-08-11T16:30:11Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-07-07T18:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1dbc0979b4f92f3b0d0bb86671639e09315f43c'/>
<id>urn:sha1:a1dbc0979b4f92f3b0d0bb86671639e09315f43c</id>
<content type='text'>
commit 49d31c2f389acfe83417083e1208422b4091cd9e upstream.

take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified).  In either case the pointer to stable
string is stored into the same structure.

dentry must be held by the caller of take_dentry_name_snapshot(),
but may be freely dropped afterwards - the snapshot will stay
until destroyed by release_dentry_name_snapshot().

Intended use:
	struct name_snapshot s;

	take_dentry_name_snapshot(&amp;s, dentry);
	...
	access s.name
	...
	release_dentry_name_snapshot(&amp;s);

Replaces fsnotify_oldname_...(), gets used in fsnotify to obtain the name
to pass down with event.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pstore: Make spinlock per zone instead of global</title>
<updated>2017-08-11T16:30:08Z</updated>
<author>
<name>Joel Fernandes</name>
<email>joelaf@google.com</email>
</author>
<published>2016-10-20T07:34:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2d0abb7b0debd522a0752571be1e820f45333d83'/>
<id>urn:sha1:2d0abb7b0debd522a0752571be1e820f45333d83</id>
<content type='text'>
commit 109704492ef637956265ec2eb72ae7b3b39eb6f4 upstream.

Currently pstore has a global spinlock for all zones. Since the zones
are independent and modify different areas of memory, there's no need
to have a global lock, so we should use a per-zone lock as introduced
here. Also, when ramoops's ftrace use-case has a FTRACE_PER_CPU flag
introduced later, which splits the ftrace memory area into a single zone
per CPU, it will eliminate the need for locking. In preparation for this,
make the locking optional.

Signed-off-by: Joel Fernandes &lt;joelaf@google.com&gt;
[kees: updated commit message]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Leo Yan &lt;leo.yan@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
