It can be useful to have the processor registers writable when debugging a kernel, for example for jtagfs. If they are not, the filesystem will protect you against it anyway. Reference: /n/sources/patch/applied/rw-regs-map Date: Mon Jul 11 11:45:55 CES 2011 Signed-off-by: paurea@gmail.com --- /sys/src/libmach/map.c Mon Jul 11 11:44:43 2011 +++ /sys/src/libmach/map.c Mon Jul 11 11:44:41 2011 @@ -89,13 +89,11 @@ map = newmap(0, 4); if (!map) return 0; - if(kflag) { + if(kflag) regs = "kregs"; - mode = OREAD; - } else { + else regs = "regs"; - mode = ORDWR; - } + mode = ORDWR; if (mach->regsize) { sprint(buf, "/proc/%d/%s", pid, regs); fd = open(buf, mode);