IP Library › Granted Patent US 12,282,668
Granted Patent B2
US 12,282,668 · App. 18/096,845 · Granted Apr 22, 2025

Methods, apparatuses, non-transitory computer-readable storage devices, and systems using fine-grained whole-program pointer layout transforms

Inventors: Yifei Wang (Beijing, CN); David Juen Fung Lie (Toronto, CA); Shengjie Xu (Toronto, CA)
Assignees: Huawei Technologies Canada Co., Ltd.; The Governing Council of the University of Toronto
G06F3/0623G06F3/0643G06F3/0673G06F8/41G06F8/443
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,282,668
App. No.
18/096,845
Granted
Apr 22, 2025
Kind
B2
Abstract

Methods and devices for analyzing and updating intermediate representations containing pointers includes compiling one or more source files into intermediate representations (IRs) having pointers, analyzing the IRs, producing transformed IRs comprising updated pointers, and producing object code from the transformed IRs. The device may include one or more non-transitory computer-readable storage devices having computer-executable instructions, when executed, cause a processing structure to perform the actions described relating to pointers. The analysis and updating of pointers may relate to types of bounds to enhance security of the systems in question by preventing erroneous references to memory space by pointers.

Claims (32)

1. A method comprising:

compiling one or more source files into intermediate representations (IRs) having pointers;

analyzing the IRs;

producing transformed IRs comprising updated pointers;

producing object code from the transformed IRs;

determining a subset of the pointers that result in arithmetic and spatial memory errors; and

determining bounds types and changes for pointer types of the subset of the pointers for avoiding the arithmetic and spatial memory errors.

2. The method of claim 1 , wherein the pointers have uncompressed bounds.

3. The method of claim 1 further comprising: for each of the pointers, compiling a point-to graph with features of layout transformation.

4. The method of claim 3 , wherein the point-to graph comprises allocation nodes, object-partition nodes, and pointer-expression nodes.

5. The method of claim 3 , wherein said compiling the point-to graph comprises: compiling dataflow information of the pointers.

6. The method of claim 1 , wherein said analyzing the IRs comprises: analyzing the IRs of all of the one or more source files, or performing static analysis of the IRs for obtaining instrumentation parameters.

7. The method of claim 6 , wherein said analyzing the IRs comprises said performing the static analysis of the IRs for obtaining the instrumentation parameters; and wherein the static analysis comprises: identifying a subset of the pointers requiring extension and determining a required bound type for each pointer.

8. The method of claim 1 , wherein said producing the transformed IRs comprises: changing bounds types of one or more of the pointers.

9. The method of claim 1 , wherein the method is configured for execution by one or more processors compatible with Capability Hardware Enhanced Reduced-Instruction-Set-Computer(RISC) Instructions (CHERI) pointer architecture.

10. One or more processors configured with instructions to perform the method of claim 1 .

11. One or more non-transitory computer-readable storage devices comprising computer-executable instructions, wherein the instructions, when executed, cause a one or more processors to perform actions comprising:

compiling one or more source files into intermediate representations (IRs) having pointers;

analyzing the IRs;

producing transformed IRs comprising updated pointers;

producing object code from the transformed IRs;

determining a subset of the pointers that result in arithmetic and spatial memory errors; and

determining bounds types and changes for pointer types of the subset of the pointers for avoiding the arithmetic and spatial memory errors.

12. The one or more non-transitory computer-readable storage devices of claim 11 , wherein the pointers have uncompressed bounds.

13. The one or more non-transitory computer-readable storage devices of claim 11 , wherein analyzing the IRs comprises:

analyzing the IRs of all of the one or more source files; or

performing static analysis of the IRs for obtaining instrumentation parameters.

14. The one or more non-transitory computer-readable storage devices of claim 13 , wherein the static analysis comprises: identifying a subset of the pointers requiring extension.

15. The one or more non-transitory computer-readable storage devices of claim 14 , wherein identifying the subset of the pointers requiring extension comprises: determining a required bound type for each pointer.

16. The one or more non-transitory computer-readable storage devices of claim 11 , wherein the instructions, when executed, cause the one or more processors to perform further action of compiling a point-to graph for each of the pointers.

17. The one or more non-transitory computer-readable storage devices of claim 16 , wherein the point-to graph comprises allocation nodes, object-partition nodes, and pointer-expression nodes.

18. The one or more non-transitory computer-readable storage devices of claim 11 , wherein said producing the transformed IRs comprises: changing bound types of one or more of the pointers.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 21, 2025
From: WANG, YIFEI
To: HUAWEI TECHNOLOGIES CANADA CO., LTD.
Reel/Frame 069943/0609 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 21, 2025
From: LIE, DAVID JUEN FUNG; XU, SHENGJIE
To: THE GOVERNING COUNCIL OF THE UNIVERSITY OF TORONTO
Reel/Frame 069943/0903 →
Continuity (1)
Related Publication 20240241651A1 · Jul 18, 2024
References Cited (14)
US 6012128A · Birns · 2000 [cited by examiner]
US 20020184486A1 · Kershenbaum · 2002 [cited by examiner]
US 20040088666A1 · Poznanovic · 2004 [cited by examiner]
US 20120151461A1 · Odaira · 2012 [cited by examiner]
US 20150362575A1 · Ourselin · 2015 [cited by examiner]
US 20160004519A1 · Carbon · 2016 [cited by examiner]
US 20180081650A1 · Larin · 2018 [cited by examiner]
US 20180275976A1 · Edler Von Koch · 2018 [cited by examiner]
US 20220012055A1 · Lemay · 2022 [cited by examiner]
US 20220382885A1 · Durham · 2022 [cited by examiner]
US 20230305718A1 · Takemoto · 2023 [cited by examiner]
US 20230418934A1 · Constable · 2023 [cited by examiner]
US 20240086579A1 · Ayrapetyan · 2024 [cited by examiner]
NPL by Watson et al. , Capability Hardware Enhanced RISC Instructions: CHERI Instruction-Set Architecture (Version 7), 2022, p. 1-2. (Year: 2022). [cited by examiner]