[go: up one dir, main page]

TWI804332B - Method, system and program product for data processing - Google Patents

Method, system and program product for data processing Download PDF

Info

Publication number
TWI804332B
TWI804332B TW111119967A TW111119967A TWI804332B TW I804332 B TWI804332 B TW I804332B TW 111119967 A TW111119967 A TW 111119967A TW 111119967 A TW111119967 A TW 111119967A TW I804332 B TWI804332 B TW I804332B
Authority
TW
Taiwan
Prior art keywords
address
real address
key generation
request
processor
Prior art date
Application number
TW111119967A
Other languages
Chinese (zh)
Other versions
TW202316274A (en
Inventor
古尼 D H 杭特
查爾斯 R 約翰
弗洛里安 奧恩漢默
查任傑特 席格 茱特拉
Original Assignee
美商萬國商業機器公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 美商萬國商業機器公司 filed Critical 美商萬國商業機器公司
Publication of TW202316274A publication Critical patent/TW202316274A/en
Application granted granted Critical
Publication of TWI804332B publication Critical patent/TWI804332B/en

Links

Images

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/1408Protection against unauthorised use of memory or access to memory by using cryptography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • 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/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0882Page mode
    • 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/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • G06F12/1045Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB] associated with a data cache
    • 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
    • G06F12/1425Protection 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 the protection being physical, e.g. cell, word, block
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1052Security improvement

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Circuits Of Receivers In General (AREA)

Abstract

A processor receives, from a requestor, a first request containing a virtual address. Based on the first request, the processor determines a real address corresponding to the virtual address, encrypts at least a portion of the real address to obtain a cryptographic secure real address, and returns the cryptographic secure real address to the requestor. Based on receiving a second request specifying a request address, the processor decrypts the request address to validate the request address as the cryptographic secure real address. Based on validating the request address as the cryptographic secure real address, the processor allows access to a resource of the data processing system identified by the real address.

Description

資料處理之方法、系統及程式產品 Data processing method, system and program product

本發明大體係關於資料處理,且詳言之,係關於資料處理系統中之輸入/輸出(I/O)安全。 The present invention relates generally to data processing, and more specifically, to input/output (I/O) security in data processing systems.

資料處理系統可包括多個處理元件及多個輸入/輸出配接器(IOA)以支援至通信網路、儲存裝置及/或儲存網路及周邊裝置之連接。在此等資料處理系統中,資料處理系統之硬體資源可邏輯地分割成多個資源集合,各資源集合由多個可能異質的作業系統例項中之一各別者控制。作業系統在系統韌體(其通常稱為虛擬機監視器(VMM)或超管理器)之控制下,在其各別邏輯分割區(LPAR)中在此共同硬體平台上並行地執行。因此,超管理器為各LPAR分配資料處理系統之資源的非相交子集,且各作業系統例項進而直接控制其不同可分配資源集合,諸如系統記憶體及IOA之區域。 A data processing system may include multiple processing elements and multiple input/output adapters (IOAs) to support connections to communication networks, storage devices, and/or storage networks, and peripheral devices. In such data processing systems, the hardware resources of the data processing system may be logically partitioned into multiple resource sets, each resource set being controlled by a respective one of multiple, possibly heterogeneous, operating system instances. Operating systems execute in parallel on this common hardware platform in their respective logical partitions (LPARs) under the control of system firmware, which is commonly referred to as a virtual machine monitor (VMM) or hypervisor. Thus, the hypervisor allocates to each LPAR a disjoint subset of the data processing system's resources, and each operating system instance in turn directly controls its different set of allocatable resources, such as regions of system memory and IOAs.

一般而言,資料處理系統中的IOA採用I/O(或虛擬)位址空間,該位址空間不同於用以定址資料處理系統中的系統記憶體之真實位址空間。因此,位址轉譯用以在資料處理系統之I/O位址空間與真實位址空間之間轉譯位址。在至少一些較早期的先前技術資料處理系統中,在處理器晶片上執行I/O位址空間與真實位址空間之間的所有轉譯。因此,I/O與 真實位址轉譯程序可用以將IOA僅限於其被准許存取之真實位址的子集。 In general, an IOA in a data processing system employs an I/O (or virtual) address space that is different from the real address space used to address system memory in the data processing system. Therefore, address translation is used to translate addresses between the I/O address space of the data processing system and the real address space. In at least some earlier prior art data processing systems, all translations between I/O address space and real address space were performed on the processor die. Therefore, I/O and A real address translator can be used to restrict an IOA to only a subset of real addresses to which it is permitted to access.

近來,諸如快速周邊組件互連(PCIe)之至少一些I/O標準已採用替代性位址轉譯服務(ATS),其中IOA可請求針對I/O位址的轉譯,且作為回應,自主機橋接器接收對應的真實位址。IOA可接著在位址轉譯快取記憶體(ATC)中快取該真實位址,且隨後將指定該真實位址之一或多個記憶體存取請求發出至主機橋接器。啟用IOA以利用真實位址進行記憶體存取請求,同時改良用於參考頻繁或最近存取位址之存取的潛時,可能會曝露主機系統記憶體以由惡意或受損I/O裝置存取,從而產生顯著的安全問題。至少一些先前技術系統藉由對傳入I/O記憶體存取請求執行真實位址驗證以確保各IOA僅存取經授權真實位址頁來部分地改善此安全問題。然而,此位址轉譯服務實施具有不良效能,且已證實就儲存習知地用以執行真實位址驗證之表所需的記憶體佔據面積而言實施起來昂貴。在真實位址驗證例如基於請求器識別符(RID)及處理位址空間識別符(PASID)兩者採用精細粒度驗證的實施中,此等缺點加劇。 More recently, at least some I/O standards, such as Peripheral Component Interconnect Express (PCIe), have adopted an Alternative Address Translation Service (ATS), where an IOA can request a translation for an I/O address and, in response, bridge The device receives the corresponding real address. The IOA may then cache the real address in an address translation cache (ATC), and then issue one or more memory access requests specifying the real address to the host bridge. Enables IOA to utilize real addresses for memory access requests while improving latency for accesses that reference frequently or recently accessed addresses, potentially exposing host system memory to malicious or compromised I/O devices access, resulting in significant security issues. At least some prior art systems ameliorate this security issue in part by performing real address verification on incoming I/O memory access requests to ensure that each IOA only accesses authorized real address pages. However, this address translation service implementation has poor performance and has proven to be expensive to implement in terms of the memory footprint required to store the tables conventionally used to perform true address verification. These shortcomings are exacerbated in implementations where real address authentication employs fine-grained authentication, eg, based on both Requester Identifier (RID) and Process Address Space Identifier (PASID).

在至少一個實施例中,一資料處理系統提供改良之I/O安全,同時支援用於一附接裝置之位址轉譯服務。 In at least one embodiment, a data processing system provides improved I/O security while supporting address translation services for an attached device.

在各種實施例中,所揭示之技術可實施於一方法、一資料處理系統及/或一程式產品中。 In various embodiments, the disclosed techniques may be implemented in a method, a data processing system, and/or a program product.

在至少一個實施例中,一處理器自一請求器接收含有一虛擬位址之一第一請求。基於該第一請求,該處理器判定對應於該虛擬位址之一真實位址,加密該真實位址之至少一部分以獲得一密碼編譯安全真實位址,且將該密碼編譯安全真實位址傳回至該請求器。基於接收到指定一 請求位址之一第二請求,該處理器解密該請求位址以將該請求位址驗證為該密碼編譯安全真實位址。基於將該請求位址驗證為該密碼編譯安全真實位址,該處理器允許對由該真實位址識別之該資料處理系統之一資源的存取。一密碼編譯安全真實位址之使用提供改良之安全,且需要的實施佔據面積通常比基於表之真實位址驗證方法更小。 In at least one embodiment, a processor receives a first request including a virtual address from a requester. Based on the first request, the processor determines a real address corresponding to the virtual address, encrypts at least a portion of the real address to obtain a cryptographically secure real address, and transmits the cryptographically secure real address Back to the requester. Based on receipt of a specified A second request is made for one of the request addresses, the processor decrypts the request address to verify the request address as the cryptographically secure real address. Based on validating the requested address as the cryptographically secure real address, the processor permits access to a resource of the data processing system identified by the real address. The use of a cryptographically secure real address provides improved security and generally requires a smaller implementation footprint than table-based real address authentication methods.

在一些實施例中,請求器可為輸入/輸出(I/O)配接器。舉例而言,在一個特定實施例中,配接器可利用快速周邊組件互連位址轉譯服務(PCIe ATS)協定與處理器就請求進行通信。在其他實施例中,請求器可為採用虛擬位址空間之附接裝置,諸如加速器。 In some embodiments, the requestor may be an input/output (I/O) adapter. For example, in one particular embodiment, the adapter may communicate the request with the processor using the Peripheral Component Interconnect Express Address Translation Service (PCIe ATS) protocol. In other embodiments, the requestor may be an attached device that employs a virtual address space, such as an accelerator.

在一些實施例中,利用基於進階加密標準(AES)之加密來加密真實位址之至少一部分。在一些實施例中,加密該真實位址之至少一部分替代地或另外包括產生該真實位址之該至少一部分之一雜湊。利用諸如AES的強加密技術具有改良安全的優勢,且利用雜湊具有高效能優勢。 In some embodiments, at least a portion of the real address is encrypted using Advanced Encryption Standard (AES) based encryption. In some embodiments, encrypting at least a portion of the real address alternatively or additionally includes generating a hash of the at least a portion of the real address. Utilizing strong encryption techniques such as AES has the advantage of improved security, and utilizing hashing has the advantage of high performance.

在一些實施例中,該處理器避免加密用以指定一記憶體頁內之一位址的該真實位址之較低階位元。藉由不加密全真實位址(例如,64個位元),加密得以簡化,且效能得以改良。 In some embodiments, the processor refrains from encrypting the lower order bits of the real address specifying an address within a memory page. By not encrypting the full real address (eg, 64 bits), encryption is simplified and performance is improved.

在一些實施例中,加密可藉由在加密之前組合額外資料與該真實位址之該至少一部分來進一步加強。在一些實施例中,該額外資料可包括來自該請求器之一處理位址空間識別符之位元及/或來自一請求器識別符之位元。在一些實施例中,該額外資料可替代地或另外包括指示該請求器對該真實位址之存取是否為唯讀之唯讀欄位。在一些實施例中,該額外資料可包括指定多個金鑰中之哪一金鑰用以加密該真實位址之金鑰產生欄位。 In some embodiments, encryption can be further strengthened by combining additional data with the at least a portion of the real address prior to encryption. In some embodiments, the additional data may include bits from a process address space identifier of the requester and/or bits from a requestor identifier. In some embodiments, the additional data may alternatively or additionally include a read-only field indicating whether the requestor's access to the real address is read-only. In some embodiments, the additional data may include a key generation field specifying which of the plurality of keys was used to encrypt the real address.

100:資料處理系統 100: Data Processing Systems

102a:處理器 102a: Processor

102n:處理器 102n: processor

104:系統網狀架構 104: System mesh architecture

110:處理器核心 110: processor core

112:快取記憶體 112: Cache memory

114:整合式記憶體控制器 114: Integrated memory controller

116a:晶片外系統記憶體 116a: Off-chip system memory

116n:晶片外系統記憶體 116n: off-chip system memory

118:網狀架構介面 118: Mesh Architecture Interface

120:主機橋接器 120: host bridge

120a:主機橋接器 120a: host bridge

120k:主機橋接器 120k: host bridge

120m:主機橋接器 120m: host bridge

120v:主機橋接器 120v: host bridge

122a:本端匯流排 122a: Bus at the local end

122k:本端匯流排 122k: local bus

122m:本端匯流排 122m: Bus at the local end

122v:本端匯流排 122v: local bus

124a:I/O網狀架構 124a: I/O mesh architecture

124k:I/O網狀架構 124k: I/O mesh architecture

124m:I/O網狀架構 124m: I/O mesh architecture

124v:I/O網狀架構 124v: I/O mesh architecture

130:IOA 130:IOA

130a:I/O配接器 130a: I/O Adapter

130k:I/O配接器 130k: I/O Adapter

130l:I/O配接器 130l: I/O Adapter

130m:I/O配接器 130m: I/O Adapter

130v:I/O配接器 130v: I/O Adapter

130w:I/O配接器 130w: I/O adapter

140:附接裝置介面 140: Attach device interface

142:附接裝置 142: Attachment device

200:I/O記憶體管理單元 200: I/O memory management unit

202:安全邏輯 202: Safety logic

204:加密引擎 204: encryption engine

206:解密引擎 206: Decryption engine

208:金鑰儲存區 208: key storage area

210:金鑰產生邏輯 210: key generation logic

212:真實位址驗證(RAV)邏輯 212: Real Address Verification (RAV) logic

220:位址轉譯快取記憶體 220:Address translation cache memory

300:區塊 300: block

302:區塊 302: block

304:區塊 304: block

305:區塊 305: block

306:區塊 306: block

308:區塊 308: block

310:區塊 310: block

312:區塊 312: block

314:區塊 314: block

316:區塊 316: block

400:區塊 400: block

402:區塊 402: block

404:區塊 404: block

406:區塊 406: block

408:區塊 408: block

410:區塊 410: block

412:區塊 412: block

414:區塊 414: block

416:區塊 416: block

500:RA 500:RA

502:高階位元欄位 502: high-order bit field

504:低階位元欄位 504: low-order bit field

506:主機欄位 506: host field

510:熵混合器 510: entropy mixer

512:加密邏輯 512: encryption logic

