Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742708 > unrolled thread

[kernel-hardening] [RFC V2 6/6] drivers: uio: un-restrict sysfs pointers for UIO

Started by"Tobin C. Harding" <me@tobin.cc>
First post2017-10-01 02:10 +0200
Last post2017-10-01 02:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [kernel-hardening] [RFC V2 6/6] drivers: uio: un-restrict sysfs pointers for UIO "Tobin C. Harding" <me@tobin.cc> - 2017-10-01 02:10 +0200

#1742708 — [kernel-hardening] [RFC V2 6/6] drivers: uio: un-restrict sysfs pointers for UIO

From"Tobin C. Harding" <me@tobin.cc>
Date2017-10-01 02:10 +0200
Subject[kernel-hardening] [RFC V2 6/6] drivers: uio: un-restrict sysfs pointers for UIO
Message-ID<uvzZv-2ZT-5@gated-at.bofh.it>
The address and size on the UIO devices are required by userspace to
function properly.  Let's un-restrict these by adding the 'P' modifier
to %pa.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 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 ff04b7f..728ec8f 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.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web