the user/kernel copy (copy_to_user / copy_from_user)
When a program makes a system call, it hands the kernel pointers to its own memory - 'read into this buffer,' 'write from that buffer.' But those pointers come from untrusted user code, and the kernel is the most privileged code on the machine. It cannot just dereference them. The user/kernel copy is the disciplined, checked way the kernel moves data across the boundary: copy_from_user pulls data from a user buffer into the kernel, and copy_to_user pushes kernel data out to a user buffer - and both verify the user address before touching a single byte.
Why a plain pointer dereference would be dangerous, concretely. A malicious or buggy program could pass a pointer that points into kernel space, or to memory it does not own, or to nothing valid at all. If the kernel naively did *user_ptr, it might read or overwrite kernel data on the program's behalf - a privilege-escalation disaster - or crash the whole kernel on a bad address. So copy_from_user and copy_to_user first check that the address range really lies within the calling process's user portion of the address space, then perform the copy in a way that catches a fault (a bad page) gracefully: instead of panicking, the copy stops and returns the number of bytes that could not be copied (nonzero means failure), so the system call can return an error like -EFAULT rather than crashing.
Why this is one of the most important rules in kernel programming: it is the practical enforcement of the kernel/user boundary as a trust boundary. Every pointer that crosses from user space is treated as hostile until validated. A whole class of serious kernel vulnerabilities comes from code paths that forgot to use these helpers and dereferenced a user pointer directly, or that checked an address and then used it later after it could have changed (a 'time-of-check to time-of-use' bug). The discipline is simple to state and easy to forget: never trust, never directly dereference, a pointer that came from user space - always go through the checked copy.
sys_write(fd, user_buf, n): char kbuf[256]; if (copy_from_user(kbuf, user_buf, n)) return -EFAULT; // validated copy; on a bad user pointer it returns nonzero instead of crashing -- never do *user_buf directly.
The kernel never dereferences a user pointer directly; copy_from_user validates the address and fails gracefully with -EFAULT on a bad one.
Validating an address once is not enough if you then use it again - between the check and a later use, another thread could change the pages, a 'time-of-check to time-of-use' (TOCTOU) bug. The rule is absolute: a user-space pointer is untrusted; route every access through copy_to_user/copy_from_user, and never dereference it directly in the kernel.