WO2015140831A1 - 情報処理装置 - Google Patents

情報処理装置 Download PDF

Info

Publication number
WO2015140831A1
WO2015140831A1 PCT/JP2014/001564 JP2014001564W WO2015140831A1 WO 2015140831 A1 WO2015140831 A1 WO 2015140831A1 JP 2014001564 W JP2014001564 W JP 2014001564W WO 2015140831 A1 WO2015140831 A1 WO 2015140831A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
data
memory access
memory
control unit
Prior art date
Application number
PCT/JP2014/001564
Other languages
English (en)
French (fr)
Inventor
政明 武安
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2014/001564 priority Critical patent/WO2015140831A1/ja
Publication of WO2015140831A1 publication Critical patent/WO2015140831A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the present invention relates to an information processing apparatus that executes a plurality of application programs.
  • ECUs Electronic Control Units
  • functions that have been realized by a plurality of ECUs are integrated and functions that are executed by fewer ECUs are being integrated.
  • an application program hereinafter referred to as an application
  • an application an application program
  • Conventional information processing apparatuses have CPU hardware functions such as an MMU (Memory Management Unit) and an MPU (Memory Protection Unit).
  • the MPU divides a memory for storing data into a plurality of areas. By providing an access right to the memory, it is determined whether or not the user who accesses the memory can access, and a memory protection function is realized.
  • data stored in the memory by the application is received by receiving notification from the MMU or MPU via the OS (Operating System) and determining whether or not the OS can access the memory. Some have determined whether or not access is possible.
  • Patent Document 1 when an application writes data on a memory, the data and application information unique to the application, for example, a checksum and CRC (Cyclic Redundancy Check) are written.
  • CRC Cyclic Redundancy Check
  • Patent Document 1 when an application reads data from the memory, the data and application information are read from the memory, and when the application information does not match its own application identification information, means for discarding the read data is provided. providing.
  • a conventional information processing apparatus needs to have a CPU hardware function such as an MMU and an MPU and an OS. For this reason, cost increase occurred and it was difficult to realize cost reduction.
  • Patent Document 1 since processing related to protection of data stored in a memory area is always executed when data is written and read by an application, there is a problem that an application activation time of the entire system increases.
  • Patent Document 1 it is necessary to generate unique application information used for memory protection when an application writes data, and there is a problem that a response of data writing by the application is delayed.
  • Patent Document 1 since it is necessary to write identifier information for each data written by an application, there is a problem that a required memory amount increases.
  • the present invention has been made to solve the above-described problems.
  • the first application is used between a memory in which data is read and written by a plurality of applications and a continuous activation timing of the first application.
  • a memory access scheduling control unit that determines whether or not a second application with low importance has been activated, and calculates an error detection code when the memory access scheduling control unit determines that the second application has been activated When the error detection code calculation unit and the memory access scheduling control unit determine that the second application has not been started, the data requested by the first application is written to the memory.
  • the memory access A memory access control unit that writes data requested to be written from the first application to the memory together with the error detection code when the scheduling control unit determines that the second application is activated;
  • An information processing apparatus characterized by comprising:
  • the present invention can perform writing to protected data at high speed in an information processing apparatus that executes a plurality of application programs.
  • FIG. 1 is a hardware configuration diagram of the information processing apparatus according to the present embodiment.
  • the information processing apparatus 1 includes a CPU 2 and a memory 3 as main components.
  • the memory 3 is composed of a program memory 20 and a data area 30.
  • the program memory (program) 20 is a non-volatile memory such as a ROM (Read Only Memory).
  • the data storage area (memory) 30 is a storage device such as a RAM (Random Access Memory).
  • the information processing apparatus 1 may be any microcomputer as long as the CPU 2 has a configuration for executing a program.
  • FIG. 2 and 3 show an example of the program and memory configuration in the first embodiment.
  • FIG. 2 is a configuration diagram illustrating an example of a program stored in the program memory 20 of the present embodiment
  • FIG. 3 is a configuration diagram illustrating an example of a memory configuration allocated to the data storage area 30 of the present embodiment. .
  • a protection application 230 that protects a plurality of applications such as an application 1 (210) and an application 2 (220) and data read and written by these applications. It is included.
  • the protection application 230 is not only called when the application reads / writes data, but is also executed as pre-processing before the application is executed and as post-processing even after the application is executed. How the application and the protection application 230 operate in cooperation will be described after the configuration of the application 1 (210) and the protection application 230 is described.
  • data used by the program is stored in the data storage area 30, and in this embodiment, a memory area is allocated for each application that defines data requiring protection.
  • Data defined and used by the application 1 (210) is stored in the application 1 definition data storage area 301
  • data defined and used by the application 2 (220) is stored in the application 2 definition data storage area 302.
  • a memory area is described for each application that defines data that needs protection, but a dedicated memory area may not be allocated. Further, a temporary data area for temporarily storing data used by the protection application 230 is allocated. As shown in the figure, the temporary data area is duplicated with the temporary data area A303 and the temporary data area B304 to guarantee the data contents of the temporary data area.
  • This data temporary area may be only the data temporary area A303, or may be three or more.
  • a temporary data area C may be allocated.
  • allocating temporary data area C if all the data written in the temporary area is the same, or if any two data are the same, data is written from the temporary area to the application 1 definition data storage area. To do.
  • data is written from the temporary area to the application 1 definition data storage area when more than half of the data is the same.
  • FIG. 4 is a functional block diagram showing configurations of the application 1 (210) and the protection application 230 in the information processing apparatus according to the embodiment of the present invention.
  • the protection application 230 is called in response to a data write request and a data read request from the application 1 (210).
  • the protection application 230 is called before and after the application 1 (210) itself is called.
  • the protection application 230 may be called at the beginning and end of the processing of the application 1 (210).
  • the information processing apparatus 1 has a schedule function for controlling applications such as the application 1 (210) and the protection application 230, the schedule function is protected before and after the application 1 (210) itself is called. You may schedule to call the application 230.
  • not only the application 1 (210) but also a plurality of applications such as the application 2 (220) can be mounted on the program memory 20.
  • the configuration is the same when multiple applications are installed.
  • the application 1 (210) includes a processing unit 211, a data writing processing unit 212, and a data reading unit 213.
  • the processing unit 211 executes main processing of the application 1 (210) such as data calculation processing.
  • the processing unit 211 calls the data write processing unit 212 when writing data to the application 1 definition data storage area 301, and calls the data read processing unit 213 when reading data.
  • the data write processing unit 212 acquires the data write address and data content from the processing unit 211.
  • the data write processing unit 212 passes the acquired address and data content to the protection application 230.
  • the data read processing unit 213 acquires an address from which data is read from the processing unit 211.
  • the data read processing unit 213 passes the acquired address to the protection application 230 and receives data.
  • the protection application 230 includes a data write acceptance unit 231, a data read acceptance unit 232, a temporary area access control unit 233, a memory access control unit 234, an error detection code calculation unit 235, a memory access determination unit 236, a memory Access information 237, a memory access scheduling control unit 238, and scheduling information 239 are provided.
  • the memory access scheduling control unit 238 is called before and after the application is executed.
  • the memory access scheduling control unit 238 is called before the application performs data write processing or data read processing.
  • the memory access scheduling control unit 238 refers to the scheduling information 239 and acquires the importance level of the application that has called itself. In addition, the memory access scheduling control unit 238 is lower than the importance of the application that called itself after the application (first application) that called itself is started last time until it is started this time. It is determined whether an application having the importance level (second application) is not activated.
  • the memory access scheduling control unit 238 calls the memory access determination unit 236 together with information called as preprocessing when an application having an importance level lower than the importance level of the application that called itself is activated.
  • the memory access scheduling control unit 238 is called after the application performs data write processing or data read processing.
  • the memory access scheduling control unit 238 calls the memory access determination unit 236 together with information called as post-processing.
  • the scheduling information 239 stores the operation order and importance of applications operating on the information processing apparatus 1.
  • FIG. 5 shows an example of the scheduling information 239.
  • the operation order of the applications operating on the information processing apparatus 1 is repeatedly held for a period, and an application identifier for identifying the application and the importance assigned to the application are stored.
  • the operation order is a sequence in which the order in which each application operates is held for repeated cycles.
  • Various scheduling algorithms for applications have been proposed. For example, there are rate monotonic scheduling and deadline monotonic scheduling as fixed priority scheduling.
  • the application operating on the information processing apparatus 1 determines the operation order based on the scheduling algorithm described above, and is repeatedly executed at a constant cycle. Examples of operation order of applications are shown in FIGS.
  • FIG. 6 shows information related to the operation order of applications in this example.
  • FIG. 7 is a time chart illustrating the activation cycle of the application shown in this example. As shown in FIG. 7, the application is repeatedly activated at a constant period based on the application activation period.
  • FIG. 5 shows the scheduling information 239 created based on this time chart.
  • the importance level mentioned here is, for example, when the information processing apparatus 1 is a control device mounted on a vehicle, the importance level of an application is defined by ISO 26262, which is a standard related to functional safety for electronic control devices of a vehicle.
  • ISO 26262 is a standard related to functional safety for electronic control devices of a vehicle.
  • the ASIL Automatic Safety Integrity Level
  • Other definitions may be applied.
  • ASIL is an index value related to unsafe risks possessed by electric and electronic control systems of automobiles, and high level safety measures are required in the order of QM, A, B, C, and D.
  • the data write accepting unit 231 accepts data write processing from the application 1 (210), and acquires an address and data in the application 1 definition data storage area 301 (first memory) to be written. Further, the data write acceptance unit 231 outputs information (application identifier) for identifying the application 1 (210), the acquired address, and data to the memory access determination unit 236.
  • the data read accepting unit 232 accepts data read processing from the application 1 (210), and acquires an address in the application 1 definition data storage area 301 to be read. In addition, the data read receiving unit 232 outputs information (application identifier) for identifying the application 1 (210) and the acquired address to the memory access determination unit 236.
  • the memory access determination unit 236 has the following four types of calls. (1. Write processing) The memory access determination unit 236 calculates the data size based on the application identifier, address, and data transmitted from the data write reception unit 231. In addition, the memory access determination unit 236 transmits the address, data, data size, and application identifier to the temporary area access control unit 233 and the memory access control unit 234. (2. Reading process) The memory access determination unit 236 determines whether the data to be read is written in the temporary area (second memory) by comparing the address transmitted from the data read reception unit 232 with the memory access information 237. . In addition, when the data to be read is written in the application 1 definition data storage area 301, the memory access determination unit 236 transmits an address to the memory access control unit 234.
  • the memory access determination unit 236 transmits the read data to the application 1 (210).
  • a checksum is used as information unique to an application, but a CRC may be used.
  • the memory access determination unit 236 transmits an address to the temporary area access control unit 233 when the data to be read is written in the temporary area. Further, when the data read from the plurality of temporary areas match, the memory access determination unit 236 transmits the read data to the application 1 (210).
  • the memory access determination unit 236 performs fail-safe processing (described later) when the data read from the plurality of temporary areas do not match.
  • the memory access determination unit 236 is called from the memory access scheduling control unit 238 together with information indicating preprocessing, and calls the memory access control unit 234. In addition, when the content of data read from the application 1 definition data storage area 301 is changed as a result of calling the memory access control unit 234, the memory access determination unit 236 performs fail-safe processing (described later). (4. Post-processing of data protection function) The memory access determination unit 236 is called from the memory access scheduling control unit 238 together with information indicating post-processing, and calls the temporary area access control unit 233.
  • the memory access determination unit 236 calls the data storage destination address based on the memory access information 218. Is determined to be a memory area permitted to be accessed by the application 1, and if access is permitted, the data in the data temporary area A303 and the data temporary area B304 are transmitted to the memory access control unit 234.
  • the memory access determination unit 236 calls the temporary area access control unit 233, and as a result, the data in the data temporary area A303 and the data temporary area B304 do not match, or the data storage destination address is accessed by the application 1. If this is not permitted, fail-safe processing (described later) is performed.
  • the memory access control unit 234 can be called in the following two types. (1. Data protection function pre-processing and read-out processing) The memory access control unit 234 is called from the memory access determination unit 236 as preprocessing or read processing. The memory access control unit 234 reads the data value and the error detection code from the application 1 definition data storage area 301 that stores data defined by the application 1 (210). Further, the memory access control unit 234 transmits the data value and the error detection code to the error detection code calculation unit 235. Further, the memory access control unit 234 determines whether or not the content of the data read from the application 1 definition data storage area 301 is changed as a result of calling the error detection code calculation unit 235.
  • the memory access control unit 234 returns the determined result to the memory access determination unit 236.
  • the memory access control unit 234 is called from the memory access determination unit 236 as post-processing or write processing.
  • the memory access control unit 234 writes in the application 1 definition data storage area 301 based on the data transmitted from the memory access determination unit 236.
  • the memory access control unit 234 activates the error detection code calculation unit 216 after writing the data, and calculates a checksum from all data in the application 1 definition data storage area 301. Further, the memory access control unit 234 writes the checksum value in the application 1 definition data storage area 301 after calculating the checksum.
  • the temporary area access control unit 233 is called in the following two types. (1. Write processing) The temporary area access control unit 233 stores the data storage address of the application 1 (210) in the data temporary area A303 and the data temporary area B304 based on the address, data, data size, and application identifier input from the memory access determination unit 236. Store data values and app identifiers. (2. Post processing and post processing of data protection function) The temporary area access control unit 233 reads data from the data temporary area A303 and the data temporary area B304 based on the address and application identifier input from the memory access determination unit 236. Further, the temporary area access control unit 233 transmits the read data to the memory access determination unit 236.
  • the memory access information 237 holds information on an address to which the application 1 definition data storage area 301 is allocated (whether or not the memory is permitted to be accessed by the application 1).
  • the error detection code calculation unit 235 can be called in the following two types. (1. Data protection function pre-processing and read-out processing) The error detection code calculation unit 235 checks whether there is any change in the content of the data read from the application 1 definition data storage area 301 based on the data value and the error detection code input from the memory access control unit 234. Further, the error detection code calculation unit 235 transmits the confirmed result to the memory access control unit 234. (2. Data protection function post-processing and write processing) When the error detection code calculation unit 235 is called from the memory access control unit 234 as the post-processing and write processing of the data protection function, the error detection code calculation unit 235 generates an error detection code of the application 1 data storage area 301 and generates the application 1 definition data storage area 301. Write to. In this embodiment, the error detection code is generated for the entire application 1 definition data storage area 301, but the error detection code may be assigned to each data unit.
  • checksum an error detection code for detecting change in data contents.
  • the target data is added in units of arbitrary words such as 8 bits or 16 bits, and the lower one word of the total is used as a code value.
  • the protection application 230 is activated, and the memory access control unit 234 of the protection application 230 reads the data in the entire data storage area for the application, and in 16-bit units. The data is added, and the lower 16-bit complement of the total is stored together with the data as a checksum of the entire data storage area for the application.
  • the checksum is calculated by adjusting the length to 16 bits by adding 0 bits to the lower order.
  • the protection application 230 is activated before the processing of the application 1 (210) is activated, and the memory access control unit 234 of the protection application 230 extracts the data and the checksum of the entire data storage area for the application. If the data and the checksum are added in units of 16 bits and the total is 0, the data has not been changed.
  • a means for performing a difference calculation is provided in preparation for a case where only a part of the data storage area for applications is rewritten.
  • the difference calculation is performed by the application that reads the data storage area from the data storage area for the area that contains the data written by the application held in the temporary area by dividing the data storage area for the application in 16-bit units. This is realized by adding the difference between the value obtained by adding the data before writing and the value obtained by adding the data after writing by the application held in the temporary area to the entire checksum.
  • FIG. 8 is an example showing a flow of information communication (checksum difference calculation) in the present embodiment.
  • the error detection code calculation unit 235 that calculates the checksum includes a checksum acquisition target area acquisition unit 271, a checksum difference calculation unit 272, and a checksum generation unit 273.
  • the checksum acquisition target area acquisition unit 271 acquires an area where the checksum difference calculation needs to be performed based on the entire data in the data storage area and the data written by the application stored in the temporary area. .
  • the checksum difference calculation unit 272 calculates the checksum difference of the target area based on the value before writing by the application in the target area and the value after writing by the application.
  • the checksum generation unit 273 recalculates the checksum based on the checksum value and the checksum difference value of the entire data storage area before writing by the application.
  • the error detection code calculation unit 235 stores the data value and checksum information of the entire application 1 definition data storage area 301 and the data storage address written by the application stored in the temporary area. , Size and value are entered.
  • the checksum calculation target area acquisition unit 271 divides the area in 16-bit units from the start address of the application 1 definition data storage area 301, and recalculates the checksum from the data storage address and size in the temporary area. Get a region. Based on the acquired area information, the data in the area before the data is written by the application and the data in the area after the data is written by the application are acquired and transferred to the checksum difference calculation unit 272.
  • the checksum generation unit 273 generates a total of the checksum and the checksum difference value in the application 1 definition data storage area 301 as a new checksum.
  • the error detection code may be a simple method such as a parity bit or a method with high detection accuracy such as a CRC value.
  • FIG. 9 is a flowchart showing an operation procedure of the application 1 (210) and the protection application 230 in the present embodiment.
  • 10, 11, 12, and 13 are examples of flowcharts showing the operation procedure of the information processing apparatus 1 in the present embodiment.
  • FIG. 10 shows an operation procedure of preprocessing of the protection application 230.
  • FIG. 11 shows an operation procedure when data is written by the application 1 (210).
  • FIG. 12 shows an operation procedure when data is read by the application 1 (210).
  • FIG. 13 shows an operation procedure of post-processing of the protection application 230.
  • FIG. 9 is a flowchart showing an operation procedure of the application 1 (210) and the protection application 230.
  • the protection application 230 is called in response to a data write request and a data read request from the application 1 (210).
  • the protection application 230 is called before and after the application 1 (210) itself is called.
  • step S401 the memory access scheduling control unit 238 in the protection application 230 performs preprocessing before executing the processing of the application 1 (210).
  • step S402 the processing unit 211 in the application 1 (210) executes a main process of the application 1 (210).
  • step S403 the processing unit 211 in the application 1 (210) determines whether to perform processing for accessing the data storage area 30 (memory).
  • the processing unit 211 in the application 1 (210) calls the data writing processing unit 212 if it is a data writing process, and calls the data reading processing unit 213 if it is a data reading process.
  • step S404 the data write processing unit 212 in the application 1 (210) calls the protection application 230 and performs a write process to the data storage area 30.
  • step S405 the data read processing unit 213 in the application 1 (210) calls the protection application 230 and performs a read process from the data storage area 30.
  • step S406 the data read processing unit 213 in the application 1 (210) determines whether its own processing has been completed. If not completed, the process returns to step S402 to execute the application again. When completed, the protection application 230 is called.
  • step S407 the memory access scheduling control unit 238 in the protection application 230 performs post-processing.
  • FIG. 10 is a flowchart showing an operation procedure of preprocessing of the protection application 230 described in step S401 of FIG.
  • step S101 the memory access scheduling control unit 238 reads the application activation order and the importance of the application from the scheduling information 239.
  • step S102 the memory access scheduling control unit 238, based on the information on the activation order of the application read from the scheduling information 239, between the time when the application 1 (210) is activated last time and the time when it is activated this time. It is determined whether or not an application (low-importance application) set with an importance level lower than the importance level of the application 1 (210) itself is activated. When a low-importance application is activated, it means that the memory may have been changed without permission. In the present embodiment, it is determined whether or not the low-importance application has been activated between the time when the app 1 (210) is activated last time and this time it is activated. If the activation order of all applications activated on 1 can be predicted, the low-importance application is activated between the time application 1 (210) is activated last time and the next time application 1 (210) is activated. You may make it determine whether it was done.
  • step S102 A case where the low importance application has not been activated in step S102 will be described.
  • step S103 the memory access scheduling control unit 238 sets the data check process to be unnecessary, and ends the preprocessing of the protection application 230.
  • step S104 the memory access scheduling control unit 238 sets the data check process as essential.
  • step S105 the memory access scheduling control unit 238 activates the memory access determination unit 236.
  • the memory access determination unit 236 activates the memory access control unit 234 and reads data and checksum from the application 1 definition data storage area 301.
  • step S106 the memory access control unit 234 reads the error detection code calculation unit 235. Further, the memory access control unit 234 calculates the data and checksum in the application 1 definition data storage area 301, and determines whether or not the data has been changed.
  • the memory access control unit 234 determines that the data has been changed, the memory access control unit 234 performs fail-safe processing in step S107 and ends the preprocessing.
  • the method of performing fail-safe processing is determined in advance for each application, and examples thereof include a method of replacing with a default value and a method of not writing a data value.
  • FIG. 11 is a flowchart showing an operation procedure of data writing processing by the application 1 (210) and the protection application 230 described in step S404 of FIG.
  • step S ⁇ b> 111 the data write processing unit 212 in the application 1 (210) sends a data write request (data write address, write data) to the application 1 definition data storage area 301. Send to 231.
  • step S 112 the data write accepting unit 231 passes the data write address and the data to be written, received from the data write processing unit 212, to the memory access determining unit 236.
  • the memory access determination unit 236 confirms whether the data check process is necessary.
  • step S113 the memory access determination unit 236 delivers the data storage address, data value, and application identifier received from the application 1 (210) to the temporary area access control unit 233.
  • the temporary area access control unit 233 stores the data storage address, data value, and application identifier of the application 1 in the temporary data area A303.
  • step S114 temporary area access control unit 233 stores the data storage address, data value, and application identifier of application 1 in temporary data area B304.
  • step S115 the memory access determination unit 236 delivers the data storage address, data value, and application identifier received from the application 1 to the memory access control unit 234.
  • the memory access determination unit 236 stores the data storage address and data value of the application 1 in the application 1 definition data storage area 301.
  • This operation is executed every time data written to the application 1 definition data storage area 301 is generated by the application 1 program.
  • This operation is executed every time data written to the application 1 definition data storage area 301 is generated by the application 1 program.
  • FIG. 12 is a flowchart showing an operation procedure of data read processing by the application 1 (210) and the protection application 230 described in step S405 of FIG.
  • step S 121 the data read processing unit 213 in the application 1 (210) sends a data read request (data read address and size) to the application 1 definition data storage area 301 to the data read reception unit 232 in the protection application 230. send.
  • a process of reading data from the application 1 definition data storage area 301 occurs when the program of the application 1 (210) performs a specific process.
  • the data read receiving unit 213 in the protected application 201 receives the request, and the data is transferred to the memory access determination unit 217.
  • the memory access determination unit 217 determines whether data check processing is necessary (S121).
  • step S122 the data read receiving unit 232 passes the data read address and the read data size received from the data read processing unit 213 to the memory access determining unit 236.
  • the memory access determination unit 236 confirms whether the data check process is necessary.
  • step S123 the memory access determination unit 236 delivers the address of data to be read from the application 1 (210), the size of the data to be read, and the application identifier to the memory access control unit 234.
  • the memory access control unit 234 reads the data from the application 1 definition data storage area 301 using the address of the data to be read, the size of the data to be read, and the application identifier passed from the memory access determination unit 236, and the data read reception unit Pass to 232
  • step S124 the memory access determination unit 236 delivers the address of the data to be read from the application 1 (210), the size of the data to be read, and the application identifier to the temporary area access control unit 233. .
  • the temporary area access control unit 233 uses the address of the data to be read, the size of the data to be read, and the application identifier passed from the memory access determination unit 236 to store the data to be read from the data temporary area. It is determined whether or not the data has been written.
  • step S124 the temporary area access control unit 233 reads data from the temporary data storage area A303.
  • step S126 the temporary area access control unit 233 reads data from the temporary data storage area B304.
  • step S127 the temporary area access control unit 233 compares the data read from the temporary data storage area A303 with the data read from the temporary data storage area B304. A case where the comparison results are the same in step S127 will be described. If the comparison results are the same, the temporary area access control unit 233 passes the read data to the data read receiving unit 232 in step S128. The data read receiving unit 232 notifies the application 1 (210) of the data received from the memory access control unit 234, and ends the read process.
  • step S127 if the comparison result is not the same, or if the comparison result is not the same, in step S129, the temporary area access control unit 233 performs the fail-safe process and ends the read process.
  • the method of performing fail-safe processing is determined in advance for each application, and examples thereof include a method of replacing with a default value and a method of not writing a data value.
  • This operation is executed every time data is read from the application 1 definition data storage area 301 by the application 1 program.
  • FIG. 13 is a flowchart showing an operation procedure of post-processing of the protection application 230 described in step S407 of FIG.
  • step S131 the memory access scheduling control unit 238 activates the memory access determination unit 236.
  • the memory access determination unit 236 determines whether data check processing is necessary. If the data check process is unnecessary, the post-processing is terminated.
  • step S132 the memory access determination unit 236 activates the temporary area access control unit 233 and reads data from the data temporary area A303.
  • step S133 the memory access determination unit 236 activates the temporary area access control unit 233 and reads data from the data temporary area B304.
  • step S134 the memory access determination unit 236 compares whether the data read from the data temporary area A303 is the same as the data read from the data temporary area B304. A case where the compared data are the same in step S134 will be described. If the compared data are the same, in step S135, the memory access determination unit 236 determines whether or not the address of the data read from the temporary data area is an address in the application 1 definition data storage area 301. Do.
  • step S135 A case where the address of the data read from the temporary data area in step S135 is the address in the application 1 definition data storage area 301 will be described. If the address of the data read from the temporary data area is an address in the application 1 definition data storage area 301, in step S136, the memory access determination unit 236 reads the data read from the temporary data area into the memory access control unit 234. To pass. In addition, the memory access control unit 234 stores the data read from the temporary data area passed from the memory access determination unit 236 in the application 1 definition storage area.
  • step S137 the memory access control unit 234 calls the error detection code calculation unit 235. Further, the error detection code calculation unit 235 generates a checksum from all data in the application 1 definition data storage area 301.
  • step S138 the memory access control unit 234 stores the checksum generated by the error detection code calculation unit 235 in the application 1 definition data storage area 301.
  • step S139 the temporary area access control unit 233 deletes the data temporary area A303 and the data temporary area B304, and ends the post-processing.
  • step S140 the memory access determination unit 236 performs fail-safe processing.
  • the memory access determination unit 236 instructs the temporary area access control unit 233 to erase the temporary data area after performing the fail-safe process.
  • step S139 the temporary area access control unit 233 deletes the data temporary area A303 and the data temporary area B304, and ends the post-processing.
  • step S140 the memory access determination unit 236 performs fail-safe processing.
  • the memory access determination unit 236 instructs the temporary area access control unit 233 to erase the temporary data area after performing the fail-safe process.
  • step S139 the temporary area access control unit 233 deletes the data temporary area A303 and the data temporary area B304, and ends the post-processing.
  • the low-importance application As described above, as a pre-process before the application performs writing and reading, it is checked in advance whether or not the low-importance application has been activated. If the low-importance application is not activated, that is, the memory is free. If it has not been changed to, write and read without performing a memory check, while maintaining memory protection and improving the response speed of the process without increasing the application startup time of the entire system , Can reduce the amount of memory required.
  • Information processing device 2 CPU, 3 memory, 20 program memory, 30 data storage area, 210 apps 1, 211 processing unit, 212 data write processing unit, 213 data read processing unit, 220 app 2, 230 protection app, 231 data Write acceptance unit, 232 Data read acceptance unit, 233 Temporary area access control unit, 234 Memory access control unit, 235 Error detection code calculation unit, 236 Memory access determination unit, 237 Memory access information, 238 Memory access scheduling control unit, 239 scheduling , 301 application 1 definition data storage area, 302 application 2 definition data storage area, 303 data temporary area A, 304 data temporary area B.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

 この発明は、上記のような課題を解消するためになされたもので、複数のアプリケーションによりデータが読み書きされるメモリと、第一のアプリケーションの連続する起動タイミングの間に、第一のアプリケーションより重要度が低い第二のアプリケーションが起動されたか否かを判定するメモリアクセススケジューリング制御部238と、第二のアプリケーションが起動されたと判定された場合、誤り検出符号を計算する誤り検出符号計算部235と、第二のアプリケーションが起動さなかったと判定された場合、第一のアプリケーションからの書き込み要求があったデータをメモリに書き込みを行い、第二のアプリケーションが起動されたと判定された場合、第一のアプリケーションからの書き込み要求があったデータを誤り検出符号とともにメモリに書き込みを行うメモリアクセス制御部234と、を有することを特徴とする情報処理装置1を提供する。