514:解密邏輯 514: Decryption logic

516:熵解混合器 516: Entropy Demixer

520:密碼編譯sRA 520: Encrypt sRA

522:經加密欄位 522: encrypted field

530:經解密RA 530: Decrypted RA

532:高階位元欄位 532: high-order bit field

534:經解密主機欄位 534:Decrypted host field

600:轉譯上下文欄位 600:Translate context field

602:唯讀(RO)欄位 602: Read-only (RO) field

700:第一中間RA 700: First Intermediate RA

702:第一階段基於進階加密標準之加密邏輯 702: The first stage is based on the encryption logic of the Advanced Encryption Standard

704:第一密碼 704: first password

705:互斥或(XOR)運算 705: Exclusive OR (XOR) operation

706:第二中間RA 706:Second Intermediate RA

707:XOR運算 707: XOR operation

708:第二階段基於進階加密標準之加密邏輯 708: The second stage is based on the encryption logic of the Advanced Encryption Standard

710:第二密碼 710: second password

800:產生欄位 800: generate fields

802:多工器 802: multiplexer

804:產生欄位 804: generate fields

810:請求位址 810: request address

812:比較器 812: Comparator

900:區塊 900: block

901:區塊 901: block

902:區塊 902: block

904:區塊 904: block

906:區塊 906: block

908:區塊 908: block

910:區塊 910: block

912:區塊 912: block

914:區塊 914: block

916:區塊 916: block

1002:XOR運算 1002: XOR operation

1004:取代步驟 1004: replace step

1006:列移位步驟 1006: column shift step

1008:行混合步驟 1008: line mixing step

1010:XOR運算 1010: XOR operation

1012:取代步驟 1012: replace step

1014:列移位步驟 1014: column shift step

1016:行混合步驟 1016: line mixing step

1018:XOR運算 1018: XOR operation

圖1為根據一個實施例的例示性資料處理系統之高階方塊圖;圖2為根據一個實施例的主機橋接器及I/O配接器(IOA)之更詳細方塊圖;圖3為根據一個實施例的處理器藉以將密碼編譯安全真實位址(sRA)提供至請求器的例示性程序之高階邏輯流程圖;圖4為根據一個實施例的處理器藉以處置請求器之記憶體存取請求的例示性程序之高階邏輯流程圖;圖5A圖5B說明根據一個實施例的用以獲得安全真實位址之真實位址加密及用以獲得原始真實位址之安全真實位址解密;圖6描繪根據一個實施例的真實位址之例示性主機欄位的內容;圖7為根據一個實施例的用於加密真實位址以獲得密碼編譯安全真實位址的例示性程序之高階資料流程圖;圖8為說明根據一個實施例的支援使用金鑰產生的處理器之安全邏輯的部分之局部視圖;圖9為根據一個實施例的處理器藉以實施金鑰產生的例示性程序之高階邏輯流程圖;且圖10為根據一個實施例的可用以產生密碼編譯安全真實位址的例示性基於AES之加密程序之資料流程圖。 1 is a high-level block diagram of an exemplary data processing system according to one embodiment; FIG. 2 is a more detailed block diagram of a host bridge and an I/O adapter (IOA) according to one embodiment; FIG. A high-level logic flow diagram of an exemplary process by which the processor of an embodiment provides a cryptographically secure real address (sRA) to a requester; FIG. 4 is a memory access request by which a processor handles a requester according to one embodiment A high-level logic flow diagram of an exemplary program; FIGS. 5A - 5B illustrate real address encryption to obtain a secure real address and secure real address decryption to obtain an original real address according to one embodiment; FIG. 6 Depicts the contents of an exemplary host field of a real address according to one embodiment; FIG. 7 is a high-level data flow diagram of an exemplary process for encrypting a real address to obtain a cryptographically secure real address, according to one embodiment; Figure 8 is a fragmentary view illustrating a portion of the security logic of a processor supporting key generation according to one embodiment; Figure 9 is a high-level logic flow diagram of an exemplary process by which a processor implements key generation according to one embodiment and FIG. 10 is a data flow diagram of an exemplary AES-based encryption procedure that may be used to generate a cryptographically secure true address, according to one embodiment.

現參考諸圖,且詳言之參考圖1,描繪根據一個實施例的 例示性資料處理系統100之高階方塊圖。在一些實施例中,資料處理系統100可為例如包括複數個處理器102a102n之對稱多處理器(SMP)系統,各處理器經耦接以用於與系統網狀架構104通信,該系統網狀架構可包括一或多個匯流排式或交換式通信連結。在替代實施例中,可利用具有單一處理器102之資料處理系統。 Referring now to the figures, and in particular to FIG. 1 , a high-level block diagram of an exemplary data processing system 100 is depicted in accordance with one embodiment. In some embodiments, data processing system 100 may be, for example, a symmetric multiprocessor (SMP) system including a plurality of processors 102a through 102n , each processor coupled for communication with system mesh architecture 104 , the system A mesh architecture may include one or more bus or switched communication links. In alternative embodiments, a data processing system with a single processor 102 may be utilized.

在所描繪之實施例中,各處理器102較佳地實現為具有半導體基板之單一積體電路晶片,其中積體電路如本領域中所已知地製造。如所示,各處理器102包括經由執行及/或處理程式碼而處理資料之複數個處理器核心110,該程式碼可包括例如軟體及/或韌體及相關聯資料(若存在)。此程式碼可包括例如超管理器、超管理器可向其分配邏輯分割區(LPAR)之一或多個作業系統例項,及應用程式。處理器102進一步包括快取記憶體112,其提供針對自資料儲存階層之較低層級擷取之指令及資料的相對較低潛時臨時儲存之一或多個層級。此外,處理器102包括控制對晶片外系統記憶體116a116n中之相關聯者的存取的整合式記憶體控制器(IMC)114。處理器102利用真實位址空間中之真實位址(RA)存取系統記憶體116。在各種實施例中,真實位址可具有不同長度,諸如32個位元、64個位元等。 In the depicted embodiment, each processor 102 is preferably implemented as a single integrated circuit die having a semiconductor substrate, where the integrated circuits are fabricated as known in the art. As shown, each processor 102 includes a plurality of processor cores 110 that process data by executing and/or processing program code, which may include, for example, software and/or firmware and associated data, if present. This code may include, for example, a hypervisor, to which the hypervisor may allocate one or more operating system instances of a logical partition (LPAR), and an application. Processor 102 further includes cache memory 112 , which provides one or more levels of relatively low-latency temporary storage for instructions and data retrieved from lower levels of the data storage hierarchy. Additionally, processor 102 includes an integrated memory controller (IMC) 114 that controls access to associated ones of off-chip system memories 116a - 116n . The processor 102 accesses the system memory 116 using a real address (RA) in the real address space. In various embodiments, real addresses may have different lengths, such as 32 bits, 64 bits, and so on.

各處理器102進一步包括處理器102藉以與系統網狀架構104通信的網狀架構介面(FIF)118,以及支援與各種輸入/輸出配接器(IOA)130a130l130m130w之輸入/輸出通信的一或多個(且較佳地多個)主機橋接器(HB)120a120k120m120v。IOA 130可為例如網路配接器、儲存裝置控制器、顯示器配接器、周邊配接器等。在其處理中,IOA 130參考VA空間中之I/O位址(亦稱為虛擬位址(VA))。在各種實 施例中,VA可具有不同長度,諸如32個位元、40個位元、48個位元、52個位元、64個位元等。由IOA 130採用的VA之長度可不同於(亦即,短於或長於)由處理器102採用的RA之長度。 Each processor 102 further includes a fabric interface (FIF) 118 through which the processor 102 communicates with the system fabric 104 , and supports input/output adapters (IOAs) 130a through 130l or 130m through 130w . One or more (and preferably a plurality) of host bridges (HB) 120a to 120k or 120m to 120v for outgoing communications. The IOA 130 can be, for example, a network adapter, a storage device controller, a display adapter, a peripheral adapter, and the like. In its processing, IOA 130 references I/O addresses (also known as virtual addresses (VA)) in VA space. In various embodiments, VAs may be of different lengths, such as 32 bits, 40 bits, 48 bits, 52 bits, 64 bits, etc. The length of VA employed by IOA 130 may be different (ie, shorter or longer) than the length of RA employed by processor 102 .

在各種實施例中,主機橋接器120可以通信方式直接或間接耦接至IOA 130。舉例而言,在所說明之實施例中,主機橋接器120a120k120m120v提供分別至本端匯流排122a122k122m122v之介面,IOA 130可直接連接或間接耦接至該等本端匯流排。因此,IOA 130a視情況經由I/O網狀架構124a耦接至本端匯流排122a,該I/O網狀架構可包含一或多個交換器及/或橋接器。以類似方式,IOA 130k130l視情況經由I/O網狀架構124k耦接至本端匯流排122k,IOA 130m視情況經由I/O網狀架構124m耦接至本端匯流排122m,且IOA 130v130w視情況經由I/O網狀架構124v耦接至本端匯流排122v。在一些實施例中,本端匯流排122中之一或多者上的通信利用已知I/O匯流排標準,諸如周邊組件互連(PCI)或快速PCI(PCIe)標準。在一些實施例中,本端匯流排122中之一或多者可使用額外或替代I/O匯流排標準。 In various embodiments, host bridge 120 may be communicatively coupled to IOA 130 directly or indirectly. For example, in the illustrated embodiment, host bridges 120a , 120k , 120m , and 120v provide interfaces to local buses 122a , 122k , 122m , and 122v , respectively, to which IOA 130 can be directly connected or indirectly coupled Wait for the local bus. Therefore, the IOA 130a is optionally coupled to the local bus 122a via the I/O mesh 124a , which may include one or more switches and/or bridges. In a similar manner, IOAs 130k and 1301 are optionally coupled to local bus 122k via I/O mesh 124k , IOA 130m is optionally coupled to local bus 122m via I/O mesh 124m , and IOA 130v and 130w are optionally coupled to the local bus 122v via the I/O mesh structure 124v . In some embodiments, communication on one or more of the local buses 122 utilizes known I/O bus standards, such as the Peripheral Component Interconnect (PCI) or PCI Express (PCIe) standards. In some embodiments, one or more of the local bus bars 122 may use additional or alternative I/O bus bar standards.

圖1中所進一步描繪,處理器102中之一或多者(例如,處理器102a)可進一步包括支援附接裝置142之附接的附接裝置介面(ADI)140。在一些實施例中,附接裝置142可為例如使得處理器102能夠卸載一或多個處理功能之加速器,該等處理功能諸如資料加密/解密、資料壓縮/解壓縮、矩陣運算、資料串流管理等。在執行其處理時,附接裝置142亦可參考VA空間,該VA空間可不同於或相同於由IOA 130利用之VA空間。 As further depicted in FIG. 1 , one or more of processors 102 (eg, processor 102a ) may further include an attachment device interface (ADI) 140 that supports attachment of an attachment device 142 . In some embodiments, attachment device 142 may be, for example, an accelerator that enables processor 102 to offload one or more processing functions, such as data encryption/decryption, data compression/decompression, matrix operations, data streaming management etc. Attachment device 142 may also refer to VA space, which may be different or the same as the VA space utilized by IOA 130 , when performing its processing.

一般熟習此項技術者應瞭解,資料處理系統之架構及組件可在實施例之間變化。舉例而言,可替代地或另外使用其他裝置及互連 件。因此,圖1中給出之例示性資料處理系統100並不意欲暗示關於所主張之發明的架構限制。 Those of ordinary skill in the art will appreciate that the architecture and components of the data processing system may vary between embodiments. For example, other devices and interconnects may alternatively or additionally be used. Accordingly, the exemplary data processing system 100 presented in FIG. 1 is not intended to imply architectural limitations with respect to the claimed invention.

現參考圖2,描繪根據一個實施例的主機橋接器120及I/O配接器130之更詳細方塊圖。在所描繪之實例中,主機橋接器120包括I/O記憶體管理單元(IOMMU)200,該I/O記憶體管理單元經組態以提供由諸如IOA 130之請求器參考之VA至可用以存取資料處理系統100之系統記憶體116(及可能其他記憶體映射資源)之RA的轉譯。主機橋接器120另外包括安全邏輯202,其經組態以加密傳達至請求器之位址且解密自請求器接收之位址。在所說明之實施例中,安全邏輯202包括:加密引擎(EE)204,其用於執行加密以產生安全真實位址(sRA);解密引擎206,其用於解密在記憶體存取請求中接收之請求位址;及金鑰儲存區208,其用於儲存在加密及解密中利用之金鑰。在至少一些實施例中,主機橋接器120可針對其支援之各請求器利用單獨的金鑰。舉例而言,假定主機橋接器120為PCIe主機橋接器,主機橋接器120可針對各PCIe請求器識別符(RID)或針對RID及處理位址空間識別符(PASID)之各組合實施各別金鑰。在至少一些實施例中,安全邏輯202另外包括:金鑰產生邏輯210,其用於在金鑰儲存區208中產生加密金鑰;及視情況選用的真實位址驗證(RAV)邏輯212,其用於驗證由主機橋接器120自請求器接收之請求的真實位址。 Referring now to FIG. 2 , depicted is a more detailed block diagram of host bridge 120 and I/O adapter 130 according to one embodiment. In the depicted example, host bridge 120 includes I/O memory management unit (IOMMU) 200 configured to provide a VA referenced by a requester, such as IOA 130 , to be available to Translations of RAs that access system memory 116 (and possibly other memory-mapped resources) of data processing system 100 . Host bridge 120 additionally includes security logic 202 configured to encrypt addresses communicated to the requester and decrypt addresses received from the requester. In the illustrated embodiment, security logic 202 includes: encryption engine (EE) 204 , which is used to perform encryption to generate secure real address (sRA); decryption engine 206 , which is used to decrypt the received request address; and the key storage area 208 , which is used to store the key used in encryption and decryption. In at least some embodiments, host bridge 120 may utilize separate keys for each requester it supports. For example, assuming host bridge 120 is a PCIe host bridge, host bridge 120 may implement individual gold for each PCIe Requester Identifier (RID) or for each combination of RID and Process Address Space Identifier (PASID). key. In at least some embodiments, security logic 202 additionally includes: key generation logic 210 for generating encryption keys in key storage area 208 ; and optional Real Address Verification (RAV) logic 212 for Used to verify the real address of the request received by the host bridge 120 from the requester.

