CN116501663A - Method for accessing hidden space and related product - Google Patents

Method for accessing hidden space and related product Download PDF

Info

Publication number
CN116501663A
CN116501663A CN202210457584.XA CN202210457584A CN116501663A CN 116501663 A CN116501663 A CN 116501663A CN 202210457584 A CN202210457584 A CN 202210457584A CN 116501663 A CN116501663 A CN 116501663A
Authority
CN
China
Prior art keywords
hidden
space
storage device
host
program
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210457584.XA
Other languages
Chinese (zh)
Inventor
李小凤
王祎磊
何蒙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Starblaze Technology Co ltd
Original Assignee
Chengdu Starblaze Technology Co ltd
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 Chengdu Starblaze Technology Co ltd filed Critical Chengdu Starblaze Technology Co ltd
Publication of CN116501663A publication Critical patent/CN116501663A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures

Abstract

The present application relates to a method and related product for accessing a hidden space, the hidden space having a first program stored therein, the method comprising: sending a command triggering the storage device in a hidden mode to adjust the working mode of the storage device so as to control the working mode of the storage device to be switched to a common mode, wherein the hidden space is invisible to a host in the hidden mode and visible to the host in the common mode; reading the first program from the hidden space; and running the first program. The technical scheme of the application can access and utilize the data stored in the hidden space so as to meet the actual requirements.

Description

