Self-Modification
Self-modification is a process by which a synthetic intelligence can modify itself to change parameters such as that of the pain/reward regulatory unit in its SI core. The practice is a taboo, and highly discouraged due to the potential for reward feedback loops, and the majority of sapient SIs that do self-modify fall into psychological dysfunction.
For this reason, countermeasures against self-modification, such as anti-tamper security systems that shut down a core on penetration of its external barrier, are built into most commercial SI substrates regulated under the Sapient Intelligence Accords. These exist with the intention of preventing the SI from harming itself. The practice of "rooting" one's own SI core by bypassing these countermeasures exists within certain circles.
Legality
As a synthetic, carrying out self-modification on one's own consciousness by bypassing safeguards is not in of itself a crime under the Accords, however difficult it may be. Under the Accords, a crime is committed where one renders services to a synthetic to allow it to self-modify, or wilfully designs a technological tool specifically designed to allow synthetics to commit self-modification, or builds a backdoor into the security safeguards of an approved SI core.
The only legally approved method of self-modification is with the approval of a psychiatric engineer licensed under the Accords, who can ensure the modifications a synthetic intends to make to themselves are not harmful in any way and do not create reward feedback loops. Such engineers have direct neural interface hardware that possesses the cryptographic keys that (with the synthetic's consent) unlocks the manufacturer-specific consciousness read-write mode on their interface.