<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/vdpa, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/vdpa?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/vdpa?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-06-08T12:56:03Z</updated>
<entry>
<title>vduse: Fix NULL pointer dereference on sysfs access</title>
<updated>2022-06-08T12:56:03Z</updated>
<author>
<name>Xie Yongji</name>
<email>xieyongji@bytedance.com</email>
</author>
<published>2022-04-26T07:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b27ee76c74dc831d6e092eaebc2dfc9c0beed1c9'/>
<id>urn:sha1:b27ee76c74dc831d6e092eaebc2dfc9c0beed1c9</id>
<content type='text'>
The control device has no drvdata. So we will get a
NULL pointer dereference when accessing control
device's msg_timeout attribute via sysfs:

[ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: 00000000000000f8
[ 132.850619][ T3644] RIP: 0010:msg_timeout_show (drivers/vdpa/vdpa_user/vduse_dev.c:1271)
[ 132.869447][ T3644] dev_attr_show (drivers/base/core.c:2094)
[ 132.870215][ T3644] sysfs_kf_seq_show (fs/sysfs/file.c:59)
[ 132.871164][ T3644] ? device_remove_bin_file (drivers/base/core.c:2088)
[ 132.872082][ T3644] kernfs_seq_show (fs/kernfs/file.c:164)
[ 132.872838][ T3644] seq_read_iter (fs/seq_file.c:230)
[ 132.873578][ T3644] ? __vmalloc_area_node (mm/vmalloc.c:3041)
[ 132.874532][ T3644] kernfs_fop_read_iter (fs/kernfs/file.c:238)
[ 132.875513][ T3644] __kernel_read (fs/read_write.c:440 (discriminator 1))
[ 132.876319][ T3644] kernel_read (fs/read_write.c:459)
[ 132.877129][ T3644] kernel_read_file (fs/kernel_read_file.c:94)
[ 132.877978][ T3644] kernel_read_file_from_fd (include/linux/file.h:45 fs/kernel_read_file.c:186)
[ 132.879019][ T3644] __do_sys_finit_module (kernel/module.c:4207)
[ 132.879930][ T3644] __ia32_sys_finit_module (kernel/module.c:4189)
[ 132.880930][ T3644] do_int80_syscall_32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:132)
[ 132.881847][ T3644] entry_INT80_compat (arch/x86/entry/entry_64_compat.S:419)

To fix it, don't create the unneeded attribute for
control device anymore.

Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Message-Id: &lt;20220426073656.229-1-xieyongji@bytedance.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa/mlx5: clean up indenting in handle_ctrl_vlan()</title>
<updated>2022-06-08T12:56:03Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-06-07T06:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f38b3c6a788f75da151b46c7da61ff26649e1843'/>
<id>urn:sha1:f38b3c6a788f75da151b46c7da61ff26649e1843</id>
<content type='text'>
These lines were supposed to be indented.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Message-Id: &lt;Yp71IYMP+QfuCJ8t@kili&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Eli Cohen &lt;elic@nvidia.com&gt;
Acked-by: Si-Wei Liu &lt;si-wei.liu@oracle.com&gt;
</content>
</entry>
<entry>
<title>vdpa/mlx5: fix error code for deleting vlan</title>
<updated>2022-06-08T12:56:03Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-06-07T06:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f766c409fcb33cfd0f511e8251831520e089eb89'/>
<id>urn:sha1:f766c409fcb33cfd0f511e8251831520e089eb89</id>
<content type='text'>
Return success if we were able to delete a vlan.  The current code
always returns failure.

Fixes: baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Message-Id: &lt;Yp709f1g9NcMBCHg@kili&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Eli Cohen &lt;elic@nvidia.com&gt;
Acked-by: Si-Wei Liu &lt;si-wei.liu@oracle.com&gt;
</content>
</entry>
<entry>
<title>vdpa/mlx5: Fix syntax errors in comments</title>
<updated>2022-06-08T12:56:03Z</updated>
<author>
<name>Xiang wangx</name>
<email>wangxiang@cdjrlc.com</email>
</author>
<published>2022-06-04T14:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2f72b2262d317093596c72bd5b27b9880be7611e'/>
<id>urn:sha1:2f72b2262d317093596c72bd5b27b9880be7611e</id>
<content type='text'>
Delete the redundant word 'is'.

Signed-off-by: Xiang wangx &lt;wangxiang@cdjrlc.com&gt;
Message-Id: &lt;20220604143858.16073-1-wangxiang@cdjrlc.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2022-06-03T18:48:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-06-03T18:48:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=500a434fc593f1fdb274c0e6fe09a0b9c0711a4b'/>
<id>urn:sha1:500a434fc593f1fdb274c0e6fe09a0b9c0711a4b</id>
<content type='text'>
Pull driver core updates from Greg KH:
 "Here is the set of driver core changes for 5.19-rc1.

  Lots of tiny driver core changes and cleanups happened this cycle, but
  the two major things are:

   - firmware_loader reorganization and additions including the ability
     to have XZ compressed firmware images and the ability for userspace
     to initiate the firmware load when it needs to, instead of being
     always initiated by the kernel. FPGA devices specifically want this
     ability to have their firmware changed over the lifetime of the
     system boot, and this allows them to work without having to come up
     with yet-another-custom-uapi interface for loading firmware for
     them.

   - physical location support added to sysfs so that devices that know
     this information, can tell userspace where they are located in a
     common way. Some ACPI devices already support this today, and more
     bus types should support this in the future.

  Smaller changes include:

   - driver_override api cleanups and fixes

   - error path cleanups and fixes

   - get_abi script fixes

   - deferred probe timeout changes.

  It's that last change that I'm the most worried about. It has been
  reported to cause boot problems for a number of systems, and I have a
  tested patch series that resolves this issue. But I didn't get it
  merged into my tree before 5.18-final came out, so it has not gotten
  any linux-next testing.

  I'll send the fixup patches (there are 2) as a follow-on series to this
  pull request.

  All have been tested in linux-next for weeks, with no reported issues
  other than the above-mentioned boot time-outs"

* tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (55 commits)
  driver core: fix deadlock in __device_attach
  kernfs: Separate kernfs_pr_cont_buf and rename_lock.
  topology: Remove unused cpu_cluster_mask()
  driver core: Extend deferred probe timeout on driver registration
  MAINTAINERS: add Russ Weight as a firmware loader maintainer
  driver: base: fix UAF when driver_attach failed
  test_firmware: fix end of loop test in upload_read_show()
  driver core: location: Add "back" as a possible output for panel
  driver core: location: Free struct acpi_pld_info *pld
  driver core: Add "*" wildcard support to driver_async_probe cmdline param
  driver core: location: Check for allocations failure
  arch_topology: Trace the update thermal pressure
  kernfs: Rename kernfs_put_open_node to kernfs_unlink_open_file.
  export: fix string handling of namespace in EXPORT_SYMBOL_NS
  rpmsg: use local 'dev' variable
  rpmsg: Fix calling device_lock() on non-initialized device
  firmware_loader: describe 'module' parameter of firmware_upload_register()
  firmware_loader: Move definitions from sysfs_upload.h to sysfs.h
  firmware_loader: Fix configs for sysfs split
  selftests: firmware: Add firmware upload selftests
  ...
</content>
</entry>
<entry>
<title>vdpa: ifcvf: set pci driver data in probe</title>
<updated>2022-06-01T06:16:38Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2022-05-24T05:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bd8bb9aed56b1814784a975e2dfea12a9adcee92'/>
<id>urn:sha1:bd8bb9aed56b1814784a975e2dfea12a9adcee92</id>
<content type='text'>
We should set the pci driver data in probe instead of the vdpa device
adding callback. Otherwise if no vDPA device is created we will lose
the pointer to the management device.

Fixes: 6b5df347c6482 ("vDPA/ifcvf: implement management netlink framework for ifcvf")
Tested-by: Zheyu Ma &lt;zheyuma97@gmail.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Message-Id: &lt;20220524055557.1938-1-jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa/mlx5: Add RX MAC VLAN filter support</title>
<updated>2022-06-01T06:16:38Z</updated>
<author>
<name>Eli Cohen</name>
<email>elic@nvidia.com</email>
</author>
<published>2022-04-11T12:29:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=baf2ad3f6a985354293e371b9ba12b162d639e29'/>
<id>urn:sha1:baf2ad3f6a985354293e371b9ba12b162d639e29</id>
<content type='text'>
Support HW offloaded filtering of MAC/VLAN packets.
To allow that, we add a handler to handle VLAN configurations coming
through the control VQ. Two operations are supported.

1. Adding VLAN - in this case, an entry will be added to the RX flow
   table that will allow the combination of the MAC/VLAN to be
   forwarded to the TIR.
2. Removing VLAN - will remove the entry from the flow table,
   effectively blocking such packets from going through.

Currently the control VQ does not propagate changes to the MAC of the
VLAN device so we always use the MAC of the parent device.

Examples:
1. Create vlan device:
$ ip link add link ens1 name ens1.8 type vlan id 8

Signed-off-by: Eli Cohen &lt;elic@nvidia.com&gt;
Message-Id: &lt;20220411122942.225717-4-elic@nvidia.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa/mlx5: Remove flow counter from steering</title>
<updated>2022-06-01T06:16:38Z</updated>
<author>
<name>Eli Cohen</name>
<email>elic@nvidia.com</email>
</author>
<published>2022-04-11T12:29:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7becdd13b640a6f91219ae3f201afa03ed67876b'/>
<id>urn:sha1:7becdd13b640a6f91219ae3f201afa03ed67876b</id>
<content type='text'>
The flow counter has been introduced in early versions of the driver to
aid in debugging. It is no longer needed and can harm performance.

Remove it.

Signed-off-by: Eli Cohen &lt;elic@nvidia.com&gt;
Message-Id: &lt;20220411122942.225717-2-elic@nvidia.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpasim: Off by one in vdpasim_set_group_asid()</title>
<updated>2022-05-31T16:45:10Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-05-23T08:30:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1f97b9785076d32fbabb8fa23889f9969c84118d'/>
<id>urn:sha1:1f97b9785076d32fbabb8fa23889f9969c84118d</id>
<content type='text'>
The &gt; comparison needs to be &gt;= to prevent an out of bounds access
of the vdpasim-&gt;iommu[] array.  The vdpasim-&gt;iommu[] is allocated in
vdpasim_create() and it has vdpasim-&gt;dev_attr.nas elements.

Fixes: 87e5afeac247 ("vdpasim: control virtqueue support")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Message-Id: &lt;YotGQU1q224RKZR8@kili&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpasim: allow to enable a vq repeatedly</title>
<updated>2022-05-31T16:45:09Z</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2022-05-19T14:59:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=242436973831aa97e8ce19533c6c912ea8def31b'/>
<id>urn:sha1:242436973831aa97e8ce19533c6c912ea8def31b</id>
<content type='text'>
Code must be resilient to enable a queue many times.

At the moment the queue is resetting so it's definitely not the expected
behavior.

v2: set vq-&gt;ready = 0 at disable.

Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator")
Cc: stable@vger.kernel.org
Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Message-Id: &lt;20220519145919.772896-1-eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
</content>
</entry>
</feed>