圖2另外說明諸如IOA 130之請求器可包括位址轉譯快取記憶體(ATC)220。位址轉譯快取記憶體220可包括將最近及/或頻繁存取之VA與自主機橋接器120接收之對應的安全RA(sRA)相關聯的複數個條目。 FIG. 2 additionally illustrates that a requestor such as IOA 130 may include address translation cache (ATC) 220 . Address translation cache 220 may include a plurality of entries associating recently and/or frequently accessed VAs with corresponding secure RAs (sRAs) received from host bridge 120 .

儘管未在圖2中具體說明,但應瞭解,圖1之ADI 140可類 似於主機橋接器120而構造。舉例而言,ADI 140可包括IOMMU 200及安全邏輯202。如同IOA 130,附接裝置142亦可包括ATC 220,其用於快取自ADI 140獲得的VA至sRA轉譯。 Although not specifically illustrated in FIG. 2 , it should be appreciated that ADI 140 of FIG. 1 may be constructed similarly to host bridge 120 . For example, ADI 140 may include IOMMU 200 and security logic 202 . Like IOA 130 , attachment device 142 may also include ATC 220 for caching VA to sRA translations obtained from ADI 140 .

現參考圖3,說明根據一個實施例的處理器102藉以將密碼編譯安全RA(sRA)提供至請求器的例示性程序之高階邏輯流程圖。在一些實施中,圖3之程序可由向IOA 130提供密碼編譯sRA之主機橋接器120執行。相同程序可替代地或另外由ADI 140採用以將sRA提供至附接裝置142Referring now to FIG. 3 , a high-level logic flow diagram of an exemplary process by which processor 102 provides a cryptographically secure RA (sRA) to a requester is illustrated, in accordance with one embodiment. In some implementations, the process of FIG. 3 may be performed by the host bridge 120 providing the cryptographic sRA to the IOA 130 . The same procedure may alternatively or additionally be employed by ADI 140 to provide sRA to attachment device 142 .

圖3之程序開始於區塊300,且接著繼續進行至區塊302,該區塊說明處理器102自相關聯請求器接收指定待轉譯之虛擬位址的轉譯請求。在一些實施例中,轉譯請求可為例如PCIe ATS轉譯請求。回應於接收到轉譯請求,處理器102例如利用IOMMU 200將VA轉譯為資料處理系統100的真實位址空間中之RA。程序自區塊304繼續進行至視情況選用的區塊305,其說明處理器102準備RA以進行加密。在所說明之實施例中,區塊305處的準備RA以進行加密包括多個步驟,包括自加密排除用以指定給定記憶體頁內之特定位址的RA之數個低階位元(區塊306)。舉例而言,假定RA的長度為64個位元且處理器102為請求器分配2MB記憶體頁,則在區塊306處自加密排除RA之21個低階位元。如應瞭解,若處理器102避免加密RA之所有位元,則加密程序得以簡化,且加密效能得以改良。在區塊305處,視情況用包括一或多個額外位元之主機欄位填補截斷RA(區塊308)。下文參考圖5A圖6描述主機欄位之不同實施例。此外,在區塊305處,處理器102可混洗RA之位元以大體增大位元值之熵(或隨機性)(區塊310)。在較佳實施例中,在區塊310處,以固定預定方式在中間 RA中重新配置位元位置。 The process of FIG. 3 begins at block 300 , and then proceeds to block 302 , which illustrates processor 102 receiving a translation request from an associated requester specifying a virtual address to translate. In some embodiments, the translation request may be, for example, a PCIe ATS translation request. In response to receiving the translation request, processor 102 translates VA to RA in the real address space of data processing system 100 , eg, using IOMMU 200 . Processing continues from block 304 to optional block 305 , which illustrates that the processor 102 prepares the RA for encryption. In the illustrated embodiment, preparing the RA for encryption at block 305 includes multiple steps, including excluding from the encryption a few low-order bits of the RA designating a particular address within a given memory page ( block 306 ). For example, assuming the length of the RA is 64 bits and the processor 102 allocates a 2MB memory page for the requester, the 21 low order bits of the RA are excluded from encryption at block 306 . As should be appreciated, if the processor 102 avoids encrypting all bits of RA, the encryption procedure is simplified and the encryption performance is improved. At block 305, the truncated RA is optionally padded with a host field including one or more extra bits (block 308 ). Different embodiments of the host field are described below with reference to FIGS . 5A and 6 . Furthermore, at block 305 , the processor 102 may shuffle the bits of the RA to generally increase the entropy (or randomness) of the bit values (block 310 ). In a preferred embodiment, at block 310 , bit positions are reconfigured in the intermediate RA in a fixed predetermined manner.

圖3之程序自區塊305繼續進行至區塊312,該區塊說明處理器102加密RA(接收自IOMMU 200的RA,或在實施區塊305的情況下在區塊305之後獲得的中間RA)以獲得密碼編譯安全RA(SRA)。在一些實施例中,區塊312處所描繪之加密可包括加密引擎204執行RA之雜湊。適合的雜湊函數可包括例如SHA-1、SHA-256或MD-5。在其他實施例中,加密可替代地或另外地包括加密引擎204利用一或多個金鑰加密RA。若執行基於金鑰之加密,則加密引擎204針對各請求器(或針對RID及PASID之各組合)利用不同的金鑰係較佳的。下文參考圖7圖10描述可採用的可能加密演算法之實施例。處理器接著將藉由在區塊312處執行之加密而產生的sRA提供至請求器(區塊314)。在至少一些實施例中,處理器102可在PCIe ATS轉譯回應中將sRA傳達至請求器。回應於接收到sRA,請求器可快取VA至sRA轉譯(例如,在ATC 220中),以輔助將來在記憶體存取請求中使用sRA。在區塊314之後,處理器102對轉譯請求之處理在區塊316處結束。 The procedure of FIG. 3 continues from block 305 to block 312 , which illustrates that processor 102 encrypts the RA (the RA received from IOMMU 200 , or the intermediate RA obtained after block 305 if block 305 is implemented. ) to obtain a cryptographically secure RA (SRA). In some embodiments, the encryption depicted at block 312 may include encryption engine 204 performing a hash of the RA. Suitable hash functions may include, for example, SHA-1, SHA-256 or MD-5. In other embodiments, encryption may alternatively or additionally include the encryption engine 204 encrypting the RA with one or more keys. If key-based encryption is performed, it is preferred that the encryption engine 204 utilize a different key for each requester (or for each combination of RID and PASID). Examples of possible encryption algorithms that may be employed are described below with reference to FIGS. 7 and 10 . The processor then provides the sRA resulting from the encryption performed at block 312 to the requester (block 314 ). In at least some embodiments, processor 102 may communicate the sRA to the requester in a PCIe ATS translation response. In response to receiving the sRA, the requester may cache the VA to sRA translation (eg, in the ATC 220 ) to facilitate future use of the sRA in memory access requests. Following block 314 , processing of the translation request by processor 102 ends at block 316 .

現參考圖4,描繪根據一個實施例的處理器102藉以處置請求器之記憶體存取請求的例示性程序之高階邏輯流程圖。在一些實施中,圖4之程序可由自IOA 130接收記憶體存取請求之主機橋接器120執行。相同程序可替代地或另外地回應於自附接裝置142接收到記憶體存取請求而由ADI 140執行。 Referring now to FIG. 4 , depicted is a high-level logic flow diagram of an exemplary process by which processor 102 handles memory access requests from requesters, according to one embodiment. In some implementations, the process of FIG. 4 may be performed by the host bridge 120 receiving memory access requests from the IOA 130 . The same program may alternatively or additionally be executed by ADI 140 in response to receiving a memory access request from attached device 142 .

程序開始於區塊400,且接著繼續進行至區塊402,該區塊說明處理器102自請求器接收記憶體存取請求,該請求器諸如IOA 130或附接裝置142。記憶體存取請求,其可通常為請求資料之傳回的讀取型請 求或請求資料之更新的寫入型請求,指定待存取之請求位址。在請求器並非惡意或受損裝置之情況下,請求位址將為sRA,該sRA先前已藉由圖3之程序由處理器102提供至請求器。然而,在請求器為惡意或受損裝置之情況下,請求位址可為非法位址或超出請求器經授權以存取之真實位址範圍之範圍的真實位址。 The process begins at block 400 and then proceeds to block 402 , which illustrates that the processor 102 receives a memory access request from a requester, such as the IOA 130 or the attached device 142 . A memory access request, which can typically be a read request requesting return of data or a write request requesting update of data, specifies the requested address to be accessed. In the case that the requester is not a malicious or compromised device, the request address will be the sRA, which was previously provided to the requester by the processor 102 by the procedure of FIG. 3 . However, where the requester is a malicious or compromised device, the request address may be an illegal address or a real address outside the range of real address ranges that the requester is authorized to access.

回應於接收到記憶體存取請求,處理器102解密請求位址(區塊404)。舉例而言,若加密引擎204利用雜湊函數產生sRA,則解密引擎206可利用對應的逆雜湊函數在區塊404處解密請求位址。替代地,若加密引擎204利用基於金鑰之加密函數產生sRA,則解密引擎206可利用與用以加密sRA相同的金鑰在區塊404處解密請求位址。同樣,解密引擎206可基於請求器之識別碼(或RID/PASID之組合)存取金鑰儲存區208中之相關金鑰,該識別碼較佳由請求器在記憶體存取請求中或結合記憶體存取請求一起傳達,或部分或完全地藉由請求器在連接I/O匯流排上之位置暗示。假定在圖3之區塊310處混洗中間RA之位元,處理器102亦解混洗(un-shuffle)經解密請求位址之位元,以逆轉在區塊310處進行的位元位置之重新排序(區塊406)。 In response to receiving the memory access request, the processor 102 decrypts the requested address (block 404 ). For example, if the encryption engine 204 uses a hash function to generate sRA, the decryption engine 206 can use the corresponding inverse hash function to decrypt the request address at block 404 . Alternatively, if the encryption engine 204 generates the sRA using a key-based encryption function, the decryption engine 206 can decrypt the request address at block 404 using the same key that was used to encrypt the sRA. Similarly, the decryption engine 206 can access the relevant key in the key storage area 208 based on the requester's identification code (or RID/PASID combination), which is preferably provided by the requester in the memory access request or in combination with Memory access requests are communicated together, either partially or fully implied by the position of the requestor on the connecting I/O bus. Assuming that the bits of the middle RA were shuffled at block 310 of FIG . reordering (block 406 ).

在區塊408處,處理器102檢查經解密請求位址之至少一部分以判定經解密請求位址是否為有效RA。舉例而言,在圖3之區塊308處的處理器102添加主機欄位以填補RA的實施例中,處理器102之安全邏輯202可在區塊408處判定經解密請求位址之主機欄位是否匹配在區塊308處添加至RA的主機欄位。在區塊408處進行的檢查可替代地或另外地包括RAV邏輯212執行對經解密請求位址之RA位元中之一些或所有的真實位址驗證。在區塊410處,處理器102判定在區塊408處執行的一或多個檢查是 否成功或是否全部成功。基於區塊410處之在區塊408處執行的一或多個檢查全部成功的判定,確認請求位址為恰當的sRA,且處理器102允許對由經解密RA識別的資料處理系統100中之資源(例如,系統記憶體116中之位置)的存取(區塊412)。然而,若處理器102在區塊410處判定在區塊410處執行的一或多個檢查未成功,則處理器102不允許對由經解密請求位址識別的資料處理系統100之資源(若存在)的所請求存取(區塊414)。另外,在區塊414處,處理器102停止請求器之操作以終止請求器產生潛在的惡意記憶體存取請求。處理器102亦可視情況重設(再啟動)請求器以將請求器恢復至已知穩定狀態,自該已知穩定狀態,將再次准許請求器發出記憶體存取請求。在區塊412或區塊414之後,圖4之程序在區塊416處結束。 At block 408 , the processor 102 checks at least a portion of the decrypted request address to determine whether the decrypted request address is a valid RA. For example , in an embodiment where processor 102 adds a host field to fill in the RA at block 308 of FIG . bit matches the host field added to RA at block 308 . The check at block 408 may alternatively or additionally include RAV logic 212 performing a real address verification of some or all of the RA bits of the decrypted request address. At block 410 , the processor 102 determines whether one or more checks performed at block 408 were successful or all were successful. Based on the determination at block 410 that one or more checks performed at block 408 were all successful, the request address is confirmed to be the proper sRA, and processor 102 allows access to one of the data processing systems 100 identified by the decrypted RA. Access to resources (eg, locations in system memory 116 ) (block 412 ). However, if processor 102 determines at block 410 that one or more checks performed at block 410 were unsuccessful, processor 102 does not allow access to the resource of data processing system 100 identified by the decryption request address (if Exists) the requested access (block 414 ). Additionally, at block 414 , the processor 102 stops the operation of the requester to stop the requester from generating a potentially malicious memory access request. Processor 102 may also optionally reset (restart) the requester to restore the requester to a known stable state from which the requester will again be permitted to issue memory access requests. After block 412 or block 414 , the process of FIG. 4 ends at block 416 .

