System and method for restricting access to resources

By using redirect table intercepting and redirecting calls in computing devices, the problem of software application code reuse in different systems and contexts is solved, and resource access control based on privilege level is realized, reducing complexity and cost.

CN119065828APending Publication Date: 2024-12-03STMICROELECTRONICS INT NV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410691125.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-05-29
Filing Date
2024-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art has difficulty reusing software application code in different systems and contexts, especially the resource access isolation and replication problems caused by differences in privilege levels, increasing complexity and cost.

Method used

By introducing a redirect table into the computing device, intercepting calls from software applications and redirecting according to the caller and the called address, access control of resources is achieved, ensuring selective redirection or blocking calls based on the privilege level.

Benefits of technology

The ability to access resources using the same reusable code in different systems and contexts reduces the complexity associated with code replication and privilege levels, and improves the flexibility and efficiency of resource access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065828A_ABST
    Figure CN119065828A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to systems and methods for restricting access to resources. A computing device includes at least one memory device configured to store a software application, a processing device coupled to the at least one memory device via a bus and configured to execute the software application, and one or more resources callable by execution of code in the software application. The at least one memory device or another memory device of the computing device is configured to store a redirection table that indicates an alternative address to which a call to one of the resources is to be forwarded based on either or both of a caller address and a called address of the call to the one of the resources. The computing device also includes software or hardware to intercept calls from the software application and selectively redirect the calls based on the redirection table.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This patent application claims the priority benefit of French patent application filed on May 30, 2023 and assigned application number FR2305372, the contents of which are incorporated herein by reference in their entirety. Technical Field

[0003] The present disclosure relates generally to computer processing systems including processors or microcontrollers, and more particularly to systems and methods for limiting access to resources of the computer processing system by particular software modules. Background Art

[0004] It is known to provide a processing environment in which applications can be given different levels of privileges for accessing resources, such as hardware resources, for example peripherals or specific memory areas, or other resources, for example software services, cryptographic services, specific parameters or confidential data.

[0005] A trusted software application with the required privilege level for accessing a given restricted resource can use direct calls to directly access it. In contrast, if an untrusted application that does not have the required privilege level wishes to access a restricted resource, it may need to execute a system call that interrupts the execution of the application and requests that the system (such as an operating system) with a higher privilege level access the resource on behalf of the untrusted application. Summary of the invention

[0006] According to one embodiment, a computing device includes at least one memory device configured to store a software application, a processing device coupled to at least one memory device via a bus and configured to execute the software application, and one or more resources that can be called by the execution of code in the software application. The at least one memory device or another memory device of the computing device is configured to store a redirection table, which indicates a call to be forwarded to an alternative address based on either or both of a caller address and a called address of a call to a resource in the resource. The computing device also includes software, which is used to intercept a call from the software application and selectively redirect the call based on the redirection table. In one embodiment, one or more resources include one or more hardware resources, such as peripheral devices of the computing device. In one embodiment, one or more resources include one or more memory areas of at least one memory device. In one embodiment, the software for intercepting the call is configured to compare the caller address of the call with a plurality of reference caller addresses indicated in the redirection table, and in the case of a hit, the call is redirected to an alternative address associated with the reference caller address of the call in the redirection table. In one embodiment, the software for intercepting calls is configured to compare the called address of the call with multiple reference called addresses indicated in the redirection table, and in the case of a hit, the call is redirected to the alternative address associated with the reference called address of the call in the redirection table. In one embodiment, the software for intercepting calls is configured to compare the caller address of the call with multiple reference caller addresses indicated in the redirection table, and the called address of the call is compared with multiple reference called addresses indicated in the redirection table, and in the case of a hit for both the caller address and the called address, the call is redirected to the alternative address associated with the reference caller address of the call and the reference called address in the redirection table. In one embodiment, one or more resources that can be called by the execution of the code in the software application include a first resource and a second resource, the first resource can be called by calling a first function at a first address stored in at least one memory device, and the second resource can be called by calling a second function at a second address stored in at least one memory device. In one embodiment, the software for intercepting calls is stored in at least one memory device.

