login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
21
Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Michael S. Tsirkin
Subject:
Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes
Date: Wednesday, April 21, 2010 - 3:30 am
On Wed, Apr 21, 2010 at 12:31:50PM +0200, Hans J. Koch wrote:
quoted text
> On Wed, Apr 21, 2010 at 12:38:49PM +0300, Michael S. Tsirkin wrote: > > > > > + j++; > > > + } > > > + } > > > + for (i = 0, j = 0; i < PCI_STD_RESOURCE_END && > > > + j < MAX_UIO_PORT_REGIONS; i++) { > > > + if (pci_resource_flags(pdev, i) & IORESOURCE_IO) { > > > + name = kmalloc(8, GFP_KERNEL); > > > + if (name == NULL) > > > + break; > > > + sprintf(name, "iobar%d", i); > > > + info->port[j].name = name; > > > + info->port[j].start = pci_resource_start(pdev, i); > > > + info->port[j].size = pci_resource_len(pdev, i); > > > + info->port[j].porttype = UIO_PORT_X86; > > > + j++; > > > > At least on x86, I think io bar can not be mmapped. > > That's right. porttype == UIO_PORT_X86 is only there for information > purposes. Userspace then knows that it cannot map this but has to use > things like inb(), outb() and friends after getting access rights with > ioperm()/iopl(). "start" and "size" gives userspace the information > needed to do this. > > Thanks, > Hans
So that fails in the declared purpose of allowing an unpriveledged userspace driver, as inb/outb are priveledged operations. -- MST --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH V3] drivers/uio/uio_pci_generic.c: allow access for ...
, Tom Lyon
, (Mon Apr 19, 3:05 pm)
Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access ...
, Michael S. Tsirkin
, (Wed Apr 21, 2:38 am)
Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access ...
, Michael S. Tsirkin
, (Wed Apr 21, 3:30 am)
Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access ...
, Hans J. Koch
, (Wed Apr 21, 3:31 am)
Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access ...
, Tom Lyon
, (Thu Apr 29, 12:29 pm)
Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access ...
, Michael S. Tsirkin
, (Thu Apr 29, 12:52 pm)
Re: [LKML] Re: [PATCH V3] drivers/uio/uio_pci_generic.c: a ...
, Konrad Rzeszutek Wilk
, (Mon May 3, 10:47 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Sam Ravnborg
Re: [PATCH] kbuild: fix make V=1
Nick Piggin
Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
Greg Kroah-Hartman
[PATCH 16/36] driver core: cpu: fix section mismatch in cpu.c:store_online
Greg Kroah-Hartman
[PATCH 22/36] PM: Make wakeup flags available whenever CONFIG_PM is set
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
linux-netdev
:
Jarek Poplawski
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Lennert Buytenhek
Re: Distributed Switch Architecture(DSA)
Daniel Schaffrath
Re: tcp bw in 2.6
Guo-Fu Tseng
Re: jme: UDP checksum error, and lots of them
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Stuart Henderson
Re: SquidGuard problem
Conor
Re: RFID Reader
Community First Financial
Teacher A+ Loan
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
kconfig: recalc symbol value before showing search results
Colocation donated by:
Syndicate