Description

情報処理装置
 本発明は、複数のアプリケーションプログラムを実行する情報処理装置に関する。
 自動車の制御装置は、制御するシステムの増加に伴い、搭載されるECU(Electronic Control Unit)数が増加している。このため、ECU数の増加に伴うコスト増や搭載スペースの不足に対応するため、複数のECUによって実現されていた機能を集約し、より少ないECUで実行させる機能の統合化が進められている。
 機能の統合化に伴い、これまで個々のECUで実現されていたアプリケーションプログラム(以下、アプリケーションと称する)を1つのECU(情報処理装置)に搭載する必要がある。しかし、複数のアプリケーションを1つのECUに搭載する際には、それぞれのアプリケーションが利用するデータを保護する機構(メモリ保護機能)を設ける必要がある。
 従来の情報処理装置では、MMU(Memory Management Unit)やMPU(Memory Protection Unit)といったCPUのハードウェア機能を備え、例えば、MPUでデータを格納するメモリを複数の領域に分割し、分割した領域毎にアクセス権を設ける事でメモリアクセスしたユーザによるアクセスの可否を判定し、メモリ保護機能を実現している。
 また、従来の情報処理装置では、OS(Operating System)を介して、MMUやMPUからの通知を受け取り、OS上でメモリへのアクセス可否を判別することによって、アプリケーションによるメモリ上に格納されたデータへのアクセス可否を判別しているものもある。
 特許文献1では、アプリケーションがデータをメモリ上に書き込む際に、データ及び該アプリケーションに固有のアプリケーション情報、例えば、チェックサムやCRC(Cyclic Redundancy Check)などを書き込むようにしている。
 そして特許文献1では、アプリケーションがデータを前記メモリから読み出す際には、データ及びアプリケーション情報を前記メモリから読み出し、アプリケーション情報が自身のアプリケーション識別情報と一致しない場合は、読み出したデータを破棄する手段を提供している。