[0007] According to another embodiment, a computing device includes one or more resources, and one or more memory devices configured to store a software application and a redirection table. The redirection table indicates an alternative address to which the call will be forwarded based on either or both of a caller address and a called address of a call to one of the one or more resources. The computing device also includes a processing device coupled to the one or more memory devices and configured to execute the software application. The processing device is configured to generate a call to one of the one or more resources. The computing device also includes a circuit for intercepting a call and forwarding the call to an alternative address according to the redirection table. In one embodiment, the circuit includes: a first comparator configured to compare the caller address of the call with a reference caller address or a reference caller address range; or a second comparator configured to compare the called address of the call with a reference called address or a reference called address range. In one embodiment, the circuit also includes a memory device configured to store the redirection table in the one or more memory devices. In one embodiment, the computing device also includes a bus configured to couple the processing device, the one or more memory devices, the one or more resources, and the circuit to each other. In one embodiment, the circuit is configured to update the redirection table. In one embodiment, the one or more resources include one or more hardware resources, such as peripheral devices of a computing device. In one embodiment, the one or more resources include one or more memory regions of one or more memory devices.

[0008] According to another embodiment, a method for accessing one or more resources of a computing device is provided, the method comprising intercepting a call from a software application stored in at least one memory device of the computing device by software or hardware of the computing device. The processing device of the computing device is coupled to at least one memory device via a bus and is configured to execute the software application. The method also comprises selectively redirecting the call by software or hardware of the computing device based on a redirection table stored in at least one memory device or another memory device. The redirection table indicates an alternative address to which the call will be forwarded based on either or both of a caller address and a called address of a call to one of the resources. In one embodiment, the method also comprises comparing the caller address of the call with a plurality of reference caller addresses indicated in the redirection table by software or hardware of the computing device, and in the case of a hit, redirecting the call to an alternative address associated with the reference caller address of the call in the redirection table by software or hardware of the computing device. In one embodiment, the method also comprises comparing the called address of the call with a plurality of reference called addresses indicated in the redirection table by software or hardware of the computing device, and in the case of a hit, redirecting the call to an alternative address associated with the reference called address of the call in the redirection table by software or hardware of the computing device. In one embodiment, the method further comprises comparing, by software or hardware of the computing device, the caller address of the call with a plurality of reference caller addresses indicated in the redirection table, and comparing the called address of the call with a plurality of reference called addresses indicated in the redirection table, and in the case of a hit for both the caller address and the called address, redirecting, by software or hardware of the computing device, the call to an alternative address in the redirection table associated with the reference caller address and the reference called address of the call. In one embodiment, the method further comprises updating the redirection table. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above-mentioned features and advantages and other features and advantages will be described in detail in the following description of specific embodiments given by way of illustration and not limitation with reference to the accompanying drawings, in which:

[0010] Figure 1 Schematically illustrates a computing device according to an example embodiment of the present disclosure;

[0011] Figure 2 Schematically illustrates a resource calling system based on direct calls from a software application;

[0012] Figure 3 schematically illustrates a resource calling system based on both system calls and direct calls from software applications;

[0013] Figure 4schematically illustrates a resource access system including a redirection module according to an example embodiment of the present disclosure; and

[0014] Figure 5 A resource access system including a redirection circuit according to an example embodiment of the present disclosure is schematically illustrated. DETAILED DESCRIPTION

[0015] Similar features have been designated by similar reference numerals in the various drawings. Specifically, common structural and / or functional features in various embodiments may have the same reference numerals and may have the same structural, dimensional, and material properties.

[0016] For clarity, only operations and elements useful for understanding the embodiments described herein are illustrated and described in detail.

[0017] Unless otherwise specified, when referring to two elements being connected together, this means a direct connection without any intermediate elements other than conductors, and when referring to two elements being coupled together, this means the two elements may be connected or they may be coupled via one or more other elements.

[0018] In the following disclosure, unless otherwise indicated, when referring to absolute position qualifiers such as terms "front", "back", "top", "bottom", "left", "right", etc., or relative position qualifiers such as terms "above", "below", "higher", "lower", etc., or orientation qualifiers such as "horizontal", "vertical", etc., reference is made to the orientation shown in the figure.

[0019] Unless otherwise indicated, the expressions "about," "approximately," "substantially," and "on the order of" mean within 10%, preferably within 5%.

[0020] In this disclosure, the following terms shall be deemed to have the following definitions:

[0021] - System call: An electronic signal generated by the execution of a software application that causes the execution of the software application to cease and a service to be requested from a resource by a privileged component (such as an operating component) on behalf of the software application;

