Re: Re: [PATCH v4 1/5] virtio-crypto: change code style

2022-04-25 Thread zhenwei pi
On 4/26/22 14:12, Jason Wang wrote: On Sun, Apr 24, 2022 at 6:45 PM zhenwei pi wrote: Use temporary variable to make code easy to read and maintain. /* Pad cipher's parameters */ vcrypto->ctrl.u.sym_create_session.op_type = cpu_to_le32(VIRTIO_CRYPTO_SYM_OP

Re: [PATCH] vduse: Fix NULL pointer dereference on sysfs access

2022-04-25 Thread Greg KH
On Tue, Apr 26, 2022 at 02:01:03PM +0800, Xie Yongji wrote: > The control device has no drvdata. So we will get a NULL > NULL pointer dereference when accessing control device's > msg_timeout via sysfs: > > [ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: > 00f8 >

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Michael S. Tsirkin
On Tue, Apr 26, 2022 at 12:07:39PM +0800, Jason Wang wrote: > On Tue, Apr 26, 2022 at 11:55 AM Michael S. Tsirkin wrote: > > > > On Mon, Apr 25, 2022 at 11:53:24PM -0400, Michael S. Tsirkin wrote: > > > On Tue, Apr 26, 2022 at 11:42:45AM +0800, Jason Wang wrote: > > > > > > > > 在 2022/4/26 11:38,

Re: [PATCH] vduse: Fix NULL pointer dereference on sysfs access

2022-04-25 Thread Jason Wang
On Tue, Apr 26, 2022 at 2:01 PM Xie Yongji wrote: > > The control device has no drvdata. So we will get a NULL > NULL pointer dereference when accessing control device's > msg_timeout via sysfs: > > [ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: > 00f8 > [ 132.85

Re: [PATCH v4 1/5] virtio-crypto: change code style

2022-04-25 Thread Jason Wang
On Sun, Apr 24, 2022 at 6:45 PM zhenwei pi wrote: > > Use temporary variable to make code easy to read and maintain. > /* Pad cipher's parameters */ > vcrypto->ctrl.u.sym_create_session.op_type = > cpu_to_le32(VIRTIO_CRYPTO_SYM_OP_CIPHER); > vcrypto->ctrl.u.

Re: [PATCH v2 2/2] vdpa/vp_vdpa : add vdpa tool support in vp_vdpa

2022-04-25 Thread Jason Wang
On Mon, Apr 25, 2022 at 2:27 PM Cindy Lu wrote: > > this patch is to add the support for vdpa tool in vp_vdpa > here is the example steps > > modprobe vp_vdpa > modprobe vhost_vdpa > echo :00:06.0>/sys/bus/pci/drivers/virtio-pci/unbind > echo 1af4 1041 > /sys/bus/pci/drivers/vp-vdpa/new_id > >

Re: [proc/sysctl] 1dd38979b2: BUG:kernel_NULL_pointer_dereference,address

2022-04-25 Thread Luis Chamberlain
On Mon, Apr 25, 2022 at 04:57:26PM -0700, Luis Chamberlain wrote: > On Mon, Apr 25, 2022 at 04:34:34PM -0700, Andrew Morton wrote: > > On Mon, 25 Apr 2022 16:08:57 -0700 Luis Chamberlain > > wrote: > > > > > On Mon, Apr 25, 2022 at 02:46:07PM -0700, Andrew Morton wrote: > > > > On Mon, 25 Apr 20

Re: fix and cleanup discard_alignment handling

2022-04-25 Thread Martin K. Petersen
Christoph, > the somewhat confusing name of the discard_alignment queue limit, that > really is an offset for the discard granularity mislead a lot of > driver authors to set it to an incorrect value. This series tries to > fix up all these cases. Not sure how I ended up with "discard_alignmen

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Jason Wang
On Tue, Apr 26, 2022 at 11:55 AM Michael S. Tsirkin wrote: > > On Mon, Apr 25, 2022 at 11:53:24PM -0400, Michael S. Tsirkin wrote: > > On Tue, Apr 26, 2022 at 11:42:45AM +0800, Jason Wang wrote: > > > > > > 在 2022/4/26 11:38, Michael S. Tsirkin 写道: > > > > On Mon, Apr 25, 2022 at 11:35:41PM -0400,

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Michael S. Tsirkin
On Mon, Apr 25, 2022 at 11:53:24PM -0400, Michael S. Tsirkin wrote: > On Tue, Apr 26, 2022 at 11:42:45AM +0800, Jason Wang wrote: > > > > 在 2022/4/26 11:38, Michael S. Tsirkin 写道: > > > On Mon, Apr 25, 2022 at 11:35:41PM -0400, Michael S. Tsirkin wrote: > > > > On Tue, Apr 26, 2022 at 04:29:11AM +

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Michael S. Tsirkin
On Tue, Apr 26, 2022 at 11:42:45AM +0800, Jason Wang wrote: > > 在 2022/4/26 11:38, Michael S. Tsirkin 写道: > > On Mon, Apr 25, 2022 at 11:35:41PM -0400, Michael S. Tsirkin wrote: > > > On Tue, Apr 26, 2022 at 04:29:11AM +0200, Halil Pasic wrote: > > > > On Mon, 25 Apr 2022 09:59:55 -0400 > > > > "M

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Jason Wang
在 2022/4/26 10:50, Halil Pasic 写道: +static void virtio_ccw_synchronize_cbs(struct virtio_device *vdev) +{ + struct virtio_ccw_device *vcdev = to_vc_device(vdev); + struct airq_info *info = vcdev->airq_info; + + /* +* Synchronize with the vring_interrupt() called by +

Re: [PATCH V3 7/9] virtio: allow to unbreak virtqueue

2022-04-25 Thread Jason Wang
在 2022/4/25 22:04, Michael S. Tsirkin 写道: On Mon, Apr 25, 2022 at 02:44:06PM +0200, Cornelia Huck wrote: On Mon, Apr 25 2022, Jason Wang wrote: This patch allows the virtio_break_device() to accept a boolean value then we can unbreak the virtqueue. Signed-off-by: Jason Wang --- drivers/c

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Jason Wang
在 2022/4/26 11:38, Michael S. Tsirkin 写道: On Mon, Apr 25, 2022 at 11:35:41PM -0400, Michael S. Tsirkin wrote: On Tue, Apr 26, 2022 at 04:29:11AM +0200, Halil Pasic wrote: On Mon, 25 Apr 2022 09:59:55 -0400 "Michael S. Tsirkin" wrote: On Mon, Apr 25, 2022 at 10:54:24AM +0200, Cornelia Huck w

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Michael S. Tsirkin
On Mon, Apr 25, 2022 at 11:35:41PM -0400, Michael S. Tsirkin wrote: > On Tue, Apr 26, 2022 at 04:29:11AM +0200, Halil Pasic wrote: > > On Mon, 25 Apr 2022 09:59:55 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Apr 25, 2022 at 10:54:24AM +0200, Cornelia Huck wrote: > > > > On Mon, Apr 25

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Michael S. Tsirkin
On Tue, Apr 26, 2022 at 04:29:11AM +0200, Halil Pasic wrote: > On Mon, 25 Apr 2022 09:59:55 -0400 > "Michael S. Tsirkin" wrote: > > > On Mon, Apr 25, 2022 at 10:54:24AM +0200, Cornelia Huck wrote: > > > On Mon, Apr 25 2022, "Michael S. Tsirkin" wrote: > > > > > > > On Mon, Apr 25, 2022 at 10:

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Halil Pasic
On Mon, 25 Apr 2022 10:54:24 +0200 Cornelia Huck wrote: > On Mon, Apr 25 2022, "Michael S. Tsirkin" wrote: > > > On Mon, Apr 25, 2022 at 10:44:15AM +0800, Jason Wang wrote: > >> This patch tries to implement the synchronize_cbs() for ccw. For the > >> vring_interrupt() that is called via virt

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Halil Pasic
On Mon, 25 Apr 2022 09:59:55 -0400 "Michael S. Tsirkin" wrote: > On Mon, Apr 25, 2022 at 10:54:24AM +0200, Cornelia Huck wrote: > > On Mon, Apr 25 2022, "Michael S. Tsirkin" wrote: > > > > > On Mon, Apr 25, 2022 at 10:44:15AM +0800, Jason Wang wrote: > > >> This patch tries to implement the

Re: [PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp

2022-04-25 Thread Jason Wang
On Mon, Apr 25, 2022 at 6:38 PM Nikolay Aleksandrov wrote: > > We received a report[1] of kernel crashes when Cilium is used in XDP > mode with virtio_net after updating to newer kernels. After > investigating the reason it turned out that when using mergeable bufs > with an XDP program which adju

Re: [PATCH V2 03/11] perf/x86: Add support for TSC in nanoseconds as a perf event clock

2022-04-25 Thread Thomas Gleixner
On Mon, Apr 25 2022 at 16:15, Adrian Hunter wrote: > On 25/04/22 12:32, Thomas Gleixner wrote: >> It's hillarious, that we still cling to this pvclock abomination, while >> we happily expose TSC deadline timer to the guest. TSC virt scaling was >> implemented in hardware for a reason. > > So you ar

Re: [PATCH v2] drm/cirrus: fix a NULL vs IS_ERR() checks

2022-04-25 Thread Greg Kroah-Hartman
On Mon, Apr 25, 2022 at 10:10:43PM +0800, Shile Zhang wrote: > The function drm_gem_shmem_vmap can returns error pointers as well, > which could cause following kernel crash: > > BUG: unable to handle page fault for address: fffc > PGD 1426a12067 P4D 1426a12067 PUD 1426a14067 PMD 0 > O

Re: [PATCH V3 7/9] virtio: allow to unbreak virtqueue

2022-04-25 Thread Michael S. Tsirkin
On Mon, Apr 25, 2022 at 02:44:06PM +0200, Cornelia Huck wrote: > On Mon, Apr 25 2022, Jason Wang wrote: > > > This patch allows the virtio_break_device() to accept a boolean value > > then we can unbreak the virtqueue. > > > > Signed-off-by: Jason Wang > > --- > > drivers/char/virtio_console.c

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Michael S. Tsirkin
On Mon, Apr 25, 2022 at 10:54:24AM +0200, Cornelia Huck wrote: > On Mon, Apr 25 2022, "Michael S. Tsirkin" wrote: > > > On Mon, Apr 25, 2022 at 10:44:15AM +0800, Jason Wang wrote: > >> This patch tries to implement the synchronize_cbs() for ccw. For the > >> vring_interrupt() that is called via v

Re: [PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp

2022-04-25 Thread Michael S. Tsirkin
On Mon, Apr 25, 2022 at 01:37:03PM +0300, Nikolay Aleksandrov wrote: > We received a report[1] of kernel crashes when Cilium is used in XDP > mode with virtio_net after updating to newer kernels. After > investigating the reason it turned out that when using mergeable bufs > with an XDP program whi

Re: [PATCH v4 2/5] virtio-crypto: use private buffer for control request

2022-04-25 Thread Dan Carpenter
Hi zhenwei, url: https://github.com/intel-lab-lkp/linux/commits/zhenwei-pi/virtio-crypto-Improve-performance/20220424-184732 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220424

Re: [PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp

2022-04-25 Thread Daniel Borkmann
On 4/25/22 12:37 PM, Nikolay Aleksandrov wrote: We received a report[1] of kernel crashes when Cilium is used in XDP mode with virtio_net after updating to newer kernels. After investigating the reason it turned out that when using mergeable bufs with an XDP program which adjusts xdp.data or xdp.

Re: [PATCH V3 7/9] virtio: allow to unbreak virtqueue

2022-04-25 Thread Cornelia Huck
On Mon, Apr 25 2022, Jason Wang wrote: > This patch allows the virtio_break_device() to accept a boolean value > then we can unbreak the virtqueue. > > Signed-off-by: Jason Wang > --- > drivers/char/virtio_console.c | 2 +- > drivers/crypto/virtio/virtio_crypto_core.c | 2 +- > dri

Re: [PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp

2022-04-25 Thread Xuan Zhuo
On Mon, 25 Apr 2022 13:37:03 +0300, Nikolay Aleksandrov wrote: > We received a report[1] of kernel crashes when Cilium is used in XDP > mode with virtio_net after updating to newer kernels. After > investigating the reason it turned out that when using mergeable bufs > with an XDP program which a

[PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp

2022-04-25 Thread Nikolay Aleksandrov
We received a report[1] of kernel crashes when Cilium is used in XDP mode with virtio_net after updating to newer kernels. After investigating the reason it turned out that when using mergeable bufs with an XDP program which adjusts xdp.data or xdp.data_meta page_to_buf() calculates the build_skb a

Re: [PATCH 5.10.y] drm/cirrus: fix a NULL vs IS_ERR() checks

2022-04-25 Thread Greg Kroah-Hartman
On Sun, Apr 24, 2022 at 11:27:17AM +0800, Shile Zhang wrote: > Hi David and Daniel, > > Sorry but could you please help to check this issue? > Due to the function 'drm_gem_shmem_vmap' could return ERROR pointers which > will cause the kernel crash due to 'cirrus_fb_blit_rect' only check the > poin

Re: [PATCH V2 03/11] perf/x86: Add support for TSC in nanoseconds as a perf event clock

2022-04-25 Thread Thomas Gleixner
On Mon, Apr 25 2022 at 08:30, Adrian Hunter wrote: > On 14/03/22 13:50, Adrian Hunter wrote: >>> TSC offsetting may also be a problem. The VMCS TSC offset must be >>> discoverable by the >>> guest. This can be done via TSC_ADJUST MSR. The offset in the VMCS and the >>> guest >>> TSC_ADJUST MSR mu

Re: [PATCH v2 1/2] vdpa: add the check for id_table in struct vdpa_mgmt_dev

2022-04-25 Thread Jason Wang
On Mon, Apr 25, 2022 at 2:27 PM Cindy Lu wrote: > > To support the dynamic ids in vp_vdpa, we need to add the check for > id table. If the id table is NULL, will not set the device type > > Signed-off-by: Cindy Lu > --- > drivers/vdpa/vdpa.c | 11 +++ > 1 file changed, 7 insertions(+), 4

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Cornelia Huck
On Mon, Apr 25 2022, "Michael S. Tsirkin" wrote: > On Mon, Apr 25, 2022 at 10:44:15AM +0800, Jason Wang wrote: >> This patch tries to implement the synchronize_cbs() for ccw. For the >> vring_interrupt() that is called via virtio_airq_handler(), the >> synchronization is simply done via the airq_

Re: [PATCH 0/4] virtio-blk: small cleanup

2022-04-25 Thread Stefan Hajnoczi
On Thu, Apr 21, 2022 at 09:56:28PM +, Chaitanya Kulkarni wrote: > On 4/19/22 21:10, Chaitanya Kulkarni wrote: > > Hi, > > > > This has some nit fixes and code cleanups along with removing > > deprecated API fir ida_simple_XXX(). > > > > -ck > > > > Chaitanya Kulkarni (4): > >virtio-blk:

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-25 Thread Michael S. Tsirkin
On Mon, Apr 25, 2022 at 10:44:15AM +0800, Jason Wang wrote: > This patch tries to implement the synchronize_cbs() for ccw. For the > vring_interrupt() that is called via virtio_airq_handler(), the > synchronization is simply done via the airq_info's lock. For the > vring_interrupt() that is called