特開2013-171467公報
 従来の情報処理装置では、MMUやMPUといったCPUのハードウェア機能及びOSを備える必要がある。このため、コスト増が生じ、低コスト化を実現するのが困難であった。
 特許文献1では、アプリケーションによるデータ書き込み、読み込みが行われる際に、メモリ領域に格納されるデータの保護に関わる処理が必ず実行されるため、システム全体のアプリケーション起動時間が増加する課題がある。
 また、特許文献1では、アプリケーションがデータを書き込む際にメモリ保護に利用する固有のアプリケーション情報の生成を行う必要があり、アプリケーションによるデータ書き込みの応答が遅延してしまう課題があった。
 また、特許文献1では、アプリケーションが書き込むデータ毎に識別子情報も書き込む必要があるため、必要とするメモリ量が増加すると言う課題もある。
 この発明は、上記のような課題を解消するためになされたもので、複数のアプリケーションによりデータが読み書きされるメモリと、第一のアプリケーションの連続する起動タイミングの間に、前記第一のアプリケーションより重要度が低い第二のアプリケーションが起動されたか否かを判定するメモリアクセススケジューリング制御部と、前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動されたと判定された場合、誤り検出符号を計算する誤り検出符号計算部と、前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動さなかったと判定された場合、前記第一のアプリケーションからの書き込み要求があったデータを前記メモリに書き込みを行い、前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動されたと判定された場合、前記第一のアプリケーションからの書き込み要求があったデータを前記誤り検出符号とともに前記メモリに書き込みを行うメモリアクセス制御部と、を有することを特徴とする情報処理装置を提供する。
 本発明は、複数のアプリケーションプログラムを実行する情報処理装置において、保護されたデータへの書き込みを高速に行なうことができる。
