1. A method for executing privileged code in a process, the method comprising: when a computer operating system is creating a computer process in a user address space, establishing, by an authorized library, access to a privileged function in the user address space, the privileged function having a first privilege level used by a processor that is executing the privileged function, while preserving a different privilege level for a process invoking the privileged function; communicating, to the computer process, a location of the privileged function by passing a token to the computer process as part of creation of the computer process in the user address space, to allow the computer process to invoke the privileged function; using a system utility to identify a location of the privileged function based on the token to allow the computer process to invoke the privileged function; and executing the privileged function for the computer process, including setting a processor that is being used by the computer process to use the first privilege level associated with the privileged function, executing the privileged function with that processor at the first privilege level, then restoring that processor to a previous privilege level, and returning control of that processor to the computer process.