現參考圖5A,說明根據一個實施例的處理器102藉以加密真實位址(RA)以獲得安全真實位址(sRA)的例示性程序。在所描繪之實例中,安全邏輯202自IOMMU 200接收RA 500。在處理器102支援64位元之真實定址的所描繪之實例中,RA 500可包括較少數目個位元,諸如52個位元。RA之長度反映以下事實:I/O請求器,諸如IOA 130及附接裝置142,通常無需定址(或受限於定址)資料處理系統100之全RA空間。RA500包括高階位元欄位502及低階位元欄位504。在所描繪之實例中,高階位元欄位502與低階位元欄位504之間的邊界經選擇以對應於(例如,由作業系統或超管理器軟體)分配至相關聯請求器的記憶體頁之大小。在此實例中,低階位元欄位之21位元長度對應於2MB之記憶體頁大小。如所說明,處理器102較佳避免加密低階位元欄位之內容,因為按照定義,請求器存取或修改其自身被分配之記憶體頁中之一者的內容並非安全威脅。藉由自加密排除低階位元欄位504,由加密引擎204執行之加密得以簡化, 且加密效能得以改良。 Referring now to FIG. 5A , an exemplary procedure by which the processor 102 encrypts a real address (RA) to obtain a secure real address (sRA) according to one embodiment is illustrated. In the depicted example, security logic 202 receives RA 500 from IOMMU 200 . In the depicted example where processor 102 supports 64 bits of real addressing, RA 500 may include a smaller number of bits, such as 52 bits. The length of the RA reflects the fact that I/O requestors, such as IOA 130 and attached device 142 , typically do not need to address (or are limited to addressing) the full RA space of data processing system 100 . The RA 500 includes a high-order bit field 502 and a low-order bit field 504 . In the depicted example, the boundary between high-order bit field 502 and low-order bit field 504 is selected to correspond to memory allocated (e.g., by the operating system or hypervisor software) to the associated requestor The size of the body page. In this example, the 21-bit length of the low-order bit field corresponds to a memory page size of 2MB. As illustrated, processor 102 preferably avoids encrypting the contents of low-order bit fields because, by definition, it is not a security threat for a requester to access or modify the contents of one of its own allocated memory pages. By excluding the low-order bit field 504 from encryption, the encryption performed by the encryption engine 204 is simplified and encryption performance is improved.

如上文參考圖3之區塊308所論述,安全邏輯202可用包含主機欄位(HF)506之所要數目個位元填補截斷RA 500(現僅包括高階位元欄位502),以獲得用於加密之所要數目個位元。舉例而言,在所說明之實例中,主機欄位506經選擇為長度為12個位元,以使得中間RA具有43個位元之總長度。在其他實施例中,主機欄位506中可包括更多或更少數目個位元。在各種實施例中,多種不同資訊可在主機欄位506內進行編碼。舉例而言,圖6描繪主機欄位506包括其中處理器102記錄用於VA至sRA轉譯之轉譯上下文的轉譯上下文欄位600之例示性實施例。舉例而言,在處理器102及請求器利用PCIe ATS協定通信的實施例中,轉譯上下文可包括來自與VA至sRA轉譯相關聯之RID及/或PASID的位元。在一個特定實例中,轉譯上下文欄位600包括相關RID及PASID之序連連接。圖6進一步說明處理器102可視情況在主機欄位506中包括唯讀(RO)欄位602,其指定RA 500是否映射至例如在維護於IOMMU 200中之頁保護資訊中識別的記憶體頁作為唯讀記憶體頁。在主機欄位506包括RO欄位602之實施例中,安全邏輯202可在區塊408處執行的檢查中包括檢查記憶體存取請求是否為寫入型請求及RO欄位602是否經設定為指示唯讀記憶體頁。在此情況下,安全邏輯202未通過圖4之區塊410處的檢查。在一些實施例中,主機欄位506可替代地或另外包括金鑰產生欄位,如下文參考圖8圖9進一步所論述。 As discussed above with reference to block 308 of FIG. 3 , security logic 202 may pad truncated RA 500 (now including only high-order bit field 502 ) with the desired number of bits including host field (HF) 506 to obtain Encrypt the desired number of bits. For example, in the illustrated example, the host field 506 is chosen to be 12 bits long, such that the intermediate RA has a total length of 43 bits. In other embodiments, a greater or lesser number of bits may be included in the host field 506 . In various embodiments, a variety of different information can be encoded within the host field 506 . For example, FIG. 6 depicts an exemplary embodiment in which the host field 506 includes a translation context field 600 in which the processor 102 records the translation context for VA to sRA translation. For example, in embodiments where the processor 102 and the requestor communicate using the PCIe ATS protocol, the translation context may include bits from the RID and/or PASID associated with the VA to sRA translation. In one particular example, the translation context field 600 includes a concatenation of the associated RIDs and PASIDs. 6 further illustrates that processor 102 may optionally include a read-only (RO) field 602 in host field 506 that specifies whether RA 500 is mapped to a memory page identified, for example, in page protection information maintained in IOMMU 200 as ROM pages. In embodiments where the host field 506 includes the RO field 602 , the checks performed by the security logic 202 at block 408 include checking whether the memory access request is a write-type request and whether the RO field 602 is set to Indicates a read-only memory page. In this case, the security logic 202 fails the check at block 410 of FIG. 4 . In some embodiments, the host field 506 may alternatively or additionally include a key generation field, as discussed further below with reference to FIGS . 8-9 .

返回參考圖5A,在用主機欄位506填補高階位元欄位502之後,加密引擎204內之熵混合器510可視情況重排43位元中間RA之至少一些位元位置的次序以增大熵。大體而言,此位元位置重新排序包括將高 階位元欄位502之較低階位元分佈在中間RA之43個位元位置當中,此傾向於在RA之間的位元值中具有較高變化性。中間RA接著由加密引擎204內的加密邏輯512加密,以獲得43位元的經加密欄位522。經加密欄位522與未經加密之21位元低階位元欄位504序連連接以形成密碼編譯sRA 520,處理器102可在不使實際對應RA曝露以由請求器發現的情況下將該密碼編譯sRA安全地傳回至請求器。 Referring back to FIG. 5A , after filling the high-order bit field 502 with the host field 506 , the entropy mixer 510 within the encryption engine 204 can optionally rearrange the order of at least some bit positions of the 43-bit intermediate RA to increase entropy . In general, this bit position reordering involves distributing the lower order bits of the high order bit field 502 among the 43 bit positions of the middle RA, which tends to have a higher number of bits in the bit values between the RAs. High variability. The intermediate RA is then encrypted by the encryption logic 512 within the encryption engine 204 to obtain a 43-bit encrypted field 522 . The encrypted field 522 is serially concatenated with the unencrypted 21-bit low-order field 504 to form a cryptographic sRA 520 , which the processor 102 can pass without exposing the actual corresponding RA to discovery by the requester. This cryptographic sRA is securely transmitted back to the requester.

現參考圖5B,說明根據一個實施例的解密sRA 520以獲得對應的真實位址的例示性程序。回應於接收到例如在記憶體存取請求中傳回至安全邏輯202的sRA 520,解密引擎206內之解密邏輯514解密經加密欄位522。解密引擎206內之熵解混合器(de-mixer)516反轉由熵混合器510執行的位元混洗以獲得高階位元欄位532及經解密主機欄位534,它們與低階位元欄位504一起形成經解密RA 530。如上文相對於圖4之區塊408410所提到,安全邏輯202可檢查經解密主機欄位534以判定經解密真實位址530是否為請求器的經授權真實位址。此外,安全邏輯202可替代地或另外利用RAV邏輯212檢查在高階位元欄位532及低階位元欄位504中發現的RA位元。 Referring now to FIG. 5B , an exemplary procedure for decrypting the sRA 520 to obtain the corresponding real address is illustrated, according to one embodiment. Decryption logic 514 within decryption engine 206 decrypts encrypted field 522 in response to receiving sRA 520 returned to security logic 202 , eg, in a memory access request. An entropy de-mixer (de-mixer) 516 within the decryption engine 206 reverses the bit shuffling performed by the entropy mixer 510 to obtain a high-order bit field 532 and a decrypted host field 534 , which are identical to the low-order bit fields Together the fields 504 form a decrypted RA 530 . As mentioned above with respect to blocks 408 and 410 of FIG. 4 , security logic 202 may check decrypted host field 534 to determine whether decrypted real address 530 is an authorized real address of the requester. Furthermore, security logic 202 may alternatively or additionally utilize RAV logic 212 to check for RA bits found in high-order bit field 532 and low-order bit field 504 .

現參考圖7,說明根據一個實施例的處理器102可藉以加密真實位址以獲得密碼編譯安全真實位址(sRA)的例示性程序之高階資料流程圖。詳言之,圖7說明為可由加密引擎204應用的多種可能的加密技術中之一者的兩階段式基於金鑰之加密程序;在其他實施例中,可替代地採用其他加密技術。 Referring now to FIG. 7 , a high-level data flow diagram illustrating an exemplary process by which processor 102 may encrypt a real address to obtain a cryptographically secure real address (sRA) is illustrated, according to one embodiment. In particular, FIG. 7 illustrates a two-stage key-based encryption procedure that is one of many possible encryption techniques that may be applied by the encryption engine 204 ; in other embodiments, other encryption techniques may be employed instead.

在所描繪之加密技術中,圖5A之31位元高階位元欄位502劃分為所標記的8個半位元組,自最高階至最低階標記為HO1至HO8(其 中HO2為僅包括3個位元之短半位元組)。在此實例中,半位元組HO1及HO2經保留以用於第二階段之加密,且不經由熵混合器510進行處理。其餘36個位元(主機欄位506之3個半位元組及高階位元欄位502之6個半位元組)之位元位置由熵混合器510以預定型樣混合,以產生說明為九個4位元半位元組的36位元第一中間RA 700In the depicted encryption technique, the 31-bit high-order bit field 502 of FIG . 5A is divided into 8 nibbles labeled, labeled HO1 to HO8 from highest order to lowest order (where HO2 consists of only 3 short nibble of ones bits). In this example, nibbles HO1 and HO2 are reserved for the second stage of encryption and are not processed by entropy mixer 510 . The bit positions of the remaining 36 bits (3 nibbles of the host field 506 and 6 nibbles of the high order field 502 ) are mixed in a predetermined pattern by the entropy mixer 510 to generate the description The 36-bit first intermediate RA 700 is nine 4-bit nibbles.

加密引擎204在兩個階段中加密中間RA 700(及高階位元欄位502之七個位元)。在第一階段中,加密引擎204邏輯地組合第一加密金鑰(「Key1」)與額外資料以獲得經修改第一加密金鑰。在所描繪之實例中,此額外資料為請求器相關識別符,諸如RID或與位址轉譯請求相關聯之RID及PASID的序連連接。在說明之實例中,加密引擎204利用互斥或(XOR)運算705邏輯地組合第一加密金鑰與額外資料。加密引擎204接著利用經修改第一加密金鑰,例如利用第一階段基於進階加密標準(AES)之加密邏輯702,來加密中間RA 700。在一些實例中,由第一階段基於AES之加密邏輯702實施的基於AES之加密方案可為採用36位元金鑰的小型基於AES之加密方案。下文參考圖10描述此類小型基於AES之加密方案之一個實例。第一階段基於AES之加密邏輯702之輸出為36位元第一密碼704,其說明為九個4位元半位元組。 The encryption engine 204 encrypts the intermediate RA 700 (and the seven bits of the high-order bit field 502 ) in two stages. In the first stage, the encryption engine 204 logically combines the first encryption key ("Key1") and additional data to obtain a modified first encryption key. In the depicted example, this additional data is a requester-related identifier, such as a RID or a concatenated concatenation of RID and PASID associated with an address translation request. In the illustrated example, the encryption engine 204 logically combines the first encryption key and the additional data using an exclusive OR (XOR) operation 705 . The encryption engine 204 then encrypts the intermediate RA 700 using the modified first encryption key, eg, using the first stage Advanced Encryption Standard (AES)-based encryption logic 702 . In some examples, the AES-based encryption scheme implemented by the first stage AES-based encryption logic 702 may be a small AES-based encryption scheme employing a 36-bit key. One example of such a small AES-based encryption scheme is described below with reference to FIG. 10 . The output of the first stage AES-based encryption logic 702 is a 36-bit first password 704 , which is specified as nine 4-bit nibbles.

加密引擎204保留第一密碼704之七個最高階位元以供後續使用。加密引擎204藉由將第一密碼204之29個較低階位元與自高階位元欄位502保留之半位元組HO1及HO2序連連接來形成第二中間RA 706The encryption engine 204 reserves the seven highest-order bits of the first password 704 for subsequent use. The encryption engine 204 forms the second intermediate RA 706 by concatenating the 29 lower-order bits of the first password 204 with the nibbles HO1 and HO2 reserved from the high-order bit field 502 .

