a software facility for patching installed computer program code (“ the facility ”) is provided . in some embodiments , the facility adds parameter testing and test result handling to installed functions . in other embodiments , the facility adds various other kinds of functionality to installed functions , in some cases at arbitrary positions in the installed functions &# 39 ; flows of execution . in some embodiments , for each patch , the facility distributes to each computer system to be patched — i . e ., each “ target computer system ”— the specification of a point at which to perform a test , the identity of the test to perform , and how to act in response to one or more different test results . in some embodiments , the facility provides a standard set of parameter validation and other tests whose use can be specified in patches . for example , a patch may specify that , for a particular function , if a particular parameter of the function does not have a certain value , invocation of the function should fail before its substantive execution begins . another patch may specify that , for a particular function , if a particular parameter has a length exceeding a specified maximum length , the parameter should be truncated to the specified maximum length before execution of the function is permitted to proceed . many security exploits rely on causing functions to be called with parameter values that , while they were not blocked in the original version of a function &# 39 ; s code , cause the function to create or take advantage of an unsafe condition . in many cases , such exploits can be prevented by using such patches to prevent the function from executing with such parameter values . in some embodiments , the patches specify the testing of values other than function parameters , such as values read from a file or inputted by user . in some embodiments , an automated patching agent automatically receives each patch , validates it , and stores it in a patch table for possible application . in some embodiments , each patch is applied to any instances of the executable module to be patched that are already loaded on the target computer system when the patch is received . this approach is referred to herein as “ hot patching ,” and enables patches to become effective immediately upon being received , and does not require the facility to be able to determine where the executable module to be patched is stored on disk . in some embodiments , each received patch is applied to the disk image of the executable module to be patched , so that , when the disk image is loaded at future times , the loaded disk image includes the patch . this approach is referred to herein as “ cold patching ,” and permits patches to be persistent across multiple sessions . in some embodiments , the facility performs both hot and cold patching . in some embodiments , each patch is applied to the executable module to be patched each time the executable module to be patched is loaded by the operating system &# 39 ; s loader . this approach is referred to herein as “ load - time patching .” in some embodiments , each patch is applied to the executable module to be patched each time the function to be patched is invoked . this approach is referred to herein as “ call - interception patching .” load - time patching and call - interception patching both ( 1 ) do not require the facility to be able to determine where the executable module to be patched is stored on disk , ( 2 ) facilitate ready reversibility of a particular patch , and ( 3 ) do not require modification of the executable module &# 39 ; s disk image . in some embodiments , the facility permits a user or administrator to configure the operation of patches that have been applied . as examples , such configuration can include , for a particular applied patch : whether the test specified by the patch is performed when execution reaches the point specified for the patch ; whether the test result handling specified by the patch is performed or ignored ; and / or whether performance of the test and / or its result is logged , displayed in warning message , etc . in these embodiments , the facility permits patches to be tested on production computer systems by initially enabling logging and disabling result handling . in these embodiments , the facility further permits operation of the patch to be logged in a “ verbose mode ” after enabling its result handling to assist with identifying instances in which the patch is creating a problem , such as an application compatibility problem or other it problem . these embodiments also permit a patch to be quickly disabled after being applied if it is discovered that the patch is creating problems . some embodiments of the facility also permit the patch to be quickly disabled by simply deleting the patch from the set of patches received and stored in the target computer system . in some embodiments , the facility uses a “ data - driven ” patching approach , in which patches contain no code , but rather data , such as a small human - readable text or xml document , that specifies a point at which to perform a test , the identity of the test to perform , and how to act in response to one or more different test results . in such embodiments , a patching agent receives data - driven patches , and adds the tests and test handling specified by the patches . in some embodiments , the facility uses a “ code - driven ” patching approach , and which each patch contains a short program to be added to the executable module to be patched that itself performs the test by calling the facility &# 39 ; s standard parameter testing functions , and that itself performs the test handling . using data - driven patching or code - driven patching , it is sometimes possible to address all flavors of an executable module to be patched with a single patch . in some embodiments , the facility signs each patch to demonstrate both that ( 1 ) the patch is from an approved source , and ( 2 ) the contents of the patch have not been modified since the time at which the patch was created by the approved source . in some embodiments , the facility distributes every patch to every target computer system , and a patching agent on the target computer system determines automatically which patches or to be applied on the target computer system , and how they are to be applied , based upon the target computer system &# 39 ; s characteristics . this relieves users and administrators of many of the burdens conventionally associated with selecting and applying patches , and the burden of maintaining an accurate and current inventory database . for example , these characteristics can include which version of the executable module to be patched is installed on the target computer system . in these embodiments , the facility can overcome the type of problems typically caused by hot fixes , by distributing patches that specify different handling for hot - fixed and un - hot - fixed flavors of a particular executable module , obviating any need to either sacrifice a hot fix for a particular executable module or make the hot fix ubiquitous when patching that executable module . in some embodiments , the patching agent stores every patch received in the target system , irrespective of whether the executable module to be patched by a particular patch is installed on the target system when that patch is received . because the facility in many cases applies patches in response to the loading of an executable module to be patched or the invocation of a function to be patched , the facility can apply a patch to an executable module that was installed on the target system after that patch was received in the target system . also , patches can survive the uninstallation and subsequent reinstallation of the executable module to be patched . in some embodiments , the patching agent is implemented in an operating system service . in these embodiments , the facility accords the patching agent any permissions required to apply a patch . these embodiments reduce the security risk typically imposed when conventional patches are applied , as they obviate any need for a user to log in to the target computer system using an administrative account having broad modification permissions , and thereby give any viruses present on the target computer system a greater opportunity to modify sensitive aspects of the target computer system . the patches used by the facility are typically relatively small , and therefore impose modest resource requirements for transmission and storage . also , because the patches used by the facility tend to modify the behavior of the patched software in a small number of well - defined ways , the facility helps to reduce the problem of code churn . fig1 illustrates an example of a suitable computing system environment 100 in which the facility may be implemented . the computing system environment 100 is only one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of the facility . neither should the computing environment 100 be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the exemplary operating environment 100 . the facility is operational with numerous other general purpose or special purpose computing system environments or configurations . examples of well known computing systems , environments , and / or configurations that may be suitable for use with the facility include , but are not limited to : personal computers , server computers , hand - held or laptop devices , tablet devices , multiprocessor systems , microprocessor - based systems , set top boxes , programmable consumer electronics , network pcs , minicomputers , mainframe computers , distributed computing environments that include any of the above systems or devices , and the like . the facility may be described in the general context of computer - executable instructions , such as program modules , being executed by a computer . generally , program modules include routines , programs , objects , components , data structures , and so forth , which perform particular tasks or implement particular abstract data types . the facility may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network . in a distributed computing environment , program modules may be located in local and / or remote computer storage media including memory storage devices . with reference to fig1 , an exemplary system for implementing the facility includes a general purpose computing device in the form of a computer 110 . components of the computer 110 may include , but are not limited to , a processing unit 120 , a system memory 130 , and a system bus 121 that couples various system components including the system memory to the processing unit 120 . the system bus 121 may be any of several types of bus structures including a memory bus or memory controller , a peripheral bus , and a local bus using any of a variety of bus architectures . by way of example , and not limitation , such architectures include industry standard architecture ( isa ) bus , micro channel architecture ( mca ) bus , enhanced isa ( eisa ) bus , video electronics standards association ( vesa ) local bus , and peripheral component interconnect ( pci ) bus also known as mezzanine bus . the computer 110 typically includes a variety of computer - readable media . computer - readable media can be any available media that can be accessed by the computer 110 and includes both volatile and nonvolatile media , and removable and non - removable media . by way of example , and not limitation , computer - readable media may comprise computer storage media and communication media . computer storage media includes volatile and nonvolatile , removable and non - removable media implemented in any method or technology for storage of information such as computer - readable instructions , data structures , program modules or other data . computer storage media includes , but is not limited to , ram , rom , eeprom , flash memory or other memory technology , cd - rom , digital versatile disks ( dvd ) or other optical disk storage , magnetic cassettes , magnetic tape , magnetic disk storage or other magnetic storage devices , or any other medium which can be used to store the desired information and which can accessed by the computer 110 . communication media typically embodies computer - readable instructions , data structures , program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media . the term “ modulated data signal ” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal . by way of example , and not limitation , communication media includes wired media such as a wired network or direct - wired connection , and wireless media such as acoustic , rf , infrared and other wireless media . combinations of the any of the above should also be included within the scope of computer - readable media . the system memory 130 includes computer storage media in the form of volatile and / or nonvolatile memory such as read only memory ( rom ) 131 and random access memory ( ram ) 132 . a basic input / output system 133 ( bios ), containing the basic routines that help to transfer information between elements within computer 110 , such as during start - up , is typically stored in rom 131 . ram 132 typically contains data and / or program modules that are immediately accessible to and / or presently being operated on by processing unit 120 . by way of example , and not limitation , fig1 illustrates operating system 134 , application programs 135 , other program modules 136 and program data 137 . the computer 110 may also include other removable / non - removable , volatile / nonvolatile computer storage media . by way of example only , fig1 illustrates a hard disk drive 141 that reads from or writes to non - removable , nonvolatile magnetic media , a magnetic disk drive 151 that reads from or writes to a removable , nonvolatile magnetic disk 152 , and an optical disk drive 155 that reads from or writes to a removable , nonvolatile optical disk 156 such as a cd rom or other optical media . other removable / non - removable , volatile / nonvolatile computer storage media that can be used in the exemplary operating environment include , but are not limited to , magnetic tape cassettes , flash memory cards , digital versatile disks , digital video tape , solid state ram , solid state rom , and the like . the hard disk drive 141 is typically connected to the system bus 121 through a non - removable memory interface such as interface 140 , and magnetic disk drive 151 and optical disk drive 155 are typically connected to the system bus 121 by a removable memory interface , such as interface 150 . the drives and their associated computer storage media , discussed above and illustrated in fig1 , provide storage of computer - readable instructions , data structures , program modules and other data for the computer 110 . in fig1 , for example , hard disk drive 141 is illustrated as storing operating system 144 , application programs 145 , other program modules 146 and program data 147 . note that these components can either be the same as or different from operating system 134 , application programs 135 , other program modules 136 , and program data 137 . operating system 144 , application programs 145 , other program modules 146 , and program data 147 are given different numbers herein to illustrate that , at a minimum , they are different copies . a user may enter commands and information into the computer 110 through input devices such as a tablet , or electronic digitizer , 164 , a microphone 163 , a keyboard 162 and pointing device 161 , commonly referred to as mouse , trackball or touch pad . other input devices not shown in fig1 may include a joystick , game pad , satellite dish , scanner , or the like . these and other input devices are often connected to the processing unit 120 through a user input interface 160 that is coupled to the system bus , but may be connected by other interface and bus structures , such as a parallel port , game port or a universal serial bus ( usb ). a monitor 191 or other type of display device is also connected to the system bus 121 via an interface , such as a video interface 190 . the monitor 191 may also be integrated with a touch - screen panel or the like . note that the monitor and / or touch screen panel can be physically coupled to a housing in which the computing device 110 is incorporated , such as in a tablet - type personal computer . in addition , computers such as the computing device 110 may also include other peripheral output devices such as speakers 195 and printer 196 , which may be connected through an output peripheral interface 194 or the like . the computer 110 may operate in a networked environment using logical connections to one or more remote computers , such as a remote computer 180 . the remote computer 180 may be a personal computer , a server , a router , a network pc , a peer device or other common network node , and typically includes many or all of the elements described above relative to the computer 110 , although only a memory storage device 181 has been illustrated in fig1 . the logical connections depicted in fig1 include a local area network ( lan ) 171 and a wide area network ( wan ) 173 , but may also include other networks . such networking environments are commonplace in offices , enterprise - wide computer networks , intranets and the internet . for example , in the present facility , the computer system 110 may comprise source machine from which data is being migrated , and the remote computer 180 may comprise the destination machine . note however that source and destination machines need not be connected by a network or any other means , but instead , data may be migrated via any media capable of being written by the source platform and read by the destination platform or platforms . when used in a lan networking environment , the computer 110 is connected to the lan 171 through a network interface or adapter 170 . when used in a wan networking environment , the computer 110 typically includes a modem 172 or other means for establishing communications over the wan 173 , such as the internet . the modem 172 , which may be internal or external , may be connected to the system bus 121 via the user input interface 160 or other appropriate mechanism . in a networked environment , program modules depicted relative to the computer 110 , or portions thereof , may be stored in the remote memory storage device . by way of example , and not limitation , fig1 illustrates remote application programs 185 as residing on memory device 181 . it will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used . while various functionalities and data are shown in fig1 as residing on particular computer systems that are arranged in a particular way , those skilled in the art will appreciate that such functionalities and data may be distributed in various other ways across computer systems in different arrangements . while computer systems configured as described above are typically used to support the operation of the facility , one of ordinary skill in the art will appreciate that the facility may be implemented using devices of various types and configurations , and having various components . fig2 is a data flow diagram showing a typical exchange of data between computer systems in accordance with the facility . the computer systems shown in fig2 ( computer systems 210 , 220 , 221 , 222 , 230 , 231 , and 232 ) typically have some or all of the components shown and discussed in conjunction with fig1 . at the patch distribution server , the facility generates one or more patches . these patches 201 are sent from the patch distribution server to one or more administration servers , such as administration servers 220 and 230 . each administration server , in turn , forwards the patches to one or more target computer systems , such as target computer systems 221 , 222 , 231 , and 232 . in some embodiments ( not shown ), the patch distribution server sends patches directly to one or more target computer systems , or via a more indirect route than through a single administration server . patches received at a target computer system are processed at the target computer system as described in greater detail below . an administration server can also send patch configuration commands 202 to one or more target computer systems , which apply the patch configuration commands to reconfigure the operation of particular patches . as is discussed in greater detail below , a patch may be completely disabled ; if a patch is not disabled , notification of its operation and its test result handling may each be independently enabled or disabled . when notification of its operation is enabled , notifications may be displayed or stored locally on the target computer system , or may be sent as notifications 203 to an appropriate administration server . fig3 is a flow diagram showing steps typically performed by the facility in order to receive and process a new patch . in step 301 , the facility receives a patch . the patch received in step 301 may be either a data - driven patch or a code - driven patch . a sample data - driven patch is shown in table 1 below . line 1 contains a unique identifier for the patch . line 2 identifies the application affected by the patch . line 3 identifies the application version affected by the patch . line 4 identifies the executable module affected by the patch . line 5 identifies two versions of the affected executable module — versions 8 . 0 . * and 9 . *— for which patching directions are provided . lines 6 - 10 contain patching directions for these two versions of the executable module . lines 6 - 7 identify the function to be patched , its address in the executable module , its parameter to be tested by the patch , and the type of the parameter to be tested . line 8 indicates that the parameter identified in lines 6 - 7 should be tested to determine whether its length exceeds 60 bytes . line 9 indicates that the invocation of the function should fail if the test succeeds . line 12 identifies two more versions of the affected executable module — versions 10 . * and 11 . *— for which patching directions are provided . lines 13 - 17 contain patching directions for these two versions of the executable module . lines 13 - 14 identify the function to be patched , its address in the executable module , its parameter to be tested by the patch , and the type of the parameter to be tested . it can be seen that the address of the function to be patched in the executable module identified in lines 13 - 14 for versions 10 . * and 11 . * is different from the address of the function to be patched identified in lines 6 - 7 for versions 8 . 0 . * and 9 .*. line 15 indicates that the parameter identified in lines 13 - 14 should be tested to determine whether its length exceeds 128 bytes . line 16 indicates that the invocation of the function should fail if the test succeeds . the patch may specify a variety of result handling action types , including failing the invocation of the patched function , raising an exception , terminating the process in which the patched executable module is being executed , or correcting the offending value ( such as by truncating an overlong string ). lines 23 - 25 contain a signature for the patch that both identifies the source of the patch and verifies that the patch has not been altered since leaving its source . table 2 below contains a code - driven version of the patch shown in table 1 above . lines 1 - 3 push parameters for the testing function onto the stack . line 4 calls the testing function . lines 5 - 8 branch on the return code for the testing function . if the testing function succeeded , line 9 jumps back to begin executing the body of the patched function . if the testing function failed , lines 10 - 11 push a failure result code onto the stack and returns from the patched function to the color of the patched function . for readability , table 2 omits certain details present in some code - driven patches , including a verifiable signature , instructions that test for the current values of the patch configuration flags , and instructions relocated from the beginning of the code for the patched function . in some embodiments , patches of both types may contain additional information , including , for each of one or more versions of the executable module to be patched , a file signature that can be used to validate that a particular instance of the executable module is a proper copy of that version . such a file signature may be , for example , a size or checksum for the entire executable module version , or the code expected to occur at a particular point in the executable module , such as at the offset at which the executable module is to be patched . in step 302 , if the patch is signed with a valid signature , then the facility continues in step 303 , else the facility continues in step 301 to receive the next patch . in step 303 , the facility adds the patch to a local patch table . in step 304 , the facility initializes the initial configuration of the patch , such as by sending it to a default configuration . fig4 is a data structure diagram showing a sample patch table typical of those used by the facility . the patch table 400 contains rows , such as rows 401 and 402 , each divided into the following columns : a patch identifier column 411 , containing the patch identifier extracted from the patch ; an executable module column 412 , containing information identifying the executable module to be patched , such as its name ; an executable module versions column 413 identifying all of the versions of the executable module identified in column 412 to which the patch applies ; a test performance enabled column 414 , containing the current configuration value for whether the test specified by the patch should be performed each time the patched function is called ; a test performance notification enabled column 415 , containing the current configuration value for whether a notification should be generated each time the patch &# 39 ; s test is performed ; a test result notification enabled column 416 , containing the current configuration value for whether a notification should be generated each time the patch &# 39 ; s test succeeds ; a test result handling enabled column 417 , containing the current configuration value for whether the patch &# 39 ; s result handling should be implemented when the patch &# 39 ; s test fails ; and a patch column 418 that contains a pointer to the patch itself , specifying a test and test result handling to be performed each time the test fails . in some embodiments , rather than containing a pointer to the patch as shown , the patch column 418 contains each patch directly . a particular patch table may contain or point to patches of various types , such as all code - driven patches , all data - driven patches , or a combination of code - driven and data - driven patches . in step 305 , once the facility has added the received patch to the patch table and initialized its configurations , the patch is available to be automatically applied by the facility to the executable module . in step 305 , the facility may utilize a variety of approaches to applying the patch , including those described in the application incorporated by reference , as well as real - time function call interception , and / or code rewriting of ( 1 ) already - loaded executable modules , ( 2 ) one or more disk images of the executable module , or ( 3 ) instances of executable modules loaded by the operating system &# 39 ; s loader . after step 305 , the facility continues in step 301 to receive the next patch . fig5 is a flow diagram showing steps typically performed by the facility in order to update configuration instructions for a particular patch . in step 501 , the facility receives configuration instructions for a particular patch , such as from an administrator . in some embodiments , such configuration instructions may be generated by administrators using group policies . in step 502 , the facility updates the patch &# 39 ; s configuration in the patch table in accordance with the received instructions . after step 502 , the facility continues in step 501 to receive the next configuration instructions . fig6 is a flow diagram showing steps typically performed by the facility to perform the parameter validation specified by a patch . in step 601 , a patched function is called . in step 602 , if testing is enabled for the patch that affects the called function , then the facility continues in step 603 , else the facility continues in step 601 to process the next call to a patched function . in step 603 , if test performance notification is enabled for the patch , then the facility continues in step 604 , else the facility continues in step 605 . in step 604 , the facility generates a notification that the test was performed . steps 604 , 608 , and 610 may involve displaying or storing an indication on the target computer system that the test was satisfied , and / or transmitting such an indication to a remote computer system for display or logging there . in step 605 , the facility performs the validation test specified by the patch . in some embodiments , step 605 involves calling one of a group of standard routines utilized by the facility for testing . in step 606 , if the test performed in step 605 is satisfied , then the facility continues in step 601 , else the facility continues in step 607 . in step 607 , if test result notification is enabled for the patch , then the facility continues in step 608 , else the facility continues in step 609 . in step 608 , the facility generates a notification that the test was not satisfied . in step 609 , if test result - handling is enabled for the patch , then the facility continues in step 610 , else the facility continues in step 601 . in step 610 , the facility performs the test result handling specified by the patch . after step 610 , the facility continues in step 601 . it will be appreciated by those skilled in the art that the above - described facility may be straightforwardly adapted or extended in various ways . for example , the facility may be used to apply a variety of different kinds of patches in a variety of ways at a variety of locations in executable modules of a variety of types for a variety of purposes . also , while patches are described herein as containing value validation tests that indicate a problem when they fail , the facility may also be implemented using value invalidity tests that indicate a problem when they succeed . in some embodiments , each test is accompanied by an indication of whether its success or failure indicates a problem . while the foregoing description makes reference to preferred embodiments , the scope of the invention is defined solely by the claims that follow and the elements recited therein .