This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2010-264317, filed Nov. 26, 2010, the entire contents of which are incorporated herein by reference.
Embodiments described herein relate generally to a storage device, an electronic device, and an access control method for a storage device.
Conventionally, storage devices accommodated in a housing of an electronic device are known. In a storage device of this type, an access thereto may be restricted from an electronic device and the like as a host and, when an access authority can be confirmed with a password or the like, the restricted access is opened according to an instruction from the electronic device.
However, in such a conventional setting, depending on the conditions of the electronic device and the storage device, the access restriction may be set involuntarily, thereby causing inconvenience in operation.
A general architecture that implements the various features of the invention will now be described with reference to the drawings. The drawings and the associated descriptions are provided to illustrate embodiments of the invention and not to limit the scope of the invention.
In general, according to one embodiment of the invention, a storage device electrically connected to a host, the storage device comprises: a storage module configured to store therein data; an access restriction module configured to restrict an access from the host to the storage module after power of the storage device is turned on; a first restricted access open module configured to open the restricted access from the host to the storage module based on a first command for opening the restricted access from the host; and a second restricted access open module configured to open the restricted access from the host to the storage module based on a second command for carrying out an operation different from the opening of the restricted access from the host.
Following non-limiting embodiments comprise the same constituent elements. Those constituent elements of the same are referred to by the same reference numerals and their redundant explanations are omitted.
An electronic device 1 such as a personal computer serving to operate as a host comprises, as illustrated in
The CPU 11 executes various programs installed and stored in advance in the ROM 12, the magnetic disk device 20, and such, and controls operations of various modules constituting the electronic device 1.
The ROM 12 is a non-volatile memory device and stores therein programs concerning the control of the electronic device 1 and various setting information in a non-rewritable manner. The RAM 13 is a volatile memory device and functions as a work area or the like for the CPU 11 and, in various processes, serves as a stack, a buffer, or the like.
The display module 15 is configured as a display device of, for example, a liquid crystal display (LCD), an organic electro-luminescence (EL) display, and the like. The display module 15 displays various types of information based on a signal from the CPU 11.
The operation input module 16 is configured as, for example, a keyboard, a touch panel, or the like. The operation input module 16 sends an instruction signal to the CPU 11 based on the input operation of an operator and such.
The communication module 17 is an interface that communicates with external devices via a communication network not depicted. The communication module 17 sends various types of information received from the external devices to the CPU 11 and sends various types of information output from the CPU 11 to the external devices.
The magnetic disk device 20 stores therein the programs concerning the control of the electronic device 1, various types of data, and such in a rewritable manner. The storage device that the electronic device 1 comprises is not limited to the magnetic disk device (hard disk drive (HDD)) 20, and may be, for example, a solid state drive (SSD), a semiconductor memory (e.g. a flash memory), or the like.
As illustrated in
The storage module 21 is a recording medium in a disk shape that magnetically stores data therein. The head 22 writes data to the storage module 21 and reads out the data written in the storage module 21. The SPM 23 rotationally drives the storage module 21. The VCM 24 comprises a magnet, a drive coil, and the like not depicted and drives the head 22. The servo controller 25 controls the SPM 23 and the VCM 24. The head IC 26 amplifies a signal of data to be written to the storage module 21 by the head 22 and a signal of data read out from the storage module 21. The read channel 27 is a circuit including, for example, a filter, an AGC, an ADC, and a Viterbi decoder. The encryption circuit 28 encrypts the data to be written to the storage module 21 by a given encryption scheme such as an advanced encryption standard (AES) using a given encryption key. Furthermore, the encryption circuit 28 decrypts the data read from the storage module 21 using a given decryption key. The encryption circuit controller 29 controls the operation of the encryption circuit 28.
The buffer memory 31 temporarily stores therein the data to be written to the storage module 21, the data read out from the storage module 21, and the like. The host IF controller 33 controls sending and receiving of data and commands between the electronic device 1 and the magnetic disk device 20 via a host IF 32.
The flash memory 34 is a non-volatile memory that stores therein programs executed by the MPU 35, various types of setting information concerning the operation of the magnetic disk device 20, and the like.
The MPU 35 executes the programs stored in the flash memory 34 to work as later described modules (for example, an access control module 35a, an access restriction module 35b, a first restricted access open module 35c, a second restricted access open module 35d, a mapping module 35e, a first mapping deactivate module 35f, a second mapping deactivate module 35g, a first determining module 35h, a second determining module 35i, a status storing module 35j, and such, see
As exemplified in
In the present embodiment, the reading/writing can be permitted/prohibited for each of the ranges. This setting is stored in a locking table 21b. The locking table 21b is stored in a security provider (SP) area 21a of the system area. In the locking table 21b, for each of the ranges, values of a start address (RangeStart), a length (RangeLength), a reading prohibition enable/disable flag (ReadLockEnabled), a writing prohibition enable/disable flag (WriteLockEnabled), a reading prohibition status (ReadLocked), a writing prohibition status (WriteLocked), and a restriction on reset flag (LockOnReset) are stored. In the present embodiment, the SP area 21a corresponds to a status storage module.
The start address indicates an address (logical block addressing (LBA)) at which each of the ranges starts. The length indicates a length (number of sectors) of each range.
The reading prohibition enable/disable flag (ReadLockEnabled) is a flag indicating enable/disable of the execution of reading prohibition (whether the reading can be prohibited). If the value is TRUE (for example, one), the reading prohibition can be set for the corresponding range, while if the value is FALSE (for example, zero), the reading prohibition cannot be set for the corresponding range.
The writing prohibition enable/disable flag (WriteLockEnabled) is a flag indicating enable/disable of the execution of writing prohibition (whether the writing can be prohibited). If the value is TRUE (for example, one), the writing prohibition can be set for the corresponding range and, if the value is FALSE (for example, zero), the writing prohibition cannot be set for the corresponding range.
The reading prohibition status (ReadLocked) is a flag indicating the status of whether the reading can be performed (whether the range is in a state capable of being read). If the value is TRUE (for example, one), reading the corresponding range is prohibited and, if the value is FALSE (for example, zero), reading the corresponding range is permitted. However, when the reading prohibition enable/disable flag (ReadLockEnabled) is FALSE, i.e., the reading prohibition cannot be set, the reading is permitted regardless of the value of the reading prohibition status (ReadLocked). In other words, when the value of the reading prohibition enable/disable flag (ReadLockEnabled) is TRUE and the value of the reading prohibition status (ReadLocked) is TRUE, the reading the corresponding range is prohibited. With combinations of other values, the reading is not prohibited.
The writing prohibition status (WriteLocked) is a flag indicating the status of whether the writing can be performed (whether the range is in a state capable of being written). If the value is TRUE (for example, one), writing to the corresponding range is prohibited, while if the value is FALSE (for example, zero), writing to the corresponding range is permitted. However, when the writing prohibition enable/disable flag (WriteLockEnabled) is FALSE, i.e., the writing prohibition cannot be set, the writing is permitted regardless of the value of the writing prohibition status (WriteLocked). In other words, when the value of the writing prohibition enable/disable flag (WriteLockEnabled) is TRUE and the value of the writing prohibition status (WriteLocked) is TRUE, the writing to the corresponding range is prohibited. With combinations of other values, the writing is not prohibited.
The access restriction module 35b, the first restricted access open module 35c, or the second restricted access open module 35d (see
The restriction on reset flag (LockOnReset) is a flag indicating whether to set each range to reading/writing prohibition, on resetting (i.e., when shifting from a power-off state to a power-on state) the magnetic disk device 20 as the storage device. The access restriction module 35b rewrites the values of the reading prohibition status and the writing prohibition status from FALSE to TRUE for the ranges of the restriction on reset flag having the value of Power Cycle. When the values of the reading prohibition status and the writing prohibition status are TRUE, they are maintained as TRUE.
The access control module 35a operates according to the values of the read prohibition status and the write prohibition status. More specifically, the access control module 35a does not read data from the ranges with the reading prohibition enable/disable flag having the value of TRUE and with the reading prohibition status having the value of TRUE. On the other hand, the access control module 35a reads data from the ranges other than those with the reading prohibition enable/disable flag having the value of TRUE and with the reading prohibition status having the value of TRUE. Furthermore, the access control module 35a does not write data to the ranges with the writing prohibition enable/disable flag having the value of TRUE and with the writing prohibition status having the value of TRUE. On the other hand, the access control module 35a writes data to the ranges other than those with the writing prohibition enable/disable flag having the value of TRUE and with the writing prohibition status having the value of TRUE.
As exemplified in
The PBA application is a program operative on the CPU 11 (basic input output system (BIOS)) of the electronic device 1 on resetting the electronic device 1 (i.e., when shifting from a power-off state to a power-off state) to carry out an identity verification based on an account ID and a password. More specifically, the CPU 11 operated according to the PBA application first displays an image (not depicted) that prompts an input of an account ID and a password on the display module 15 of the electronic device 1. The CPU 11 operated according to the PBA application then creates authentication information based on the account ID and the password entered by the operator (user) operating the operation input module 16 and refers to the magnetic disk device 20. When the account ID and the password entered can be confirmed correct, the CPU 11 operated according to the PBA application sends a permit command to the magnetic disk device 20 as the storage device.
In other words, in the present embodiment, by the MBR shadowing, the CPU 11 of the electronic device 1 confirms by the PBA application whether the operator has an authority to log-in or operate, prior to booting the OS. When the authority is confirmed, by cancelling the MBR shadowing, the CPU 11 of the electronic device 1 loads the OS from the storage module 21 and boots it. The magnetic disk device 20 as the storage device deactivates the MBR shadowing and also deactivates the foregoing access restriction when the permit command is received from the electronic device 1 as the host by the operation of the PBA application.
As indicated in
The execution enable flag (Enabled) for MBR shadowing is a flag indicating enable/disable of execution of the MBR shadowing (whether the MBR shadowing can be executed). If the value is TRUE (for example, one), it is possible to execute (set) the MBR shadowing and, if the value is FALSE (for example, zero), it is not possible to execute (set) the MBR shadowing.
The execution status (Done) is a flag indicating the state of whether the MBR shadowing (mapping) is in execution (valid). If the value is TRUE (for example, one), the MBR shadowing is in a finished state, i.e., the state in which the MBR shadowing is deactivated (invalid) and, if the value is FALSE (for example, zero), the MBR shadowing is not in a finished state, i.e., the state in which the MBR shadowing can be executed (valid).
The mapping module 35e, the first mapping deactivate module 35f, or the second mapping deactivate module 35g rewrites the execution status. The mapping module 35e can rewrite the value of the execution status from TRUE to FALSE. The first mapping deactivate module 35f or the second mapping deactivate module 35g can rewrite the value of the execution status from FALSE to TRUE. While the first mapping deactivate module 35f and the second mapping deactivate module 35g differ in their operating conditions from each other, the operations of rewriting the status value are the same.
The execution on reset flag (DoneOnReset) is a flag indicating whether to execute the MBR shadowing when resetting (i.e., when shifting from a power-off state to a power-on state) the magnetic disk device 20 as the storage device. The mapping module 35e rewrites the value of the execution status from TRUE to FALSE if the value of the execution on reset flag is Power Cycle. When the value of the execution status is FALSE, it is maintained as FALSE.
The access control module 35a operates according to the value of the execution status. More specifically, when the value of the execution enable/disable flag is TRUE and the value of the execution status is FALSE, the access control module 35a carries out the foregoing MBR shadowing (mapping). The access control module 35a does not carry out the MBR shadowing (mapping) other than when the value of the execution enable/disable flag is TRUE and the value of the execution status is FALSE.
Referring to
The MPU 35 of the magnetic disk device 20 first executes a power-on process (S1). In the power-on process, as indicated in
The MPU 35 then operates as the mapping module 35e (see
The MPU 35 then operates as the access restriction module 35b (see
In other words, in the present embodiment, by the power-on process at S1 (S11 to S14), at the time of resetting the magnetic disk device 20 as the storage device, the PBA application is launched by the MBR shadowing, whereby the operation of an identity verification (authority confirmation) is required and the access restriction to predetermined areas of the storage module 21 is executed. Consequently, the security of data stored in the storage module 21 of the magnetic disk device 20 can be further enhanced.
However, in resetting the magnetic disk device 20 as the storage device, there are a reset at the time the electronic device 1 as the host is turned on (hereinafter, referred to as a host reset) and a reset at the time the magnetic disk device 20 is turned on (being returned) from a stand-by state in which the magnetic disk device 20 as the storage device is turned off while the electronic device 1 is maintained to be turned on (hereinafter, referred to as a stand-by return). The CPU 11 of the electronic device 1 accesses the address of LBA=0 for loading the OS and such at the time of the host reset, while it accesses addresses other than LBA=0 at the time of the stand-by return because loading of the OS and such is not necessary. If the magnetic disk device 20 as the storage device carries out the same operation in both the host reset and the stand-by return, the desired operation cannot be obtained. More specifically, for example, if the MPU 35 of the magnetic disk device 20 executes the MBR shadowing even at the time of the stand-by return similarly to that of the host reset, the required data cannot be returned to the electronic device 1 as the host, whereby problems may occur in operations of the electronic device 1, the magnetic disk device 20, and the like.
In this point, in the present embodiment, changing the operation of the magnetic disk device 20 as the storage device in response to the result of S3 described later makes it easier to avoid the foregoing inconvenient situations to occur.
More specifically, referring back to
At S3, when the command received from the electronic device 1 as the host is the read command or the write command specifying LBA=0, it can be assumed to be in a host reset state. In the present embodiment, when the first determining module 35h determines that the command received from the electronic device 1 as the host is the read command or the write command specifying LBA=0 (Yes at S3), the CPU 11 of the electronic device 1 as the host reads the PBA application by the MBR shadowing (mapping) of the MPU 35 and executes the PBA application (S6). Then, as a result of the verification of a password for an account ID entered with the password stored in the storage module 21 (S7), if the password entered is not a correct password (No at S7), the CPU 11 now operative according to the PBA application may display on the display module 15 an image that prompts reentering an account ID and a password, for example, or may turn the electronic device 1 off.
On the other hand, when the password entered is confirmed to be correct (Yes at S7), the CPU 11 of the electronic device 1 as the host sends permit commands that opens the restricted access (a TrustedSend command and a TrustedRecv command (TrustedSend/Recv commands)) to the magnetic disk device 20 as the storage device. When the MPU 35 now operates as the second determining module 35i (see
The MPU 35 that received the permit command at S8 now operates as the first restricted access open module 35c (see
Meanwhile, when the access destination (LBA) of the read command or the write command received from the electronic device 1 as the host at S2 is not zero, it can be assumed to be in a stand-by return state. In the present embodiment, when the first determining module 35h determines that the access destination (LBA) of the read command or the write command received from the electronic device 1 as the host is not zero (No at S3), the MPU 35 operates as the second mapping deactivate module 35g (see
Furthermore, when determined No at S3, the MPU 35 operates as the second restricted access open module 35d (see
In the present embodiment, after S2, the MPU 35 operates as a third determining module and, when a read command or a write command is received at S2, determines whether a security unlock command is received (S21). As illustrated in
In the present embodiment, after S2, the MPU 35 is operative as a first determining module different from that of the first embodiment and checks whether an Identify Device command (see
While exemplary embodiments have been explained in the foregoing, the present invention is not limited to those embodiments and various modifications can be made. For example, the constituent elements and processes of the foregoing exemplary embodiments can be appropriately combined. The mapping may be a mapping to other addresses, or a system not carrying out the mapping can be employed. Furthermore, commands other than the foregoing commands that can distinguish each state can be used. Furthermore, a storage device externally connected to an electronic device can be used.
According to the exemplary embodiments, a storage device, an electronic device, and an access control method for a storage device that are less likely to cause inconveniences associated with the access restriction to the storage device can be obtained.
Moreover, the various modules of the systems described herein can be implemented as software applications, hardware and/or software modules, or components on one or more computers, such as servers. While the various modules are illustrated separately, they may share some or all of the same underlying logic or code.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2010-264317 | Nov 2010 | JP | national |