在第二階段加密中,加密引擎204邏輯地組合(例如,利用XOR運算707)第二加密金鑰(「Key2」)與額外資料以獲得經修改第二加密金鑰。如上所述,此額外資料可為請求器相關識別符,諸如RID或與位 址轉譯請求相關聯之RID及PASID的序連連接。加密引擎204接著利用經修改第二加密金鑰(例如,36位元金鑰),例如利用第二階段基於AES之加密邏輯708,來加密第二中間RA 706。在一些實例中,第二階段基於AES之加密邏輯708可等同於第一階段基於AES之加密邏輯702,及/或可重複使用同一電路。第二階段基於AES之加密邏輯708之輸出為36位元第二密碼710,其說明為九個4位元半位元組。加密引擎204可接著藉由將在第一階段加密之後保留的第一密碼704之7個最高階位元與36位元第二密碼710序連連接來形成sRA 520之43位元經加密欄位522。如圖5A所說明,安全邏輯202接著將未經加密之21位元低階位元欄位504附加至經加密欄位522以形成全64位元sRA 520In the second stage of encryption, encryption engine 204 logically combines (eg, using XOR operation 707 ) a second encryption key ("Key2") with additional data to obtain a modified second encryption key. As noted above, this additional data may be a requester-related identifier, such as a RID or a concatenated concatenation of RID and PASID associated with an address translation request. The encryption engine 204 then encrypts the second intermediate RA 706 with a modified second encryption key (eg, a 36-bit key), such as with the second stage AES-based encryption logic 708 . In some examples, the second stage AES-based encryption logic 708 may be identical to the first stage AES-based encryption logic 702 , and/or the same circuitry may be reused. The output of the second stage AES-based encryption logic 708 is a 36-bit second cipher 710 specified as nine 4-bit nibbles. The encryption engine 204 may then form the 43-bit encrypted field of the sRA 520 by sequentially concatenating the 7 highest-order bits of the first password 704 retained after the first-stage encryption with the 36-bit second password 710 522 . As illustrated in FIG. 5A , security logic 202 then appends unencrypted 21-bit low-order bit field 504 to encrypted field 522 to form full 64-bit sRA 520 .

現參考圖8,描繪說明根據一個實施例的支援使用金鑰產生的圖2之安全邏輯202的部分之局部視圖。 Referring now to FIG. 8 , a partial view of the portion of the security logic 202 of FIG. 2 that supports key generation is depicted, according to one embodiment.

隨時間推移,負責在資料處理系統100之真實位址空間中分配記憶體頁之超管理器或作業系統例項將會將各種記憶體頁重新分配至不同處理程序及/或不同邏輯分割區(LPAM)。當重新分配記憶體頁時,處理器102將大體上例如藉由發送轉譯無效請求而使其IOMMU 200中及其附接請求器之ATC 220中的對應轉譯條目無效。若接收轉譯無效請求之請求器並非惡意的且為無錯誤的,則請求器將依照處理器102之轉譯無效請求使其ATC 220中之各經指示轉譯無效。然而,若請求器為惡意或受損的,則請求器可回應於轉譯失效請求而不使其ATC 220中之轉譯無效,且可替代地保留過時sRA且嘗試隨後再次使用過時sRA來嘗試存取當前未分配至該請求器的真實位址空間之部分。 Over time, the hypervisor or operating system instance responsible for allocating memory pages in the real address space of data processing system 100 will reallocate various memory pages to different processes and/or different logical partitions ( LPAM). When reallocating a page of memory, the processor 102 will generally invalidate the corresponding translation entry in its IOMMU 200 and in the ATC 220 of its attached requestor, eg, by sending a translation invalidation request. If the requester receiving the translation invalidation request is not malicious and is error-free, the requester will invalidate each instructed translation in its ATC 220 in accordance with the translation invalidation request of the processor 102 . However, if the requester is malicious or compromised, the requester can respond to the translation invalidation request without invalidating the translations in its ATC 220 , and can instead keep the stale sRA and try to use the stale sRA again to attempt access later The portion of the real address space that is not currently allocated to this requestor.

在至少一些實施例中,安全邏輯202經組態以透明地更新 金鑰儲存區208中之加密金鑰的使用,以防止惡意或受損的請求器能夠成功地再次使用過時sRA。在圖8之實施例中,安全邏輯202較佳實施與指派給各所支援請求器之加密金鑰相關聯的各別產生(G)欄位800。產生欄位800指定將利用哪一加密金鑰產生。舉例而言,假定支援僅兩個加密金鑰產生(例如,標示為金鑰產生A及B),金鑰儲存區208可針對各所支援請求器包括用於金鑰產生A及B中之各者的Key1及Key2。因此,金鑰儲存區208針對給定請求器包括供在金鑰產生A期間使用的金鑰Key1A及Key2A及供在金鑰產生B期間使用的金鑰Key1B及Key2B。 In at least some embodiments, security logic 202 is configured to transparently update the use of encryption keys in key store 208 to prevent malicious or compromised requesters from being able to successfully re-use an outdated sRA. In the embodiment of FIG. 8 , security logic 202 preferably implements a separate generation (G) field 800 associated with the encryption key assigned to each supported requestor. Generate field 800 specifies which encryption key will be used for generation. For example, assuming that only two encryption key generations are supported (e.g., denoted as Key Generation A and B), the key storage area 208 may include, for each supported requestor, one for each of Key Generation A and B Key1 and Key2. Thus, the key store 208 includes keys Key1A and Key2A for use during key generation A and keys Key1B and Key2B for use during key generation B for a given requester.

藉由此配置,在某一時間點,產生欄位800將具有值b「0」,表示例如金鑰產生A。因此,安全邏輯202將選擇(例如,利用多工器802)Key1A及Key2A以供加密引擎204用於產生sRA 520之經加密欄位522。在不同時間,產生欄位800將具有值b「1」,表示例如金鑰產生B。基於產生欄位800指示金鑰產生B,安全邏輯202將選擇(例如,利用多工器802)Key1B及Key2B以供加密引擎204用於產生sRA 520之經加密欄位522。在任一情況下,產生欄位800之值置於附加至由加密引擎204輸出之密碼的產生欄位804中,以獲得sRA 520之經加密欄位522。應注意,在所說明之實施例中,加密引擎204經組態以產生42位元密碼而非圖7之43位元第二密碼710。在至少一個實施中,此結果可藉由將主機欄位506的長度自12個位元減小至11個位元來達成。 With this configuration, at a certain point in time, the generation field 800 will have the value b"0", indicating, for example, key generation A. Accordingly, security logic 202 will select (eg, using multiplexer 802 ) Key1A and Key2A for use by encryption engine 204 in generating encrypted field 522 of sRA 520 . At various times, the generation field 800 will have the value b"1", indicating key generation B, for example. Based on generation field 800 indicating key generation B, security logic 202 will select (eg, using multiplexer 802 ) Key1B and Key2B for encryption engine 204 to use to generate encrypted field 522 of sRA 520 . In either case, the value of generation field 800 is placed in generation field 804 that is appended to the password output by encryption engine 204 to obtain encrypted field 522 of sRA 520 . It should be noted that in the illustrated embodiment, the encryption engine 204 is configured to generate a 42-bit password rather than the 43-bit second password 710 of FIG. 7 . In at least one implementation, this result can be achieved by reducing the length of the host field 506 from 12 bits to 11 bits.

回應於自請求器接收到請求位址810連同記憶體存取請求,安全邏輯202基於請求位址810之產生欄位804選擇(例如,利用多工器802)待用於解密請求位址810的金鑰。安全邏輯另外較佳包括比較器812以偵測由請求位址810之產生欄位804指定的金鑰產生是否仍為有效金 鑰產生,且若不為有效金鑰產生,則使安全邏輯202將請求位址810作為偽位址而拒絕。 In response to receiving the request address 810 together with the memory access request from the requester, the security logic 202 selects (e.g., using the multiplexer 802 ) the one to be used to decrypt the request address 810 based on the generation field 804 of the request address 810 key. The security logic additionally preferably includes a comparator 812 to detect whether the key generation specified by the generation field 804 of the request address 810 is still a valid key generation, and if not, cause the security logic 202 to Request address 810 is rejected as a pseudo address.

現參考圖9,說明根據一個實施例的處理器102藉以實施金鑰產生之例示性程序的高階邏輯流程圖。為便於理解,參考圖8中所描繪之安全邏輯202之實施來描述圖9中所給出之程序,該程序採用稱為金鑰產生A及B之兩個交替金鑰產生。 Referring now to FIG. 9 , a high-level logic flow diagram of an exemplary process by which processor 102 implements key generation is illustrated, according to one embodiment. For ease of understanding, the procedure presented in FIG. 9 , which employs two alternating keygenerations called keygenerations A and B, is described with reference to the implementation of the security logic 202 depicted in FIG .

如所示,圖9之程序開始於區塊900,且接著繼續至區塊901,該區塊說明處理器102之安全邏輯202將當前金鑰產生初始化為金鑰產生A。程序接著繼續進行至區塊902,其說明安全邏輯202產生兩個不同金鑰(例如,Key1A及Key2A)供在當前金鑰產生(例如,金鑰產生A)期間產生用於請求器之sRA 520。舉例而言,安全邏輯202可使用金鑰產生邏輯210產生金鑰,該金鑰產生邏輯諸如線性回饋移位暫存器(LFSR)或AES金鑰產生邏輯。另外,在區塊902處,安全邏輯202將產生欄位800設定為值b「0」,以表示金鑰產生A為適用於請求器之當前金鑰產生。雖然金鑰產生A仍為當前金鑰產生,但安全邏輯202之加密引擎204及解密引擎206利用與產生A相關聯之金鑰(即,Key1A及Key2A)來產生傳輸至請求器之sRA 520且解密自請求器接收之請求位址,且拒絕利用用於金鑰產生B的金鑰產生之請求位址(區塊904)。 As shown, the process of FIG. 9 begins at block 900 and then continues to block 901 , which illustrates that security logic 202 of processor 102 initializes the current key generation as key generation A. The program then continues to block 902 , which illustrates that the security logic 202 generates two different keys (e.g., Key1A and Key2A) for generating the sRA 520 for the requester during the current key generation (e.g., key generation A) . For example, security logic 202 may generate keys using key generation logic 210 such as linear feedback shift register (LFSR) or AES key generation logic. Additionally, at block 902 , the security logic 202 sets the generation field 800 to a value b"0" to indicate that key generation A is the current key generation applicable to the requester. Although key generation A is still the current key generation, the encryption engine 204 and decryption engine 206 of the security logic 202 utilize the keys associated with generation A (i.e., Key1A and Key2A) to generate the sRA 520 that is transmitted to the requester and The request address received from the requester is decrypted and the request address generated with the key used for key generation B is rejected (block 904 ).

在決策區塊906處,處理器102判定是否為請求器使用新金鑰產生。舉例而言,在一些實施例或使用情況下,處理器102可至少部分基於先前分配至請求器(或請求器經分配至之LPAR)的一些或所有位址空間之再映射而判定利用新金鑰產生。在一些實施例或使用情況下,處理器102可至少部分地基於軟體命令判定為請求器開始新金鑰產生。在一些實 施例或使用情況下,處理器102可至少部分基於由加密引擎204採用的加密演算法之屬性判定金鑰產生之改變頻率。若處理器102在區塊906處並未作出肯定判定,則程序返回至區塊904,該區塊已進行描述。然而,若處理器102在區塊906處作出肯定判定,則程序繼續進行至區塊908,該區塊說明處理器102之安全邏輯202產生兩個不同金鑰(例如,Key1B及Key2B)供在新的當前金鑰產生(例如,金鑰產生B)期間產生用於請求器之sRA 520。如上所述,安全邏輯202可使用金鑰產生邏輯210產生金鑰。另外,在區塊908處,安全邏輯202將產生欄位800設定為與適用於請求器之當前金鑰產生相關聯的值(例如,用於金鑰產生B的值b「1」)。安全邏輯202另外將針對先前金鑰產生(例如,金鑰產生A)中之所有sRA的轉譯無效請求發送至請求器,該先前金鑰產生例如由在產生欄位804中指定之值指定(區塊910)。回應於轉譯無效請求,並非為惡意或受損的請求器將使參考在先前金鑰產生(例如,金鑰產生A)期間產生之sRA的其ATC 220中之任何VA至sRA轉譯無效。 At decision block 906 , processor 102 determines whether to use new key generation for the requester. For example, in some embodiments or use cases, the processor 102 may determine to utilize the new gold address space based at least in part on remapping some or all of the address space previously allocated to the requestor (or to the LPAR to which the requestor is allocated). key generation. In some embodiments or use cases, the processor 102 may determine to initiate new key generation for the requester based at least in part on the software command. In some embodiments or use cases, processor 102 may determine the frequency of key generation changes based at least in part on properties of the encryption algorithm employed by encryption engine 204 . If the processor 102 does not make an affirmative determination at block 906 , the process returns to block 904 , which has already been described. However, if the processor 102 makes an affirmative determination at block 906 , then the program continues to block 908 , which illustrates that the security logic 202 of the processor 102 generates two different keys (eg, Key1B and Key2B) for use in The sRA 520 for the requester is generated during a new current key generation (eg, Key Generation B). Security logic 202 may use key generation logic 210 to generate keys, as described above. Additionally, at block 908 , the security logic 202 sets the generation field 800 to the value associated with the current key generation applicable to the requester (eg, value b"1" for key generation B). The security logic 202 additionally sends translation invalidation requests to the requester for all sRAs in a previous key generation (e.g., key generation A), such as specified by the value specified in the generation field 804 (area block 910 ). In response to a translation invalidation request, a requester that is not malicious or compromised will invalidate any VA-to-sRA translations in its ATC 220 that reference an sRA generated during a previous key generation (eg, Key Generation A).