[0022] - Resource: any hardware or software resource that can be called by a software application through a direct call to a given address or a system call, and to which access can be restricted, examples are peripherals such as hardware accelerators, cryptographic circuits, memory interfaces, etc., volatile or non-volatile memory devices, or regions or address ranges of memory devices, software services, cryptographic services, specific parameters or confidential data;

[0023] -Call redirection: Converts a call to a given address into a call to another address without the caller participating in the process.

[0024] Typically, in order to support both trusted and untrusted applications, two versions of a software application can be developed, one for use in environments where the software application is trusted and the other for use in environments where the software application is not trusted. However, this can lead to technical problems because it means that a given application code cannot be reused on all systems and contexts, resulting in additional complexity and cost.

[0025] Another difficulty is that in some processing environments, two or more software components may run in isolation from each other and may need to access one or more restricted resources. This may require duplicating the application code in each software component, or each application code having specific code for calling a given service provider, which again means that the software code cannot be reused in all systems and in all contexts.

[0026] The present disclosure describes systems and methods for permitting a software application's access to one or more resources to be selectively restricted based on the software application's privilege level and using the same reusable code.

[0027] Figure 1 A computing device 100 according to an example embodiment of the present disclosure is schematically illustrated. The computing device 100 is implemented, for example, by a system on a chip (SoC). The computing device 100 is, for example, part of an electronic device, such as an IoT (Internet of Things) device, a digital sensor, a digital controller of an electronic or electromechanical system, or any "smart device" that can benefit from security, such as a meter of electricity, water, gas, etc., a body camera, a medical device (such as an insulin pump, a heart rate monitor, etc.), and the like.

[0028] The computing device 100 includes, for example, a processing device (P) 102 (which includes one or more processors) and one or more memory devices, such as volatile memory (RAM) 104 and / or non-volatile memory (flash memory) 106. In some embodiments, the volatile memory 104 is a random access memory, and / or the non-volatile memory 106 is a flash memory, but other types of volatile and non-volatile memory may also be present.

[0029] The processing device 102 and the memories 104 , 106 are linked, for example, via a bus 108 , which is formed, for example, of an address bus and a data bus (not shown separately).

[0030] The non-volatile memory 106 stores, for example, software codes including, for example, an operating system (OS) and one or more software applications. The OS may be a secure operating system and / or a real-time operating system (RTOS). Figure 1 1 and 2 illustrate two examples of software applications APP1 and APP2. As known to those skilled in the art, the operating system OS and the software applications may be at least partially loaded into the volatile memory 104 and executed by the processing device 102. The computing device 100 may also be a bare metal system without any operating system OS or without a rich operating system, such as an RTOS.

[0031] The computing device 100 also includes, for example, one or more restricted access hardware devices (RA HW1, RA HW N) 110, 112 coupled to the bus 108, which are, for example, peripheral devices such as communication interfaces, or other types of resources that can only be directly accessed by the operating system and / or by one or more software applications with the required privileges. In addition, the volatile memory 104, for example, includes a restricted access area (RA area) 114, and / or the non-volatile memory 106, for example, includes a restricted access area (RA area) 116, which are, for example, hardware resources in the form of memory areas or address ranges that can only be directly accessed by the operating system and / or by one or more software applications with the required privileges. Although Figure 1 Not shown in the figure, but the computing device may additionally implement one or more software resources that provide, for example, limited access services.

[0032] Figure 2 A resource calling system 200 based on direct calls from software applications is schematically illustrated. The system 200 includes, for example, Figure 1 The software application 202 is composed of software code (SW), which is sometimes referred to as binary code, and includes library code LIB_A (HAL) 204, which is, for example, a hardware abstraction layer (HAL) code that allows the software application to make direct calls to the hardware resources 206, 208. In fact, Figure 2 The system 200 is, for example, a bare metal system, where the software application 202 has all the required privileges to access hardware or software resources. Figure 2 In the example of FIG. 2 , the hardware resource 206 is a UART (Universal Asynchronous Receiver-Transmitter) interface, and the hardware resource 208 is a timer unit (TIM).

