On 07/08/2019 21:38, Dave Hansen wrote: > On 8/7/19 8:53 AM, Catalin Marinas wrote: >> +- The syscall behaviour is undefined for non valid tagged pointers. > > Do you really mean "undefined"? I mean, a bad pointer is a bad pointer. > Why should it matter if it's a tagged bad pointer or an untagged bad > pointer? bad pointers are invalid, but some non-bad pointers are also invalid if they are tagged (e.g. tagged pointer to device memory?) those may be valid to dereference in userspace but don't work across the syscall abi (device driver does not handle the tag?). >> +- mmap() addr parameter. >> + >> +- mremap() new_address parameter. > > Is munmap() missing? Or was there a reason for leaving it out? the new address in mmap and mremap may not be currently mapped, other m* functions operate on existing mappings (munmap, madvise, mprotect, mlock,...) although by this logic brk (and related PR_SET_MM_*) should be excluded here too. >> +- prctl(PR_SET_MM, ``*``, ...) other than arg2 PR_SET_MM_MAP and >> + PR_SET_MM_MAP_SIZE. >> + >> +- prctl(PR_SET_MM, PR_SET_MM_MAP{,_SIZE}, ...) struct prctl_mm_map fields. >> + >> +Any attempt to use non-zero tagged pointers will lead to undefined >> +behaviour. > > I wonder if you want to generalize this a bit. I think you're saying > that parts of the ABI that modify the *layout* of the address space > never accept tagged pointers. something like that, but i think this is hard to specify in a generic way.