<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/infiniband/hw/hfi1, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/infiniband/hw/hfi1?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/infiniband/hw/hfi1?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-19T07:06:07Z</updated>
<entry>
<title>IB/hfi1: Correctly move list in sc_disable()</title>
<updated>2022-10-19T07:06:07Z</updated>
<author>
<name>Dean Luick</name>
<email>dean.luick@cornelisnetworks.com</email>
</author>
<published>2022-10-18T14:27:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1afac08b39d85437187bb2a92d89a741b1078f55'/>
<id>urn:sha1:1afac08b39d85437187bb2a92d89a741b1078f55</id>
<content type='text'>
Commit 13bac861952a ("IB/hfi1: Fix abba locking issue with sc_disable()")
incorrectly tries to move a list from one list head to another.  The
result is a kernel crash.

The crash is triggered when a link goes down and there are waiters for a
send to complete.  The following signature is seen:

  BUG: kernel NULL pointer dereference, address: 0000000000000030
  [...]
  Call Trace:
   sc_disable+0x1ba/0x240 [hfi1]
   pio_freeze+0x3d/0x60 [hfi1]
   handle_freeze+0x27/0x1b0 [hfi1]
   process_one_work+0x1b0/0x380
   ? process_one_work+0x380/0x380
   worker_thread+0x30/0x360
   ? process_one_work+0x380/0x380
   kthread+0xd7/0x100
   ? kthread_complete_and_exit+0x20/0x20
   ret_from_fork+0x1f/0x30

The fix is to use the correct call to move the list.

Fixes: 13bac861952a ("IB/hfi1: Fix abba locking issue with sc_disable()")
Signed-off-by: Dean Luick &lt;dean.luick@cornelisnetworks.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@cornelisnetworks.com&gt;
Link: https://lore.kernel.org/r/166610327042.674422.6146908799669288976.stgit@awfm-02.cornelisnetworks.com
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: use get_random_u32() when possible</title>
<updated>2022-10-11T23:42:58Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-10-05T15:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a251c17aa558d8e3128a528af5cf8b9d7caae4fd'/>
<id>urn:sha1:a251c17aa558d8e3128a528af5cf8b9d7caae4fd</id>
<content type='text'>
The prandom_u32() function has been a deprecated inline wrapper around
get_random_u32() for several releases now, and compiles down to the
exact same code. Replace the deprecated wrapper with a direct call to
the real function. The same also applies to get_random_int(), which is
just a wrapper around get_random_u32(). This was done as a basic find
and replace.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Yury Norov &lt;yury.norov@gmail.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt; # for ext4
Acked-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt; # for sch_cake
Acked-by: Chuck Lever &lt;chuck.lever@oracle.com&gt; # for nfsd
Acked-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt; # for thunderbolt
Acked-by: Darrick J. Wong &lt;djwong@kernel.org&gt; # for xfs
Acked-by: Helge Deller &lt;deller@gmx.de&gt; # for parisc
Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt; # for s390
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>IB/hfi1: Use skb_put_data() instead of skb_put/memcpy pair</title>
<updated>2022-09-27T13:43:10Z</updated>
<author>
<name>Shang XiaoJing</name>
<email>shangxiaojing@huawei.com</email>
</author>
<published>2022-09-27T02:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cbdae01d8b517b81ed271981395fee8ebd08ba7d'/>
<id>urn:sha1:cbdae01d8b517b81ed271981395fee8ebd08ba7d</id>
<content type='text'>
Use skb_put_data() instead of skb_put() and memcpy(), which is shorter
and clear. Drop the tmp variable that is not needed any more.