[0033] Figure 3A resource calling system 300 based on both system calls and direct calls from software applications is schematically illustrated. The system 300 includes, for example, Figure 1 The system 300 includes two software applications APP1 and APP2, the first software application (application module 1) 302 of the software applications includes library code LIB_A (HAL) 304, and the second software application (application module 2) 306 of the software applications includes library code LIB_A (HAL) 308. The system 300 also includes an operating system (secure OS) 310, which is, for example, a secure OS. Alternatively, in addition to an OS with scheduling capabilities, any security framework that acts as a gatekeeper (in other words, a system without scheduling capabilities) may be used. The system 300 also includes, for example, hardware resources (HW) 206, 208, which are, for example, Figure 2 In addition to or in lieu of either or both of the hardware resources 206, 208, the system 300 may also include one or more software resources.

[0034] Software application 306 has, for example, Figure 2 The software application 202 has similar privileges and can therefore call both hardware resources 206 , 208 directly via the library code 308 .

[0035] In contrast, software application 302 , for example, has a lower level of privilege and can, for example, call hardware resource 208 directly, but must make a system call to OS 310 in order to access hardware resource 206 .

[0036] Therefore, while it is possible to reuse library code 204 of software application 202 as library code 308 of software application 306 without the need for additional mechanisms for handling resource calls, library code 304 of software application 302 must be different from others in order to handle both types of calls to hardware resources 206 and 208.

[0037] Figure 4 The resource access system 400 including the redirection module 410 according to an exemplary embodiment of the present disclosure is schematically illustrated. The system 400 is, for example, Figure 1 The system 400 includes, for example, a computer system corresponding to Figure 1406 , the first of the software applications (BINARY: @SECTION1) 402 includes library code LIB_A CHECK_REDIRECT() 404, and the second of the software applications (BINARY: @SECTION2) 406 includes library code LIB_A CHECK_REDIRECT() 408, which is, for example, the same as the library code 404. Therefore, the code 404 and 408 can be reused between the software applications 402 and 406, even if these software applications have different privilege levels. This is achieved by a redirection module (CHECK_REDIRECT()) 410, which is configured to intercept calls from the software applications 402 and 406 and redirect calls from the software applications 402 and 406 based on whether the calls are to be made as direct calls or system calls. To this end, each of the software applications 402 and 406 is, for example, configured to call the same specific function FuncHR for a given resource HR. In some embodiments, function FunchR is part of software applications 402, 406 (such as part of library code LIB_A 404, 408, respectively), and has the role of calling redirection module 410. Specifically, software applications 402, 406 call services from library code LIB_A due to function FunchR, and function FunchR calls redirection module CHECK_REDIRECT() 410. As an example, function FunchR = HAL_GPIO_Init. Functions FunchR for various resources are, for example, all stored in non-volatile memory 106, and each function, for example, contains code started by calling redirection module 410, which, for example, implements function CHECK_REDIRECT(). In this way, redirection module 410 is able to intercept and process calls to function FunchR. Redirection module 410 is configured to determine which actual call must be made: a direct call or a system call.

[0038] The function CHECK_REDIRECT() for example is not platform dependent and is always the same code. For example, the only parts that may vary from one system to another are the address of the function and the size of the redirection table.

[0039] The redirection module 410, and in particular the function CHECK_REDIRECT(), for example, is configured to redirect the call if redirection is to be applied. Figure 4An example is illustrated in which the resource being called is a UART, and the call is redirected by the redirection module 410 to one of: a first memory address 412 corresponding to a UART direct call (UART_DIRECTCALL); or a second memory address 414 corresponding to a UART system call (UART_SYS CALL). For example, the redirection performed by the redirection module 410 is based on rules stored in a redirection table 411, which is, for example, part of the redirection module 410. In some embodiments, the redirection table can be updated as indicated by an input "TABLE UPDATE" to the redirection module 410.

[0040] When leaving the redirection function CHECK_REDIRECT(), the stack is, for example, popped and the link register is, for example, forced to the redirection address. In addition, for example, based on the input parameters and the called address in the link register, a branch is applied to the redirection address using the stack from the caller. Alternatively, if the redirection is not applied, the code flow continues, for example, with the standard flow.

[0041] Table 1 and Table 2 below provide examples of redirection tables.