本発明における情報処理装置のハードウェア構成を示す一例である。 本発明におけるプログラムメモリの構成を示す一例である。 本発明におけるデータ記憶領域の構成を示す一例である。 本発明における保護アプリの機能ブロックを示す一例である。 本発明におけるスケジュール情報を示す一例である。 本発明におけるアプリケーションの動作順番に関係する情報を示す一例である。 本発明におけるアプリケーションの動作周期のタイムチャートを示す一例である。 本発明における誤り検出符号計算部の処理の構成を示す一例である。 本発明におけるアプリ1と保護アプリの動作手順を示すフローチャートの一例である。 本発明における保護アプリの前処理の動作手順を示すフローチャートの一例である。 本発明における書き込み処理の動作手順を示すフローチャートの一例である。 本発明における読み出し処理の動作手順を示すフローチャートの一例である。 本発明における保護アプリの後処理の動作手順を示すフローチャートの一例である。
実施の形態1.
 図1は、本実施の形態における、情報処理装置のハードウェア構成図である。
 図1において、情報処理装置1は、主要な構成として、CPU2とメモリ3がある。また、メモリ3はプログラムメモリ20とデータ領域30で構成されている。プログラムメモリ(プログラム)20は、ROM(Read Only Memory)等の不揮発性メモリである。データ格納領域(メモリ)30は、RAM(Random Access Memory)等の記憶装置である。本実施例において、情報処理装置1は、CPU2がプログラムを実行する構成を備えていれば、どのようなマイコンでも良い。
 図2と図3は、実施の形態1におけるプログラムとメモリの構成の一例である。図2は、本実施例のプログラムメモリ20に記憶されているプログラムの一例を示す構成図であり、図3は、本実施例のデータ記憶領域30に割り当てるメモリ構成の一例を示す構成図である。
 図2において、本実施例では、プログラムメモリ20に記憶されているプログラムとして、アプリ1(210)、アプリ2(220)等、複数のアプリケーション及び、これらアプリケーションが読み書きするデータを保護する保護アプリ230が含まれている。
 保護アプリ230は、アプリケーションがデータの読み書きを行なう際に呼び出されるだけではなく、アプリケーションが実行される前には前処理として、アプリケーションが実行された後でも後処理として実行される。
 アプリケーション及び保護アプリ230がどのように連携して動作するかについては、アプリ1(210)及び保護アプリ230の構成について述べた後で説明する。
 図3において、データ記憶領域30にはプログラムが使用するデータが格納され、本実施例では、保護を必要とするデータを定義するアプリ毎にメモリ領域を割り当てる。アプリ1(210)が定義し使用するデータは、アプリ1定義データ格納領域301に、アプリ2(220)が定義し使用するデータでは、アプリ2定義データ格納領域302へ格納される。
 なお、本実施の形態では保護を必要とするデータを定義するアプリ毎にメモリ領域を割り当てる形で記載するが、専用にメモリ領域を割り当て無くても良い。また、保護アプリ230が使用するデータを一時的に格納するデータ一時領域を割り当てる。データ一時領域は、図に示すようにデータ一時領域A303、データ一時領域B304と二重化することで、データ一時領域のデータ内容の保証を行う。
 このデータ一時領域は、データ一時領域A303だけであっても良いし、三つ以上あってもよい。例えば、データ一時領域A303、データ一時領域B304の他、更にデータ一時領域Cを割り当てても構わない。データ一時領域Cを割り当てる場合は、一時領域に書き込まれたデータが全て同一の場合、または、いずれか2つのデータが同一の場合に、一時領域からアプリ1定義データ格納領域へデータの書き込みを実施する。
 データ一時領域が四つ以上あった場合は、過半数以上のデータが同一の場合に、一時領域からアプリ1定義データ格納領域へデータの書き込みを実施する。
 図4は、本発明の実施例に関わる情報処理装置におけるアプリ1(210)と保護アプリ230の構成を示す機能ブロック図である。
 保護アプリ230は、アプリ1(210)からのデータ書き込み要求及びデータ読み出し要求に応じて呼びだされる。また、保護アプリ230は、アプリ1(210)自身が呼び出される前と後に、呼び出される。
 アプリ1(210)自身が呼び出される前と後に保護アプリ230を呼び出す方法として、アプリ1(210)の処理の先頭と末尾に保護アプリ230を呼び出すようにしても良い。
 また、情報処理装置1が、アプリ1(210)及び保護アプリ230等のアプリケーションを制御するスケジュール機能を有している場合、そのスケジュール機能が、アプリ1(210)自身が呼び出される前と後に保護アプリ230を呼び出すようにスケジュールしても良い。
 なお、図4では図示していないが、プログラムメモリ20上にアプリ1(210)だけではなく、アプリ2(220)等の複数のアプリケーションを搭載することができる。複数のアプリケーションが搭載された場合も構成は同じである。
 アプリ1(210)は、処理部211と、データ書き込み処理部212と、データ読み出し部213を備える。
 処理部211は、データの計算処理など、アプリ1(210)の主となる処理を実行する。また、処理部211は、アプリ1定義データ格納領域301に対し、データの書き込みを行なう際には、データ書き込み処理部212を、データの読み出しを行なう際には、データ読み出し処理部213を呼び出す。
 データ書き込み処理部212は、処理部211からデータの書き込みを行なうアドレスとデータの内容を取得する。データ書き込み処理部212は、取得したアドレスとデータの内容を保護アプリ230へ渡す。
 データ読み出し処理部213は、処理部211からデータの読み出しを行なうアドレスを取得する。データ読み出し処理部213は、取得したアドレスを保護アプリ230へ渡し、データを受け取る。
 保護アプリ230は、データ書き込み受付部231と、データ読み出し受付部232と、一時領域アクセス制御部233と、メモリアクセス制御部234と、誤り検出符号計算部235と、メモリアクセス判定部236と、メモリアクセス情報237と、メモリアクセススケジューリング制御部238と、スケジューリング情報239を備える。
 メモリアクセススケジューリング制御部238は、アプリケーションが実行される前後に呼び出される。
