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: <20230417082040.16e0ac18.alex.williamson@redhat.com>
Date:   Mon, 17 Apr 2023 08:20:40 -0600
From:   Alex Williamson <alex.williamson@...hat.com>
To:     Nipun Gupta <nipun.gupta@....com>
Cc:     <jgg@...pe.ca>, <linux-kernel@...r.kernel.org>,
        <kvm@...r.kernel.org>, <masahiroy@...nel.org>, <nathan@...nel.org>,
        <ndesaulniers@...gle.com>, <nicolas@...sle.eu>, <git@....com>,
        <harpreet.anand@....com>, <pieter.jansen-van-vuuren@....com>,
        <nikhil.agarwal@....com>, <michal.simek@....com>
Subject: Re: [PATCH v3] vfio/cdx: add support for CDX bus

On Mon, 17 Apr 2023 14:07:25 +0530
Nipun Gupta <nipun.gupta@....com> wrote:

> +static long vfio_cdx_ioctl(struct vfio_device *core_vdev,
> +			   unsigned int cmd, unsigned long arg)
> +{
> +	struct vfio_cdx_device *vdev =
> +		container_of(core_vdev, struct vfio_cdx_device, vdev);
> +	struct cdx_device *cdx_dev = to_cdx_device(core_vdev->dev);
> +	unsigned long minsz;
> +
> +	switch (cmd) {
> +	case VFIO_DEVICE_GET_INFO:
> +	{
> +		struct vfio_device_info info;
> +
> +		minsz = offsetofend(struct vfio_device_info, num_irqs);
> +
> +		if (copy_from_user(&info, (void __user *)arg, minsz))
> +			return -EFAULT;
> +
> +		if (info.argsz < minsz)
> +			return -EINVAL;
> +
> +		info.flags = VFIO_DEVICE_FLAGS_CDX;
> +		info.flags = VFIO_DEVICE_FLAGS_RESET;

Whoops, I think you mean |= for the latter one.  Thanks,

Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