<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/fs/9p, branch dev-5.0</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=dev-5.0</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=dev-5.0'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2019-03-23T19:11:10+00:00</updated>
<entry>
<title>9p: use inode-&gt;i_lock to protect i_size_write() under 32-bit</title>
<updated>2019-03-23T19:11:10+00:00</updated>
<author>
<name>Hou Tao</name>
<email>houtao1@huawei.com</email>
</author>
<published>2019-01-24T06:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=3cccba9a38d5119c48eebf60e1071b60c457591f'/>
<id>urn:sha1:3cccba9a38d5119c48eebf60e1071b60c457591f</id>
<content type='text'>
commit 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f upstream.

Use inode-&gt;i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a soft lockup will be
triggered as show below:

  watchdog: BUG: soft lockup - CPU#5 stuck for 22s! [stat:2217]
  Modules linked in:
  CPU: 5 PID: 2217 Comm: stat Not tainted 5.0.0-rc1-00005-g7f702faf5a9e #4
  Hardware name: Generic DT based system
  PC is at generic_fillattr+0x104/0x108
  LR is at 0xec497f00
  pc : [&lt;802b8898&gt;]    lr : [&lt;ec497f00&gt;]    psr: 200c0013
  sp : ec497e20  ip : ed608030  fp : ec497e3c
  r10: 00000000  r9 : ec497f00  r8 : ed608030
  r7 : ec497ebc  r6 : ec497f00  r5 : ee5c1550  r4 : ee005780
  r3 : 0000052d  r2 : 00000000  r1 : ec497f00  r0 : ed608030
  Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
  Control: 10c5387d  Table: ac48006a  DAC: 00000051
  CPU: 5 PID: 2217 Comm: stat Not tainted 5.0.0-rc1-00005-g7f702faf5a9e #4
  Hardware name: Generic DT based system
  Backtrace:
  [&lt;8010d974&gt;] (dump_backtrace) from [&lt;8010dc88&gt;] (show_stack+0x20/0x24)
  [&lt;8010dc68&gt;] (show_stack) from [&lt;80a1d194&gt;] (dump_stack+0xb0/0xdc)
  [&lt;80a1d0e4&gt;] (dump_stack) from [&lt;80109f34&gt;] (show_regs+0x1c/0x20)
  [&lt;80109f18&gt;] (show_regs) from [&lt;801d0a80&gt;] (watchdog_timer_fn+0x280/0x2f8)
  [&lt;801d0800&gt;] (watchdog_timer_fn) from [&lt;80198658&gt;] (__hrtimer_run_queues+0x18c/0x380)
  [&lt;801984cc&gt;] (__hrtimer_run_queues) from [&lt;80198e60&gt;] (hrtimer_run_queues+0xb8/0xf0)
  [&lt;80198da8&gt;] (hrtimer_run_queues) from [&lt;801973e8&gt;] (run_local_timers+0x28/0x64)
  [&lt;801973c0&gt;] (run_local_timers) from [&lt;80197460&gt;] (update_process_times+0x3c/0x6c)
  [&lt;80197424&gt;] (update_process_times) from [&lt;801ab2b8&gt;] (tick_nohz_handler+0xe0/0x1bc)
  [&lt;801ab1d8&gt;] (tick_nohz_handler) from [&lt;80843050&gt;] (arch_timer_handler_virt+0x38/0x48)
  [&lt;80843018&gt;] (arch_timer_handler_virt) from [&lt;80180a64&gt;] (handle_percpu_devid_irq+0x8c/0x240)
  [&lt;801809d8&gt;] (handle_percpu_devid_irq) from [&lt;8017ac20&gt;] (generic_handle_irq+0x34/0x44)
  [&lt;8017abec&gt;] (generic_handle_irq) from [&lt;8017b344&gt;] (__handle_domain_irq+0x6c/0xc4)
  [&lt;8017b2d8&gt;] (__handle_domain_irq) from [&lt;801022e0&gt;] (gic_handle_irq+0x4c/0x88)
  [&lt;80102294&gt;] (gic_handle_irq) from [&lt;80101a30&gt;] (__irq_svc+0x70/0x98)
  [&lt;802b8794&gt;] (generic_fillattr) from [&lt;8056b284&gt;] (v9fs_vfs_getattr_dotl+0x74/0xa4)
  [&lt;8056b210&gt;] (v9fs_vfs_getattr_dotl) from [&lt;802b8904&gt;] (vfs_getattr_nosec+0x68/0x7c)
  [&lt;802b889c&gt;] (vfs_getattr_nosec) from [&lt;802b895c&gt;] (vfs_getattr+0x44/0x48)
  [&lt;802b8918&gt;] (vfs_getattr) from [&lt;802b8a74&gt;] (vfs_statx+0x9c/0xec)
  [&lt;802b89d8&gt;] (vfs_statx) from [&lt;802b9428&gt;] (sys_lstat64+0x48/0x78)
  [&lt;802b93e0&gt;] (sys_lstat64) from [&lt;80101000&gt;] (ret_fast_syscall+0x0/0x28)