(1.データ保護機能の前処理)
 メモリアクセススケジューリング制御部238は、アプリケーションがデータ書き込み処理またはデータ読み出し処理を行なう前に呼び出される。
 メモリアクセススケジューリング制御部238は、スケジューリング情報239を参照し、自分を呼び出したアプリケーションの重要度を獲得する。
 また、メモリアクセススケジューリング制御部238は、自分を呼び出したアプリケーション(第一のアプリケーション)が前回起動された後から、今回起動されるまでの間に、自分自身を呼び出したアプリケーションの重要度よりも低い重要度のアプリケーション(第二のアプリケーション)が、他に起動されていないか判定する。
 メモリアクセススケジューリング制御部238は、自分自身を呼び出したアプリケーションの重要度よりも低い重要度のアプリケーションが、起動されていた場合、前処理として呼びだしている情報とともに、メモリアクセス判定部236を呼び出す。
(2.データ保護機能の後処理)
 メモリアクセススケジューリング制御部238は、アプリケーションがデータ書き込み処理またはデータ読み出し処理を行なった後に呼び出される。
 メモリアクセススケジューリング制御部238は、後処理として呼びだしている情報とともに、メモリアクセス判定部236を呼び出す。
 スケジューリング情報239は、情報処理装置1上で動作するアプリケーションの動作順番及び、重要度が記憶されている。図5にスケジューリング情報239の例を示す。
 スケジューリング情報239では、情報処理装置1上で動作するアプリケーションの動作順番を繰り返し周期分保持したものであり、アプリケーションを識別するためのアプリケーション識別子とアプリケーションに割り当てられた重要度が記憶されている。
 動作順番とは、各アプリケーションが動作する順番を繰り返し周期分保持したものである。アプリケーションのスケジューリングアルゴリズムは多種提案されており、例えば、優先度固定のスケジューリングとしては、レートモノトニックスケジューリングやデットラインモノトニックスケジュールがある。
 情報処理装置1上で動作するアプリケーションは上述したスケジューリングアルゴリズムに基づき動作順番を決定し、一定周期で繰り返し実行される。アプリケーションの動作順番の例を図6及び図7に示す。図6は、本例におけるアプリケーションの動作順番に関係する情報を示したものである。図7は、本例に示したアプリケーションの起動周期を図示したタイムチャートである。図7に示すようにアプリケーションの起動周期に基づいて、一定周期で繰り返し起動される。本タイムチャートに基づいてスケジューリング情報239を作成したものが図5となる。
 また、ここで言う重要度とは、例えば、情報処理装置1が車両に搭載される制御装置である場合、アプリケーションの重要度には、車両の電子制御機器に対する機能安全に関する規格であるISO26262で定義されたASIL(Automotive Safety Integrity Level)を適用しても良い。また、他の定義を適用しても良い。
 なお、ASILとは、自動車の電気電子制御システムが持つ不安全なリスクに関する指標値であり、QM、A、B、C、Dの順に高いレベルの安全方策が求められている。異なるASILが割り当てられた複数のアプリケーションを1つの情報処理装置に混在して搭載される場合、より低いASILが割り当てられたアプリケーションがより高いASILが割り当てられたアプリケーションに対して干渉しないことを説明する必要がある。本説明ができない場合は、より高いASILのプロセスに従い開発する必要がある。
 つまり、自アプリケーションよりも高い重要度のアプリケーションは、自アプリケーションに対し、勝手にメモリの変更を行なうなどの干渉を行なわないことが保証されているが、自アプリケーションよりも低い重要度のアプリケーションからの干渉は保証されていないことを意味する。
 データ書き込み受付部231は、アプリ1(210)からのデータ書き込み処理を受け付け、書き込みを行なうアプリ1定義データ格納領域301(第一のメモリ)内のアドレスとデータを取得する。また、データ書き込み受付部231は、アプリ1(210)を識別するための情報(アプリ識別子)と取得したアドレスとデータをメモリアクセス判定部236に出力する。
 データ読み出し受付部232は、アプリ1(210)からのデータ読み出し処理を受け付け、読み出しを行なうアプリ1定義データ格納領域301内のアドレスを取得する。また、データ読み出し受付部232は、アプリ1(210)を識別するための情報(アプリ識別子)と取得したアドレスをメモリアクセス判定部236に出力する。
 メモリアクセス判定部236は、以下の4種類の呼びだされ方がある。
(1.書き込み処理)
 メモリアクセス判定部236は、データ書き込み受付部231から送信されたアプリ識別子とアドレスとデータをもとに、データサイズを計算する。
 また、メモリアクセス判定部236は、アドレスとデータとデータサイズとアプリ識別子を一時領域アクセス制御部233及びメモリアクセス制御部234に送信する。
(2.読み出し処理)
 メモリアクセス判定部236は、データ読み出し受付部232から送信されたアドレスをメモリアクセス情報237と照らし合わせることによって、読み出し対象のデータが一時領域(第二のメモリ)に書き込まれているかの判定を行なう。
 また、メモリアクセス判定部236は、読み出し対象のデータがアプリ1定義データ格納領域301に書き込まれたものであった場合、メモリアクセス制御部234にアドレスを送信する。
 また、メモリアクセス判定部236は、アプリ1定義データ格納領域301より読み出したデータのチェックサムが正しかった場合、アプリ1(210)へ読み出しデータを送信する。
 なお、本実施の形態では、アプリケーションに固有の情報として、チェックサムを用いているが、CRCを用いてもよい。
 また、メモリアクセス判定部236は、読み出し対象のデータが一時領域に書き込まれたものであった場合、一時領域アクセス制御部233にアドレスを送信する。
 また、メモリアクセス判定部236は、複数の一時領域より読み出したデータが一致した場合、アプリ1(210)へ読み出しデータを送信する。
 また、メモリアクセス判定部236は、複数の一時領域より読み出したデータが一致しなかった場合、フェールセーフ処理(後述)を行なう。
(3.データ保護機能の前処理)
 メモリアクセス判定部236は、メモリアクセススケジューリング制御部238から前処理であるとの情報とともに呼びだされ、メモリアクセス制御部234を呼び出す。
 また、メモリアクセス判定部236は、メモリアクセス制御部234を呼び出した結果、アプリ1定義データ格納領域301より読み出したデータの内容に変更があった場合、フェールセーフ処理(後述)を行なう。
(4.データ保護機能の後処理)
 メモリアクセス判定部236は、メモリアクセススケジューリング制御部238から後処理であるとの情報とともに呼びだされ、一時領域アクセス制御部233を呼び出す。
 また、メモリアクセス判定部236は、一時領域アクセス制御部233を呼び出した結果、データ一時領域A303とデータ一時領域B304のデータが一致した場合、メモリアクセス情報218をもとに、データ格納先のアドレスがアプリ1によるアクセスが許可されたメモリ領域か否かを判定し、アクセスが許可されていた場合、メモリアクセス制御部234にデータ一時領域A303及びデータ一時領域B304のデータを送信する。
 また、メモリアクセス判定部236は、一時領域アクセス制御部233を呼び出した結果、データ一時領域A303とデータ一時領域B304のデータが一致しなかった場合、または、データ格納先のアドレスがアプリ1によるアクセスが許可されていなかった場合、フェールセーフ処理(後述)を行なう。
 メモリアクセス制御部234は、以下の2種類の呼びだされ方がある。
