#include #include #include #include #include #include "xenfs.h" #include "../xenbus/xenbus_comms.h" static ssize_t xsd_read(struct file *file, char __user *buf, size_t size, loff_t *off) { const char *str = (const char *)file->private_data; return simple_read_from_buffer(buf, size, off, str, strlen(str)); } static int xsd_release(struct inode *inode, struct file *file) { kfree(file->private_data); return 0; } static int xsd_kva_open(struct inode *inode, struct file *file) { file->private_data = (void *)kasprintf(GFP_KERNEL, "0x%p", xen_store_interface); if (!file->private_data) return -ENOMEM; return 0; } static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma) { size_t size = vma->vm_end - vma->vm_start; if ((size > PAGE_SIZE) || (vma->vm_pgoff != 0)) return -EINVAL; if (remap_pfn_range(vma, vma->vm_start, virt_to_pfn(xen_store_interface), size, vma->vm_page_prot)) return -EAGAIN; return 0; } const struct file_operations xsd_kva_file_ops = { .open = xsd_kva_open, .mmap = xsd_kva_mmap, .read = xsd_read, .release = xsd_release, }; static int xsd_port_open(struct inode *inode, struct file *file) { file->private_data = (void *)kasprintf(GFP_KERNEL, "%d", xen_store_evtchn); if (!file->private_data) return -ENOMEM; return 0; } const struct file_operations xsd_port_file_ops = { .open = xsd_port_open, .read = xsd_read, .release = xsd_release, }; ass='sub'>net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 14:16:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 14:16:23 -0800
commit396bf4cd835e62d70fad4a03a8963e61f19021f2 (patch)
tree79ac8f33554260fea1a8d43e6f8c4c5460115f45 /include/dt-bindings/gpio/meson-gxbb-gpio.h
parentd5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c (diff)
parent7c2cf1c4615cc2f576d0604406cdf0065f00b83b (diff)
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - use-after-free in algif_aead - modular aesni regression when pcbc is modular but absent - bug causing IO page faults in ccp - double list add in ccp - NULL pointer dereference in qat (two patches) - panic in chcr - NULL pointer dereference in chcr - out-of-bound access in chcr * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: chcr - Fix key length for RFC4106 crypto: algif_aead - Fix kernel panic on list_del crypto: aesni - Fix failure when pcbc module is absent crypto: ccp - Fix double add when creating new DMA command crypto: ccp - Fix DMA operations when IOMMU is enabled crypto: chcr - Check device is allocated before use crypto: chcr - Fix panic on dma_unmap_sg crypto: qat - zero esram only for DH85x devices crypto: qat - fix bar discovery for c62x
Diffstat (limited to 'include/dt-bindings/gpio/meson-gxbb-gpio.h')