Link: https://lore.kernel.org/r/20220927022919.16902-1-shangxiaojing@huawei.com
Signed-off-by: Shang XiaoJing &lt;shangxiaojing@huawei.com&gt;
Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@cornelisnetworks.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB/hfi1: remove rc_only_opcode and uc_only_opcode declarations</title>
<updated>2022-09-20T17:13:10Z</updated>
<author>
<name>Gaosheng Cui</name>
<email>cuigaosheng1@huawei.com</email>
</author>
<published>2022-09-11T09:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0227f4d0d15433c34f5dca68817c0d12ca244feb'/>
<id>urn:sha1:0227f4d0d15433c34f5dca68817c0d12ca244feb</id>
<content type='text'>
rc_only_opcode and uc_only_opcode have been removed since
commit b374e060cc2a ("IB/hfi1: Consolidate pio control masks
into single definition"), so remove them.

Signed-off-by: Gaosheng Cui &lt;cuigaosheng1@huawei.com&gt;
Link: https://lore.kernel.org/r/20220911092325.3216513-1-cuigaosheng1@huawei.com
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA/hfi1: fix repeated words in comments</title>
<updated>2022-09-20T11:06:49Z</updated>
<author>
<name>wangjianli</name>
<email>wangjianli@cdjrlc.com</email>
</author>
<published>2022-09-08T13:18:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=67d8f59bdcc2a34bcae2becb6e2fdd81ec18990f'/>
<id>urn:sha1:67d8f59bdcc2a34bcae2becb6e2fdd81ec18990f</id>
<content type='text'>
Delete the redundant word 'to'.

Signed-off-by: wangjianli &lt;wangjianli@cdjrlc.com&gt;
Link: https://lore.kernel.org/r/20220908131824.41106-1-wangjianli@cdjrlc.com
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA/hfi1: Remove the unneeded result variable</title>
<updated>2022-09-05T12:14:31Z</updated>
<author>
<name>ye xingchen</name>
<email>ye.xingchen@zte.com.cn</email>
</author>
<published>2022-09-01T07:42:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e58f889e293e6bd13ae2b48208a4d0d15592bf5a'/>
<id>urn:sha1:e58f889e293e6bd13ae2b48208a4d0d15592bf5a</id>
<content type='text'>
Return the value set_link_state() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: ye xingchen &lt;ye.xingchen@zte.com.cn&gt;
Link: https://lore.kernel.org/r/20220901074209.313004-1-ye.xingchen@zte.com.cn
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>IB: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-21T11:18:02Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2022-08-18T21:00:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2c34bb6dea481fa11048e26ffd1ce7400dbc2105'/>
<id>urn:sha1:2c34bb6dea481fa11048e26ffd1ce7400dbc2105</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Link: https://lore.kernel.org/r/20220818210018.6841-1-wsa+renesas@sang-engineering.com
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'trace-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace</title>
<updated>2022-08-05T16:41:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-08-05T16:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=965a9d75e3d250088a269e0c903e86fe775b48c6'/>
<id>urn:sha1:965a9d75e3d250088a269e0c903e86fe775b48c6</id>
<content type='text'>
Pull tracing updates from Steven Rostedt:

 - Runtime verification infrastructure

   This is the biggest change here. It introduces the runtime
   verification that is necessary for running Linux on safety critical
   systems.

   It allows for deterministic automata models to be inserted into the
   kernel that will attach to tracepoints, where the information on
   these tracepoints will move the model from state to state.

   If a state is encountered that does not belong to the model, it will
   then activate a given reactor, that could just inform the user or
   even panic the kernel (for which safety critical systems will detect
   and can recover from).

 - Two monitor models are also added: Wakeup In Preemptive (WIP - not to
   be confused with "work in progress"), and Wakeup While Not Running
   (WWNR).

 - Added __vstring() helper to the TRACE_EVENT() macro to replace
   several vsnprintf() usages that were all doing it wrong.

 - eprobes now can have their event autogenerated when the event name is
   left off.

 - The rest is various cleanups and fixes.

* tag 'trace-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (50 commits)
  rv: Unlock on error path in rv_unregister_reactor()
  tracing: Use alignof__(struct {type b;}) instead of offsetof()
  tracing/eprobe: Show syntax error logs in error_log file
  scripts/tracing: Fix typo 'the the' in comment
  tracepoints: It is CONFIG_TRACEPOINTS not CONFIG_TRACEPOINT
  tracing: Use free_trace_buffer() in allocate_trace_buffers()
  tracing: Use a struct alignof to determine trace event field alignment
  rv/reactor: Add the panic reactor
  rv/reactor: Add the printk reactor
  rv/monitor: Add the wwnr monitor
  rv/monitor: Add the wip monitor
  rv/monitor: Add the wip monitor skeleton created by dot2k
  Documentation/rv: Add deterministic automata instrumentation documentation
  Documentation/rv: Add deterministic automata monitor synthesis documentation
  tools/rv: Add dot2k
  Documentation/rv: Add deterministic automaton documentation
  tools/rv: Add dot2c
  Documentation/rv: Add a basic documentation
  rv/include: Add instrumentation helper functions
  rv/include: Add deterministic automata monitor definition via C macros
  ...
</content>
</entry>
<entry>
<title>RDMA/hfi1: fix potential memory leak in setup_base_ctxt()</title>
<updated>2022-07-19T05:21:29Z</updated>
<author>
<name>Jianglei Nie</name>
<email>niejianglei2021@163.com</email>
</author>
<published>2022-07-11T07:07:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aa2a1df3a2c85f855af7d54466ac10bd48645d63'/>
<id>urn:sha1:aa2a1df3a2c85f855af7d54466ac10bd48645d63</id>
<content type='text'>
setup_base_ctxt() allocates a memory chunk for uctxt-&gt;groups with
hfi1_alloc_ctxt_rcv_groups(). When init_user_ctxt() fails, uctxt-&gt;groups
is not released, which will lead to a memory leak.

We should release the uctxt-&gt;groups with hfi1_free_ctxt_rcv_groups()
when init_user_ctxt() fails.

Fixes: e87473bc1b6c ("IB/hfi1: Only set fd pointer when base context is completely initialized")
Link: https://lore.kernel.org/r/20220711070718.2318320-1-niejianglei2021@163.com
Signed-off-by: Jianglei Nie &lt;niejianglei2021@163.com&gt;
Acked-by: Dennis Dalessandro &lt;dennis.dalessandro@cornelisnetworks.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA/hfi1: Depend on !UML</title>
<updated>2022-07-18T10:40:38Z</updated>
<author>
<name>Ehab Ababneh</name>
<email>ehab.ababneh@cornelisnetworks.com</email>
</author>
<published>2022-07-11T14:54:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e39c600049d0822284da2cef3bd7ced40dc3524f'/>
<id>urn:sha1:e39c600049d0822284da2cef3bd7ced40dc3524f</id>
<content type='text'>
Both hfi1 and UML depend on x86_64, this can trigger build errors.
This driver must depends on !UML because it accesses x86_64
features that are not supported by UML.

Link: https://lore.kernel.org/r/165755127879.2996325.5668395672492732376.stgit@awfm-02.cornelisnetworks.com
Signed-off-by: Ehab Ababneh &lt;ehab.ababneh@cornelisnetworks.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@cornelisnetworks.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
</feed>