(1.データ保護機能の前処理及び読み出し処理)
 メモリアクセス制御部234は、メモリアクセス判定部236から前処理もしくは、読み出し処理として呼び出される。
 メモリアクセス制御部234は、アプリ1(210)が定義するデータを格納するアプリ1定義データ格納領域301より、データ値ならびに誤り検出符号を読み出す。
 また、メモリアクセス制御部234は、データ値ならびに誤り検出符号を誤り検出符号計算部235に送信する。
 また、メモリアクセス制御部234は、誤り検出符号計算部235を呼び出した結果、アプリ1定義データ格納領域301より読み出したデータの内容に変更が無いか判定する。
 また、メモリアクセス制御部234は、判定した結果をメモリアクセス判定部236に返す。
(2.データ保護機能の後処理及び書き込み処理)
メモリアクセス制御部234は、メモリアクセス判定部236から後処理もしくは、書き込み処理として呼び出される。
 メモリアクセス制御部234は、メモリアクセス判定部236から送信されたデータを元に、アプリ1定義データ格納領域301へ書き込む。
 また、メモリアクセス制御部234は、データの書き込み後に、誤り検出符号計算部216を起動し、アプリ1定義データ格納領域301内の全データよりチェックサムを計算する。
 また、メモリアクセス制御部234は、チェックサム計算後、アプリ1定義データ格納領域301にチェックサム値を書き込む。
 一時領域アクセス制御部233は、以下の2種類の呼びだされ方がある。
(1.書き込み処理)
 一時領域アクセス制御部233は、メモリアクセス判定部236から入力されたアドレスとデータとデータサイズとアプリ識別子をもとに、データ一時領域A303とデータ一時領域B304にアプリ1(210)のデータ格納アドレス、データ値ならびにアプリ識別子を格納する。
(2.読み出し処理及びデータ保護機能の後処理)
 一時領域アクセス制御部233は、メモリアクセス判定部236から入力されたアドレスとアプリ識別子をもとに、データ一時領域A303及びデータ一時領域B304からデータを読み出す。
 また、一時領域アクセス制御部233は、読み出したデータをメモリアクセス判定部236に送信する。
 メモリアクセス情報237は、アプリ1定義データ格納領域301が割り当てられたアドレスの情報(アプリ1によってアクセスが許可されたメモリであるか否か)を保有する。
 誤り検出符号計算部235は、以下の2種類の呼びだされ方がある。
(1.データ保護機能の前処理及び読み出し処理)
 誤り検出符号計算部235は、メモリアクセス制御部234から入力されたデータ値ならびに誤り検出符号をもとに、アプリ1定義データ格納領域301より読み出したデータの内容に変更が無いか確認を行なう。
 また、誤り検出符号計算部235は、メモリアクセス制御部234に確認した結果を送信する。