[0042] As indicated in Table 1, each of table records #1 to #6, for example, defines a rule for a call to a given resource at a given caller address (Caller@) in software module 402 or 406 (that is, at any address in segment 1 (@SECTION1) or at any address in segment 2 (@SECTION2), or at a specific address in one of these segments). In the example of Table 1, there are two resources that can be called by functions FuncA and FuncB, respectively. The called addresses of these functions made by software applications 402 and 406 are, for example, addresses in redirection module 410, so that redirection module 410 intercepts and processes these calls. In addition, for each table record #1 to #6, there is an indication of a redirection address (Redirected@) (in other words, the address to which the call should be rerouted by redirection module 410).

[0043] Table 1

[0044]

[0045] For example, record #1 in Table 1 corresponds to a caller address at the exact address of code I1 that is calling function FuncA, record #2 in the table corresponds to a caller address at the exact address of code I2 that is calling function FuncB, and record #3 in the table corresponds to a caller address at the exact address of code I3 that is calling function FuncB. Codes I1, I2, and I3 may be in any one of software applications 402 or 406. Functions FuncA and FuncB are, for example, stored in non-volatile memory 106, which is, for example, a flash memory. The redirection addresses for records #1, #2, and #3 are, for example, system calls to the corresponding functions, because codes I1, I2, and I3, for example, do not have the privilege level required for directly calling resources associated with functions FuncA and FuncB.

[0046] For example, record #4 in Table 1 corresponds to a caller address in software application 402, in other words, within the address range of segment S1, record #5 in the table corresponds to a caller address in software application 406, in other words, within the address range of segment S2, and record #6 in the table corresponds to a caller address of volatile memory 104 (which is, for example, RAM). The called address for table record #4 is, for example, the address range [@1; @2], i.e., any address between address @1 and address @2, and the redirection address is the called address plus an offset. This allows, for example, a direct call to a resource, but at a modified address. For example, the called address for table record #5 is function FuncA, and the redirection address is a system call to function FuncA, but different from the system call of table record #1, for example because a different device is called (such as in Figure 1 A system call is made to access a resource using a device external to device 100 (e.g., a device external to device 100) in order to access a resource. As an example, a system call is used to access a cryptographic service, such as a decryption operation involving the use of a confidential key. In a first case, the cryptographic key is, for example, protected directly in device 100 itself, and therefore the first system call (e.g., the system call of table record #1) is made with all operations performed within device 100, which is, for example, a SoC. In a second case, the cryptographic key may be even more sensitive, and additional access to an external security component may be enabled, thus resulting in a different system call (e.g., the system call of table record #5). The called address for table record #6 is, for example, function FuncB, and the call is, for example, blocked and not redirected, as indicated by the entry "&DoNothing".

[0047] Table 2 indicates, for each table record #1 to #6 of Table 1, in the column "Applicability", additional conditions that must be applied, for example, before the redirection is applied. Providing additional conditions is optional, and in some cases, there may be no additional conditions for some or all of the table records, as indicated by the entry "Unconditional". Furthermore, in some cases, a further column "Reject" indicates, for each table record #1 to #6 of Table 1, what should be done if the condition is not met. If there is no condition, then the entry Not Applicable (NA) will appear in this column.

[0048] Table 2

[0049]

[0050]

[0051] Of course, Tables 1 and 2 above provide only one example of a set of rules for defining call redirection, and many variations are possible, for example depending on the number of resources that can be called, the number of software applications that can issue calls, etc. Although examples have been provided in which each table record is defined for a specific caller address and a specific called address, it is also possible to define only some or all of the table records based on the caller address or only based on the called address if, for example, all calls from a given software code or to a given resource are to be handled in the same manner.

[0052] Although Figure 4 An embodiment in which call interception and redirection is performed in software by a software module is illustrated, but hardware implementation is also possible, and reference will now be made to Figure 5 An example of a hardware implementation is described in more detail.

[0053] Figure 5 The resource access system 500 including a redirection circuit 502 according to an example embodiment of the present disclosure is schematically illustrated. The system 500 is, for example, Figure 1 is implemented in the computing system 100 of .

[0054] For example, the redirection circuit 502 is coupled between the bus 108 and the volatile memory device 104 (RAM (CODE, VDATA)) storing software code and / or volatile data, and / or is coupled between the bus 108 and the non-volatile memory device 106 (Flash memory (CODE, NVDATA)) storing software code and non-volatile data. Figure 5 An example is illustrated where a single circuit 502 is coupled between the bus and each of the memory devices 104 , 106 , but in further embodiments, separate circuits may be provided for each memory device 104 , 106 .

