4 ms·
It wouldn't suprise me if the majority of such >2GB write attempts were int32_t underflows with <2GB of data provided, and further that the EINVALs instead of a
by MaulingMonkey 5y ago
It wouldn't suprise me if the majority of such >2GB write attempts were int32_t underflows with <2GB of data provided, and further that the EINVALs instead of any access of said data might avoid some segfaults as a result.
Which I don't say to excuse such behavior, but neither does it suprise me.
- yakubin 5y ago1. 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.