(2.データ保護機能の後処理及び書き込み処理)
 誤り検出符号計算部235は、メモリアクセス制御部234からデータ保護機能の後処理及び書き込み処理として呼び出された場合、アプリ1データ格納領域301の誤り検出符号を生成し、アプリ1定義データ格納領域301へ書き込みを行う。
 なお、本実施例では、アプリ1定義データ格納領域301全体に対して誤り検出符号を生成しているが、誤り検出符号はデータ単位に付与しても良い。
 データ内容の変更検出のための誤り検出符号として、チェックサムを使用した実施例を簡単に説明する。
 チェックサムは対象となるデータを8ビットや16ビットなど、任意のワード単位で加算し、総計の下位1ワードを符号値とするものである。
 本実施例では、アプリ1(210)の処理完了後、保護アプリ230が起動され、保護アプリ230のメモリアクセス制御部234にて、アプリケーション用のデータ格納領域全体のデータを読み出し、16ビット単位でデータを加算し、総計の下位16ビットの補数をアプリケーション用のデータ格納領域全体のチェックサムとしてデータとともに格納する。
 なお、対象となるデータ格納領域内のデータのデータ長さが16ビットで割り切れない場合は、下位に0のビットを追加するなどして16ビットの長さに整え、チェックサムを計算する。
 続いて、アプリ1(210)の処理が起動する前に保護アプリ230が起動され、保護アプリ230のメモリアクセス制御部234にて、アプリケーション用のデータ格納領域全体のデータならびにチェックサムを取り出す。データならびにチェックサムを16ビット単位で加算し、総計が0であればデータは変更されていないこととなる。
 チェックサムの計算方法として、アプリケーション用のデータ格納領域の内、一部の領域のみが書き換えられる場合に備え、差分計算を実施する手段も設けておく。差分計算は、アプリケーション用のデータ格納領域を16ビット単位で領域を区切り、一時領域に保持しているアプリケーションにより書き込みが行われたデータが含まれる領域に対して、データ格納領域から読み出したアプリケーションによる書き込みが行われる前のデータを加算した値と、一時領域に保持しているアプリケーションによる書き込みが行われた後のデータを加算した値との差分を全体のチェックサムに加算することで実現する。
 図8は、本実施の形態における情報通信の流れ(チェックサム差分計算)を示す一例である。
 チェックサムを計算する誤り検出符号計算部235は、チェックサム取得対象領域取得部271と、チェックサム差分計算部272と、チェックサム生成部273で構成される。
 チェックサム取得対象領域取得部271は、データ格納領域のデータ全体と一時領域に格納されたアプリケーションによる書き込みが行われたデータをもとに、チェックサムの差分計算を行う必要がある領域を取得する。
 チェックサム差分計算部272は、対象領域におけるアプリケーションによる書き込みが行われる前の値とアプリケーションによる書き込みが行われた後の値をもとに、対象領域のチェックサムの差分を求める。
 チェックサム生成部273は、アプリケーションによる書き込みが行われる前のデータ格納領域全体のチェックサム値とチェックサム差分値をもとにチェックサムの再計算を行う。
 図5に示すように、誤り検出符号計算部235では、アプリ1定義データ格納領域301全体のデータ値とチェックサム情報と、一時領域内に格納しているアプリケーションにより書き込みが行われたデータ格納アドレス、サイズ、値が入力される。
 チェックサム計算対象領域取得部271では、アプリ1定義データ格納領域301の先頭アドレスより16ビット単位で領域を区切り、一時領域内のデータ格納アドレスとサイズから、チェックサムの再計算を実施する必要のある領域を取得する。
 取得した領域情報をもとに、アプリケーションによりデータが書き込まれる前の領域内のデータとアプリケーションによりデータが書き込まれた後の領域内のデータを取得し、チェックサム差分計算部272に引き渡す。
 チェックサム差分計算部272では、アプリケーションによりデータが書き込まれる前の領域内のデータを加算した値とアプリケーションによりデータが書き込まれた後の領域内のデータを加算した値を求め、チェック差分値を取得する。
 チェックサム生成部273では、アプリ1定義データ格納領域301内のチェックサムとチェックサム差分値の総計を新しいチェックサムとして生成する。
 このような処理を行うことで、アプリケーション用のデータ格納領域全体のサイズが大きい場合のチェックサム計算時間を短縮することができる。
 なお、チェックサムの差分値を計算する必要のある領域を求める時間を短縮するため、予めチェックサムを計算するワード単位の倍数でアプリケーションのデータを定義しても良い。
 また、本実施例は誤り検出符号としてチェックサムを用いる例としたが、誤り検出符号はパリティビットのような単純な方式でもCRC値のような検出精度の高い方式を適用しても良い。
 次に図9、10、11、12、13を用いて本発明の動作を説明する。
 図9は、本実施の形態における、アプリ1(210)と保護アプリ230の動作手順を示すフローチャートである。
 図10、11,12、13は本実施の形態における、情報処理装置1の動作手順を示すフローチャートの一例である。図10は、保護アプリ230の前処理の動作手順について示す。図11は、アプリ1(210)によりデータ書き込みが行なわれる場合の動作手順について示す。図12は、アプリ1(210)によりデータ読み出しが行なわれる場合の動作手順について示す。図13は、保護アプリ230の後処理の動作手順について示す。
 まず、図9について説明する。
 図9は、アプリ1(210)と保護アプリ230の動作手順を示すフローチャートである。図4で説明したように、保護アプリ230は、アプリ1(210)からのデータ書き込み要求及びデータ読み出し要求に応じて呼びだされる。また、保護アプリ230は、アプリ1(210)自身が呼び出される前と後に、呼び出される。
 ステップS401において、保護アプリ230内のメモリアクセススケジューリング制御部238は、アプリ1(210)の処理を実行する前に、前処理を行なう。
 ステップS402において、アプリ1(210)内の処理部211は、アプリ1(210)の主となる処理を実行する。
 ステップS403において、アプリ1(210)内の処理部211は、データ記憶領域30(メモリ)をアクセスする処理を行なうかの判定を行なう。アプリ1(210)内の処理部211は、データの書き込み処理であれば、データ書き込み処理部212を、データの読み出し処理であれば、データ読み出し処理部213を呼び出す。
 ステップS404において、アプリ1(210)内のデータ書き込み処理部212は、保護アプリ230を呼び出し、データ記憶領域30への書き込み処理を行なう。
 ステップS405において、アプリ1(210)内のデータ読み出し処理部213は、保護アプリ230を呼び出し、データ記憶領域30から読み出し処理を行なう。
 ステップS406において、アプリ1(210)内のデータ読み出し処理部213は、自身の処理が完了したか判断する。完了していない場合、ステップS402に戻り、アプリケーションの実行を再度行なう。完了した場合、保護アプリ230を呼び出す。
 ステップS407において、保護アプリ230内のメモリアクセススケジューリング制御部238は、後処理を行なう。
 次に、図10について説明する。図10は、図9のステップS401で説明した保護アプリ230の前処理の動作手順を示すフローチャートである。
 ステップS101において、メモリアクセススケジューリング制御部238は、アプリケーションの起動順番とアプリケーションの重要度を、スケジューリング情報239から読み出す。
 ステップS102において、メモリアクセススケジューリング制御部238は、スケジューリング情報239から読み出したアプリケーションの起動順番の情報をもとに、アプリ1(210)が前回起動されてから、今回起動されるまでの間に、アプリ1(210)自身の重要度よりも低い重要度が設定されたアプリケーション(低重要度アプリ)が起動されたかどうかを判定する。低重要度アプリが起動された場合、勝手にメモリの変更が行われた可能性があることを意味する。
 なお、本実施の形態では、アプリ1(210)が前回起動されてから、今回起動されるまでの間に、低重要度アプリが起動されたがどうかを判定するようにしたが、情報処理装置1上で起動されるアプリケーション全ての起動順番が予測できる場合には、アプリ1(210)が前回起動されてから、次回アプリ1(210)が起動されるまでの間、低重要度アプリが起動されたがどうかを判定するようにしてもよい。
 ステップS102において、低重要度アプリが起動されていなかった場合について述べる。
 低重要度アプリが起動されていなかった場合、ステップS103において、メモリアクセススケジューリング制御部238は、データチェック処理を不要に設定し、保護アプリ230の前処理を終了する。
 ステップS102において、低重要度アプリが起動された場合について述べる。
 低重要度アプリが起動された場合、ステップS104において、メモリアクセススケジューリング制御部238は、データチェック処理を要に設定する。
 次にステップS105において、メモリアクセススケジューリング制御部238は、メモリアクセス判定部236を起動する。メモリアクセス判定部236は、メモリアクセス制御部234を起動し、アプリ1定義データ格納領域301からデータとチェックサムを読み出す。
 ステップS106において、メモリアクセス制御部234は、誤り検出符号計算部235を読み出す。また、メモリアクセス制御部234は、アプリ1定義データ格納領域301内のデータとチェックサムを計算し、データが変更されているか否かを判定する。
 メモリアクセス制御部234は、データが変更されていると判定した場合、ステップS107において、フェールセーフ処理を行い、前処理を終了する。
 フェールセーフ処理を行なう方法は、予めアプリケーション毎に定めてられており、例えばデフォルト値へ置き換える方法や、データ値を書き込まない等の方法が挙げられる。
 次に、図11について説明する。図11は、図9のステップS404で説明したアプリ1(210)及び保護アプリ230による、データ書き込み処理の動作手順を示すフローチャートである。
 ステップS111において、アプリ1(210)内のデータ書き込み処理部212は、アプリ1定義データ格納領域301に対するデータの書き込み要求(データを書き込むアドレス、書き込むデータ)を、保護アプリ230内のデータ書き込み受付部231に送る。
 ステップS112において、データ書き込み受付部231は、データ書き込み処理部212から受け取った、データを書き込むアドレス及び書き込むデータを、メモリアクセス判定部236に渡す。メモリアクセス判定部236は、データチェック処理の要否を確認する。
 データチェック処理が要の場合、ステップS113において、メモリアクセス判定部236は、一時領域アクセス制御部233へ、アプリ1(210)から受けたデータ格納アドレス、データ値ならびに、アプリ識別子を引き渡す。
 一時領域アクセス制御部233は、データ一時領域A303に、アプリ1のデータ格納アドレス、データ値ならびにアプリ識別子を格納する。
 ステップS114にて、一時領域アクセス制御部233は、データ一時領域B304にアプリ1のデータ格納アドレス、データ値とアプリ識別子を格納する。
 データチェック処理が不要の場合、ステップS115において、メモリアクセス判定部236は、メモリアクセス制御部234へ、アプリ1から受けたデータ格納アドレス、データ値ならびに、アプリ識別子を引き渡す。
 メモリアクセス判定部236は、アプリ1定義データ格納領域301に、アプリ1のデータ格納アドレス、データ値を格納する。
 本動作は、アプリ1のプログラムにより、アプリ1定義データ格納領域301への書き込みデータが発生する度に実行される。
 このように複数の一時領域へデータを格納することにより、データ保護アプリが利用するデータ一時領域のデータ変更を検出でき、一次領域の安全性を保証することができる。
 次に、図12について説明する。図12は、図9のステップS405で説明したアプリ1(210)及び保護アプリ230による、データ読み出し処理の動作手順を示すフローチャートである。
 ステップS121において、アプリ1(210)内のデータ読み出し処理部213は、アプリ1定義データ格納領域301に対するデータの読み出し要求(データを読み出すアドレス、サイズ)を保護アプリ230内のデータ読み出し受付部232に送る。
 アプリ1(210)のプログラムが特有の処理を行うことで、アプリ1定義データ格納領域301からのデータ読み出し処理が発生する。アプリ1のデータをアプリ1定義データ格納領域301から読み出す際に、保護アプリ201内のデータ読み出し受付部213で要求を受け付け、メモリアクセス判定部217にデータが受け渡される。メモリアクセス判定部217はデータチェック処理要否を判定する(S121)。
 ステップS122において、データ読み出し受付部232は、データ読み出し処理部213から受け取った、データを読み出すアドレス及び読み出すデータのサイズを、メモリアクセス判定部236に渡す。メモリアクセス判定部236は、データチェック処理の要否を確認する。
 ステップS122において、データチェック処理要の場合について述べる。
 データチェック処理要の場合、ステップS123において、メモリアクセス判定部236は、メモリアクセス制御部234へ、アプリ1(210)から受けたを読み出すデータのアドレス、読み出すデータのサイズならびに、アプリ識別子を引き渡す。
 メモリアクセス制御部234は、メモリアクセス判定部236から渡された、読み出すデータのアドレス、読み出すデータのサイズならびに、アプリ識別子を用いて、アプリ1定義データ格納領域301よりデータを読み出し、データ読み出し受付部232へ渡す。
 ステップS128において、データ読み出し受付部232は、メモリアクセス制御部234から受け取ったデータをアプリ1(210)へ通知し、読み出し処理を終了する。
 ステップS122において、データチェック処理不要の場合について述べる。
 データチェック処理不要の場合、ステップS124において、メモリアクセス判定部236は、一時領域アクセス制御部233へ、アプリ1(210)から受けたを読み出すデータのアドレス、読み出すデータのサイズならびに、アプリ識別子を引き渡す。
 一時領域アクセス制御部233は、メモリアクセス判定部236から渡された、読み出すデータのアドレス、読み出すデータのサイズならびに、アプリ識別子を用いて、データ一時領域に対し、読み出しの対象となっているデータが書き込まれているか否か判断を行なう。
 ステップS124において、読み出し対象データが一時領域に書き込まれている場合について述べる。
 読み出し対象データが一時領域に書き込まれている場合、ステップS125において、一時領域アクセス制御部233は、データ一時格納領域A303よりデータを読み出す。
 なお、ステップS124で
 ステップS126において、一時領域アクセス制御部233は、データ一時格納領域B304よりデータを読み出す。
 ステップS127において、一時領域アクセス制御部233は、データ一時格納領域A303より読み出したデータと、データ一時格納領域B304より読み出したデータとを比較する。
 ステップS127において、比較した結果が同一だった場合について述べる。
 比較した結果が同一だった場合、ステップS128において、一時領域アクセス制御部233は、読み出したデータを、データ読み出し受付部232へ渡す。
 データ読み出し受付部232は、メモリアクセス制御部234から受け取ったデータをアプリ1(210)へ通知し、読み出し処理を終了する。
 ステップS127において、比較した結果が同一で無かった場合、比較した結果が同一で無かった場合、ステップS129において、一時領域アクセス制御部233は、フェールセーフ処理を行い、読み出し処理を終了する。
 フェールセーフ処理を行なう方法は、予めアプリケーション毎に定めてられており、例えばデフォルト値へ置き換える方法や、データ値を書き込まない等の方法が挙げられる。
 本動作は、アプリ1のプログラムにより、アプリ1定義データ格納領域301からのデータ読み出しが発生する度に実行される。
 次に、図13について説明する。図13は、図9のステップS407で説明した保護アプリ230の後処理の動作手順を示すフローチャートである。
 ステップS131において、メモリアクセススケジューリング制御部238は、メモリアクセス判定部236を起動する。メモリアクセス判定部236は、データチェック処理の要否を判定する。データチェック処理が不要であった場合、後処理を終了する。
 ステップS131において、データチェック処理が要であった場合について述べる。
 データチェック処理が要であった場合、ステップS132において、メモリアクセス判定部236は、一時領域アクセス制御部233を起動し、データ一時領域A303からデータを読み出す。
 ステップS133において、メモリアクセス判定部236は、一時領域アクセス制御部233を起動し、データ一時領域B304からデータを読み出す。
 ステップS134において、メモリアクセス判定部236は、データ一時領域A303から読み出したデータと、データ一時領域B304から読み出したデータとが同一であるか比較する。
 ステップS134において、比較したデータが同一であった場合について述べる。
 比較したデータが同一であった場合、ステップS135において、メモリアクセス判定部236は、データ一時領域から読み出したデータのアドレスが、アプリ1定義データ格納領域301内のアドレスであるか否かの判定を行なう。
 ステップS135において、データ一時領域から読み出したデータのアドレスが、アプリ1定義データ格納領域301内のアドレスであった場合について述べる。
 データ一時領域から読み出したデータのアドレスが、アプリ1定義データ格納領域301内のアドレスであった場合、ステップS136において、メモリアクセス判定部236は、データ一時領域から読み出したデータをメモリアクセス制御部234へ渡す。
 また、メモリアクセス制御部234は、メモリアクセス判定部236から渡されたデータ一時領域から読み出したデータをアプリ1定義格納領域へ格納する。
 ステップS137において、メモリアクセス制御部234は、誤り検出符号計算部235を呼び出す。
 また、誤り検出符号計算部235は、アプリ1定義データ格納領域301の全データからチェックサムを生成する。
 ステップS138において、メモリアクセス制御部234は、誤り検出符号計算部235が生成したチェックサムを、アプリ1定義データ格納領域301へ格納する。
 ステップS139において、一時領域アクセス制御部233は、データ一時領域A303の消去、及び、データ一時領域B304の消去を行ない、後処理を終了する。
 ステップS134において、比較したデータが同一では無かった場合について述べる。
 比較したデータが同一では無かった場合、ステップS140において、メモリアクセス判定部236は、フェールセーフ処理を行う。
 また、メモリアクセス判定部236は、フェールセーフ処理を行なった後に、一時領域アクセス制御部233に対し、データ一時領域の消去を指示する。
 ステップS139において、一時領域アクセス制御部233は、データ一時領域A303の消去、及び、データ一時領域B304の消去を行ない、後処理を終了する。
 ステップS135において、データ一時領域から読み出したデータのアドレスが、アプリ1定義データ格納領域301内のアドレスで無かった場合について述べる。
 データ一時領域から読み出したデータのアドレスが、アプリ1定義データ格納領域301内のアドレスでは無かった場合、ステップS140において、メモリアクセス判定部236は、フェールセーフ処理を行う。
 また、メモリアクセス判定部236は、フェールセーフ処理を行なった後に、一時領域アクセス制御部233に対し、データ一時領域の消去を指示する。
 ステップS139において、一時領域アクセス制御部233は、データ一時領域A303の消去、及び、データ一時領域B304の消去を行ない、後処理を終了する。
 以上のように、アプリケーションが書き込み及び読み出しを行う前の前処理として、低重要度アプリが起動されたか否かを予め調べておき、低重要度アプリが起動されていない場合、つまり、メモリが勝手に変更されていない場合には、メモリチェックを行わずに書き込み及び読み出しを行うことにより、メモリ保護を維持しつつ、システム全体のアプリケーション起動時間を増加させることなく、処理の応答速度を改善するとともに、必要とするメモリ量を減らすことができる。
