Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

System and method of determining memory ownership on cache line basis for detecting self-modifying code including code with instruction that overlaps cache line boundaries

a cache line and memory ownership technology, applied in the field of system and memory ownership, can solve the problems of dcache, improper or unintended operation, smc subsequently modified,

Active Publication Date: 2017-10-17
VIA ALLIANCE SEMICON CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Benefits of technology

The patent describes a method for detecting self-modifying code by analyzing cache lines and setting stale bits. The method includes fetching cache lines, determining an ownership index for each cache line, translating cache line data into instructions, setting straddle bits for each instruction, and marking instructions with a first exception if a stale bit is set. The technical effect of this method is to improve the detection of self-modifying code and improve the efficiency of the processor.

Problems solved by technology

At least one problem with prefetch and OOO operation is that instructions that have been prefetched and forwarded for execution may be subsequently modified by SMC.
Thus, an instruction that is already sent for execution may have missed the modification potentially causing improper or unintended operation.
If the icache attempts to read from memory owned by the dcache, ownership must be transferred from the dcache which is a slow and tedious process which tends to serialize operation.
Although 4 KB is not a significant amount of memory, SMC may cause thrashing of ownership between the icache and the dcache substantially reducing operating efficiency.
It has been observed that even 1 KB ownership granularity was still problematic for SMC in many situations.
Furthermore, larger page sizes are often used, such as 2 megabytes (MB) or even 1 gigabyte (GB), so that ownership granularity has remained a significant issue that reduces overall performance.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • System and method of determining memory ownership on cache line basis for detecting self-modifying code including code with instruction that overlaps cache line boundaries
  • System and method of determining memory ownership on cache line basis for detecting self-modifying code including code with instruction that overlaps cache line boundaries
  • System and method of determining memory ownership on cache line basis for detecting self-modifying code including code with instruction that overlaps cache line boundaries

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027]The inventors have recognized the problems of memory ownership in view of self-modifying code (SMC). They have therefore developed a system and method of establishing memory ownership on a cache line basis using an ownership queue which may be used for detecting SMC including code with one or more instructions that overlap cache line boundaries. An ownership index is determined for each cache line entered into the ownership queue. A processing front end sets a straddle bit for each instruction that was derived from cache line data that overlapped two cache lines in the ownership queue. The ownership index and straddle bit are included with each instruction issued for processing from a processor front end. A stale detection system sets a stale bit of an entry of the ownership queue that collides with a store instruction, and marks an issued instruction with a first exception when a stale bit of the corresponding entry in the ownership queue is set, or when a straddle bit of the...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

A system and method for determining memory ownership on a cache line basis for detecting self-modifying code with instructions that overlap cache line boundaries. An ownership index and a cache line address are entered into the ownership queue for each cache line. The cache lines are translated into instructions, and a straddle bit is set for each instruction that was derived from cache line data that overlapped two cache lines. A stale bit is set for any entry of the ownership queue that collides with a store instruction. Each instruction issued for execution is marked with a first exception when the stale bit of the corresponding ownership queue entry is set, or when the straddle bit of the issued instruction and a stale bit of a next sequential entry are both set. A first exception is performed for each instruction ready to retire that is marked with the first exception.

Description

CROSS REFERENCE TO RELATED APPLICATION(S)[0001]This application claims priority based on U.S. Provisional Application Ser. No. 62 / 324,945, filed Apr. 20, 2016, which is hereby incorporated by reference in its entirety.[0002]This application is related to the following co-pending U.S. patent applications, each of which has a common assignee and common inventors.[0003]FILINGSER. NO.DATETITLE15 / 156,391May 17, SYSTEM AND METHOD OF2016DETERMINING MEMORY OWNERSHIPON CACHE LINE BASIS FOR DETECTINGSELF-MODIFYING CODE INCLUDINGCODE WITH LOOPING INSTRUCTIONS15 / 156,416May 17, SYSTEM AND METHOD OF2016DETERMINING MEMORY OWNERSHIPON CACHE LINE BASIS FOR DETECTINGSELF-MODIFYING CODE15 / 156,429May 17, SYSTEM AND METHOD OF2016DETERMINING MEMORY OWNERSHIPON CACHE LINE BASIS FOR DETECTINGSELF-MODIFYING CODE INCLUDINGMODIFICATION OF A CACHE LINE WITHAN EXECUTING- INSTRUCTIONBACKGROUND OF THE INVENTION[0004]Field of the Invention[0005]The present invention relates in general to memory ownership, and more...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F12/00G06F12/0891G06F12/0875
CPCG06F12/0875G06F12/0891G06F2212/452G06F2212/1008G06F12/0893G06F12/109G06F2212/604G06F2212/657
Inventor BEAN, BRENTEDDY, COLIN
Owner VIA ALLIANCE SEMICON CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products