4 ms·
1. It wouldn't segfault, because it's the kernel reading the data. It can read from anywhere. 2. Kernel already checks, whether the buffer is in a mapped memor
by yakubin 5y ago
1. It wouldn't segfault, because it's the kernel reading the data. It can read from anywhere.
2. Kernel already checks, whether the buffer is in a mapped memory region that your process has access to. If it isn't, the error is signaled with errno=EFAULT.