[dominique.martinet@cea.fr: updated comment to not refer to a function
in another subsystem]
Link: http://lkml.kernel.org/r/20190124063514.8571-2-houtao1@huawei.com
Cc: stable@vger.kernel.org
Fixes: 7549ae3e81cc ("9p: Use the i_size_[read, write]() macros instead of using inode-&gt;i_size directly.")
Reported-by: Xing Gaopeng &lt;xingaopeng@huawei.com&gt;
Signed-off-by: Hou Tao &lt;houtao1@huawei.com&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branch 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2018-11-02T02:58:52+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-11-02T02:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=9931a07d518e86eb58a75e508ed9626f86359303'/>
<id>urn:sha1:9931a07d518e86eb58a75e508ed9626f86359303</id>
<content type='text'>
Pull AFS updates from Al Viro:
 "AFS series, with some iov_iter bits included"

* 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits)
  missing bits of "iov_iter: Separate type from direction and use accessor functions"
  afs: Probe multiple fileservers simultaneously
  afs: Fix callback handling
  afs: Eliminate the address pointer from the address list cursor
  afs: Allow dumping of server cursor on operation failure
  afs: Implement YFS support in the fs client
  afs: Expand data structure fields to support YFS
  afs: Get the target vnode in afs_rmdir() and get a callback on it
  afs: Calc callback expiry in op reply delivery
  afs: Fix FS.FetchStatus delivery from updating wrong vnode
  afs: Implement the YFS cache manager service
  afs: Remove callback details from afs_callback_break struct
  afs: Commit the status on a new file/dir/symlink
  afs: Increase to 64-bit volume ID and 96-bit vnode ID for YFS
  afs: Don't invoke the server to read data beyond EOF
  afs: Add a couple of tracepoints to log I/O errors
  afs: Handle EIO from delivery function
  afs: Fix TTL on VL server and address lists
  afs: Implement VL server rotation
  afs: Improve FS server rotation error handling
  ...
</content>
</entry>
<entry>
<title>iov_iter: Separate type from direction and use accessor functions</title>
<updated>2018-10-23T23:41:07+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-10-19T23:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=aa563d7bca6e882ec2bdae24603c8f016401a144'/>
<id>urn:sha1:aa563d7bca6e882ec2bdae24603c8f016401a144</id>
<content type='text'>
In the iov_iter struct, separate the iterator type from the iterator
direction and use accessor functions to access them in most places.

Convert a bunch of places to use switch-statements to access them rather
then chains of bitwise-AND statements.  This makes it easier to add further
iterator types.  Also, this can be more efficient as to implement a switch
of small contiguous integers, the compiler can use ~50% fewer compare
instructions than it has to use bitwise-and instructions.

Further, cease passing the iterator type into the iterator setup function.
The iterator function can set that itself.  Only the direction is required.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>9p locks: fix glock.client_id leak in do_lock</title>
<updated>2018-09-07T16:52:35+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-09-07T16:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=b4dc44b3cac9e8327e0655f530ed0c46f2e6214c'/>
<id>urn:sha1:b4dc44b3cac9e8327e0655f530ed0c46f2e6214c</id>
<content type='text'>
the 9p client code overwrites our glock.client_id pointing to a static
buffer by an allocated string holding the network provided value which
we do not care about; free and reset the value as appropriate.

