On Wed, 7 Jul 2010 11:22:34 -0600, Paul Gilmartin wrote: >On Jul 7, 2010, at 11:15, Paul Raulerson wrote: >> Linux restricts a bunch of instructions and does not allow user programs to ever run in a priv. mode. >> >What's a "user program"? What's a "priv. mode"? What does "su" do?
In z/Linux, processes run in their own address spaces. None of the kernel code is mapped into those address spaces so there is no way a process can directly access anything in the kernel. The PSA is not mapped in a process address space the PSA and page 0 is normally not addressable so NULL pointers will cause exceptions. Processes run in problem state in Home Address Space mode. All interrupts switch to the kernel which runs in supervisor state in Primary Address Space mode in its own address space. Kernel calls from processes are done through the SVC instruction. su changes the process privilege to that of another user. (I know this is simplified.) su has nothing to do with supervisor state. Processes simply can never run in supervisor state. Many of the z instructions are semi-privileged and must be enabled by the operating system. z/Linux does not enable all of the instructions that z/OS or z/VSE do. z/Linux does not set up the linkage stack so BAKR, PC and related instructions are not available.