如由區塊912916所指示,在發出轉譯無效請求之後且直至自請求器接收到所請求無效的應答(區塊914)或逾時週期已過去(區塊916),安全邏輯202獨佔地利用用於當前金鑰產生(例如,金鑰產生B)的金鑰來產生sRA,但利用用於產生A或產生B的金鑰來解密請求位址。藉由繼續支援先前金鑰產生(例如,金鑰產生A)中之請求位址直至無效已確認或逾時週期已過去,安全邏輯202自請求器之視角確保金鑰產生之間的無縫及透明轉變。回應於安全邏輯202接收到無效應答或逾時週期已過去,程序返回至區塊904。因此,安全邏輯202之加密引擎204及解密引擎206僅利用與當前金鑰產生相關聯的金鑰(例如,金鑰產生B的Key1B及 Key2B)來產生傳輸至請求器的sRA 520,且解密自請求器接收的請求位址。另外,安全邏輯202基於比較器812偵測到產生欄位800804之內容之間的失配而拒絕指定產生欄位804中之非當前金鑰產生的任何傳入請求位址。以此方式,安全邏輯202防止再次使用本應由請求器回應於在區塊910處發出之轉譯無效請求而使得無效的任何過時sRA。在區塊904之後,圖9中給出之程序在區塊906及後續區塊處繼續,該等區塊已進行描述。在至少一些實施例中,回應於區塊916處的逾時週期已過去而並未接收到請求器對用於先前金鑰產生之sRA之無效的應答的判定,處理器102可另外重設請求器。 As indicated by blocks 912 through 916 , after a translation invalidation request is issued and until a response to the requested invalidation is received from the requester (block 914 ) or a timeout period has elapsed (block 916 ), the security logic 202 exclusively sRA is generated using the key used for the current key generation (eg, key generation B), but the request address is decrypted using the key used for generation A or generation B. Security logic 202 ensures seamless and seamless between key generation from the requester's perspective by continuing to support the request address in a previous key generation (e.g., key generation A) until invalidation is confirmed or a timeout period has elapsed. Transparency. In response to the security logic 202 receiving an invalid response or the timeout period has elapsed, the process returns to block 904 . Thus, the encryption engine 204 and decryption engine 206 of the security logic 202 only utilize the keys associated with the current key generation (e.g., Key1B and Key2B of key generation B) to generate the sRA 520 transmitted to the requester, and decrypt it from The request address received by the requester. Additionally, security logic 202 rejects any incoming request address specifying a non-current key generation in generation field 804 based on comparator 812 detecting a mismatch between the contents of generation fields 800 and 804 . In this way, the security logic 202 prevents reuse of any stale sRAs that would have been invalidated by the requester in response to the translation invalidation request issued at block 910 . After block 904 , the process presented in FIG. 9 continues at block 906 and subsequent blocks, which have been described. In at least some embodiments, in response to a determination that the timeout period at block 916 has elapsed without receiving an invalid response from the requester to the sRA used for previous key generation, the processor 102 may additionally reset the request device.

現參考圖10,描繪根據一個實施例的可用於產生sRA 520之例示性基於AES之加密程序之資料流程圖。詳言之,所描繪實例說明可由第一階段基於AES之加密邏輯702或第二階段基於AES之加密邏輯708執行的經修改小型AES加密程序。在圖10之所描繪實施例中,Key(n)為圖7之互斥或705707的輸出。 Referring now to FIG. 10 , depicted is a data flow diagram of an exemplary AES-based encryption process that may be used to generate sRA 520 , according to one embodiment. In particular, the depicted example illustrates a modified small AES encryption procedure that may be performed by either the first stage AES-based encryption logic 702 or the second stage AES-based encryption logic 708 . In the depicted embodiment of FIG. 10 , Key(n) is the output of mutex or 705 or 707 of FIG. 7 .

在經修改小型AES加密程序之第一輪中,加密引擎204首先例如藉由執行XOR運算1002邏輯地組合36位元中間RA 700706與36位元經修改Key(n)。所得36位元工作值接著置於矩陣中,例如3×3矩陣,其中各矩陣條目保存九個半位元組中之一者。矩陣之內容接著可經歷習知矩陣操縱,包括經由取代步驟1004、列移位步驟1006及行混合步驟1008In the first round of the modified small AES encryption procedure, the encryption engine 204 first logically combines the 36-bit intermediate RA 700 or 706 with the 36-bit modified Key(n), eg, by performing an XOR operation 1002 . The resulting 36-bit working value is then placed in a matrix, such as a 3x3 matrix, where each matrix entry holds one of nine nibbles. The contents of the matrix may then undergo conventional matrix manipulations, including via a replace step 1004 , a column shift step 1006 , and a row blend step 1008 .

在經修改小型AES加密程序1000之第二輪中,加密引擎204例如藉由執行XOR運算1010再次邏輯地組合36位元工作值與36位元經修改Key(n)。所得36位元工作值接著經歷另一輪矩陣操縱,包括取代步驟 1012、列移位步驟1014及視情況選用的行混合步驟1016。應注意,行混合步驟1016並不在習知的小型AES加密程序中執行,且用以進一步保護sRA。由所說明處理產生之36位元值可接著用作密碼704710,如圖7中先前所描述。 In the second round of the modified small AES encryption program 1000 , the encryption engine 204 again logically combines the 36-bit working value with the 36-bit modified Key(n), eg, by performing an XOR operation 1010 . The resulting 36-bit working value then undergoes another round of matrix manipulation, including a replace step 1012 , a column shift step 1014 , and an optional row blend step 1016 . It should be noted that the row mixing step 1016 is not performed in the conventional small AES encryption procedure and is used to further protect the sRA. The 36-bit value resulting from the illustrated process may then be used as a password 704 or 710 as previously described in FIG. 7 .

如已描述,在至少一個實施例中,一資料處理系統提供改良之I/O安全,同時支援用於一附接裝置之位址轉譯服務。 As described, in at least one embodiment, a data processing system provides improved I/O security while supporting address translation services for an attached device.

在至少一個實施例中,一處理器自一請求器接收含有一虛擬位址之一第一請求。基於該第一請求,該處理器判定對應於該虛擬位址之一真實位址,加密該真實位址之至少一部分以獲得一密碼編譯安全真實位址,且將該密碼編譯安全真實位址傳回至該請求器。基於接收到指定一請求位址之一第二請求,該處理器解密該請求位址以將該請求位址驗證為該密碼編譯安全真實位址。基於將該請求位址驗證為該密碼編譯安全真實位址,該處理器允許對由該真實位址識別之該資料處理系統之一資源的存取。一密碼編譯安全真實位址之使用提供改良之安全,且需要的實施佔據面積通常比基於表之真實位址驗證方法更小。 In at least one embodiment, a processor receives a first request including a virtual address from a requester. Based on the first request, the processor determines a real address corresponding to the virtual address, encrypts at least a portion of the real address to obtain a cryptographically secure real address, and transmits the cryptographically secure real address Back to the requester. Upon receiving a second request specifying a request address, the processor decrypts the request address to verify the request address as the cryptographically secure true address. Based on validating the requested address as the cryptographically secure real address, the processor permits access to a resource of the data processing system identified by the real address. The use of a cryptographically secure real address provides improved security and generally requires a smaller implementation footprint than table-based real address authentication methods.

在一些實施例中,請求器可為輸入/輸出(I/O)配接器。舉例而言,在一個特定實施例中,配接器可利用快速周邊組件互連位址轉譯服務(PCIe ATS)協定與處理器就請求進行通信。在其他實施例中,請求器可為採用虛擬位址空間之附接裝置,諸如加速器。 In some embodiments, the requestor may be an input/output (I/O) adapter. For example, in one particular embodiment, the adapter may communicate the request with the processor using the Peripheral Component Interconnect Express Address Translation Service (PCIe ATS) protocol. In other embodiments, the requestor may be an attached device that employs a virtual address space, such as an accelerator.

在一些實施例中,利用基於進階加密標準(AES)之加密來加密真實位址之至少一部分。在一些實施例中,加密該真實位址之至少一部分替代地或另外包括產生該真實位址之該至少一部分之一雜湊。利用諸如AES的強加密技術具有改良安全的優勢,且利用雜湊具有高效能優勢。 In some embodiments, at least a portion of the real address is encrypted using Advanced Encryption Standard (AES) based encryption. In some embodiments, encrypting at least a portion of the real address alternatively or additionally includes generating a hash of the at least a portion of the real address. Utilizing strong encryption techniques such as AES has the advantage of improved security, and utilizing hashing has the advantage of high performance.

在一些實施例中,該處理器避免加密用以指定一記憶體頁內之一位址的該真實位址之較低階位元。藉由不加密全真實位址(例如,64個位元),加密得以簡化,且效能得以改良。 In some embodiments, the processor refrains from encrypting the lower order bits of the real address specifying an address within a memory page. By not encrypting the full real address (eg, 64 bits), encryption is simplified and performance is improved.

在一些實施例中,加密可藉由在加密之前組合額外資料與該真實位址之該至少一部分來進一步加強。在一些實施例中,該額外資料可包括來自該請求器之一處理位址空間識別符之位元及/或來自一請求器識別符之位元。在一些實施例中,該額外資料可替代地或另外包括指示該請求器對該真實位址之存取是否為唯讀之唯讀欄位。在一些實施例中,該額外資料可包括指定多個金鑰中之哪一金鑰用以加密該真實位址之金鑰產生欄位。 In some embodiments, encryption can be further strengthened by combining additional data with the at least a portion of the real address prior to encryption. In some embodiments, the additional data may include bits from a process address space identifier of the requester and/or bits from a requestor identifier. In some embodiments, the additional data may alternatively or additionally include a read-only field indicating whether the requestor's access to the real address is read-only. In some embodiments, the additional data may include a key generation field specifying which of the plurality of keys was used to encrypt the real address.

本發明可為一系統、一方法及/或一電腦程式產品。電腦程式產品可包括一(或多個)電腦可讀儲存媒體,其上具有電腦可讀程式指令以使處理器進行本發明之態樣。 The present invention can be a system, a method and/or a computer program product. A computer program product may include one (or more) computer-readable storage media having computer-readable program instructions thereon to cause a processor to perform aspects of the present invention.

電腦可讀儲存媒體可為有形裝置,其可保持及儲存指令以供指令執行裝置使用。電腦可讀儲存媒體可為例如但不限於電子儲存裝置、磁性儲存裝置、光學儲存裝置、電磁儲存裝置、半導體儲存裝置或前述各者之任何合適組合。電腦可讀儲存媒體之更具體實例之非窮盡性清單包括以下各者:攜帶型電腦磁片、硬碟、隨機存取記憶體(RAM)、唯讀記憶體(ROM)、可擦除可程式化唯讀記憶體(EPROM或快閃記憶體)、靜態隨機存取記憶體(SRAM)、攜帶型緊密光碟唯讀記憶體(CD-ROM)、數位化通用光碟(DVD)、記憶棒、軟性磁碟、機械編碼裝置(諸如其上記錄有指令之凹槽中之打孔卡片或凸起結構)及前述各者之任何合適組合。如本文中所使用,不應將電腦可讀儲存媒體本身解釋為暫時性信號,諸如無線 電波或其他自由傳播之電磁波、藉由波導或其他傳輸媒體傳播之電磁波(例如,穿過光纜之光脈衝),或藉由導線傳輸之電信號。 A computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer readable storage media includes the following: portable computer diskettes, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable Compact Read-Only Memory (EPROM or Flash), Static Random Access Memory (SRAM), Portable Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD), Memory Stick, Soft Disk Magnetic disks, mechanical encoding devices such as punched cards or raised structures in grooves on which instructions are recorded, and any suitable combination of the foregoing. As used herein, the computer-readable storage medium itself should not be construed as a transitory signal, such as a wireless Electromagnetic waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses traveling through optical cables), or electrical signals transmitted by wires.

本文中所描述之電腦可讀程式指令可自電腦可讀儲存媒體下載至各別計算/處理裝置或經由網路(例如,網際網路、區域網路、廣域網路及/或無線網路)下載至外部電腦或外部儲存裝置。網路可包含銅傳輸纜線、光傳輸光纖、無線傳輸、路由器、防火牆、交換器、閘道器電腦及/或邊緣伺服器。各計算/處理裝置中之網路配接器卡或網路介面自網路接收電腦可讀程式指令,且轉遞電腦可讀程式指令以供儲存於各別計算/處理裝置內之電腦可讀儲存媒體中。 Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device or via a network (e.g., the Internet, local area network, wide area network, and/or wireless network) to an external computer or external storage device. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards computer-readable program instructions for computer-readable storage in the respective computing/processing devices in storage media.

