From 3ee6e658755bcdc7277df553845c8361a0bf1c10 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 11 Jan 2018 12:07:24 +0000 Subject: [PATCH] Update comment explaining the check, to reality. Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/amd64/amd64/support.S | 8 +++----- sys/i386/i386/support.s | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 5a69ffd2ca51..042ec5fc3bd4 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -249,12 +249,10 @@ ENTRY(copyout) jz done_copyout /* - * Check explicitly for non-user addresses. If 486 write protection - * is being used, this check is essential because we are in kernel - * mode so the h/w does not provide any protection against writing - * kernel addresses. + * Check explicitly for non-user addresses. This check is essential + * because it prevents usermode from writing into kernel. We do not + * verify that user did not specified a rogue address anywhere else. */ - /* * First, prevent address wrapping. */ diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index 2fe4de7bc7f2..afbad837f91e 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -291,12 +291,10 @@ ENTRY(copyout) jz done_copyout /* - * Check explicitly for non-user addresses. If 486 write protection - * is being used, this check is essential because we are in kernel - * mode so the h/w does not provide any protection against writing - * kernel addresses. + * Check explicitly for non-user addresses. This check is essential + * because it prevents usermode from writing into kernel. We do not + * verify that user did not specified a rogue address anywhere else. */ - /* * First, prevent address wrapping. */