Use the flags in elf header to set vm permissions
Modify pgbug() so that usertests text segment is without W
Add test to check app cannot write text segment
Growing adds R|W pages (without X). Exec() marks the stack only R|W.
Probably could setup permissions for text and data better if we call
ld with --no-omagic instead of -N.
locking plan, which is a difficult to understand because ptable lock
protects many invariants. This implementation has a bug: once in a
while xv6 unlocks a proc lock that is locked by another core.