Hi Theo, Theo de Raadt wrote on Tue, Jul 20, 2021 at 08:14:20PM -0600: > Ingo Schwarze wrote:
>> [EFAULT] foo points outside the process's allocated address space. >> >> But i don't really i like that. The word "allocated" makes me wonder >> because it sounds too much like malloc(3) for my taste. >> Usually, pointers to automatic and to static objects are acceptable, >> too, and are those "allocated"? Some might say they are not. >> Besides, "process's" looks awkward. > Disagree on your dislike of this wording. > > A process has an address space, VM_MIN_ADDRESS to VM_MAXUSER_ADDRESS. > Parts of this are not mapped, because nothing has allocated backing > resources. Allocation happens via stack growth, execve, shm, mmap, etc > etc etc etc. Those are all methods for "allocating" within the > processes' address space. > > Unallocated space generates EFAULT. > > Addresses outside the VM_MIN_ADDRESS to VM_MAXUSER_ADDRESS range also > generate EFAULT, and this is because backing resources are not permitted > to be allocated there. No allocation, thus EFAULT. > > "allocated" is correct terminology, and it has nothing to do with > malloc. Fair enough, thank you for explaining. Given that it is correct terminology, i recommend using it in the nanosleep(2) manual, too, because it is the most widely used idiom and it isn't excessively long. > I don't see how trying to mince words is going to help anyone. > > Unifying all the varients into one form will be quite a task. Right, that would probably be a make-work project. Having a wide variety of wordings is slightly messy, but not enough of a problem to warrant spending a significant effort on unification. Yours, Ingo > I don't know if this is the right form to use, but I don't like the > argument you made.