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>] [day] [month] [year] [list]
Message-ID: <20240619154950.819859-1-leitao@debian.org>
Date: Wed, 19 Jun 2024 08:49:50 -0700
From: Breno Leitao <leitao@...ian.org>
To: Alexander Viro <viro@...iv.linux.org.uk>
Cc: leit@...a.com,
	linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] iov_iter: Update direction initializers to new naming convention

Commit de4eda9de2d95 ("use less confusing names for iov_iter direction
initializers") updated the direction initializers from READ/WRITE to the
more intuitive ITER_DEST and ITER_SOURCE.

However, the function iov_iter_ubuf() is still using the old READ/WRITE
names, which could confuse readers who might expect the new
ITER_DEST/ITER_SOURCE arguments.

Update iov_iter_ubuf() to use the new ITER_DEST/ITER_SOURCE macros,
removing the old and confusing READ/WRITE macros.

Signed-off-by: Breno Leitao <leitao@...ian.org>
---
 include/linux/uio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/uio.h b/include/linux/uio.h
index 7020adedfa08..aa1ca69febaa 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -347,7 +347,7 @@ int import_ubuf(int type, void __user *buf, size_t len, struct iov_iter *i);
 static inline void iov_iter_ubuf(struct iov_iter *i, unsigned int direction,
 			void __user *buf, size_t count)
 {
-	WARN_ON(direction & ~(READ | WRITE));
+	WARN_ON(direction & ~(ITER_DEST | ITER_SOURCE));
 	*i = (struct iov_iter) {
 		.iter_type = ITER_UBUF,
 		.data_source = direction,
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