1 情報処理装置、2 CPU、3 メモリ、20 プログラムメモリ、30 データ格納領域、210 アプリ1、211 処理部、212 データ書き込み処理部、213 データ読み出し処理部、220 アプリ2、230 保護アプリ、231 データ書き込み受付部、232 データ読み出し受付部、233 一時領域アクセス制御部、234 メモリアクセス制御部、235 誤り検出符号計算部、236 メモリアクセス判定部、237 メモリアクセス情報、238 メモリアクセススケジューリング制御部、239 スケジューリング部、301 アプリ1定義データ格納領域、302 アプリ2定義データ格納領域、303 データ一時領域A、304 データ一時領域B。

Claims (3)

  1.  複数のアプリケーションによりデータが読み書きされるメモリと、
     第一のアプリケーションの連続する起動タイミング間に、前記第一のアプリケーションより重要度が低い第二のアプリケーションが起動されたか否かを判定するメモリアクセススケジューリング制御部と、
     前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動されたと判定された場合、誤り検出符号を計算する誤り検出符号計算部と、
     前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動さなかったと判定された場合、前記第一のアプリケーションからの書き込み要求があったデータを前記メモリに書き込み、前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動されたと判定された場合、前記第一のアプリケーションからの書き込み要求があったデータを前記誤り検出符号とともに前記メモリに書き込むメモリアクセス制御部と、
    を有することを特徴とする情報処理装置。
  2.  前記メモリは、第一のメモリと第二のメモリとで構成され、
     前記メモリアクセス制御部は、前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動されなかったと判定された場合、前記第一のアプリケーションからの書き込み要求があったデータを複数の前記第一のメモリに書き込み、前記メモリアクセススケジューリング制御部により前記第二のアプリケーションが起動されたと判定された場合、前記第一のアプリケーションからの書き込み要求があったデータを前記誤り検出符号とともに前記第二のメモリに書き込む
    ことを特徴とする請求項1に記載の情報処理装置。
  3.  前記複数の第一のメモリそれぞれから読み出した複数のデータが一致しなかった場合、または、前記第二のメモリから読み出したデータを前記誤り検出符号計算部で計算した結果と前記第二のメモリから読み出した誤り検出符号が一致しなかった場合、データが前記第二のアプリケーションによって変更されたと判定するメモリアクセス判定部を
    有する事を特徴とする請求項2に記載の情報処理装置。
PCT/JP2014/001564 2014-03-19 2014-03-19 情報処理装置 WO2015140831A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/001564 WO2015140831A1 (ja) 2014-03-19 2014-03-19 情報処理装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/001564 WO2015140831A1 (ja) 2014-03-19 2014-03-19 情報処理装置

Publications (1)

Publication Number Publication Date
WO2015140831A1 true WO2015140831A1 (ja) 2015-09-24

Family

ID=54143860

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/001564 WO2015140831A1 (ja) 2014-03-19 2014-03-19 情報処理装置

Country Status (1)

Country Link
WO (1) WO2015140831A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013057825A1 (ja) * 2011-10-20 2013-04-25 トヨタ自動車株式会社 情報処理装置、データ管理方法、データ管理プログラム
JP2013171467A (ja) * 2012-02-21 2013-09-02 Toyota Motor Corp 情報処理装置、車両用電子制御装置、データ読み書き方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013057825A1 (ja) * 2011-10-20 2013-04-25 トヨタ自動車株式会社 情報処理装置、データ管理方法、データ管理プログラム
JP2013171467A (ja) * 2012-02-21 2013-09-02 Toyota Motor Corp 情報処理装置、車両用電子制御装置、データ読み書き方法

Similar Documents

Publication Publication Date Title
US11262915B2 (en) Method for read latency bound in SSD storage systems
US8595427B1 (en) Non-volatile block storage module using magnetic random access memory (MRAM)
JP2017021789A5 (ja)
WO2009077813A1 (en) Memory mapping system, request controller, multi-processing arrangement, central interrupt request controller, apparatus, method for controlling memory access and computer program product
JP2021043814A (ja) メモリシステム
CN113794764A (zh) 服务器集群的请求处理方法、介质和电子设备
US9569303B2 (en) Information processing apparatus
CN108108262B (zh) 具有检查所选择的存储器访问的硬件检查单元的集成电路
US20180217758A1 (en) Data storage device and method for rewriting parameters thereof
US10403366B1 (en) Method and system for adapting solid state memory write parameters to satisfy performance goals based on degree of read errors
JP2013214212A (ja) メモリコントローラ、半導体記憶装置および復号方法
WO2015140831A1 (ja) 情報処理装置
JP2016537730A (ja) 割り付けられていないメモリ、または初期化されていないメモリに対するリード・アクセスを検出すること
US20150134876A1 (en) Data storage device and operating method thereof
US11868627B2 (en) Method for operating a processing unit
KR101470158B1 (ko) 캘리브레이션 장치 및 그 방법
CN118140215A (zh) 一种内存控制器和带内存控制器的数据处理系统
JP2008003940A (ja) 保護制御装置、保護制御方法及び保護制御プログラム
KR102120044B1 (ko) 복수의 소프트웨어 레벨을 포함하는 컨트롤러 및 그 동작 방법
US8503241B2 (en) Electronic apparatus and data reading method
WO2014119063A1 (ja) 情報処理装置、情報処理方法、およびプログラム
US10635309B2 (en) Method for protecting user data of a storage device, and electronic computing system
US20210357285A1 (en) Program Generation Apparatus and Parallel Arithmetic Device
JP6469599B2 (ja) メモリ管理システム
JP5435647B2 (ja) コンピュータシステム、メモリ初期化方法、及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14886284

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 14886284

Country of ref document: EP

Kind code of ref document: A1