用於進行本發明之操作之電腦可讀程式指令可為組譯程式指令、指令集合架構(ISA)指令、機器指令、機器相關指令、微碼、韌體指令、狀態設定資料或以一或多種程式設計語言之任何組合撰寫之原始碼或目標碼,該一或多種程式設計語言包括諸如Smalltalk、C++或其類似者之物件導向式程式設計語言,及諸如「C」程式設計語言或類似程式設計語言之習知程序程式設計語言。電腦可讀程式指令可完全在使用者電腦上執行、部分地在使用者電腦上執行、作為獨立套裝軟體執行、部分地在使用者電腦上執行且部分地在遠端電腦上執行或完全在遠端電腦或伺服器上執行。在後一種情境中,遠端電腦可經由任何類型之網路(包括區域網路(LAN)或廣域網路(WAN))連接至使用者電腦,或可(例如,經由使用網際網路服務提供者之網際網路)連接至外部電腦。在一些實施例中,包括例如可程式化邏輯電路、場可程式化閘陣列(FPGA)或可程式化邏輯陣列(PLA)之電子電路可藉由利用電腦可讀程式指令之狀態資訊來個人化電子電路而執行電腦可讀程式指令,以便執行本發明之態樣。 The computer readable program instructions for carrying out the operations of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or in one or more Source or object code written in any combination of programming languages, including object-oriented programming languages such as Smalltalk, C++ or the like, and programming languages such as "C" or similar programming languages The language is known as a programming language. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer. Execute on the terminal computer or server. In the latter case, the remote computer can be connected to the user computer via any type of network, including a local area network (LAN) or wide area network (WAN), or can be connected (for example, by using an Internet service provider Internet) to an external computer. In some embodiments, electronic circuits including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer-readable program instructions Electronic circuits execute computer readable program instructions to implement aspects of the present invention.

本文中參考根據本發明之實施例之方法、設備(系統)及電腦程式產品之流程圖說明及/或方塊圖來描述本發明之態樣。應理解,可藉由電腦可讀程式指令實施流程圖說明及/或方塊圖中之各區塊以及流程圖說明及/或方塊圖中之區塊的組合。 Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It should be understood that each block in the flowchart illustrations and/or block diagrams and combinations of blocks in the flowchart illustrations and/or block diagrams can be implemented by computer readable program instructions.

可將此等電腦可讀程式指令提供至通用電腦、專用電腦或其他可程式化資料處理設備之處理器以產生機器,以使得經由電腦或其他可程式化資料處理設備之處理器執行之指令建立用於實施一或多個流程圖及/或方塊圖區塊中所指定之功能/動作之手段。亦可將此等電腦可讀程式指令儲存於電腦可讀儲存媒體中,該等指令可指導電腦、可程式化資料處理設備及/或其他裝置以特定方式起作用,以使得儲存有指令之電腦可讀儲存媒體包含製品,該製品包括實施該一或多個流程圖及/或方塊圖區塊中所指定之功能/動作之態樣的指令。 These computer-readable program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, or other programmable data processing equipment to generate a machine, so that instructions executed by the processor of the computer or other programmable data processing equipment can create means for implementing the functions/actions specified in one or more flowcharts and/or block diagram blocks. Such computer-readable program instructions may also be stored in a computer-readable storage medium, which instructions can instruct computers, programmable data processing equipment and/or other devices to function in specific ways, so that the computer on which the instructions are stored The readable storage medium includes an article of manufacture including instructions for implementing aspects of the functions/actions specified in the one or more flowcharts and/or block diagram blocks.

電腦可讀程式指令亦可載入至電腦、其他可程式資料處理設備或其他裝置上,以使一系列操作步驟在該電腦、其他可程式化設備或其他裝置上執行以產生電腦實施之處理程序,使得在該電腦、其他可程式化設備或其他裝置上執行之指令實施一或多個流程圖及/或方塊圖區塊中所指定之功能/動作。 Computer-readable program instructions can also be loaded into a computer, other programmable data processing equipment, or other device, so that a series of operation steps can be executed on the computer, other programmable equipment, or other device to generate a computer-implemented processing program , so that the instructions executed on the computer, other programmable equipment or other devices implement the functions/actions specified in one or more flowcharts and/or block diagram blocks.

諸圖中之流程圖及方塊圖說明根據本發明之各種實施例之系統、方法及電腦程式產品之可能實施的架構、功能性及操作。在此方面,流程圖或方塊圖中之各區塊可表示模組、區段或指令部分,該指令部分包含用於實施特定邏輯功能之一或多個可執行指令。在一些替代實施中,區塊中所提及之功能可不按諸圖中所提及之次序發生。舉例而言,視所涉及之功能性而定,依次展示之兩個區塊實際上可實質上同時執行,或 該等區塊有時可以相反次序執行。亦將注意,可由執行經指定功能或動作或實行專用硬體及電腦指令之組合的基於專用硬體之系統實施方塊圖及/或流程圖說明之各區塊及方塊圖及/或流程圖說明中之區塊的組合。 The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, section, or instruction portion that includes one or more executable instructions for implementing specified logical functions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in sequence may, in fact, be executed substantially concurrently, depending on the functionality involved, or The blocks can sometimes be executed in reverse order. It will also be noted that the blocks and block diagrams and/or flowchart illustrations described in the block diagrams and/or flowchart illustrations may be implemented by special purpose hardware-based systems that perform the specified functions or actions or implement combinations of special hardware and computer instructions The combination of blocks in it.

雖然已特定地展示本發明,如參考一或多個較佳實施例所描述,但熟習此項技術者應理解,在不脫離所附申請專利範圍之精神及範疇的情況下,可在本發明中進行形式及細節上之各種改變。舉例而言,儘管已論述特定長度之位址及位址欄位的實例,但熟習此項技術者應瞭解,本文中所描述之發明不限於例示性位址及位址欄位長度。另外,值得注意的是,所描述之發明可用於虛擬化及非虛擬化環境兩者中。舉例而言,在各種實施例或使用情況下,請求器可指派至VM、超管理器或裸金屬OS。舉例而言,儘管已相對於指導某些功能之資料處理硬體描述了態樣,但應理解,本發明可替代地實施為包括儲存裝置之程式產品,該儲存裝置儲存可由處理器處理以執行此等功能或使得執行此等功能的程式碼。如本文中所採用,「儲存裝置」具體地定義為僅包括法定製品且不包括信號媒體本身、暫時性傳播信號本身及能量本身。 While the invention has been particularly shown and described with reference to one or more preferred embodiments, those skilled in the art will appreciate that other applications may be made in the invention without departing from the spirit and scope of the appended claims. various changes in form and detail. For example, although examples of addresses and address fields of particular lengths have been discussed, those skilled in the art will appreciate that the inventions described herein are not limited to the exemplary addresses and address field lengths. Additionally, it is worth noting that the described invention can be used in both virtualized and non-virtualized environments. For example, in various embodiments or use cases, a requestor may be assigned to a VM, a hypervisor, or a bare metal OS. For example, although the aspects have been described with respect to data processing hardware directing certain functions, it should be understood that the present invention may alternatively be implemented as a program product including a storage device that stores data that can be processed by a processor for execution. These functions or the code that causes these functions to be performed. As used herein, "storage device" is specifically defined to include legal articles only and exclude the signal medium itself, the transitory propagated signal itself, and the energy itself.

上文所描述之圖式及特定結構及功能的書面描述並非呈現以限制申請人已發明之內容的範疇或所附申請專利範圍之範疇。確切而言,提供諸圖及書面描述以教示任何熟習此項技術者製作及使用尋求專利保護的發明。熟習此項技術者應瞭解,為清楚及理解起見,並未描述或展示本發明之商業實施例的所有特徵。熟習此項技術者亦應瞭解,併有本發明之態樣的實際商業實施例之開發將需要眾多實施特定決策以達成開發者對商業實施例之最終目標。此等實施特定決策可包括且可能並不限於符合系統相關、企業相關、政府相關約束及其他約束,該等約束可能因特定實 施、位置及時間而變化。雖然開發者之努力在絕對意義上可能係複雜且耗時的,但對於得益於本公開之熟習此項技術者而言,此類努力將為常規任務。必須理解,本文中所揭示及教示之本發明容易具有眾多及各種修改以及替代形式。最後,諸如但不限於「一」之單數術語的使用並不意欲限制項目之數目。 The above-described drawings and written descriptions of specific structures and functions are not presented to limit the scope of what the applicant has invented or the scope of the appended claims. Rather, the drawings and written description are provided to teach any person skilled in the art to make and use the invention for which patent protection is sought. Those skilled in the art will appreciate that not all features of a commercial embodiment of the invention are described or shown in the interest of clarity and understanding. Those skilled in the art will also appreciate that the development of an actual commercial embodiment incorporating aspects of the present invention will require numerous implementation-specific decisions to achieve the developer's ultimate goals for the commercial embodiment. Such implementation-specific decisions may include, and may not be limited to, compliance with system-related, enterprise-related, government-related and other Varies with facility, location, and time. While a developer's effort might be complex and time-consuming in an absolute sense, such an effort would be a routine undertaking for those skilled in the art having the benefit of this disclosure. It must be understood that the invention disclosed and taught herein is susceptible to numerous and various modifications and alternative forms. Finally, use of a singular term such as, but not limited to, "a" is not intended to limit the number of items.

400:區塊 400: block

402:區塊 402: block

404:區塊 404: block

406:區塊 406: block

408:區塊 408: block

410:區塊 410: block

412:區塊 412: block

414:區塊 414: block

416:區塊 416: block

Claims (23)