[0055] like Figure 5 As shown in , processing device (P) 102 is also coupled to bus 108, and in some embodiments, one or more additional master devices ((multiple) other master devices) 504 may be coupled to bus 108 and may be configured to make calls to resources via bus 108, which may be processed in a manner similar to calls made by processing device 102.

[0056] The redirection circuit 502 includes, for example, a buffer (@IN) 506, which is coupled to the bus 108 and is configured to temporarily store addresses that appear on an address bus of the bus 108 and correspond to addresses within the non-volatile memory 106. The redirection circuit 502 also includes a comparator (callee comparator) 508, which is configured to compare the address in the buffer 506 with one or more reference callee addresses or reference callee address ranges, for example, stored in registers (REF ADDRS) 510. These reference callee addresses or reference callee address ranges correspond, for example, to addresses or address ranges defined in the "Callee Address" column of the above-mentioned redirection table.

[0057] In addition, the redirection circuit 502 includes, for example, a buffer (@IN) 512, which is coupled to the bus 108 and is configured to temporarily store an address that appears on an address bus of the bus 108 and corresponds to an address within the volatile memory 104. The comparator 508 is also configured to compare the address in the buffer 512 with one or more reference callee addresses or reference callee address ranges stored in the register 510.

[0058] The redirection circuit 502 further includes, for example, a buffer 514 configured to store previous addresses present in the buffer 506 and / or the buffer 512. The redirection circuit 502 further includes a comparator (caller comparator) 516 configured to compare the address in the buffer 514 with one or more reference caller addresses or reference caller address ranges, for example, stored in a register (REF ADDRS) 518. These reference caller addresses or reference caller address ranges correspond, for example, to the addresses or address ranges defined in the “Caller Address” column of the above-mentioned redirection table.

[0059] Figure 5 The implementation of circuit 502 in assumes that for a given call, the caller address appears on the address bus one clock cycle before the called address.

[0060] The outputs of comparators 508 and 516 are coupled, for example, to a memory 520 that stores, for example, a lookup table (LUT) 522 that implements the redirection table described above. In the event that either or both of comparators 508 and 516 detect a hit, the corresponding caller and / or callee address is provided, for example, as an entry to the lookup table 522, which is configured to determine whether there is a match with one of the records of the redirection table, and if so, to make the redirected address available to an address fetcher (fetcher) 524. The address fetcher is configured to store the redirected address in a buffer 526 (REDIRECTED@IN) if the call is to the non-volatile memory 106, or in a buffer 528 (REDIRECTED@IN) if the call is to the volatile memory 104.

[0061] The output of buffer 506 is also coupled to the input of buffer 526, and the output of buffer 512 is also coupled to the input of buffer 528, so that if no redirection address is defined, the address flows through circuit 502 in a transparent manner. If a redirection address is defined, then fetcher 524 is configured to overwrite the address transmitted from buffer 506 or 512 in buffer 526 or 528 with the redirection address.

[0062] Although in Figure 5 Not shown in the figure, but it will be apparent to those skilled in the art that circuit 502 is a synchronous implementation, with each component being clocked, for example, by a common clock signal.

[0063] Although in Figure 5 Not illustrated, but lookup table 522 may take additional information as further input so that the conditions indicated in the "Applicability" column of the redirection table described above can be evaluated and applied.

[0064] Additionally, in some embodiments, the contents of the lookup table can be updated, as represented by configuration input (CONFIG) 530 and update path (UPDATE) 532. In the event that a caller or callee address or address range is updated, the new information is also stored, for example, in registers 510, 518. In some embodiments, the update mechanism is a secure mechanism that can only be accessed based on authentication verification using, for example, one or more cryptographic keys.

[0065] Additionally or alternatively, hardware implementation ( Figure 5 ) and software implementation ( Figure 4) may be stored, for example, in a ROM (read-only memory) or as a non-volatile table, for example, in a flash memory that is configured when the computing device 100 is programmed. In some embodiments, the redirection table is write-protected or updateable under certain conditions, such as read-out protection (RDP) regression and / or authentication, only by privileged and / or secure software, based on option bytes, system bits, or status pins, etc. As a further variation, the redirection table may be a dynamic RAM table that is configured at each reset or power-off of the computing device 100. Table updates may be performed via one or more input pins of the computing device 100 or via a wireless interface such as an OTA (over-the-air) interface.

[0066] An advantage of the embodiments described herein is that resources can be accessed based on the same, reusable code, regardless of the context in which the software application is used, and in particular regardless of the privilege level assigned to the software application. In fact, restricted access is implemented using the described redirection table, which will allow the call to proceed as a direct call to the resource, or it will redirect the call to a system call, or it will block the call.

[0067] It is an object of embodiments of the present disclosure to at least partially address one or more needs in the art.

[0068] According to one aspect, a computing device is provided, comprising: at least one memory device configured to store a software application; a processing device coupled to the at least one memory device via a bus and configured to execute the software application; and one or more resources capable of being called by execution of code in the software application, wherein the at least one memory device, or another memory device of the computing device, is configured to store a redirection table indicating an alternative address to which a call will be forwarded based on either or both of a caller address and a called address of a call to one of the resources, wherein the computing device further comprises software or hardware for intercepting calls from the software application and selectively redirecting the calls based on the redirection table.

[0069] According to another aspect, a method for accessing one or more resources of a computing device is provided, the method comprising: intercepting, by software or hardware of the computing device, a call from a software application stored in at least one memory device of the computing device, wherein a processing device of the computing device is coupled to the at least one memory device via a bus and is configured to execute the software application; and selectively redirecting, by the software or hardware of the computing device, the call based on a redirection table stored in the at least one memory device or another memory device, the redirection table indicating an alternative address to which the call will be forwarded based on either or both of a caller address and a called address of a call to one of the resources.

[0070] According to one embodiment, the one or more resources include one or more hardware resources, such as peripheral devices of a computing device.

[0071] According to one embodiment, the one or more resources include one or more memory regions of at least one memory device.

[0072] According to one embodiment, the software or hardware for intercepting calls is configured to compare the caller address of the call with multiple reference caller addresses indicated in the redirection table, and in the event of a hit, redirect the call to an alternative address in the redirection table associated with the reference caller address of the call.

[0073] According to one embodiment, the software or hardware for intercepting calls is configured to compare the called address of the call with multiple reference called addresses indicated in the redirection table, and in case of a hit, redirect the call to an alternative address in the redirection table associated with the reference called address of the call.

[0074] According to one embodiment, the software or hardware for intercepting calls is configured to compare the caller address of the call with multiple reference caller addresses indicated in the redirection table, and compare the called address of the call with multiple reference called addresses indicated in the redirection table, and in the event of a hit for both the caller address and the called address, redirect the call to an alternative address in the redirection table that is associated with the reference caller address and the reference called address of the call.

[0075] According to one embodiment, one or more resources that can be called by execution of code in a software application include: a first resource that can be called by calling a first function stored at a first address in at least one memory device; and a second resource that can be called by calling a second function stored at a second address in at least one memory device.

[0076] According to one embodiment, the software or hardware for intercepting calls is a software module stored in at least one memory device.

[0077] According to one embodiment, the software or hardware for intercepting calls is a circuit that is coupled to a bus and includes one or both of the following: a first comparator that is configured to compare an address on the bus with a reference caller address or a reference caller address range; and a second comparator that is configured to compare an address on the bus with a reference callee address or a reference callee address range.

[0078] Various embodiments and variations have been described. Those skilled in the art will appreciate that certain features of these embodiments may be combined, and those skilled in the art will readily appreciate other variations. For example, it will be apparent to those skilled in the art that the principles described herein may be applied to any number of resources, which may correspond to peripheral devices or memory areas.

[0079] Finally, actual implementation of the embodiments and variations described herein is within the capabilities of those skilled in the art based on the functional description provided above.

Claims

1. A computing device, include: at least one memory device configured to store a software application; a processing device coupled to the at least one memory device via a bus and configured to execute the software application; as well as One or more resources capable of being called by execution of code in the software application, wherein the at least one memory device, or another memory device of the computing device, is configured to store a redirection table, the redirection table indicating an alternative address to which a call to one of the resources is to be forwarded based on either or both of a caller address and a called address of the call, wherein the computing device further comprises software for intercepting calls from the software application and selectively redirecting the calls based on the redirection table. 2 . The computing device of claim 1 , wherein the one or more resources comprise one or more hardware resources, such as peripheral devices of the computing device. 3 . The computing device of claim 1 , wherein the one or more resources include one or more memory regions of the at least one memory device.

