[PATCH] fs/proc/kcore: correct comment
From: Lorenzo Stoakes
Date: Tue Aug 01 2023 - 12:36:08 EST
Correct comment to be strictly correct about reasoning.
Signed-off-by: Lorenzo Stoakes <lstoakes@xxxxxxxxx>
---
fs/proc/kcore.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 3bc689038232..23fc24d16b31 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -568,8 +568,8 @@ static ssize_t read_kcore_iter(struct kiocb *iocb, struct iov_iter *iter)
goto out;
}
/*
- * We use _copy_to_iter() to bypass usermode hardening
- * which would otherwise prevent this operation.
+ * We know the bounce buffer is safe to copy from, so
+ * use _copy_to_iter() directly.
*/
} else if (_copy_to_iter(buf, tsz, iter) != tsz) {
ret = -EFAULT;
--
2.41.0