The present invention relates to a method for operating a computing unit including at least one processor core.
The present invention further relates to a device for carrying out such a method.
Preferred specific example embodiments of the present invention relate to a method for operating a computing unit including at least one processor core, in particular, for an embedded system and/or for a control unit, in particular, for a vehicle, in particular, for a motor vehicle, the method including the following steps: assigning one or multiple application programs executable by the computing unit to one of at least two zones, the zones characterizing resources of the computing unit, which are usable for executing a relevant application program, executing at least one of the application programs as a function of the zone to which it is assigned. This advantageously allows for an increase in the security of the operation of the computing unit without adversely affecting the operational flexibility during the execution of the application program.
The method according to the specific example embodiments of the present invention is particularly preferably designed as a computer-implemented method.
In further preferred specific embodiments of the present invention, two zones or also more than two zones may be provided.
In further preferred specific embodiments of the present invention, the resources of the computing unit, which are characterizable by the zones, include at least one of the following elements: a) memory, b) execution time or computing time, the resources including, in particular, memory.
In further preferred specific embodiments of the present invention, it is provided that the computing unit includes multiple processor cores, the method further including: a) assigning at least one processor core to exactly one zone, and/or b) assigning at least one processor core to more than one zone, in particular, to two zones.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: controlling, in particular limiting, at least one of the following elements: a) read rights to memory assigned to the computing unit, b) write rights to memory assigned to the computing unit, c) execution rights to memory assigned to the computing unit, as a function of the at least one zone.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: using at least temporarily at least one memory protection unit for controlling the read rights and/or the write rights and/or the execution rights.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: providing at least one dedicated memory protection unit for at least one processor core, one dedicated memory protection unit being in each case provided, in particular, for multiple, preferably for all processor cores.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: providing a, in particular shared, memory protection unit for multiple processor cores.
In further preferred specific embodiments of the present invention, it is provided that at least one processor core assumes at least temporarily a first operating mode, in particular, the at least one processor core in the first operating mode specifying and/or writing configuration data, which control an operation of at least one memory protection unit, in particular, the at least one processor core assuming at least temporarily a second operating mode, in which it is unable to write and/or to change the configuration data for the at least one memory protection unit.
In further preferred specific embodiments of the present invention, it is provided that the at least one processor core assumes the first operating mode in an event-controlled manner, in particular, as a function of at least one interrupt request.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: providing multiple sets of configuration data for the at least one memory protection unit, in particular, at least one first set of the multiple sets of configuration data being assigned to a first zone of the at least two zones and at least one second set of the multiple sets of configuration data being assigned to a second zone of the at least two zones.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: providing one first instance of the application program and one second instance of the application program, assigning the first instance of the application program to a first zone of the at least two zones, assigning the second instance of the application program to a second zone of the at least two zones.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: separating areas of a memory assigned to the computing unit as a function of the at least two zones, the memory assigned to the computing unit including at least one of the following elements: a) buffer memory, in particular, in the form of a working memory, b) stack memory, c) data memory, d) program memory, e) register memory, f) OTP (one-time programmable) memory, at least one memory protection unit being used for the separation.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: exchanging first data between various zones via a buffer memory, in particular, a working memory, the exchange of the first data between the first zone and the second zone including, in particular, the following steps: copying the first data into a first buffer memory area assigned to the first zone, checking the copied first data and, in particular, as a function of the check, copying the first data from the first buffer memory area assigned to the first zone into a second buffer memory area assigned to the second zone.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: separating computing time resources for different application programs and/or instances of application programs, in particular, assigning computing time resources for different application programs and/or for instances of application programs, as a function of the at least two zones.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: a) using an operating system for embedded systems, in particular, a lightweight embedded operating system, for assigning computer time resources for different application programs and/or for instances of application programs, in particular, one processor core each of the computing unit being assigned an operating system, and/or b) using a supervisor for embedded systems, in particular, a lightweight embedded supervisor, for assigning computing time resources for different application programs and/or for instances of application programs, in particular, if the (instances of) application programs are assigned to different zones, in particular, one supervisor being assigned to one processor core each of the computing unit.
In further preferred specific embodiments of the present invention, it is provided that the operating system and/or the supervisor execute/executes an assignment of computer time resources, preferably only, for defined tasks, in particular, using a static task list.
In further preferred specific embodiments of the present invention, it is provided that the operating system and/or the supervisor execute/executes an assignment of computing resource times as a function of a) repeated, in particular, periodically repeated interrupt requests and/or b) event-controlled interrupt requests, in particular, tasks from at least one interrupt routine being activated.
In further preferred specific embodiments of the present invention, it is provided that upon entry into an interrupt routine, configuration data for at least one memory protection unit or for the at least one memory protection unit are changed, in particular, in a hardware-controlled manner.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: monitoring, in particular, with the aid of the operating system and/or of the supervisor, at least one of the following elements, in particular, for a potential compromise: a) first zone, b) an application program assigned to the first zone c) an instance of an application program assigned to the first zone, the monitoring including, in particular: evaluating a stack memory and/or evaluating a program counter, the evaluation of a stack memory and/or evaluation of a program counter preferably taking place prior to an activation of the application program and/or of the instance of the application program. In further preferred specific embodiments, a monitoring routine of the supervisor is executed or carried out in a trustworthy operating mode (for example, a “supervisor mode”), in particular, by a trustworthy instance.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: initiating an error response, in particular, when the monitoring suggests a potential compromise, the error response including at least one of the following elements: a) transferring the first zone and/or the processor core assigned to the first zone into a secure state, in particular, by deactivating the processor core assigned to the first zone and/or by resetting (executing a reset) the processor core assigned to the first zone and/or transferring into an error mode, b) generating an error entry and/or c) forwarding a or the error entry to an attack detection system, in particular, to an intrusion detection system (IDS). In further preferred specific embodiments, the IDS may, for example, be situated internally or externally with respect to the computing unit.
In further preferred specific embodiments of the present invention, cf.
In further preferred specific embodiments of the present invention, it is provided that only that processor core to which a dedicated memory protection unit has been provided configures this dedicated memory protection unit.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: checking an integrity and/or authenticity of configuration data, which control an operation of at least one memory protection unit, or the configuration data, in particular, with the aid of at least one of the following elements: a) verification of a program code useable for the configuration of the at least one memory protection unit, b) verification of the configuration data, c) persistence of a or of the program code useable for the configuration of the at least one memory protection unit, d) persistence of the configuration data.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: carrying out at least temporarily a secure boot method and/or carrying out at least temporarily a method for manipulation detection during the runtime, in particular by at least one processor core.
In further preferred specific embodiments of the present invention, it is provided that the method further includes: controlling an access of an application program to at least one of the following elements as a function of at least one zone: a) internal interface, in particular, software interface, of the computing unit, b) internal and/or external hardware interface of the computing unit, c) hardware security module and/or cryptography module for carrying out cryptographic functions, d) peripheral devices of the computing unit, in particular, special function registers of at least one peripheral device, e) internal interfaces of a target system for the computing unit, in particular, of a control unit, f) external interfaces of a target system for the computing unit, in particular, of a control unit g) addressing elements for communication protocols, in particular, on at least one layer of the ISO/OSI layer model.
In further preferred specific embodiments of the present invention, it is provided that the method further includes at least one of the following elements: a) introducing at least one additional, in particular not previously existing, zone, b) shifting functionalities from one first processor core to at least one further processor core of the computing unit, c) carrying out a communication between at least two zones using a, in particular, working memory integrated, in particular, into the computing unit, d) defining at least one trustworthy zone and, optionally, monitoring at least one further, in particular, non-trustworthy, zone by at least one application program assigned to the trustworthy zone. In further preferred specific embodiments, the monitoring of the at least one further, in particular, non-trustworthy, zone may be carried out, for example, by a program, for example, an interrupt service routine (ISR), preferably in a monitoring mode, which may also be referred to as “supervisor mode.”
Further preferred specific embodiments of the present invention relate to a device for carrying out the method according to the specific embodiments.
In further preferred specific embodiments of the present invention, it is provided that the device includes at least one of the following elements: a) a computing unit including at least one processor core, b) a memory unit, c) a data bus, d) a memory protection unit, e) a hardware security module.
In further preferred specific embodiments of the present invention, it is provided that the device is designed as a microcontroller, in particular, as a single microcontroller or as a system-on-chip (SoC), in particular, as a single SoC.
In further preferred specific embodiments, it is provided that the device includes an, in particular, shared, semiconductor substrate, at least one of the following elements being situated on the, in particular, shared, semiconductor substrate: a) the computing unit including at least one processor core, b) the memory unit, c) the data bus, d) the memory protection unit, e) the hardware security module.
Further preferred specific embodiments of the present invention relate to a computer-readable memory medium, including commands, in particular, in the form of a computer program which, when executed by a computer, prompt the computer to carry out the method according to the specific embodiments.
Further preferred specific embodiments of the present invention relate to a computer program, including commands which, upon execution of the program by a computer, prompt the computer to carry out the method according to the specific embodiments.
Further preferred specific embodiments of the present invention relate to a data carrier signal, which transfers the computer program according to the specific embodiments.
Further preferred specific embodiments of the present invention relate to a use of the method according to the specific embodiments and/or of the device according to the specific embodiments and/or of the computer program according to the specific embodiments for at least one of the following elements: a) providing trust boundaries in the computing unit, in particular, also within a processor core of the computing unit, b) reducing an attack surface for attacks on the computing unit and/or on one of its components, c) limiting access rights to memories, d) limiting access rights to peripherals, e) limiting access rights to computing resources, f) minimizing an influence of a corrupted component, g) operating a control unit, in particular, for a vehicle, in particular, for a motor vehicle, h) operating an embedded system, in particular, an Internet of Things (IoT) system, i) operating an application-specific integrated circuit, ASIC, j) detecting a corrupted zone, k) initiating an error response, in particular, in the event of a detected compromise.
In further preferred specific embodiments of the present invention, the method and/or the device according to the specific embodiments may be used in a control unit, for example, in a control unit for a motor vehicle, in particular, in a control unit for an internal combustion engine of a motor vehicle, for example, for at least one of the following particular applications: a) controlling an operation or an operating state transition of the control unit, b) unblocking or blocking one or multiple functions of the control unit and/or of another component and/or for example, of the motor vehicle, c) switching into an error mode and/or emergency mode, d) carrying out an error memory entry, e) signaling an operating state to an external unit and/or to a user, f) activating an actuator.
Further preferred specific embodiments of the present invention relate to a use of the method according to the specific embodiments and/or of the device according to the specific embodiments and/or of the computer program according to the specific embodiments for checking at least one subarea of the memory unit for changes or manipulations, in particular, prior to or during or after a switch of the memory unit and/or of a computing unit accessing the memory unit, from a first operating state into a second operating state, and for controlling an operation, for example, a control unit of an internal combustion engine of a motor vehicle as a function of the check.
Further features, applications and advantages of the present invention result from the following description of exemplary embodiments of the present invention, which are represented in the figures. All features described or represented form the subject matter of the present invention or in arbitrary combination, regardless of their wording or representation in the description or in the figures.
Preferred specific embodiments relate to a method for operating computing unit 100, which includes the following steps, cf. the flowchart of
In further preferred specific embodiments, trust boundaries may be defined, for example, as a result, for example, between trustworthy and non-trustworthy instances/units/domains. In this way, for example, first application programs for the computing unit may be assigned to a non-trustworthy first zone (NTZ) and second application programs for the computing unit may be assigned to a trustworthy second zone (TZ).
In further preferred specific embodiments, it is provided that computing unit 100 (
In further preferred specific embodiments, for example, first processor core 102a is assigned to a first zone Z1 which may, for example, represent a non-trustworthy zone, and second processor core 102b is assigned to a second zone Z2, which may, for example, represent a trustworthy zone.
In further preferred specific embodiments, third processor core 102c, for example, is assigned to both first zone Z1 as well as to second zone Z2, see
In further preferred specific embodiments, computing unit 100 according to
In further preferred specific embodiments, it is provided that the method for operating computing unit 100 (
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, use 232′ (
In further preferred specific embodiments, cf.
In further preferred specific embodiments, the first operating mode may also be referred to as “supervisor mode.” The “supervisor mode” may thus preferably represent a privileged state, in which the relevant processor core 102a is able to carry out a configuration of the at least one memory protection unit M1, M2, . . . , M5_8.
In further preferred specific embodiments, the configuration data for the at least one memory protection unit M1, M2, . . . M5_8 may be provided, for example, in the form of special function registers (SFR), in particular, configuration registers 1036, which are potentially also at least temporarily accessible via bus system 101, preferably by controlling a corresponding memory protection unit M5_6. In other words, in further preferred specific embodiments, special function registers (SFR), in particular, configuration register 1036, may be provided, for example, for the configuration data of the at least one memory protection unit M1, M2, . . . , M5_8.
In further preferred specific embodiments, it is provided, cf.
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, it is provided that at least one processor core 102a assumes a particular operating mode such as, for example, the supervisor mode within the scope of dedicated system states, for example, in a start cycle and/or during particular events, for example when entering into an interrupt service routine (ISR), which may take place, for example, in a hardware-controlled manner.
In further preferred specific embodiments, at least one further non-privileged operating mode is provided for one or for multiple, preferably for all processor cores (“non-privileged mode”), which in further preferred specific embodiments may also be referred to as “user mode.” In the user mode, configuration data KD, 1036 are preferably not writable for the at least one memory protection unit M1, M2, . . . , M5_8. In other words, in further preferred specific embodiments, a processor core that is currently in the user mode, is unable to write or to change configuration data KD, 1036 for the at least one memory protection unit M1, M2, . . . , M5_8, whereas a processor core that is presently in the supervisor mode is able to write or to change configuration data KD, 1036 for the at least one memory protection unit M1, M2, . . . , M5_8.
In further preferred specific embodiments, it is provided that application programs AP1, AP2 are executed in a non-privileged mode, for example, in the user mode.
In further preferred specific embodiments, three operating modes or operating states or modes, for example, may be provided, for example: first a supervisor mode, second a “user mode 1,” in particular for non-trustworthy zone(s), third, a “user mode 2,” in particular, for trustworthy zone(s).
In further preferred specific embodiments, static configuration data KD2 may be active, for example, in user mode 1 and, for example, a first application program AP1 runs.
In further preferred specific embodiments, static configuration data KD3 may be active, for example, in user mode 2 and, for example, a second program AP2 runs.
In further preferred specific embodiments, static configuration data KD1, for example, are active in the supervisor mode, the supervisor mode being used, for example, (optionally solely) for switching between static configuration data KD2 and static configuration data KD3.
In further preferred specific embodiments, user modes 1 and 2 are unable to switch between static configuration data KD1, KD2, KD3, KD4.
In further preferred specific embodiments, (only) two modes (for example, supervisor mode and user mode) may, for example, also be provided. Accordingly, in further preferred specific embodiments, for example, the supervisor mode may be assigned to the trustworthy mode and, for example may carry out the switch between configuration data KD1 and configuration data KD2, as well as, if necessary, executing second application program AP2, for example.
In further preferred specific embodiments, for different operating modes or operating states (for example, privileged and non-privileged mode or supervisor mode, user mode), specific read rights and/or write rights and/or execution rights, for example, to memory or memories 1030, 1032 are granted for the respective operating mode, which is implementable in further preferred specific embodiments, for example, by providing different sets of configuration data KD (“configuration data sets”).
In further preferred specific embodiments, operating mode-specific and/or application-specific read rights and/or write rights and/or execution rights are granted for different combinations of operating mode(s) including respective application programs, which is implementable in further preferred specific embodiments, for example, also by providing different sets of configuration data KD (“configuration data sets”). Thus, for example, read rights and/or write rights and/or execution rights adapted in each case to the relevant application program AP1, AP2 may be granted, for example, for the user mode for different application programs AP1, AP2 (
In further preferred specific embodiments, one or multiple, preferably all of memory protection units M1, M2, . . . , M5_8 mentioned by way of example include multiple configuration data sets which, in further preferred specific embodiments, may be preferably efficiently assigned to different modes and application programs AP1, AP2.
In further preferred specific embodiments, a switch may be efficiently made, in particular, in a hardware-controlled manner, between the configuration data sets for the relevant modes or operating modes, for example, during a change between privileged or non-privileged modes (for example, a change from supervisor mode to user mode or vice versa) or between application programs, in particular, in a non-privileged mode.
In further preferred specific embodiments, computing unit 100, 100a (
In further preferred specific embodiments, the configuration data define, for example, which memory addresses a component of computing unit, for example, a processor core, may access in terms of reading and/or writing and/or executing. The memory protection unit in further preferred specific embodiments may be designed to compare accesses (reading and/or writing and/or executing) instantaneously executed by the relevant processor core with the content of the configuration data, and, for example, if they conform, to allow or prevent the relevant accesses or vice versa.
In further preferred specific embodiments, the aforementioned, preferably static, configuration data sets for the dedicated memory protection units M1, M2, M3, M4, for example for the user mode, may correlate with zones Z1, Z2 according to the specific embodiments.
In further preferred specific embodiments, in particular, in the case of a so-called “inter-core-zone-separation,” only application programs of a particular zone Z2 (for example, including the same trust level) are executed on a particular processor core 102a (
In further preferred specific embodiments, in particular, in the case of a so-called “intra-core-zone-separation,” application programs of two zones Z1, Z2, including, for example, two different trust levels each, are executed on a particular processor core 102c (
In further preferred specific embodiments, cf.
In further preferred specific embodiments, such a proxy AP1_I2 for the relevant further zone Z2 is able to cover relevant (sub)functionalities. In further preferred specific embodiments, a proxy is also able, if necessary, to include multiple subcomponents.
In further preferred specific embodiments, computing unit 100, 100a may execute, for example, the following scenario: if a first application program AP1 is to receive data from a, for example, non-trustworthy first zone Z1—for example, remote service requests from the Internet—and to accordingly process or forward these data within trustworthy zone Z2—for example, for executing the corresponding service (“remote service”)—the reception of the data takes place within first zone Z1 by Z1 proxy AP1_I1 of application program AP1, the corresponding Z2 proxy AP1_I2, for example, carrying out the following steps: a data verification of the data classified by Z2 proxy AP1_I2, in particular, by default as non-trustworthy and—in the event of a successful data verification—the processing or forwarding of the data now classified (according to the data verification) as trustworthy within second zone Z2.
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, it is provided that the method further includes, cf.
Multiple proxies PXY are also depicted in
In further preferred specific embodiments, at least one of subareas TB1, TB2 may in turn be subdivided into different areas TB1a, TB1b or TB2a, TB2b, area TB1a, for example, corresponding to a non-trustworthy area of first subarea TB1, area TB1b corresponding to a trustworthy area of first subarea TB1 area TB2a corresponding to a trustworthy area of second subarea TB2 and area TB2b corresponding to a non-trustworthy area of second subarea TB2. In further preferred specific embodiments, a separation of subareas TB1, TB2 or of different areas TB1a, TB1b or TB2a, TB2b may be provided with the aid of at least one memory protection unit.
In further preferred specific embodiments, cf.
In further preferred specific embodiments, it is provided that the method further includes: using 292 an operating system BS for embedded systems, in particular, a lightweight embedded operating system BS, for assigning computing time resources for different application programs AP1, AP2 and/or for instances AP1_I1, AP2_I2 of application programs, in particular, one processor core each of computing unit 100, 100a being assigned an operating system BS, see
In further preferred specific embodiments, it is provided that the method alternatively or in addition to step 292 according to
In further preferred specific embodiments, it is provided that operating system BS and/or supervisor SV executes or execute an assignment of computing time resources, preferably only, for predefined tasks (application programs and/or instances of application programs and/or parts thereof), in particular, using a static (non-changeable) task list. In other words, in further preferred specific embodiments, a scheduling of predefined tasks only is possible, which further increases the security.
In further preferred specific embodiments, it is provided that operating system BS (
In further preferred specific embodiments, it is provided that upon entering into an interrupt routine, configuration data for at least one memory protection unit M1, M2, . . . , SSE are changed, in particular, in a hardware-controlled manner.
In further preferred specific embodiments, lightweight embedded OS BS (
In further preferred specific embodiments, lightweight embedded OS BS and the lightweight embedded supervisor include, in particular, at least one of the following properties:
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, it is provided that the error response or initiation 305 of the error response includes at least one of the following elements, cf.
In further preferred specific embodiments, the IDS may, for example, also include a distributed implementation, first sub-functionalities (such as, for example, IDS sensors and, if necessary, an IDS master), for example, being implemented or carried out on a or on the computing unit or on at least one processor core of the computing unit and, in particular, other parts or further subfunctionality(ies) being implemented in another device, for example, in a backend. In further preferred specific embodiments, the backend may, for example, also be designed to implement at least one of the following aspects: a) in-depth expert analysis, b) artificial intelligence (KI), c) machine learning (ML), etc.
In further preferred specific embodiments, cf.
In further preferred specific embodiments, it is provided that only that processor core 102a, 102b, 102c, 102n to which a dedicated memory protection unit M1, M2, M3, M4 has been provided (cf. step 231 from
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, persistence 326, 328 may, for example, include a provision of the program code useable for the configuration of the at least one memory protection unit or of the configuration data in a read-only memory, for example, in a ROM or an OTP (one-time programmable memory).
In further specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, it is provided that the method further includes, cf.
In further preferred specific embodiments, it is provided that the method further includes at least one of the following elements, cf.
Further preferred specific embodiments, aspects and advantages of the principle according to the specific embodiments are described below with reference to
In further preferred specific embodiments, interrupt service routine ISR1 according to
Flash symbol IRQ′ in
In further preferred specific embodiments, interrupt service routine ISR2 according to
In further preferred specific embodiments, a test pattern or pattern may be written into the volatile memory powered, in particular, in a power-down mode as part of a cold start to be run through at least once. Thus, due to the aforementioned power, the aforementioned test pattern or pattern is maintained in the volatile memory per se. This RAM pattern in further preferred specific embodiments is checked in at least one, in particular, in each, start cycle of a system state machine (state machine, which is useable in further preferred specific embodiments, for example, for controlling system states), and a cold start (for example, when the RAM pattern is not present) or a warm start (for example, when the RAM pattern is present) may be carried out, in particular, as a function of the existence of the test pattern.
Thus, in further preferred specific embodiments, an integrity and authenticity of the volatile memory powered in the power-down mode or its data and functionalities contained or situated therein (for example, processor core 102c and/or configuration data of the memory protection unit, in particular, for the first and/or second zone and/or a program code) as part of the preceding cold start necessarily to be run through at least once (secure boot and/or start from OTP memory—see above) is ensured.
Thus, in further preferred specific embodiments, an invalid manipulation of the data and functionalities situated in the volatile memory powered in the power-down mode and of the RAM pattern implies an at least temporary power interruption and thus an erasure of the volatile memory (RAM pattern, etc.) powered in the power-down mode. In further preferably specific embodiments, the system state machine would accordingly initiate, in particular, automatically, a cold start (secure boot and/or start from OTP—see above) as part of the start cycle due to the missing RAM pattern, with which the integrity and authenticity of the volatile memory powered in the power-down mode or its data and functionalities prior to its use or execution is ensured.
In further preferred specific embodiments, it is provided that with the existence of the test pattern, for example, within the scope of a warm start, selected time-critical SW instances are not checked prior to their execution, (i.e., for example, in particular, no secure boot), but, if necessary, only at the runtime after their execution. In this way, a startup time for time-critical SW instances during the warm start is advantageously accelerated. The integrity and authenticity during the warm start is thus advantageously ensured in further preferred specific embodiments implicitly by the availability of the test pattern (and thus the check during the previous cold start) even without an explicit check during the warm start. Non-time-critical components in further specific embodiments may also be checked during the warm start explicitly prior to their execution (for example, with the aid of a secure boot process).
Block 102a_1 symbolizes by way of example first processor core 102a of the computing unit (
Arrow a1 symbolizes a boot process (power-up of computing unit 100a, for example, from a fully deactivated state). Arrow a2 symbolizes a configuration of at least one memory protection unit, in particular, of a central memory protection unit M5_1, M5_2, . . . , M5_8 or of one assigned to bus system 101 (
Arrow a3 symbolizes a start of the boot manager for processor core 102c, cf. also block 111.
Arrow a4 symbolizes a configuration of at least one dedicated memory protection unit M3 (
Arrow a7 also symbolizes an optional verification of processor core 102c in the context of a cold start 310′. In further preferred specific embodiments, optional verification a7 may be carried out with the aid of cryptographic methods, for example, based on CMACs and/or on signed hash values. Arrow a8 symbolizes a start of the boot manager for processor core 102c, similar to arrow a3, cf. also block 111. Arrow a9 symbolizes, in particular, similar to arrow a4, the configuration of the at least one dedicated memory protection unit M3 (
Arrow all symbolizes an optional verification of multiple, preferably of all, processor cores 102a, 102b, . . . , 102n. Arrow a12 symbolizes a start of the boot manager for processor core 102n, cf. also block 115. Arrow a13 symbolizes the configuration of at least one dedicated memory protection unit for processor core 102n. Arrow a14 symbolizes the start of an execution 116 of program code by processor core 102n.
Arrow a15 symbolizes a start of the boot manager for processor core 102b. Arrow a16 symbolizes the configuration of at least one dedicated memory protection unit for processor core 102b.
Arrow a17 symbolizes the start of an execution 114 of program code by processor core 102b.
Arrow a18 symbolizes a start of the boot manager for processor core 102a. Arrow a19 symbolizes the configuration of at least one dedicated memory protection unit for processor core 102a.
Arrow a20 symbolizes the start of an execution 102a_3 of program code by processor core 102a.
First instances of various application programs, which are identified in
In further preferred specific embodiments, send tasks, i.e., tasks or application programs or parts of application programs for sending out messages, are planned (“scheduling”).
In further preferred specific embodiments, interrupt requests that characterize the reception of a message (“Rx IRQ,” receive interrupt request) are processed with a higher priority than other interrupt requests, which are triggered, for example, by timers and/or application programs or by software in general.
In further preferred specific embodiments, incoming interrupt requests are prioritized simultaneously or within a predefinable first time range, for example, as a function of the source of the interrupt request (incoming message, timer, software) and/or as a function of one or of multiple other or further criteria.
In further preferred specific embodiments, such a prioritization may be carried out, for example, by a control unit for interrupt requests (interrupt controller).
In further preferred specific embodiments, the switching of the context, cf., for example, step e23 of
The aspects described by way of example above with reference to
The further aspects described above by way of example with reference to
In further preferred specific embodiments, first processor core K1 is assigned to two zones Z1, Z2. In further preferred specific embodiments, fourth processor core K4 is also assigned to two zones Z1, Z2.
In further preferred specific embodiments, first processor core K1 is assigned an application program for sending and/or receiving CAN messages, reference numeral I1 in
In further preferred specific embodiments, interrupt requests Rx, TIM_SW described by way of example above with reference to
In further preferred specific embodiments, fourth processor core K4 is assigned an application program for sending and/or receiving Ethernet messages, reference numeral I1′ in
In further preferred specific embodiments, a separation of the two zones Z1, Z2 is achieved within processor cores K1, K4, each using at least one memory protection unit SSE1, SSE4.
As previously mentioned above, the two application cores K2, K3 are designed to execute application programs, which, or individual instances thereof, are indicated in
In further preferred specific embodiments, computing unit 100b includes a volatile memory, in particular, a working memory (RAN) 1030b which, similar to the representation according to
For example, a first area B1 of working memory 1030b of computing unit 100b according to
Further areas B2, B3 of working memory 1030b in further preferred specific embodiments are assignable, for example to application cores K2, K3. In further preferred specific embodiments, area B2, for example, is further divisible into a trustworthy area B2′ and into a non-trustworthy area B2″. The same may similarly apply in further preferred specific embodiments also for third application core K3, cf. reference numerals B3′, B3″.
In further preferred specific embodiments, one or multiple further memory protection units, which are identified collectively in
In further preferred specific embodiments, computing unit 100b according to
Block ISR6 represents by way of example an interrupt service routine, which is executable, for example, in the case of at least one of the following interrupt requests: a) reception of a message “Rx,” b) signaling a timer, c) interrupt request “SW” generated with the aid of software. Block T_RX_Z1 represents by way of example, a task (for example, part or an instance of an application program), which is assigned to zone Z1 and is carried out upon receipt “Rx” of a message, similar to instance I1 of first processor core K1 of computing unit 100b according to
Arrow a30 represents an interrupt request, triggered by the reception of a (CAN) message, which interrupts, in particular, the processing of an instantaneously running task, cf. send task T_TX_Z2, cf. arrow a30′. As a result, receiver task T_RX_Z1 is called up in further preferred specific embodiments by interrupt service routine ISR6, cf. arrow a31. After receiver task T_RX_Z1 is carried out, it branches out, preferably with the aid of a software interrupt request (software interrupt) a32, in turn, to interrupt service routine ISR6, which then continues previously interrupted send task T_TX_Z2, cf. arrow a33. Upon occurrence a34 of an interrupt request (timer IRQ) generated by a timer, interrupt service routine ISR6 calls up send task T_TX_Z1, cf. arrow a35, which results in interruption a34′ of previously running send task T_TX_Z2.
From the diagram according to
First processor core K1 according to
Arrow A1 represents the reception of a CAN message, which triggers a processing by instance I1 of a corresponding application program of first processor core K1. Instance I1, which is assigned to first zone Z1, transfers data of the received CAN message or data derived therefrom via the working memory, cf. arrow A2, to an instance I5 of an application program for processing such data, which is assigned to first zone Z1, and is executable by third processor core K3, cf. arrow A3. Reference numeral I6 from
In further preferred specific embodiments, a, in particular, in-depth (in terms of a DPI), payload analysis is carried out, for example, by instance I6′ (“Z2-DPI proxy,” i.e., proxy assigned to second zone Z2 for carrying out DPI methods), instance I6 (“Z1-DPI proxy,” i.e., proxy assigned to first zone Z1 for carrying out DPI methods) being responsible for copying the data in B3″.
After an optional further processing of the data by second processor core K2, cf. arrow A7, the data or data derived therefrom are written by an instance I5′ into memory area B1_2 of working memory 1030b, cf. arrow A8, from which instance I4, which is designed, for example, to send CAN messages and which is assigned to second zone Z2, and which is executable by CAN core K1, removes the data and, for example, sends them out again to the CAN bus, cf. arrow A10.
The scenario described by way of example above with reference to
It is apparent from
These data are then read in by application core K2 assigned to second zone Z2, cf. arrow A16, processed, cf. arrow A17, and written into further memory area B1_2, cf. arrow A18. The data from CAN core K1 are then read in (arrow A19) from further memory area B1_2, by instance I4 (part of an application program of sending out CAN messages) processed and sent out on the CAN bus (not shown), cf. arrow A20.
In further preferred specific embodiments, hardware security module HSM represents an autonomous (“on-chip”) module, which is situated preferably on the same semiconductor substrate or die (chip) as the computing unit. Hardware security module HSM preferably includes a separate processor core (not shown) and, if necessary, a separate memory, etc.
In further preferred specific embodiments, a crypto-stack KS is provided, which is useable for communicating between the processor cores of the computing unit and hardware security module HSM. In further preferred specific embodiments, this crypto-stack KS is implemented, in particular, for security reasons, solely on processor core K2′, since in the present case processor core K2′ represents by way of example the only processor core of the computing unit, which is assigned exclusively to trustworthy zone Z2. Thus, processor core K2′ in further preferred specific embodiments may be viewed as the “most secure core.” Arrows A31, A32, A33, A34, A35, A36 represent by way of example, the following steps: receiving (A31) an Ethernet message, storing (A32) the received message in area B3′, loading (A33) this message by an application program of third processor core K3, processing (A34) the loaded message by third processor core K3, writing (A35) the data obtained in the processing into memory area B3″, loading (A36) the written data from memory area B3″ via an application program, which is executable on second processor core K2.
In further preferred specific embodiments, second processor core K2 processes the loaded data, in particular, also using hardware security module HSM, cf. arrow A37. Processing A37 may include, for example, an encryption of data. Processed data A38 are then written (A38) in memory area B1_2. The data are subsequently loaded (A39) by the instance of CAN core K1 from memory area B1_2 and sent to the CAN bus.
In further preferred specific embodiments, second zone Z2 includes only read rights but, in particular, no write rights and/or execution rights to memory area B3″. In further preferred specific embodiments, this may apply correspondingly, for example, also in the configurations described by way of example above with reference to
In further preferred specific embodiments, complete memory images (“ECU image”) 1033a for at least one processor core or for the entire computing unit and/or for a corresponding control unit may, for example, also be stored at least temporarily in external memory 1033.
In further preferred specific embodiments, the content of data stored in external memory 1033 may, for example, be checked or validated by an application program executable by second processor core K2″ or by a corresponding instance thereof.
In further preferred specific embodiments, for example, after a successful validation of the data contained in external memory 1033, a corresponding memory image 1033a may be distributed to one or to multiple external devices (not shown), cf. arrows A49, A50, A51, A52, which involve, among other things, a, for example, block-wise copying of memory image 1033a from external memory 1033a into memory area B1_2 of working memory 1030b (A50) and from there to instance I4 (for example, CAN send task).
In further preferred specific embodiments, the validation may be preferably carried out based on digital signatures and/or signed hash values. In further preferred specific embodiments, for example, a signed hash value may exist for each ECU image. In further preferred specific embodiments, a signature verification may be carried out preferably via hardware security module HSM.
In further preferred specific embodiments, a preferably again block-wise check of a CMAC value and/or of another value, which enables a check of the integrity and/or authenticity of the relevant blocks, may also take place during the distribution or copying of memory image 1033a, for example, controlled by corresponding instances of application programs run, for example, on second processor core K2″, optionally supported by hardware security module HSM.
In further preferred specific embodiments, a formation and verification of, for example, CMAC values may function, in particular, as additional integrity protection and authenticity protection, for example, for signature verification. In further preferred specific embodiments, a single data packet or every single data packet from buffer B3″ may be provided with a CMAC value or a truncated CMAC value. This/these data packet(s) is or are verified in further preferred specific embodiments, for example, before a transfer into buffer B1_2, as a result of which, it is ensured, in particular, that only data packets that are integral and authentic enter into buffer B1_2. In further preferred specific embodiments, a buffer-wise CMAC generation and verification is optional.
Block ISR7 represents by way of example an interrupt service routine, which is executable, for example, in the case of interrupt requests that signal (“Rx ISR”) the reception of a message (“Rx”).
Block ISR8 represents by way of example an interrupt service routine, which is executable, for example, in the case of at least one of the following interrupt requests: a) signaling a timer, b) interrupt request (“SW ISR”) generated with the aid of software.
Block RX_H_Z1 represents by way of example a receive handler (for example, part or instance of an application program that controls the receipt of a message), which is assigned to zone Z1 and is executed upon receipt (“Rx”) of a message, similar to instance I1 of first processor core K1 of computing unit 100b according to
Block RX_H_Z2 represents by way of example a receive handler (for example, part or instance of an application program that controls the receipt of a message), which is assigned to zone Z2 and is executed upon receipt (“Rx”) of a message, similar to instance 12 of first processor core K1 of computing unit 100b according to
Block T_TX_Z1′ represents by way of example a task, which is assigned to zone Z1 and is executed when sending a message, similar to instance I3 of first processor core K1 of computing unit 100b according to
Arrow a40 represents an interrupt request, triggered by the receipt of a (CAN) message, which interrupts, in particular, the processing of an instantaneously running task, cf. send task T_TX_Z2′, cf. arrow a40′. As a result, receive handler RX_H_Z1 is called up in further preferred specific embodiments by interrupt service routine ISR7, cf. arrow a41. After the execution of receive handler RX_H_Z1, the latter returns to interrupt service routine ISR7 (for example, preferably via an interrupt request generated with the aid of software), arrow a42.
According to the example according to
With the occurrence a44 of an interrupt request (timer IRQ) generated by a timer, interrupt servicer routine ISR7 calls up send task T_TX_Z2′, cf. arrow a45, which results in interruption a44′ of previously running send task T_TX_Z1′. A switch to the static configuration (for example, the corresponding configuration data set) of zone Z2 takes place preferably before the execution of send task T_TX_Z2′. The sequence then returns, for example, with the aid of a software interrupt a46, to interrupt service routine ISR7, whereupon send task T_TZ_Z1′ is continued, cf. arrow a47.
In further preferred specific embodiments, interrupt service routine ISR7 according to
Further preferred specific embodiments, aspects and advantages of the principle according to the specific embodiments are described below, which—according to further preferred specific embodiments—are each combinable individually per se or in combination with one another with at least one of the above described specific embodiments.
In further preferred specific embodiments, a limitation of the access rights to memory 1030a, for example, according to
In further preferred specific embodiments, an exchange of data between various zones (“intra- and/or inter-zone data exchange”), may be implemented, for example, via a buffer situated in a shared RAM (divided working memory, cf. reference numeral 1030a from
In further preferred specific embodiments, for example, at least one trusted buffer and non-trusted buffer each may be provided (depending on the particular application, buffers may optionally be omitted) per instance I1, I2, I3 (“proxy”) of an application program and per zone, cf. for example, subareas TB1a, TB1b from
In further preferred specific embodiments, a data exchange within a zone or the intra-zone communication takes place, in particular, exclusively via trusted buffer TB2a (
In further preferred specific embodiments, a data exchange between zones or the inter-zone communication takes place preferably via non-trusted buffer TB1a situated in shared RAM 1030a. If in further preferred specific embodiments, for example, data are transferred from zone Z1 to zone Z2, then these are preferably initially copied by a Z1 proxy in associated Z1 non-trusted buffer, substantively verified by associated Z2 proxy regarding their validity and, in the case of valid or substantively correct trustworthy data, copied by Z2 proxy in the Z2 trusted buffer. The copying process after successful data verification by Z1 non-trusted buffer after Z2 trusted buffer is referred to in further preferred specific embodiments as zone transition. The verified, trustworthy data that is located in the Z2 trusted buffer may be correspondingly processed or forwarded within Z2 in further preferred specific embodiments, i.e., the data verification takes place in further preferred specific embodiments prior to the zone transition and, if necessary prior to data utilization.
One further measure for limiting the attack surface of the computing unit according to the specific embodiments is the limitation of the access rights to runtime according to further preferred specific embodiments, which may take place in further preferred specific embodiments, for example, under the control of a corresponding operating system BS or supervisor SV.
In further preferred specific embodiments, an AUTomotive Open System ARchitecture (AUTOSAR) BS, for example, which is reduced in further preferred specific embodiments to a minimum with respect to its complexity (for example, via configuration, etc.), may function as a basis for the lightweight embedded operating system BS, for example, according to
In further preferred specific embodiments, no invalid zone transition or invalid access of Z1 to Z2 memory or runtime may take place, even in the case of an escalation of privileges—for example, abuse of supervisor mode in lightweight embedded OS ISR emanating from a compromised processor core 102a (
In further preferred specific embodiments, an ISR (interrupt service routine) running in the supervisor mode is able to switch only between the static configuration data sets for the dedicated memory protection unit for the relevant processor core→identical static configuration data sets for supervisor mode and user mode of the processor core in further preferred specific embodiments allow access solely to memory and/or runtime, which are assigned to a relevant zone, for example, to first zone Z1.
In further preferred specific embodiments, an ISR running in the supervisor mode is unable to carry out any dynamic reconfiguration of the memory protection unit, this is, in particular, implicitly achievable by a static, integral and authentic configuration of the memory protection unit(s) during a start cycle, for example, during a cold start and/or during a warm start.
In further preferred specific embodiments, a task running in the user mode, which is assigned, for example, to first zone Z1, is not able to switch between static configuration data sets of memory protection unit dedicated for one particular processor core, because this switch in further preferred specific embodiments is possible only in the supervisor mode.
In further preferred specific embodiments, a task running in the user mode, which is assigned, for example to first zone Z1, is unable to carry out any dynamic reconfiguration of the memory protection unit(s), which in turn is advantageously implicitly achievable by a static, integral and authentic configuration of the memory protection unit(s) provided in further preferred specific embodiments during the start cycle, i.e., for example, during a cold start and/or during a warm start.
In further preferred specific embodiments, a supervisor SV, in particular a lightweight embedded supervisor, may have additional monitoring functionalities with respect to the operating system BS, in particular, to the lightweight embedded operating system. In the case of an intra-core-zone-separation (
In further preferred specific embodiments, it may be provided that the supervisor mode, in particular, in the context of an intra-core-zone-separation, controls a monitoring of a non-trustworthy zone Z1, cf., for example, the sequence according to
In further preferred specific embodiments, 3 or more zones Z1, Z2, Z3 (not shown), for example, may be provided, first zone Z1 being, for example, a highly trustworthy/highly-confidential zone, second zone Z2 being, for example, a trustworthy zone, and third zone Z3 being, for example, a non-trustworthy zone.
In further preferred specific embodiments, the computing unit may, for example, include a microcontroller or may be formed by a microcontroller including a corresponding number of processor cores.
According to studies by the inventors, the attack surface on computer units, for example, of control units and/or of embedded systems increases drastically in the context of highly-networked, modern vehicles, in particular due to the diverse external interfaces. Specifically, the risk of a so-called remote attack, i.e., a compromise, for example, via the Internet without physical access to the vehicle or to the computing unit exists. The principle according to the preferred specific embodiments may be advantageously used for the efficient mitigation of such remote attacks and/or of other attacks on a computing unit.
Further preferred specific embodiments relate to a device 1000 for carrying out the method according to the specific embodiments, cf. the schematic block diagram according to
Device 1000 further includes a memory unit 1004, which preferably has a volatile memory 1004a, for example, a working memory (RAN), and/or a non-volatile memory 1004b, for example, a flash EEPROM and/or a ROM and/or an OTP memory. A computer program PRG is preferably stored in ROM 1004b, which includes commands which, upon execution of program PRG by a computer 1002, prompt the computer to carry out the method according to the specific embodiments.
In further preferred specific embodiments, configuration data CFG for the operation of device 1000 are also stored in ROM 1004b. These configuration data CFG may also include, for example, one or multiple configuration data (sets) KD, KD′, KD1, KD2, KD3, KD4 for (the) at least one memory protection unit 1002a′.
In further preferred specific embodiments, it is provided that device 1000 includes at least one data bus 1006, which enables a data exchange between computing unit 1002 and memory unit 1004.
Further preferred specific embodiments relate to a computer-readable memory medium SM, including commands, in particular, in the form of a computer program PRG which, upon execution by a computer 1002, prompt the computer to carry out the method according to the specific embodiments.
Further preferred specific embodiments relate to a data carrier signal DS, which transfers computer program PRG according to the specific embodiments. Device 1000 may preferably include a, preferably bidirectional, data interface 1008 for receiving data carrier signal DS.
In further preferred specific embodiments, computing unit 1002 may also include a configuration according to computing unit 100, 100a, as described by way of example above with reference to, among others,
In further preferred specific embodiments, device 1000 also includes a hardware security module HSM′ or cryptography module HSM′, for example, for carrying out cryptographic functions.
In further preferred specific embodiments, it is provided that device 1000 is designed as a microcontroller or microcontroller unit (MCU), in particular, as a single microcontroller (single MCU) or as a one-chip system (system-on-chip, SoC), in particular, as a single SoC.
In further preferred specific embodiments, it is provided that device 1000 includes a, in particular, shared semiconductor substrate 1001 (die), at least one of the following elements being situated on the, in particular, shared semiconductor substrate 1001: a) computing unit 1002 including at least one processor core, b) memory unit 1004, c) data bus 1006, d) the at least one memory protection unit 1002a, d) (optional) hardware security module HSM′.
The principle according to preferred specific embodiments thus advantageously enables a single MCU system 1 or single SoC system 1 to be provided, with simultaneous separation into two or more zones Z1, Z2.
In further preferred specific embodiments, an exchange of data between the various zones (“intra- and/or inter-zone data exchange”) may be implemented, for example, via a buffer situated in a shared RAM (divided working memory, cf. reference numeral 1030a from
Preferred specific embodiments advantageously enable the “arrangement” of different zones Z1, Z2, for example, trustworthy (TZ) and non-trustworthy (NTZ) zones, and/or a data processing with respect to the data of different zones Z1, Z2 on the same, preferably single, MCU, or SoC system 1.
In further preferred specific embodiments, the method and/or device 100, 100a, 1000 according to the specific embodiments may be used in a control unit, for example, a control unit for a motor vehicle, in particular, a control unit for an internal combustion engine of a motor vehicle, for example, for at least one of the following particular applications: a) controlling an operation or operation state transition of the control unit, b) unblocking or blocking one or multiple functions of the control unit and/or of another component and/or, for example, of the motor vehicle, c) changing into an error mode and/or emergency operation, d) carrying out an error memory entry, e) signaling an operating state to an external unit and/or to a user, f) activating an actuator.
Further preferred specific embodiments relate to a use of the method according to the specific embodiments and/or of device 100, 100a, 1000 according to the specific embodiments and/or of computer program PRG according to the specific embodiments, for checking at least one subarea of memory unit 1030, 1032, 1004 for changes or manipulations, in particular, prior to or during or after a change of the memory unit, and/or of computing unit 100, 100a, 1002 accessing the memory unit, from a first operating state to a second operating state, and for controlling an operation, for example, of a control unit of an internal combustion engine of a motor vehicle as a function of the check. Further preferred specific embodiments, cf.
Number | Date | Country | Kind |
---|---|---|---|
10 2019 216 462.5 | Oct 2019 | DE | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2020/078884 | 10/14/2020 | WO |
Number | Date | Country | |
---|---|---|---|
20240134709 A1 | Apr 2024 | US |