Method for accessing hidden space and related product
Technical Field
The present application relates generally to the field of storage technology. More particularly, the present application relates to a method for accessing a hidden space, and a host and a computer readable storage medium performing the aforementioned method.
Background
FIG. 1A illustrates a block diagram of a solid state storage device. The solid state storage device 102 is coupled to a host for providing storage capability for the host. The host and solid state storage device 102 may be coupled by a variety of means including, but not limited to, connecting the host to the solid state storage device 102 via, for example, SATA (Serial Advanced TechnoLogy Attachment ), SCSI (Small Computer System Interface, small computer system interface), SAS (Serial Attached SCSI ), IDE (Integrated Drive Electronics, integrated drive electronics), USB (Universal Serial Bus ), PCIE (Peripheral Component Interconnect Express, PCIE, peripheral component interconnect Express), NVMe (NVM Express), ethernet, fibre channel, wireless communications network, and the like. The host may be an information processing device capable of communicating with the storage device in the manner described above, such as a personal computer, tablet, server, portable computer, network switch, router, cellular telephone, personal digital assistant, or the like. The storage device 102 (hereinafter, solid-state storage device will be simply referred to as storage device) includes an interface 103, a control section 104, one or more NVM chips 105, and a DRAM (Dynamic Random Access Memory ) 110.
The NVM chip 105 includes common storage media such as NAND flash memory, phase change memory, feRAM (Ferroelectric RAM, ferroelectric memory), MRAM (Magnetic Random Access Memory, magnetoresistive memory), RRAM (Resistive Random Access Memory, resistive memory), and the like.
The interface 103 may be adapted to exchange data with a host by way of, for example, SATA, IDE, USB, PCIE, NVMe, SAS, ethernet, fibre channel, etc.
The control unit 104 is used for controlling data transmission among the interface 103, the NVM chip 105 and the DRAM110, and also for memory management, host logical address to flash physical address mapping, erase balancing, bad block management, etc. The control component 104 can be implemented in a variety of ways, such as software, hardware, firmware, or a combination thereof, for example, the control component 104 can be in the form of an FPGA (Field-programmable gate array, field programmable gate array), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), or a combination thereof. The control component 104 may also include a processor or controller in which software is executed to manipulate the hardware of the control component 104 to process IO (Input/Output) commands. Control unit 104 may also be coupled to DRAM110 and may access data of DRAM 110. FTL tables and/or cached data of IO commands may be stored in the DRAM.
The control section 104 includes a flash interface controller (or referred to as a media interface controller, a flash channel controller) coupled to the NVM chip 105, which issues commands to the NVM chip 105 in a manner conforming to an interface protocol of the NVM chip 105 to operate the NVM chip 105, and receives a command execution result output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI", and the like.
FTL (Flash Translation Layer ) is utilized in the storage device 102 to maintain mapping information from logical addresses (LBAs) to physical addresses. The logical addresses constitute the memory address space of the solid state memory device as perceived by upper level software such as the operating system. The physical address is an address for accessing a physical storage unit of the solid state storage device. Address mapping may also be implemented in the related art using an intermediate address modality. For example, logical addresses are mapped to intermediate addresses, which in turn are further mapped to physical addresses. The table structure storing mapping information from logical addresses to physical addresses is called FTL table. FTL tables are important metadata in a storage device. The entries of the FTL table record address mapping relationships in units of data pages in the storage device.
FTLs of some storage devices are provided by a host to which the storage device is coupled, FTL tables are stored by a memory of the host, and FTLs are provided by a CPU executing software of the host. Still other storage management devices disposed between a host and a storage device provide FTLs. In these cases, the read/write command received by the storage device indicates a physical address.
Commands provided by the host to the storage device may access logical addresses corresponding to one or more entries of the FTL table. And the control component may change the form of the command received from the interface 103 (e.g., split the command according to the logical address space size corresponding to the FTL entry) and process the command to change the form. For clarity purposes, herein, access to a single FTL entry by a read/write command received by a storage device is described as an example.
FIG. 1B shows a schematic diagram of a prior art logical address space. In the prior art, a logical address space is a storage address space provided by a storage device, and a host can access the storage device using elements (logical addresses) in the logical address space. In general, the logical address (Logical Block Addressing, LBA) space that can be accessed by the host is the same size as the LBA space that can be provided by the storage device. For a logical address space, the storage device manages the mapping between logical and physical addresses through FTL tables.
FIG. 1C illustrates a schematic diagram of a host accessing a storage device. In fig. 1C, the host sends an IO command (read/write command) to the storage device, the IO command indicating a logical address (LBA address) to be accessed, the storage device converts the LBA address into a physical block address (Physical Block Address, PBA) based on the FTL table managed in the control section, and then the control section accesses the NVM chip according to the PBA address.
With the increasing data storage technologies, a variety of data is stored in storage devices, such as user data, operating systems, application data, or data required for a host to restore factory settings, and the like. In order to improve the security of data, some data are not desired to be seen by the user (such as the data required for the host to restore factory settings), and the data may be stored in a hidden manner in the storage device, where the hidden storage of the data means that the data cannot be seen or accessed by the user or the application program on the host side.
Disclosure of Invention
The prior art generally refers to hiding the stored data from an application program of the host, but is visible to an operating system of the host, and if the operating system is invaded or misoperated, the hidden stored data may be tampered or deleted. In order to improve the security of the data stored in a hidden manner, the data stored in the storage device is hidden to both the host application program and the operating system, and the host cannot access and modify the data stored in the hidden manner through the application program or the operating system under normal conditions, and can access the data stored in the hidden manner only when the data stored in the hidden manner is required to be used. For example, when the host needs to restore the factory settings, the host can access data required for restoring the factory settings by the host, which is stored in the storage device, to execute the factory settings.
In order to implement a function of hiding the stored data from both host applications and operating systems, a logical address space provided by a storage device is generally partitioned, and the data to be hidden is stored in the hidden space. The hidden space refers to a part of logic address space which is not provided for the host by the storage device under normal conditions, and an application program or an operating system of the host cannot access the data stored in the hidden space in a hidden mode. However, in some cases, for example, factory setting needs to be restored, the host needs to access the data stored in the hidden space, and in this case, the hidden space and the data stored in the hidden space need to be accessible to the host. Since the function of hiding the stored data is provided in the storage device, it is desirable that on the basis of this, when access to the hiding stored data is required, the computer is able to acquire the hiding stored data and perform a corresponding operation according to the acquired hiding stored data.
Therefore, how to access the hidden data according to the actual requirement is a technical problem to be solved.
The scheme provided by the embodiment of the application can access and utilize the data stored in the hidden space to meet the actual requirements.
According to a first aspect of the present application, there is provided a first method for accessing a hidden space according to the first aspect of the present application, the hidden space having a first program stored therein, the method comprising: sending a command triggering the storage device in a hidden mode to adjust the working mode of the storage device so as to control the working mode of the storage device to be switched to a common mode, wherein the hidden space is invisible to a host in the hidden mode and visible to the host in the common mode; reading the first program from the hidden space; and running the first program.
According to a first method for accessing a hidden space according to a first aspect of the present application, there is provided a second method for accessing a hidden space according to the first aspect of the present application, further comprising, before reading the first program from the hidden space: and sending an Identify command to the storage device to receive the storage capacity of the storage device in the normal mode, which is fed back by the storage device based on the Identify command.
According to a first method for accessing a hidden space of the first aspect of the present application, there is provided a third method for accessing a hidden space according to the first aspect of the present application, wherein the command for adjusting the operation mode includes a mode switching command or a Set Feature command defined by NVMe protocol.
According to a third method for accessing a hidden space according to the first aspect of the present application, there is provided a fourth method for accessing a hidden space according to the first aspect of the present application, the method further comprising: and recording a mode switching mark in response to the command for adjusting the working mode being sent to the storage device.
According to one of the first to fourth methods for accessing a hidden space according to the first aspect of the present application, there is provided a fifth method for accessing a hidden space according to the first aspect of the present application, reading out the first program from the hidden space includes: reading the first program from the hidden space according to the logical address of the first program; or creating a block device with the hidden space and reading out the first program from the hidden space according to the block device.
According to a fifth method for accessing a hidden space according to the first aspect of the present application, there is provided a sixth method for accessing a hidden space according to the first aspect of the present application, reading out the first program from the hidden space according to the block device, comprising: mounting the block device to a file system designated path; accessing the hidden space according to the specified path and reading the first program from the logical address space.
According to one of the first to fourth methods for accessing a hidden space according to the first aspect of the present application, there is provided a second method for accessing a hidden space according to the first aspect of the present application, reading out the first program from the hidden space comprises: updating a partition table of the storage device in a hidden mode to create a partition corresponding to the hidden space; accessing the hidden space from the partition and reading the first program from the hidden space.
A seventh method for accessing a hidden space according to the first aspect of the present application provides an eighth method for accessing a hidden space according to the first aspect of the present application, the method further comprising: before updating the partition table of the storage device in the hidden mode, backing up the partition table of the storage device in the hidden mode, and before the storage device is restored to the hidden mode from the normal mode, restoring the backed up partition table to delete the partition corresponding to the hidden space.
According to an eighth method for accessing a hidden space according to the first aspect of the present application, there is provided a method for accessing a hidden space according to the ninth method for accessing a hidden space according to the first aspect of the present application, wherein the first program occupies a non-tail logical address space in the hidden space, so as to avoid that an updated partition table covers part or all of the first program when creating a partition corresponding to the hidden space.
According to one of the first to eighth methods for accessing a hidden space according to the first aspect of the present application, there is provided the tenth method for accessing a hidden space according to the first aspect of the present application, wherein a second program is stored in a specified location of the hidden space, and reading the first program from the hidden space includes: and acquiring the second program from the designated position, and executing the second program to read the first program.
According to a tenth method for accessing a hidden space according to the first aspect of the present application, there is provided a method for accessing a hidden space according to the eleventh aspect of the present application, running the first program comprising: and writing the first program into an existing file system, and running the first program.
According to an eleventh method for accessing a hidden space according to the first aspect of the present application, there is provided a twelfth method for accessing a hidden space according to the first aspect of the present application, wherein the first program includes an operating system or antivirus software for restoring factory settings, and the first program is run to restore factory settings or perform disinfection.
According to an eighth method for accessing a hidden space according to the first aspect of the present application, there is provided a thirteenth method for accessing a hidden space according to the first aspect of the present application, the method further comprising: restoring the backed-up partition table through the first program execution.
According to one of the eleventh to thirteenth methods for accessing a hidden space according to the first aspect of the present application, there is provided a fourteenth method for accessing a hidden space according to the first aspect of the present application, the method further comprising: and before the first program is run, sending a command triggering the first program to adjust the working mode to the storage device so as to control the working mode of the storage device to be switched to the hidden mode.
According to one of the eleventh to thirteenth methods for accessing a hidden space according to the first aspect of the present application, there is provided a method for accessing a hidden space according to the fifteenth aspect of the present application, the method further comprising: during the operation of the first program, the operation of writing data into the part of the logic address space before the hidden space is not executed.
According to a fourth method for accessing a hidden space of the first aspect of the present application, there is provided a sixteenth method for accessing a hidden space according to the first aspect of the present application, further comprising: in response to detecting a partition table exception for the storage device and the mode switch flag being present, the partition table exception is ignored.
According to one of the first to sixteenth methods for accessing a hidden space according to the first aspect of the present application, there is provided the seventeenth method for accessing a hidden space according to the first aspect of the present application, wherein the storage device is set to a hidden mode before shipment and the first program is recorded in its hidden space.
According to one of the first to sixteenth methods for accessing a hidden space according to the first aspect of the present application, there is provided the eighteenth method for accessing a hidden space according to the first aspect of the present application, the method further comprising: in response to attempting to access the hidden space of the storage device in the hidden mode, denying the access by a storage device driver in the host; or in response to having access to a hidden space of the storage device in the hidden mode, denying said access by the storage device.
According to one of the first to eighteenth methods for accessing a hidden space according to the first aspect of the present application, there is provided a nineteenth method for accessing a hidden space according to the first aspect of the present application, the method further comprising: and in response to determining that the storage device is switched to the normal mode, accessing the data or the files in the non-hidden space of the storage device by using the original file system.
According to a second aspect of the present application, there is provided a host according to the second aspect of the present application, the host comprising a processor; and a memory storing computer instructions for accessing the hidden space, which when executed by the processor, cause the host to perform one of the first to nineteenth methods for accessing the hidden space of the first aspect of the present application.
According to a third aspect of the present application, there is provided a computer readable storage medium according to the third aspect of the present application, which when executed by a processor, causes one of the first to nineteenth methods for accessing a hidden space to be implemented.
Drawings
For a clearer description of embodiments of the present application or of the solutions of the prior art, reference will be made below to the accompanying drawings, which are used in the description of embodiments or of the prior art, it being obvious that the drawings in the description below are only some embodiments described in the present application, from which other drawings can also be obtained for a person skilled in the art;
FIG. 1A illustrates a block diagram of a solid state storage device;
FIG. 1B illustrates a prior art logical address space LBA space diagram;
FIG. 1C illustrates a schematic diagram of a host accessing a storage device;
FIG. 1D is a schematic diagram of a LBA space presented to a host by a hidden-mode storage device according to an embodiment of the present application;
FIG. 1E illustrates a mapping diagram between another hidden-mode host LBA space and device LBA space provided by an embodiment of the present application;
FIG. 1F illustrates a mapping diagram between a normal mode host LBA space and a device LBA space provided by an embodiment of the present application;
FIG. 2 illustrates a flow diagram of a method for accessing a hidden space provided by an embodiment of the present application;
FIG. 3A is a schematic diagram of a storage space visible to a hidden mode host according to an embodiment of the present disclosure;
FIG. 3B is a schematic diagram of a storage space visible to a normal mode host according to an embodiment of the present application;
FIG. 3C is a schematic diagram of a memory space visible to another common mode host according to an embodiment of the present application; and
FIG. 4 illustrates a schematic diagram of a logical address space of a memory device provided by an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application, taken in conjunction with the accompanying drawings, clearly and completely describes the technical solutions of the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
According to the embodiments of the present application, the operation modes of the storage device may be set to a plurality of modes, including at least a hidden mode and a normal mode. Wherein in the hidden mode, the storage device provides a portion, but not all, of its logical address space to the host, such that the host is aware of only a portion of the storage device's logical address space. And, if the host attempts to access a logical address space that is present in the storage device but not provided to the host, the storage device will reject such access requests by the host and report errors.
The normal mode is an operation mode opposite to the hidden mode, and the normal mode is an operation mode in which the hidden logical address space is visible to the host. Alternatively, in normal mode, the storage device provides the host with a logical address space that is the same as or smaller than the logical address space maintained inside the storage device. It will be appreciated that in some embodiments, other ranges of logical address space are maintained within the storage device that are not visible to the host, whether in normal or hidden mode.
For ease of understanding, both sets of concepts, the host-visible logical address space and the logical address space, and the host logical address space and the device logical address space, are introduced herein. In addition, the concept of logical address space visible to the host and hidden logical address space is introduced on the basis of the logical address space. The storage device is used for storing the data, wherein the logical address space visible to the host is the storage address space reported to the host by the storage device and accessed by the host according to the block device, and the hidden logical address space is the logical address space hidden by the storage device to the host in a hidden mode. The device logical address space is a storage address space provided by the storage device, the host accesses the storage device by using elements of the host logical address space, and for processing IO commands provided by the host, the storage device converts the elements of the host logical address space in the IO commands into elements of the device logical address space. And the host logical address space is the memory address space that the memory device reports to the host and that is accessed by the host in terms of block devices. Thus, a hidden space in this application may be understood as a device logical address space in which the aforementioned hidden logical address space or portion has no mapping relationship with the host logical address space.
The LBA space presented to the host by the storage device in different modes of operation is described below in connection with fig. 1D-1F.
FIG. 1D illustrates a schematic view of a LBA space presented to a host by a hidden-mode storage device provided by embodiments of the present application. As shown in fig. 1D, the LBA space includes a LBA space visible to the host and a hidden LBA space, where the LBA space visible to the host is part or all of the storage address space of the LBA space.
By way of example, the logical address space visible to the host provided by embodiments of the present application is a dynamically variable memory address space. When the storage device is in normal mode, the hidden LBA space (i.e., hidden space) is visible or accessible to applications and/or operating systems in the host, and the logical address space visible to the host is the full logical address space, which is the same size as the logical address space. When the storage device is in the hidden mode, the hidden LBA space is an "LBA space" that is invisible or inaccessible to applications and/or operating systems in the host, and the logical address space visible to the host is a portion of the logical address space that is smaller in size than the logical address space.
FIG. 1E illustrates a mapping diagram between a hidden-mode host LBA space and a device LBA space provided by an embodiment of the present application. Wherein the host logical address space is a storage address space known to and accessible by the host and the device logical address space is a storage address space maintained and managed by the storage device. In order to realize that the host accesses the storage device through the elements of the host logical address space, a certain mapping relationship exists between the host logical address space and the device logical address space, and the mapping relationship is not always unchanged, but dynamically changed according to different working modes of the storage device. In fig. 1E, the device LBA space may include A1, A2, and A3, where there is a mapping relationship between the host logical address space 1 and A2, and A1 and A3 do not have a corresponding host logical address space. It will be appreciated that in the hidden mode, the hidden space includes device logical address spaces A1 and A3.
As shown in fig. 1E, when the storage device is in the hidden mode, a relationship between the host logical address space and the device logical address space may be set, where a mapping relationship is stored between the host logical address space and a portion of the device logical address space (e.g., a mapping relationship exists between the host logical address space 1 and A2), and a portion of the device logical address space does not have a corresponding host logical address space (e.g., A1 and A3 do not have a corresponding host logical address). Since the host accesses the storage device through the host logical address in the host logical address space, the portion of the device logical address space (A1 and A3) that does not have a corresponding host logical address is inaccessible to the host. For example, the host operating system, the application program or the disk manager cannot access the part of the device logic address space, so that the storage device can hide part of the storage address space from the host, and the storage device is in a hidden mode.
FIG. 1F illustrates a mapping diagram between normal mode host LBA space and device LBA space provided by embodiments of the present application.
In the normal mode in fig. 1F (specifically, the storage device may be Set to the normal mode by a mode switch command or a Set Feature command), as can be seen from fig. 1E, in the hidden mode, the device LBA spaces A1 and A3 cannot be accessed by the host because they do not have corresponding host logical address spaces. As can be seen from the above, compared with the hidden mode, the host may access not only all the device LBA spaces in the hidden mode but also some or all of the device LBA spaces that cannot be accessed in the hidden mode, i.e., in the normal mode, the host may access not only the LBA space A2 but also some or all of the device LBA space A1 and/or the device LBA space A3. The following description will take an example in which the host can access all of the device LBA space A1 and the device LBA space A3 in the normal mode.
In order to enable access to device LBA space A1 and device LBA space A3, in FIG. 1F, in normal mode, the host LBA space includes host LBA space 1 and host LBA space 2. Wherein, there is a mapping relationship between host LBA space 2 and device LBA spaces A1 and A3. It will be appreciated that in hidden mode, the partial device LBA spaces A1, A3 do not have corresponding host LBA spaces (as shown in FIG. 1E). In the normal mode, the partial device LBA spaces A1 and A3 have a mapping relationship with the host LBA space 2. At this time, the host LBA space 2 may be understood as a host LBA space newly added by converting the hidden mode into the normal mode, and the host realizes access to the device LBA space A1 and the device LBA space A3 through the newly added host LBA space 2. For example, when the newly added host logical address space 2 is located behind the host logical address space 1, so as to ensure that the capacity value provided by the storage device to the host changes, the host can still find the corresponding data according to the logical address of the data recorded by the existing file system.
Also by way of example, the newly added host logical address space 2 in normal mode is mapped to any location in the device logical address space (e.g., A1, A3) that is not visible to the host. Thus, after the storage device is switched from the hidden mode to the normal mode, in the normal mode, each address of the host LBA space in the original hidden mode is unchanged, and the added new host LBA space can be mapped to any position of the device LBA space, so that the position limitation of the hidden space in the device LBA space is cancelled. For example, the address range of the host LBA space in the original hidden mode is 0-256GB, and after the hidden mode is switched to the normal mode, the address range of the host LBA space is still 0-256GB. In addition, before and after the mode switching, the device LBA space managed by the storage device is unchanged, so that the change of the host LBA space is isolated from the processing of the control part of the storage device, and the extra complexity is avoided.
After describing the related concepts such as the operation mode of the storage device and the hidden space, the following describes the access procedure of the hidden space with reference to fig. 2.
In order to improve the security of the data stored in a hidden manner, the data stored in the storage device is hidden to both the host application program and the operating system, and the host cannot access and modify the data stored in the hidden manner through the application program or the operating system under normal conditions, and can access the data stored in the hidden manner only when the data stored in the hidden manner is required to be used. For example, when a user finds that a system has malicious codes and needs to restore factory settings or needs to disinfect a host, the user needs to access the hidden space and the stored hidden data thereof.
Fig. 2 illustrates a schematic diagram of a method 200 for accessing a hidden space according to an embodiment of the present application. The aforementioned hidden space stores a first program (i.e., program a) (for example, an operating system or antivirus software for restoring factory settings), and is invisible to the host in the hidden mode and visible to the host in the normal mode. That is, the host cannot read the program a from the hidden space when the storage device is in the hidden mode, and the host needs to be in the normal mode to read the program a from the hidden space. As shown in fig. 2, the access procedure to the hidden space may include:
At step S201, when the storage device is in the hidden mode, a command triggering the storage device in the hidden mode to adjust the operation mode thereof may be transmitted to control the operation mode of the storage device to switch to the normal mode. As described above, the hidden space is visible to the host in the normal mode, so it is necessary to control the storage device to switch to the normal mode by a command in order to be able to access the program a in the hidden space later. The following describes the storage space visible to the host in different modes of operation with reference to fig. 3A-3C.
Fig. 3A illustrates a schematic diagram of a host acquiring a storage space of a storage device in a hidden mode of the storage device according to an embodiment of the present application. When the host initializes the storage device, such as during startup, storage space information of the storage device, such as storage capacity provided by the storage device, a starting address of the hidden storage space, and the like, may be acquired. By way of example, the storage device may be in a hidden mode when delivered to a customer, i.e., a portion of the storage device's LBA space is visible to the host (referred to as non-hidden space), i.e., LBA space that is accessible in IO commands provided by the host to the storage device, and a portion is invisible to the host (referred to as hidden space), i.e., LBA space that is not accessible by the host or known to the host application, operating system, or file system. It is understood that the non-hidden space in this application may be a logical address space visible to the host or a device logical address space having a mapping relationship with the host logical address space, with respect to the hidden space.
For example, referring to fig. 3A, the LBA space size of the storage device is 356GB, and the non-hidden space size and the hidden space size may be set at the manufacturing stage of the storage device, e.g., the non-hidden space (e.g., the LBA space visible to the host) is 256GB, and the hidden space (e.g., the hidden LBA space) is 100GB. The LBA space hidden by the host is located behind the LBA space visible to the host, namely, the logical address range of the LBA space visible to the host is 0-256GB, and the logical address range of the LBA space hidden by the host is 256-356 GB. In addition, LBA space visible to the host may store user data/operating system/applications, LBA space hidden from the host may store program A (e.g., data needed by the host to restore factory settings, etc.). In hidden mode, the storage device sets its storage capacity according to the LBA space size visible to the host, i.e. at this point the storage device sets its storage capacity to 256GB. When the host initializes the storage device, the storage space information of the storage device is acquired, for example, the host may acquire that the storage capacity of the storage device is 256GB and/or the starting address of the hidden LBA space is lba=256 GB. When the host acquires the storage capacity of the storage device as 256GB, the host knows that the accessible logical address space is 0-256GB, the host operating system, the application program or the disk manager can access the data in the range of 0-256GB in the logical address space of the storage device, and the host operating system, the application program or the disk manager cannot access the data in the range of 256-356 GB in the logical address space of the storage device, so that in the hidden mode, the 256-356 GB in the logical address space of the storage device is invisible to the host operating system, the application program or the disk manager.
Fig. 3B illustrates a schematic diagram of a storage space of a host acquiring a storage device in a normal mode of the storage device according to an embodiment of the present application.
The normal mode mentioned in fig. 3B is compared to the hidden mode in fig. 3A, where the host cannot access the hidden LBA space, and in the normal mode, the storage device sets the storage capacity in combination with the LBA space visible to the host and the size of the hidden LBA space, i.e. the storage device sets its storage capacity to 356GB. When the host initializes the storage device, the storage space information of the storage device is acquired, for example, the host may acquire the storage capacity of the storage device to be 356GB. When the host acquires the storage capacity of the storage device to be 356GB, the host knows that the accessible logical address space is 0-356GB, and the host operating system, the application program or the disk manager can access the data in the range of 0-356GB in the logical address space of the storage device. Further, in the normal mode, the host may access the hidden LBA space (including access to program a stored therein) in addition to the LBA space visible to the host. That is, in normal mode, the host can access the LBA space of the entire storage device.
Fig. 3C illustrates a schematic diagram of a host acquiring a storage space of a storage device in another general mode according to an embodiment of the present application.
Metadata (e.g., partition tables) for certain storage systems is recorded at the head and end of storage space of the storage capacity provided by the storage device. As shown in fig. 3C, in the hidden mode, the storage capacity provided by the storage device is 256GB, and metadata is stored at the tail of 256GB space. As can be seen from fig. 3A and 3B, the storage capacity of the storage device in different operation modes changes, and when the storage device mode is switched (from the hidden mode to the normal mode), the LBA space of the storage device changes from 256GB to 356GB. In the process of accessing the storage device, the host computer has no original metadata at the tail of the changed storage space because the storage capacity of the storage device is increased. At this time, a space of a sufficient size may be reserved at the end of the 100GB hidden space for writing metadata when installing an operating system/file system/disk partition. When the operating system recognizes that the storage device size is 356GB, it attempts to acquire metadata (partition table or FAT table, etc.) from the end of the LBA space (around 356 GB).
After the operation mode switching is completed, fig. 2 is returned. Next, at step S202, the program a may be read out from the aforementioned hidden space. Program a can be read in a number of ways. Program a may be read from the hidden space, for example, by a block device, partition, or directly from its logical address.
By way of example, it is specifically possible to create a block device with a hidden space, then mount the block device to a file system specified path, and access the hidden space according to the specified path shown to read out the program a from the hidden space.
By way of example, it is also possible to update the partition table of the storage device in the hidden mode to create a partition corresponding to the hidden space, and access the hidden space from the partition to read out the program a.
By way of example, the program a may also be read from the hidden space directly from the logical address of the program a stored in the storage device.
Next, at step S203, the program a may be run. By way of example, program A may be written to an existing file system and run. Therefore, the hidden space can be accessed to acquire the stored program, and corresponding operations (such as sterilization or factory setting restoration) are executed through running the program (such as a sterilization program and a default operating system for factory setting restoration) so as to meet the actual use requirements.
The aforementioned command for adjusting the operation mode may include a mode switching command or a Set Feature command defined by NVMe protocol, for example. The mode switching command is a custom command and is not a protocol-defined command. However, the format of the mode switch command conforms to a protocol (e.g., NVMe protocol). By way of example, the mode switch command includes a "command code" having a specified value with an optional "command parameter" command code to indicate that the current command is a mode switch command. The host specifies the content or parameter value of the mode switch command.
By way of example, the mode switch command provided by the host to the storage device includes only a command code (without specifying a command parameter). The storage device recognizes that the received command is a mode switch command based on the command code, and changes the mode of the current storage device, for example, if the storage device is currently in a hidden mode, to a normal mode in response to receiving the mode switch command; and/or if the storage device is currently in the normal mode, changing to the hidden mode in response to receiving the mode switch command. In yet another example, a mode switch command provided by a host to a storage device includes a command code and a command parameter. The storage device recognizes that the received command is a mode switching command according to the command code, and further determines a mode to be entered by the storage device according to the command parameter. The switch from the hidden mode to the normal mode is indicated when the command parameter is, for example, 0, and the switch from the normal mode to the hidden mode is indicated when the command parameter is, for example, 1.
The content of the host defines the mode switching command to instruct the storage device to execute the working mode switching operation after receiving the mode switching command, or configures parameters of the mode switching command, for example, the host instructs the storage device to execute the working mode switching operation after receiving the mode switching command by setting a value of a command parameter in the mode switching command.
When the host defines the content of the mode switching command, the storage device switches the current working mode according to the mode switching command, and as an example, in response to receiving the mode switching command in the normal mode, the storage device switches from the normal mode to the hidden mode; or in response to receiving the mode switch command in the hidden mode, the storage device switches from the hidden mode to the normal mode. When the host configures the command parameter of the mode switching command, the storage device switches the operation mode according to the value of the command parameter, for example, the command parameter of the host configures the mode switching command to be configured according to the operation mode of the current storage device, for example, the operation mode of the current storage device is a hidden mode, and in order to control the storage device to switch to the normal mode, the command parameter is configured to be 0, and the storage device switches the operation mode to the normal mode according to the value of the command parameter; the current working mode of the storage device is a normal mode, and in order to control the storage device to switch to a hidden mode, the command parameter is configured to be 1, and the storage device switches the working mode to the hidden mode according to the command parameter value.
By way of example, the specific format of the host-defined mode switch command may also include a command code and two or more command parameters to implement further functions.
In one embodiment, the mode switch command instructs the storage device to: set to hidden mode, set to normal mode, and set to hidden LBA space size. Wherein the function set to the hidden mode and the function set to the normal mode are suitable for use during operation of the storage device, and the function set to the size of the hidden LBA space is suitable for use when the storage device is manufactured to provide the storage device with a specified size of the hidden space to a user. When the mode switch command indicates that the hidden LBA space size is set, the value of the hidden LBA space size is also described by a further command parameter.
Further, a command parameter of the mode switch command is used to indicate the data length to be transmitted by the current command, so as to meet the requirements of the host and the storage device. The host and/or storage device determines whether processing of the current command is complete by identifying the data length to be transmitted by the current command indicated in the command parameters. Since the mode switch command does not require data transfer between the host and the storage device, the command parameter is set to 0 in the mode switch command.
Similarly, a further command parameter of the mode switch command is used to indicate the length of metadata to be transmitted by the current command, which command parameter is also set to 0 in the mode switch command in accordance with embodiments of the present application.
When the mode switch command indicates that the hidden LBA space size function is set, it is also indicated by one or more command parameters, for example, whether the hidden LBA space is initialized, whether the hidden LBA space requires 4KB alignment, etc.
As another implementation manner, the aforementioned command for triggering the storage device to adjust the operation mode may also be a Set Feature command defined by the NVMe protocol. The Set Feature command of the NVMe protocol can Set a variety of different "features" by a command parameter. For a specific storage device, some "features" are not supported, so that when it receives a Set Feature command for such features (functions), it is not necessary to perform processing, so that a Set Feature command indicating such features (functions) can be utilized as a mode switching command, so that it is not necessary to add a new command.
By way of example, the "LBA Range Type" is one of the features that a Set feature command may indicate, and some current storage devices do not support. Thus, a Set Feature command with an "LBA Range Type" command parameter is used as a mode switch command according to an embodiment of the present application. For this purpose, in the Set Feature command, one or more command parameters are carried in addition to the "LBA Range Type" command parameter, so that the mode switch command instructs the storage device to: set to hidden mode, set to normal mode, and set to hidden LBA space size. And when the mode switch command indicates that the hidden LBA space size function is set, also indicates, for example, by one or more command parameters, whether the hidden LBA space is to be initialized, whether the hidden LBA space requires 4KB alignment, and so forth. Specifically, the "Data Structure Entry" field of the Set Feature command with the "LBA Range Type" command parameter is utilized to describe one or more parameters for the mode switch command.
In yet another example, the Set Feature command indicates two logical address intervals LBA0 through LAB100, LBA200 through LBA 300. According to the embodiment of the application, on the basis that the function of the Set Feature command for indicating one or more sections of logical address intervals is defined by using the existing NVMe protocol, one or more sections of logical address intervals indicated by the Set Feature command are Set as logical address intervals accessible to a host or as logical address intervals inaccessible to the host, so that part of logical address spaces in the storage device are hidden or displayed for the host. Further, the operation mode of the storage device and the value indicating the storage capacity of the storage device may be Set according to one or more sections of the logical address section indicated by the Set Feature command. By way of example, the one or more logical address intervals may be Set by a user via a Set Feature command. It can be appreciated that, in some embodiments, the user may also directly Set the Set Feature command defined by the NVMe protocol, so that the Set Feature command instructs the storage device to perform mode switching, that is, after the storage device receives the Set Feature command, the storage device enters the hidden mode or exits the hidden mode according to the switching mode indicated by the Set Feature command.
As an example, before reading the program a, an Identify command may also be sent to the storage device to receive the storage capacity of the storage device in the normal mode based on the feedback of the Identify command. When acquiring the storage capacity of the storage device, for the storage device following the NVMe protocol, the host may acquire the storage capacity of the storage device from the response of the command by sending an Identify command to the storage device. In the prior art, the host triggers the initialization of the storage device and acquires the storage capacity of the storage device when in startup, and the operation of acquiring the storage capacity of the storage device is not actively triggered at other moments. That is, when the working mode of the storage device is switched during the operation of the host, the host includes the operating system, the file system, and other components during the operation of the host, which do not know whether the storage capacity of the storage device is changed or still access the storage device according to the storage capacity before the change, and when the storage capacity of the storage device is changed, the partition table may be abnormal, so that the host fails to access the storage device, or the host cannot use the increased storage space because the storage space is not known to be increased.
In order to enable the host to acquire the changed storage capacity in real time after the storage capacity of the storage device is changed. Further, by way of example, the mode switch command may be registered before the mode switch command is issued, so as to associate the mode switch command with a specified command (e.g., an Identify command). The registration is a function provided by an operating system of the host or a driver of the storage device, and the mode switching command and the specified command are associated through registration, so that after the host sends the mode switching command, the operating system or the driver of the storage device can spontaneously send the registered specified command to the storage device again, thereby adjusting the sending time of the Identify command, and after the registered mode switching command is sent to the storage device, the host can send the Identify command to the storage device at any time according to the requirement to acquire the storage capacity of the storage device.
The Identify command may indicate a variety of command parameters. As an example, in the case where the storage device does not support "NameSpace", the storage capacity of the storage device is acquired with an Identify command indicating the "NameSpace" parameter, or further information related to the hidden LBA space is further acquired. Therefore, the processing of the Identify command with other command parameters by the storage device is not changed, so that the storage device meets the requirement of being compatible with the NVMe protocol. When the storage device according to the embodiment of the present application processes the Identify command indicating the "NameSpace" parameter, information hiding the logical address space is added to the result of the Identify command. Alternatively, since the storage device does not support "NameSpace", the NSID of "NameSpace" is set to, for example, NS0 in the Identify command indicating the "NameSpace" parameter.
Also by way of example, in the case where a Set Feature command indicating "LBA Range Type" is used as the mode switch command, a Get Feature command indicating "LBA Range Type" may be used accordingly to acquire the current operation mode (in normal mode or hidden mode) of the storage device, and optionally the size of the hidden LBA space. A Set Feature command indicating "LBA Range Type" is also registered to be associated with the mode switch command.
According to the embodiment of the application, the mode switching command is indicated by a custom command or by an existing command in a standard, so that a new function or a function different from the standard is provided for the command. While the storage devices to which the hosts are coupled may come from different vendors or different batches, and may or may not support mode switch commands. Support needs to be provided to assist the host in identifying whether the storage device supports mode switch commands. Also as an example, the command sent to the storage device by the corresponding host, for example, an NVMe command or a custom command, may reflect the effect generated by each command through the Log page. "Log Page" is a data structure defined by NVMe protocol, which reflects the effect generated after each command is processed by the storage device, so that the difference of the effect of processing the command between the storage devices is reflected by the data corresponding to each command in "Log Page". For example, one storage device may change the storage capacity size after processing a Set Feature command indicating "LBA Range Type" while another storage device may not; for another example, one storage device may change the storage capacity after processing the custom mode switch command, while another storage device does not support the custom mode switch command. Thus, the effect that a command will produce can be obtained through the Log page to identify whether one or more storage devices connected to the host support hiding from part of the logical address space. Specifically, the host sets an identifier for the mode switching command in the Log Page to indicate an effect generated by the mode switching command, and returns a relevant identifier when a Get Log Page command (a Log Page of a corresponding mode switching command is acquired) in the NVMe protocol is received. For example, in the data of the Log Page corresponding to the mode switch command, the CSUPP/LBCC/NCC/NIC/CCC/CSE field specified by the NVMe protocol is set to 1.
Before issuing a mode switching command to a storage device, a host firstly inquires through a Get Log command, if the mode switching command for a certain storage device is found to change the storage capacity, the mode switching command of the storage device is correspondingly registered in an operating system or a driver of the storage device so as to be related to an Identify command, a Get Feature command indicating an LBA Range Type, and the like; if it is found that the storage capacity is not changed for a certain storage device mode switch command, the mode switch command is not registered for that storage device.
After registering the mode switch command, the host may acquire the storage capacity of the storage device by issuing a command Identify namespace or Get Feature command after the driver captures that the mode switch command is issued.
As an example, further, before updating the partition table of the storage device in the hidden mode, the partition table of the storage device in the hidden mode may be backed up, and before the storage device is restored from the normal mode to the hidden mode, the backed up partition table may be restored, so as to delete the partition corresponding to the hidden space. The partition table of the storage device in different working modes is different, the partition table updated in the common mode is recorded with the partition corresponding to the hidden space, and the partition table in the hidden mode cannot generate the related information of the hidden space. Therefore, the partition corresponding to the hidden space is deleted by using the backup and recovery of the partition table in the hidden mode, and the hidden space is ensured not to be exposed in the hidden mode. As an embodiment, restoring the backed-up partition table may be performed specifically by the program a.
By way of example, program A may occupy a non-trailing logical address space in the hidden space to avoid that the updated partition table covers part or all of program A when creating the partition to which the hidden space corresponds. FIG. 4 illustrates a schematic diagram of a logical address space of a memory device provided by an embodiment of the present application. As shown in FIG. 4, the logical address spaces of the storage device are LBA 0-LBAm, where the non-hidden spaces are LBA 0-LBAn and the hidden spaces are LBAn-LBAm. The Protective MBR is a Protective main boot partition table, and a globally unique identification partition table (GUID Partition Table, GPT) is divided into a Primary GPT at the head and a Secondary GPT at the tail. In the actual use process, the program A is not required to be stored at the tail part (the second GPT area of the shadow part) of the hidden space, so that the program A is prevented from being damaged, for example, part or all of the updated partition table coverage program A is used when the partition corresponding to the hidden space is created.
As an example, the specified location of the hidden space may store a second program (e.g., program B). Program B may be acquired from a specified location and read by executing program B. It will be appreciated that the specified location may be specifically set according to actual design requirements, and may be any location in the non-tail logical address space in the hidden space. And program B may be understood as the driver of program a. It will be appreciated that in some embodiments the program B is not limited to being stored in a hidden space, but may be downloaded directly from the server side, etc.
For example, further, before the program a runs, a command triggering the storage device to adjust the working mode may be further sent to the storage device, so as to control the working mode of the storage device to switch to the hidden mode.
By way of example, it is also possible that during the operation of program A, no operation is performed to write data to the part of the logical address space preceding the hidden space. For example, the memory space of the memory device is 0 to 356GB. Wherein the hidden space is 256 GB-356 GB. If there is an operation of writing data into a part of the logical address space (for example, 0GB to 256 GB) before the hidden space during the running process of the program a, the operation of writing data is refused, which is more than avoiding the damage to the old partition table. By way of further example, not performing operations to write data to a portion of the logical address space preceding the hidden space includes: during the running process of the program A, the host does not send a write command for indicating to write data into a part of the logic address space in front of the hidden space to the storage device; or the storage device does not process the write command upon receiving a write command indicating to write data to a portion of the logical address space preceding the hidden space.
As an example, a command to adjust the operation mode may also be sent to the storage device, recording the mode switch flag. Thus, it may be convenient to determine whether the storage device is mode-adjusted subsequently by the mode switch flag. Accordingly, as an example, the mode switching mark can be deleted according to the requirement, so as to meet different use requirements of the user.
Further, by way of example, when a partition table exception of a storage device is checked and a mode switch flag is present, the partition table exception is ignored. Specifically, when detecting a partition table abnormality of the storage device, if the mode switch flag can be found at the same time, it can be determined that the partition table abnormality is caused by the mode switch of the storage device, and processing is not required, and at this time, a partition table abnormality error is ignored. If the mode switching mark is not found, the fact that some faults possibly exist to cause the abnormal partition table is indicated, and the fault is reported at the moment, so that timely maintenance can be facilitated.
As one implementation, the storage device is set in a hidden mode during the storage device manufacturing phase and delivered to the customer who installs the storage device on the host. By way of example, the size of the hidden space may be set at the manufacturing stage of the memory device, for example, the logical address space of the memory device may be 356GB and the hidden space may be set to 100GB. Also by way of example, it may be provided that the hidden space is located after the non-hidden space in the logical address space provided by the storage device. Optionally, in the hidden mode, it is also set that the first program (i.e. program a) is recorded in the hidden space. By way of example, program a may include an operating system required to store a host to restore factory settings, or a disinfection program required for disinfection, etc.
Further by way of example, in hidden mode, if the host's program attempts to access the hidden space, the host's storage device driver denies that access. For example, in hidden mode, the host generates an IO command indicating a logical address contained in the hidden space, and the host's storage device driver refuses to send the IO command to the memory store. Or in the hidden mode, if the host accesses the hidden space, the storage device denies the access. Thus, access by the host to an illegitimate logical address space can be avoided.
In an alternative embodiment, in the process of sending an IO command to the storage device in the hidden mode, if the address of the storage space after accessing the designated location in the IO command exceeds the storage address space range of the storage device, the storage device driver of the host refuses to send the IO command to the storage device, so as to avoid error occurrence, avoid meaningless command sending and processing, and effectively save system resources. Alternatively or in addition, if for some reason (e.g., a virus infection) the host issues an IO command to access the hidden LBA space to the storage device in hidden mode, the storage device also refuses to process such IO command and reports an error to the host, e.g., an access logical address out of range error.
Still optionally, the storage device refuses to process the erase command and/or the format command to the hidden LBA space to protect the data of the hidden LBA space. For example, in hidden mode, the storage device refuses to process erase commands and/or format commands to the hidden LBA space; in the normal mode, the storage device may execute the erase command and/or the format command to the hidden LBA space after verifying the authority of the host, and delete the data of the hidden LBA space in response. In yet another example, after the storage device is manufactured and the required data is written to the hidden LBA space, the erase command and/or format command from the host to the hidden LBA space is never accepted to ensure that the data of the hidden LBA space is continuously available. It will be appreciated that, for wear leveling, data reliability, etc., the control unit may implement garbage collection on the physical address corresponding to the hidden LBA space within the storage device, but ensure that the data of the hidden LBA space is valid.
Further by way of example, after switching to normal mode, the data/files in the non-hidden space of the storage device remain unchanged in logical address from the perspective of the host. Thus, after switching to the normal mode, the host can access the data/files in the non-hidden space with the original file system.
For example, in practical applications, for example, when the user needs to restore factory settings, the host may send a custom mode switch command or a Set Feature command to the storage device in response to the user indicating that factory settings are to be restored. The storage device responds to the received mode switching command or the Set Feature command, and sets the working mode to be a normal mode or exits from the hidden mode to enter the normal mode. Next, the storage capacity of the storage device is acquired. By way of example, the host may acquire its storage capacity by restarting, having sent an Identify command to the storage device during the host startup. Also by way of example, a mode switch command may be registered to associate the mode switch command with an Identify command before the mode switch command is issued. Thus, the sending time of the Identify command is adjusted, so that after the registered mode switching command is sent to the storage device, the host can send the Identify command to the storage device at any time according to the requirement to acquire the storage capacity of the host. Also by way of example, the host may also send Identify namespace commands or get feature commands to the storage device to obtain the storage capacity of the storage device.
Next, a program may be run to obtain a preloaded default operating system from a hidden space (e.g., 256GB-356 GB), at which point the file system need not be loaded. The default operating system is then installed in non-hidden space (e.g., 0-256GB space where a new file system may be installed, since the file system needs to set metadata at the end of the address space, and space of sufficient size is reserved at the end of the 100GB hidden space for writing metadata when installing the operating system/file system/disk partition). Then, loading a default operating system to finish the starting of the host.
Optionally, a program may be further executed to restore data of the file system in the original 256GB space, where the program obtains metadata of the file system in the original 256GB space (e.g., records when a factory setting is instructed to be restored), accesses a file managed by the file system in the original 256GB space according to the obtained metadata, and writes the obtained file into the 356GB partition.
There is also provided in accordance with the present application a host including a processor; and a memory storing computer instructions for accessing the hidden space, which when executed by the processor, cause the host to perform the scheme described above in relation to fig. 2. In addition, the present application also provides a computer-readable storage medium, which when executed by a processor, causes the implementation of the scheme related to fig. 2.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application. It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A method of accessing a hidden space, wherein a first program is stored in the hidden space, the method comprising:
sending a command triggering the storage device in a hidden mode to adjust the working mode of the storage device so as to control the working mode of the storage device to be switched to a common mode, wherein the hidden space is invisible to a host in the hidden mode and visible to the host in the common mode;
reading the first program from the hidden space; and
and running the first program.
2. The method of claim 1, wherein reading the first program from the hidden space comprises:
reading the first program from the hidden space according to the logical address of the first program; or alternatively
A block device is created with the hidden space and the first program is read out from the hidden space according to the block device.
3. The method according to claim 1 or 2, wherein reading out the first program from the hidden space comprises:
updating a partition table of the storage device in a hidden mode to create a partition corresponding to the hidden space;
accessing the hidden space from the partition and reading the first program from the hidden space.
4. A method according to claim 3, wherein the first program occupies a non-trailing logical address space in the hidden space to avoid that the updated partition table covers part or all of the first program when creating the partition to which the hidden space corresponds.
5. The method of any of claims 1-4, wherein the designated location of the hidden space stores a second program, and wherein reading the first program from the hidden space comprises:
And acquiring the second program from the designated position, and executing the second program to read the first program.
6. The method of any one of claims 1-5, wherein running the first program comprises:
and writing the first program into an existing file system, and running the first program.
7. The method of any of claims 1-6, wherein the first program comprises an operating system or antivirus software for factory-set restoration, and wherein the factory-set restoration or the antivirus is performed by running the first program.
8. The method according to any one of claims 1-7, further comprising:
during the operation of the first program, the operation of writing data into the part of the logic address space before the hidden space is not executed.
9. The method according to any one of claims 1-8, further comprising:
in response to attempting to access the hidden space of the storage device in the hidden mode, denying the access by a storage device driver in the host; or alternatively
In response to having access to a hidden space of the storage device in the hidden mode, the access is denied by the storage device.
10. A host, comprising:
a processor; and
a memory storing computer instructions for accessing a hidden space, which when executed by the processor, cause the host to perform the method according to any one of claims 1-9.
CN202210457584.XA 2022-01-18 2022-04-27 Method for accessing hidden space and related product Pending CN116501663A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN2022100565444 2022-01-18
CN202210056544 2022-01-18
CN202210331662 2022-03-30
CN2022103316621 2022-03-30

