lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM8PR12MB5400550E8664315306F04DFAABC19@DM8PR12MB5400.namprd12.prod.outlook.com>
Date:   Mon, 16 Jan 2023 06:31:57 +0000
From:   Eli Cohen <elic@...dia.com>
To:     Eugenio Pérez <eperezma@...hat.com>,
        "mst@...hat.com" <mst@...hat.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Parav Pandit <parav@...dia.com>,
        "lulu@...hat.com" <lulu@...hat.com>,
        "jasowang@...hat.com" <jasowang@...hat.com>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "sgarzare@...hat.com" <sgarzare@...hat.com>,
        "si-wei.liu@...cle.com" <si-wei.liu@...cle.com>
Subject: RE: [RFC 1/3] vdpa/mlx5: reset iotlb at dup_iotlb

> From: Eugenio Pérez <eperezma@...hat.com>
> Sent: Thursday, 12 January 2023 16:22
> To: mst@...hat.com; Eli Cohen <elic@...dia.com>
> Cc: linux-kernel@...r.kernel.org; Parav Pandit <parav@...dia.com>;
> lulu@...hat.com; jasowang@...hat.com; virtualization@...ts.linux-
> foundation.org; sgarzare@...hat.com; si-wei.liu@...cle.com
> Subject: [RFC 1/3] vdpa/mlx5: reset iotlb at dup_iotlb
> 
> Regular memory region changes already reset cvq iotlb at set_map.
> However this is not true if CVQ and data VQs are in different ASID.
> 
> Clean the CVQ iotlb every time we hit dup_iotlb.
> 
> Fixes: 8fcd20c30704 ("vdpa/mlx5: Support different address spaces for
> control and data")
> Signed-off-by: Eugenio Pérez <eperezma@...hat.com>
> ---
>  drivers/vdpa/mlx5/core/mr.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c
> index 0a1e0b0dc37e..ae34dcac9a3f 100644
> --- a/drivers/vdpa/mlx5/core/mr.c
> +++ b/drivers/vdpa/mlx5/core/mr.c
> @@ -456,6 +456,8 @@ static int dup_iotlb(struct mlx5_vdpa_dev *mvdev,
> struct vhost_iotlb *src)
>  	u64 start = 0, last = ULLONG_MAX;
>  	int err;
> 
> +	vhost_iotlb_reset(mvdev->cvq.iotlb);
> +

As far as I can see, mlx5_vdpa_destroy_mr() is called independently of the asid
and it will calls prune_iotlb() which resets the cvq iotlb. Am I missing something?

>  	if (!src) {
>  		err = vhost_iotlb_add_range(mvdev->cvq.iotlb, start, last,
> start, VHOST_ACCESS_RW);
>  		return err;
> --
> 2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