This is almost identical to the leak in v9fs_file_getlock() fixed by
Al Viro in commit ce85dd58ad5a6 ("9p: we are leaking glock.client_id
in v9fs_file_getlock()"), which was returned as an error by a coverity
false positive -- while we are here attempt to make the code slightly
more robust to future change of the net/9p/client code and hopefully
more clear to coverity that there is no problem.

Link: http://lkml.kernel.org/r/1536339057-21974-5-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: acl: fix uninitialized iattr access</title>
<updated>2018-09-07T16:51:50+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-09-07T15:10:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=e02a53d92e197706cad1627bd84705d4aa20a145'/>
<id>urn:sha1:e02a53d92e197706cad1627bd84705d4aa20a145</id>
<content type='text'>
iattr is passed to v9fs_vfs_setattr_dotl which does send various
values from iattr over the wire, even if it tells the server to
only look at iattr.ia_valid fields this could leak some stack data.

Link: http://lkml.kernel.org/r/1536339057-21974-2-git-send-email-asmadeus@codewreck.org
Addresses-Coverity-ID: 1195601 ("Uninitalized scalar variable")
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p locks: add mount option for lock retry interval</title>
<updated>2018-09-07T16:40:06+00:00</updated>
<author>
<name>Dinu-Razvan Chis-Serban</name>
<email>justcsdr@gmail.com</email>
</author>
<published>2018-09-05T07:44:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=5e172f75e51e3de1b4274146d9b990f803cb5c2a'/>
<id>urn:sha1:5e172f75e51e3de1b4274146d9b990f803cb5c2a</id>
<content type='text'>
The default P9_LOCK_TIMEOUT can be too long for some users exporting
a local file system to a guest VM (30s), make this configurable at
mount time.

Link: http://lkml.kernel.org/r/1536295827-3181-1-git-send-email-asmadeus@codewreck.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195727
Signed-off-by: Dinu-Razvan Chis-Serban &lt;justcsdr@gmail.com&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: do not trust pdu content for stat item size</title>
<updated>2018-09-07T16:40:06+00:00</updated>
<author>
<name>Gertjan Halkes</name>
<email>gertjan@google.com</email>
</author>
<published>2018-09-05T06:41:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=2803cf4379ed252894f046cb8812a48db35294e3'/>
<id>urn:sha1:2803cf4379ed252894f046cb8812a48db35294e3</id>
<content type='text'>
v9fs_dir_readdir() could deadloop if a struct was sent with a size set
to -2

Link: http://lkml.kernel.org/r/1536134432-11997-1-git-send-email-asmadeus@codewreck.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88021
Signed-off-by: Gertjan Halkes &lt;gertjan@google.com&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: fix spelling mistake in fall-through annotation</title>
<updated>2018-09-07T16:39:47+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-09-03T19:38:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=426d5a0f9733ecc2c4d7b252672fa8b1970d1c91'/>
<id>urn:sha1:426d5a0f9733ecc2c4d7b252672fa8b1970d1c91</id>
<content type='text'>
Replace "fallthough" with a proper "fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

Link: http://lkml.kernel.org/r/20180903193806.GA11258@embeddedor.com
Addresses-Coverity-ID: 402012 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>v9fs_dir_readdir: fix double-free on p9stat_read error</title>
<updated>2018-08-29T04:39:57+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-08-27T06:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=81c99089bce693b94b775b6eb888115d2d540086'/>
<id>urn:sha1:81c99089bce693b94b775b6eb888115d2d540086</id>
<content type='text'>
p9stat_read will call p9stat_free on error, we should only free the
struct content on success.

There also is no need to "p9stat_init" st as the read function will
zero the whole struct for us anyway, so clean up the code a bit while
we are here.

Link: http://lkml.kernel.org/r/1535410108-20650-1-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Reported-by: syzbot+d4252148d198410b864f@syzkaller.appspotmail.com
</content>
</entry>
<entry>
<title>Merge tag '9p-for-4.19-2' of git://github.com/martinetd/linux</title>
<updated>2018-08-18T00:27:58+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-08-18T00:27:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=1f7a4c73a739a63b3f108d8eda6f947fdc70dd65'/>
<id>urn:sha1:1f7a4c73a739a63b3f108d8eda6f947fdc70dd65</id>
<content type='text'>
Pull 9p updates from Dominique Martinet:
 "This contains mostly fixes (6 to be backported to stable) and a few
  changes, here is the breakdown:

   - rework how fids are attributed by replacing some custom tracking in
     a list by an idr

   - for packet-based transports (virtio/rdma) validate that the packet
     length matches what the header says

   - a few race condition fixes found by syzkaller

   - missing argument check when NULL device is passed in sys_mount

   - a few virtio fixes

   - some spelling and style fixes"

* tag '9p-for-4.19-2' of git://github.com/martinetd/linux: (21 commits)
  net/9p/trans_virtio.c: add null terminal for mount tag
  9p/virtio: fix off-by-one error in sg list bounds check
  9p: fix whitespace issues
  9p: fix multiple NULL-pointer-dereferences
  fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
  9p: validate PDU length
  net/9p/trans_fd.c: fix race by holding the lock
  net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
  net/9p/virtio: Fix hard lockup in req_done
  net/9p/trans_virtio.c: fix some spell mistakes in comments
  9p/net: Fix zero-copy path in the 9p virtio transport
  9p: Embed wait_queue_head into p9_req_t
  9p: Replace the fidlist with an IDR
  9p: Change p9_fid_create calling convention
  9p: Fix comment on smp_wmb
  net/9p/client.c: version pointer uninitialized
  fs/9p/v9fs.c: fix spelling mistake "Uknown" -&gt; "Unknown"
  net/9p: fix error path of p9_virtio_probe
  9p/net/protocol.c: return -ENOMEM when kmalloc() failed
  net/9p/client.c: add missing '\n' at the end of p9_debug()
  ...
</content>
</entry>
</feed>
