[comp.os.vms] CHMK - who can use it.

dp@JASPER.PALLADIAN.COM (Jeffrey Del Papa) (06/30/87)

    Date: Sun, 28 Jun 87 13:46 EST
    From: Todd Warnock <WARNOCK@prism.clemson.edu>

    It's my understanding that ANYONE can issue a CHMK instruction successfully.
    (not to be confused with a successful call to the similar system service...)
    Exactly what is the difference in the two ?  What actually requires the
    CHMKNL privilege ?

    Thanks !

    Todd Warnock
    VAX Systems
    Clemson University
    Clemson, South Carolina 29634-2803

    ARPA:	Warnock@Prism.Clemson.EDU
    BITnet:	Warnock@Clemson
    CSnet:	Warnock@Clemson.CSnet


yes you can issue a chmk instruction, but it doesn't just switch your processor mode
and execute the next instruction following the call. It is a trap instruction, you
supply it a number, and the chmk 'interrupt' handler decodes this and calls the
apropriate peice of system code. the system code could do any number of things, the
cmkrnl service checks for privs, then calls the subroutine who's address the user
supplies. If you are just randomly executing the instruction, you will proabably find
a failure code in R0, as you called either an illegal system service #, or called it
with the wrong arguments. or if you were 'lucky', you did something obscure to your
process or system.

<dp>