> I see. I will document in the man page that (void *)0 and (void *)1 are > special cases and they have to be set with PTRACE_REG_SET_PC() > explicitly if really intended. > > Keeping allowed 0x0 in PT_CONTINUE/PT_DETACH/.. makes it harder to > distinguish between broken kernel and broken program.
the problem is you are trying to make potentially valid values into magic values. what's the ultimate goal here? can you use explicit signalling instead of embedding special values? overloading values like this leads to pain and failure. maybe you can put this behind a sysctl -- perhaps even re-use vm.user_va0_disable, such that the normal system will fail like you are wanting, but it's possible to get around it if the admin chooses. thanks. .mrg.