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]
Date:   Wed, 12 Dec 2018 17:37:35 +0100
From:   Christian Borntraeger <borntraeger@...ibm.com>
To:     Vivek Goyal <vgoyal@...hat.com>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc:     miklos@...redi.hu, stefanha@...hat.com, dgilbert@...hat.com,
        sweil@...hat.com, swhiteho@...hat.com,
        Cornelia Huck <cohuck@...hat.com>,
        Halil Pasic <pasic@...ux.ibm.com>
Subject: Re: [PATCH 15/52] fuse: map virtio_fs DAX window BAR



On 10.12.2018 18:12, Vivek Goyal wrote:
> From: Stefan Hajnoczi <stefanha@...hat.com>

> +static int virtio_fs_setup_dax(struct virtio_device *vdev, struct virtio_fs *fs)
> +{
> +	struct virtio_fs_memremap_info *mi;
> +	struct dev_pagemap *pgmap;
> +	struct pci_dev *pci_dev;
> +	phys_addr_t phys_addr;
> +	size_t len;
> +	int ret;
> +
> +	if (!IS_ENABLED(CONFIG_DAX_DRIVER))
> +		return 0;
> +
> +	/* HACK implement VIRTIO shared memory regions instead of
> +	 * directly accessing the PCI BAR from a virtio device driver.
> +	 */
> +	pci_dev = container_of(vdev->dev.parent, struct pci_dev, dev);
> +
> +	/* TODO Is this safe - the virtio_pci_* driver doesn't use managed
> +	 * device APIs? */
> +	ret = pcim_enable_device(pci_dev);
> +	if (ret < 0)
> +		return ret;
> +
> +	/* TODO handle case where device doesn't expose BAR? */
> +	ret = pci_request_region(pci_dev, VIRTIO_FS_WINDOW_BAR,
> +				 "virtio-fs-window");
> +	if (ret < 0) {
> +		dev_err(&vdev->dev, "%s: failed to request window BAR\n",
> +			__func__);
> +		return ret;
> +	}

Can we please have a generic virtio interface to map the address (the default can then
fall back to PCI) instead of mapping a PCI bar? This would make it easier to implement
virtio-ccw or virtio-mmio.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