一種在包括一處理器之一資料處理系統中進行資料處理之方法,該方法包含:該處理器自一請求器接收含有一虛擬位址之一第一請求;基於該第一請求,該處理器判定對應於該虛擬位址之一真實位址,加密該真實位址之至少一部分以獲得一密碼編譯安全真實位址,且將該密碼編譯安全真實位址傳回至該請求器,其中該加密包括:該處理器維護一金鑰產生欄位,該金鑰產生欄位指定複數個不同金鑰產生中之一當前金鑰產生,該維護包括隨時間推移通過該複數個不同金鑰產生來重覆循環該金鑰產生欄位;基於由該金鑰產生欄位指定的該當前金鑰產生,該處理器選擇複數個不同金鑰之一者以用於該加密;該處理器推進(advancing)該金鑰產生欄位以基於包含該虛擬位址的一虛擬位址空間的重新映射而在該當前金鑰產生之後指定一新金鑰產生;基於接收到指定一請求位址之一第二請求,該處理器解密該請求位址以將該請求位址驗證為該密碼編譯安全真實位址;及基於將該請求位址驗證為該密碼編譯安全真實位址,該處理器允許對由該真實位址識別之該資料處理系統之一資源的存取。 A method of data processing in a data processing system comprising a processor, the method comprising: the processor receiving a first request including a virtual address from a requester; based on the first request, the processor determining a real address corresponding to the virtual address, encrypting at least a portion of the real address to obtain a cryptographically secure real address, and returning the cryptographically secure real address to the requester, wherein the encrypted comprising: the processor maintaining a key generation field specifying a current key generation of a plurality of different key generations, the maintaining including repeating over time through the plurality of different key generations looping through the key generation field; based on the current key generation specified by the key generation field, the processor selects one of a plurality of different keys for the encryption; the processor advances the key generation field to specify a new key generation after the current key generation based on remapping of a virtual address space containing the virtual address; upon receipt of a second request specifying a request address , the processor decrypts the request address to verify the request address as the cryptographically secure true address; and based on verifying the request address as the cryptographically secure true address, the processor allows Access to a resource of the data processing system identified by an address. 如請求項1之方法,其中該接收一第一請求包括接收一快速周邊組件互連位址轉譯服務(PCIe ATS)協定請求。 The method of claim 1, wherein the receiving a first request comprises receiving a Peripheral Component Interconnect Express Service (PCIe ATS) protocol request. 如請求項1之方法,其中加密該真實位址之至少一部分包括利用基於進階加密標準(AES)之加密來加密該真實位址之該至少一部分。 The method of claim 1, wherein encrypting at least a portion of the real address comprises encrypting the at least a portion of the real address using Advanced Encryption Standard (AES)-based encryption. 如請求項1之方法,其中加密該真實位址之至少一部分包括產生該真實位址之該至少一部分之一雜湊。 The method of claim 1, wherein encrypting at least a portion of the real address comprises generating a hash of the at least a portion of the real address. 如請求項1之方法,其中加密該真實位址之至少一部分包括避免加密用以指定一記憶體頁內之一位址的該真實位址之較低階位元。 The method of claim 1, wherein encrypting at least a portion of the real address includes refraining from encrypting lower order bits of the real address specifying an address within a memory page. 如請求項1之方法,其進一步包含在該加密之前組合額外資料與該真實位址之該至少一部分。 The method of claim 1, further comprising combining additional data with the at least a portion of the real address before the encrypting. 如請求項6之方法,其中該額外資料包括至少來自該請求器之一處理位址空間識別符之位元。 The method of claim 6, wherein the additional data includes at least bits from a processing address space identifier of the requester. 如請求項6之方法,其中該額外資料包括指示該請求器對該真實位址之存取是否為唯讀之一唯讀欄位。 The method according to claim 6, wherein the additional data includes a read-only field indicating whether the requester's access to the real address is read-only. 一種資料處理系統,其包含:一處理器,其經組態以執行:自一請求器接收含有一虛擬位址之一第一請求;基於該第一請求,判定對應於該虛擬位址之一真實位址,加密該 真實位址之至少一部分以獲得一密碼編譯安全真實位址,且將該密碼編譯安全真實位址傳回至該請求器,其中該加密包括:該處理器維護一金鑰產生欄位,該金鑰產生欄位指定複數個不同金鑰產生中之一當前金鑰產生,該維護包括隨時間推移通過該複數個不同金鑰產生來重覆循環該金鑰產生欄位;基於由該金鑰產生欄位指定的該當前金鑰產生,該處理器選擇複數個不同金鑰之一者以用於該加密;該處理器推進該金鑰產生欄位以基於包含該虛擬位址的一虛擬位址空間的重新映射而在該當前金鑰產生之後指定一新金鑰產生;基於接收到指定一請求位址之一第二請求,解密該請求位址以將該請求位址驗證為該密碼編譯安全真實位址;及基於將該請求位址驗證為該密碼編譯安全真實位址,允許對由該真實位址識別之該資料處理系統之一資源的存取。 A data processing system comprising: a processor configured to perform: receiving a first request from a requester including a virtual address; based on the first request, determining one of the virtual addresses corresponding to the virtual address real address, encrypt the at least a portion of the real address to obtain a cryptographically secure real address, and to pass the cryptographically secure real address back to the requester, wherein the encryption includes: the processor maintaining a key generation field, the key The key generation field specifies a current key generation of a plurality of different key generation, the maintenance includes repeatedly cycling the key generation field through the plurality of different key generation over time; based on the key generation by the key generation field specifies the current key generation, the processor selects one of a plurality of different keys to use for the encryption; the processor advances the key generation field based on a virtual address including the virtual address Space remapping to specify a new key generation after the current key generation; upon receiving a second request specifying a request address, decrypting the request address to verify the request address as the cryptographically secure a real address; and allowing access to a resource of the data processing system identified by the real address based on verifying the requested address as the cryptographically secure real address. 如請求項9之資料處理系統,其中該接收一第一請求包括接收一快速周邊組件互連位址轉譯服務(PCIe ATS)協定請求。 The data processing system of claim 9, wherein the receiving a first request includes receiving a Peripheral Component Interconnect Express Address Translation Service (PCIe ATS) protocol request. 如請求項9之資料處理系統,其中加密該真實位址之至少一部分包括利用基於進階加密標準(AES)之加密來加密該真實位址之該至少一部分。 The data processing system of claim 9, wherein encrypting at least a portion of the real address comprises encrypting the at least a portion of the real address using Advanced Encryption Standard (AES)-based encryption. 如請求項9之資料處理系統,其中加密該真實位址之至少一部分包括產生該真實位址之該至少一部分之一雜湊。 The data processing system of claim 9, wherein encrypting at least a portion of the real address comprises generating a hash of the at least a portion of the real address. 如請求項9之資料處理系統,其中加密該真實位址之至少一部分包括避免加密用以指定一記憶體頁內之一位址的該真實位址之較低階位元。 The data processing system of claim 9, wherein encrypting at least a portion of the real address includes avoiding encrypting lower order bits of the real address used to designate an address within a memory page. 如請求項9之資料處理系統,其中該處理器進一步經組態以執行:在該加密之前組合額外資料與該真實位址之該至少一部分。 The data processing system of claim 9, wherein the processor is further configured to perform: combining additional data with the at least a portion of the real address before the encryption. 如請求項14之資料處理系統,其中該額外資料包括至少來自該請求器之一處理位址空間識別符之位元。 The data processing system of claim 14, wherein the additional data includes at least bits from a processing address space identifier of the requester. 如請求項14之資料處理系統,其中該額外資料包括指示該請求器對該真實位址之存取是否為唯讀之一唯讀欄位。 The data processing system according to claim 14, wherein the additional data includes a read-only field indicating whether the requester's access to the real address is read-only. 如請求項9之資料處理系統,其進一步包含:一系統記憶體,其耦接至該處理器;及該請求器,其經由一匯流排耦接至該處理器。 The data processing system according to claim 9, further comprising: a system memory coupled to the processor; and the requester coupled to the processor via a bus. 一種程式產品,其包含:一儲存裝置;及儲存於該儲存裝置內的程式碼,其中該程式碼在由一處理器執行時使該處理器執行:自一請求器接收含有一虛擬位址之一第一請求;基於該第一請求,判定對應於該虛擬位址之一真實位址,加密該 真實位址之至少一部分以獲得一密碼編譯安全真實位址,且將該密碼編譯安全真實位址傳回至該請求器,其中該加密包括:該處理器維護一金鑰產生欄位,該金鑰產生欄位指定複數個不同金鑰產生中之一當前金鑰產生,該維護包括隨時間推移通過該複數個不同金鑰產生來重覆循環該金鑰產生欄位;基於由該金鑰產生欄位指定的該當前金鑰產生,該處理器選擇複數個不同金鑰之一者以用於該加密;該處理器推進該金鑰產生欄位以基於包含該虛擬位址的一虛擬位址空間的重新映射而在該當前金鑰產生之後指定一新金鑰產生;基於接收到指定一請求位址之一第二請求,解密該請求位址以將該請求位址驗證為該密碼編譯安全真實位址;及基於將該請求位址驗證為該密碼編譯安全真實位址,允許對由該真實位址識別之該資料處理系統之一資源的存取。 A program product comprising: a storage device; and program code stored in the storage device, wherein the program code, when executed by a processor, causes the processor to execute: receiving from a requester a message containing a virtual address A first request; based on the first request, determine a real address corresponding to the virtual address, encrypt the at least a portion of the real address to obtain a cryptographically secure real address, and to pass the cryptographically secure real address back to the requester, wherein the encryption includes: the processor maintaining a key generation field, the key The key generation field specifies a current key generation of a plurality of different key generation, the maintenance includes repeatedly cycling the key generation field through the plurality of different key generation over time; based on the key generation by the key generation field specifies the current key generation, the processor selects one of a plurality of different keys to use for the encryption; the processor advances the key generation field based on a virtual address including the virtual address Space remapping to specify a new key generation after the current key generation; upon receiving a second request specifying a request address, decrypting the request address to verify the request address as the cryptographically secure a real address; and allowing access to a resource of the data processing system identified by the real address based on verifying the requested address as the cryptographically secure real address. 如請求項18之程式產品,其中該接收一第一請求包括接收一快速周邊組件互連位址轉譯服務(PCIe ATS)協定請求。 The program product of claim 18, wherein the receiving a first request includes receiving a Peripheral Component Interconnect Express Address Translation Service (PCIe ATS) protocol request. 如請求項18之程式產品,其中加密該真實位址之至少一部分包括利用基於進階加密標準(AES)之加密來加密該真實位址之該至少一部分。 The program product of claim 18, wherein encrypting at least a portion of the real address comprises encrypting the at least a portion of the real address using Advanced Encryption Standard (AES)-based encryption. 如請求項18之程式產品,其中加密該真實位址之至少一部分包括產生該真實位址之該至少一部分之一雜湊。 The program product of claim 18, wherein encrypting at least a portion of the real address comprises generating a hash of the at least a portion of the real address. 如請求項18之程式產品,其中加密該真實位址之至少一部分包括避免加密用以指定一記憶體頁內之一位址的該真實位址之較低階位元。 The program product of claim 18, wherein encrypting at least a portion of the real address includes avoiding encrypting lower order bits of the real address specifying an address within a memory page. 如請求項18之程式產品,其中該程式碼在執行時使該處理器執行:在該加密之前組合額外資料與該真實位址之該至少一部分。 The program product of claim 18, wherein the program code, when executed, causes the processor to: combine additional data with the at least a portion of the real address before the encryption.
TW111119967A 2021-09-30 2022-05-30 Method, system and program product for data processing TWI804332B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US17/490,723 US11556482B1 (en) 2021-09-30 2021-09-30 Security for address translation services
US17/490,723 2021-09-30

Publications (2)

Publication Number Publication Date
TW202316274A TW202316274A (en) 2023-04-16
TWI804332B true TWI804332B (en) 2023-06-01

Family

ID=83903301

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111119967A TWI804332B (en) 2021-09-30 2022-05-30 Method, system and program product for data processing

Country Status (6)

Country Link
US (1) US11556482B1 (en)
EP (1) EP4409456A1 (en)
JP (1) JP2024535180A (en)
CN (1) CN117882074A (en)
TW (1) TWI804332B (en)
WO (1) WO2023052340A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821835B (en) * 2021-11-24 2022-02-08 飞腾信息技术有限公司 Key management method, key management device and computing equipment
US11860797B2 (en) * 2021-12-30 2024-01-02 Advanced Micro Devices, Inc. Peripheral device protocols in confidential compute architectures

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6145064A (en) * 1996-08-28 2000-11-07 Canon Information Systems Research Australia Pty Ltd Method of efficiently updating hashed page tables
US20110078359A1 (en) * 2009-09-25 2011-03-31 Van Dyke James M Systems and Methods for Addressing Physical Memory
US20130054934A1 (en) * 2011-08-29 2013-02-28 International Business Machines Corporation Method and Apparatus for Performing Mapping Within a Data Processing System Having Virtual Machines
US20160344731A1 (en) * 2015-05-20 2016-11-24 Google Inc. Address validation using signatures

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7958376B2 (en) * 2000-11-02 2011-06-07 Ati Technologies Ulc Write once system and method for facilitating digital encrypted transmissions
US7822993B2 (en) * 2004-08-27 2010-10-26 Microsoft Corporation System and method for using address bits to affect encryption
EP2151763A1 (en) * 2008-07-28 2010-02-10 Nagravision S.A. Method and apparatus for obfuscating virtual to physical memory mapping
US8806171B2 (en) * 2011-05-24 2014-08-12 Georgia Tech Research Corporation Systems and methods providing wear leveling using dynamic randomization for non-volatile memory
CN102841852B (en) * 2011-06-24 2015-06-17 华为技术有限公司 Wear leveling method, storing device and information system
US9037870B1 (en) * 2013-08-16 2015-05-19 Intuit Inc. Method and system for providing a rotating key encrypted file system
KR102042859B1 (en) * 2013-10-14 2019-11-08 에스케이하이닉스 주식회사 Semiconductor device and operating method thereof
US9436847B2 (en) * 2014-09-26 2016-09-06 Intel Corporation Cryptographic pointer address encoding
US10521344B1 (en) 2017-03-10 2019-12-31 Pure Storage, Inc. Servicing input/output (‘I/O’) operations directed to a dataset that is synchronized across a plurality of storage systems
US11030117B2 (en) * 2017-07-14 2021-06-08 Advanced Micro Devices, Inc. Protecting host memory from access by untrusted accelerators
US10657071B2 (en) * 2017-09-25 2020-05-19 Intel Corporation System, apparatus and method for page granular, software controlled multiple key memory encryption
US11036651B2 (en) * 2018-06-29 2021-06-15 Micron Technology, Inc. Host side caching security for flash memory
US10838722B2 (en) * 2018-12-20 2020-11-17 Intel Corporation Restartable cache write-back and invalidation
US11226894B2 (en) * 2018-12-21 2022-01-18 Micron Technology, Inc. Host-based flash memory maintenance techniques
US11010067B2 (en) 2018-12-28 2021-05-18 Intel Corporation Defense against speculative side-channel analysis of a computer system
KR20200100955A (en) * 2019-02-19 2020-08-27 에스케이하이닉스 주식회사 Apparatus and method for managing map data in memory system
US10949358B2 (en) 2019-09-25 2021-03-16 Intel Corporaton Secure address translation services using message authentication codes and invalidation tracking
US11861022B2 (en) * 2020-05-20 2024-01-02 Silicon Motion, Inc. Method and computer program product and apparatus for encrypting and decrypting physical-address information
US11580035B2 (en) * 2020-12-26 2023-02-14 Intel Corporation Fine-grained stack protection using cryptographic computing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6145064A (en) * 1996-08-28 2000-11-07 Canon Information Systems Research Australia Pty Ltd Method of efficiently updating hashed page tables
US20110078359A1 (en) * 2009-09-25 2011-03-31 Van Dyke James M Systems and Methods for Addressing Physical Memory
US20130054934A1 (en) * 2011-08-29 2013-02-28 International Business Machines Corporation Method and Apparatus for Performing Mapping Within a Data Processing System Having Virtual Machines
US20160344731A1 (en) * 2015-05-20 2016-11-24 Google Inc. Address validation using signatures

Also Published As

Publication number Publication date
EP4409456A1 (en) 2024-08-07
CN117882074A (en) 2024-04-12
JP2024535180A (en) 2024-09-30
US11556482B1 (en) 2023-01-17
WO2023052340A1 (en) 2023-04-06
TW202316274A (en) 2023-04-16

Similar Documents

Publication Publication Date Title
US11775447B2 (en) System, apparatus and method for page granular, software controlled multiple key memory encryption
US11088846B2 (en) Key rotating trees with split counters for efficient hardware replay protection
US10325118B2 (en) Cryptographic cache lines for a trusted execution environment
US10684945B2 (en) System, apparatus and method for providing key identifier information in a non-canonical address space
US20220197825A1 (en) System, method and apparatus for total storage encryption
TWI804332B (en) Method, system and program product for data processing
US10896267B2 (en) Input/output data encryption
US20070067644A1 (en) Memory control unit implementing a rotating-key encryption algorithm
US20160364343A1 (en) Systems and methods for data encryption
CN107438850A (en) Use the address validation of signature
CN112149146A (en) Deterministic encryption key rotation
US20070050642A1 (en) Memory control unit with configurable memory encryption
CN112514320B (en) Dynamic Cryptography Key Expansion
KR101653193B1 (en) Offloading functionality from a secure processing environment
EP3274849A1 (en) Cache-less split tracker architecture for replay protection trees
WO2019139854A1 (en) Managing a set of cryptographic keys in an encrypted system
US10181027B2 (en) Interface between a device and a secure processing environment
WO2018227518A1 (en) Reconfigurable device bitstream key authentication
US7403615B2 (en) Methods and apparatus for accelerating ARC4 processing
US11516013B2 (en) Accelerator for encrypting or decrypting confidential data with additional authentication data
KR102421318B1 (en) A device for managing multiple accesses to a system-on-a-chip security module of an apparatus
JP2015026892A (en) Information processing system
US20110091035A1 (en) Hardware kasumi cypher with hybrid software interface
US20240414137A1 (en) Pregeneration of one-time pads for end-to-end encryption
US20250047469A1 (en) Reduced latency metadata encryption and decryption