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] [day] [month] [year] [list]
Message-Id: <1230582733-8010-1-git-send-email-vapier@gentoo.org>
Date:	Mon, 29 Dec 2008 15:32:13 -0500
From:	Mike Frysinger <vapier@...too.org>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH v4] linux/uio.h: cleanup for userspace

Hide iov_shorten() behind __KERNEL__ since it's a prototype only.  Use the
__inline__ form for iov_length() since it's usable by userspace.

Signed-off-by: Mike Frysinger <vapier@...too.org>
---
v4
	- hide all funcs behind __KERNEL__
v3
	- keep all __KERNEL__ stuff in one place
v2
	- drop inline conversion stuff

 include/linux/uio.h |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/uio.h b/include/linux/uio.h
index b7fe138..31d75cd 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -19,6 +19,13 @@ struct iovec
 	__kernel_size_t iov_len; /* Must be size_t (1003.1g) */
 };
 
+/*
+ *	UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
+ */
+
+#define UIO_FASTIOV	8
+#define UIO_MAXIOV	1024
+
 #ifdef __KERNEL__
 
 struct kvec {
@@ -26,15 +33,6 @@ struct kvec {
 	size_t iov_len;
 };
 
-#endif
-
-/*
- *	UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
- */
- 
-#define UIO_FASTIOV	8
-#define UIO_MAXIOV	1024
-
 /*
  * Total number of bytes covered by an iovec.
  *
@@ -55,3 +53,5 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
 unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
 
 #endif
+
+#endif
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