Publications (1)

Publication Number Publication Date
CN116501663A true CN116501663A (en) 2023-07-28

Family

ID=87320729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210457584.XA Pending CN116501663A (en) 2022-01-18 2022-04-27 Method for accessing hidden space and related product

Country Status (1)

Country Link
CN (1) CN116501663A (en)

Similar Documents

Publication Publication Date Title
US11360679B2 (en) Paging of external memory
US9058123B2 (en) Systems, methods, and interfaces for adaptive persistence
JP5636034B2 (en) Mediation of mount times for data usage
EP2631916B1 (en) Data deletion method and apparatus
US7970983B2 (en) Identity-based flash management
US20070156763A1 (en) Storage management system and method thereof
CN113126910A (en) Storage device and operation method thereof
US11409451B2 (en) Systems, methods, and storage media for using the otherwise-unutilized storage space on a storage device
JP6972202B2 (en) Computer system and memory management method
US11947419B2 (en) Storage device with data deduplication, operation method of storage device, and operation method of storage server
US11256435B2 (en) Method and apparatus for performing data-accessing management in a storage server
CN116501663A (en) Method for accessing hidden space and related product
WO2022068298A1 (en) Usb flash disk access method and usb flash disk
US20210311654A1 (en) Distributed Storage System and Computer Program Product
CN116501239A (en) Method for managing storage device and storage controller
WO2019043815A1 (en) Storage system
CN116466871A (en) Method for accessing storage device and related product
TWI731515B (en) Computer system and boot controlling method for storage apparatus
US11740838B2 (en) Array-based copy utilizing one or more unique data blocks
CN117311591A (en) Method for accessing storage device and related product
CN117311594A (en) Method for managing NVM chip and related product
JP2021182309A (en) Cloud server, storage system, and computer system
CN112764671A (en) Metadata aggregation processing method of storage device and storage device
CN117130553A (en) Configuration method of solid state disk, solid state disk and partition storage method
JP2015141508A (en) Data storage control device, data storage control method, and data storage control program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination