Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1636816
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC 6/6] drivers: uio: Un-restrict sysfs pointers for UIO |
| Date | 2017-05-06 06:10 +0200 |
| Message-ID | <tDZcB-36m-3@gated-at.bofh.it> (permalink) |
| References | <tDZcB-36m-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Chris Fries <cfries@google.com>
The addr and size on the UIO devices are required by userspace to function
properly. Let's unrestrict these by adding the 'P' modifier to %p and %pa.
Cc: William Roberts <william.c.roberts@intel.com>
Cc: Dave Weinstein <olorin@google.com>
Signed-off-by: Chris Fries <cfries@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/uio/uio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 60ce7fd54e89..d9eae52519f4 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -56,12 +56,12 @@ static ssize_t map_name_show(struct uio_mem *mem, char *buf)
static ssize_t map_addr_show(struct uio_mem *mem, char *buf)
{
- return sprintf(buf, "%pa\n", &mem->addr);
+ return sprintf(buf, "%paP\n", &mem->addr);
}
static ssize_t map_size_show(struct uio_mem *mem, char *buf)
{
- return sprintf(buf, "%pa\n", &mem->size);
+ return sprintf(buf, "%paP\n", &mem->size);
}
static ssize_t map_offset_show(struct uio_mem *mem, char *buf)
--
2.12.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 00/06] printk: add more new kernel pointer filter options. Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 06:10 +0200
[RFC 6/6] drivers: uio: Un-restrict sysfs pointers for UIO Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 06:10 +0200
[RFC 5/6] lib: vsprintf: Add "%paP", "%padP" options Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 06:10 +0200
Re: [RFC 5/6] lib: vsprintf: Add "%paP", "%padP" options Joe Perches <joe@perches.com> - 2017-05-06 06:50 +0200
Re: [RFC 5/6] lib: vsprintf: Add "%paP", "%padP" options Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 07:10 +0200
[RFC 4/6] lib: vsprintf: default kptr_restrict to the maximum value Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 06:10 +0200
[RFC 1/6] lib: vsprintf: additional kernel pointer filtering options Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 06:10 +0200
[RFC 3/6] lib: vsprintf: physical address kernel pointer filtering options Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 06:10 +0200
Re: [kernel-hardening] [RFC 3/6] lib: vsprintf: physical address kernel pointer filtering options Ian Campbell <ijc@hellion.org.uk> - 2017-05-06 12:50 +0200
[RFC 2/6] lib: vsprintf: whitelist stack traces Greg KH <gregkh@linuxfoundation.org> - 2017-05-06 06:10 +0200
Re: [RFC 00/06] printk: add more new kernel pointer filter options. Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-05-11 03:40 +0200
csiph-web