4. A computing device according to claim 1, wherein the software for intercepting the call is configured to compare the caller address of the call with multiple reference caller addresses indicated in the redirection table, and in the event of a hit, redirect the call to the alternative address in the redirection table associated with the reference caller address of the call.

5. A computing device according to claim 1, wherein the software for intercepting the call is configured to compare the called address of the call with multiple reference called addresses indicated in the redirection table, and in the event of a hit, redirect the call to the alternative address in the redirection table associated with the reference called address of the call.

6. A computing device according to claim 1, wherein the software for intercepting the call is configured to compare the caller address of the call with multiple reference caller addresses indicated in the redirection table, and compare the called address of the call with multiple reference called addresses indicated in the redirection table, and in the event of a hit for both the caller address and the called address, redirect the call to the alternative address associated with the reference caller address and the reference called address of the call in the redirection table.

7. The computing device of claim 1, wherein the one or more resources that can be invoked by the execution of the code in the software application include: a first resource capable of being invoked by calling a first function stored at a first address in the at least one memory device; as well as A second resource is invoked by calling a second function stored at a second address in the at least one memory device.

8. The computing device of claim 1, wherein the software for intercepting the call is stored in the at least one memory device.

9. A computing device, include: one or more resources; One or more memory devices configured to store: Software applications; as well as a redirection table, wherein the redirection table indicates, based on either or both of a caller address and a called address of a call to one of the one or more resources, an alternate address to which the call is to be forwarded; a processing device coupled to the one or more memory devices and configured to execute the software application, wherein the processing device is configured to generate the call to one of the one or more resources; as well as Circuitry is configured to intercept the call and forward the call to the alternative address according to the redirection table.

10. The computing device of claim 9, wherein the circuit include: a first comparator configured to compare the caller address of the call with a reference caller address or a range of reference caller addresses; or A second comparator is configured to compare the called address of the call with a reference called address or a reference called address range.

11. The computing device of claim 10, wherein the circuitry further comprises a memory device of the one or more memory devices configured to store the redirection table.

12. The computing device of claim 9, further comprising a bus configured to couple the processing device, the one or more memory devices, the one or more resources, and the circuit to one another.

13. The computing device of claim 9, wherein the circuit is configured to update the redirection table.

14. The computing device of claim 9, wherein the one or more resources include one or more hardware resources, such as peripherals of the computing device.

15. The computing device of claim 9, wherein the one or more resources include one or more memory regions of the one or more memory devices.

16. A method of accessing one or more resources of a computing device, the method include: intercepting, by software or hardware of the computing device, a call from a software application stored by at least one memory device of the computing device, wherein a processing device of the computing device is coupled to the at least one memory device via a bus and is configured to execute the software application; as well as The call is selectively redirected by the software or the hardware of the computing device based on a redirection table stored in the at least one memory device or another memory device, the redirection table indicating an alternative address to which the call is to be forwarded based on either or both of a caller address and a called address of a call to one of the resources.

17. The method according to claim 16, further comprising: include: comparing, by the software or the hardware of the computing device, the caller address of the call with a plurality of reference caller addresses indicated in the redirection table; as well as In the event of a hit, the call is redirected, by the software or the hardware of the computing device, to the alternative address in the redirection table that is associated with the reference caller address of the call.

18. The method according to claim 16, further comprising: include: comparing, by the software or the hardware of the computing device, the called address of the call with a plurality of reference called addresses indicated in the redirection table; as well as In case of a hit, the call is redirected by the software or the hardware of the computing device to the alternative address in the redirection table that is associated with the reference called address of the call.

19. The method according to claim 16, further comprising: include: comparing, by the software or the hardware of the computing device, the caller address of the call with a plurality of reference caller addresses indicated in the redirection table, and comparing the callee address of the call with a plurality of reference callee addresses indicated in the redirection table; as well as In case of a hit for both the caller address and the called address, the call is redirected by the software or the hardware of the computing device to the alternative address in the redirection table that is associated with the reference caller address and the reference called address of the call.

20. The method according to claim 16, further comprising: include: The redirection table is updated.