IP Library Granted Patent US 9,762,544
Granted Patent B2
US 9,762,544 · App. 14/863,484 · Granted Sep 12, 2017

Reverse NFA generation and processing

Inventors: Rajan Goyal (Saratoga, CA); Satyanarayana Lakshmipathi Billa (Sunnyvale, CA)
Assignee: Cavium, Inc.
H04L63/0254G06F17/30958H04L63/0245H04L63/1408H04L63/1416
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 9,762,544
App. No.
14/863,484
Granted
Sep 12, 2017
Kind
B2
Abstract

In a processor of a security appliance, an input of a sequence of characters is walked through a finite automata graph generated for at least one given pattern. At a marked node of the finite automata graph, if a specific type of the at least one given pattern is matched at the marked node, the input sequence of characters is processed through a reverse non-deterministic finite automata (rNFA) graph generated for the specific type of the at least one given pattern by walking the input sequence of characters backwards through the rNFA beginning from an offset of the input sequence of characters associated with the marked node. Generating the rNFA for a given pattern includes inserting processing nodes for processing an input sequence of patterns to determine a match for the given pattern. In addition, the rNFA is generated from the given type of pattern.

Claims (24)

1. A method comprising:

in an apparatus including a multi-layer protocol processor configured to inspect content of data received from a network:

improving inspection performance of the processor by (a) determining whether or not a given regular expression pattern requires a match of at least one back-reference and (b) in response to determining that the given regular expression pattern requires the match and prior to inspecting the content received from the network, generating a reverse non-deterministic finite automata (rNFA) graph for the given regular expression pattern, the rNFA graph including processing nodes for walking a sequence of characters for inspecting the content to enable recognition of the given regular expression pattern in the sequence of characters, the rNFA graph having at least one processing node inserted into the rNFA graph based on the at least one back reference, the apparatus forwarding the content of the data to the network based on the inspecting.

2. The method of claim 1 wherein generating the rNFA graph includes:

converting the given regular expression pattern including the at least one back-reference into a revised pattern, wherein the converting includes replacing the at least one back-reference with a capture group corresponding to the at least one back-reference; and

generating the rNFA graph using the revised pattern.

3. The method of claim 2 wherein generating the rNFA graph further includes:

determining locations of the given regular expression pattern requiring the match of the at least one back-reference; and

inserting back-reference processing nodes into the rNFA graph corresponding to locations associated with a beginning offset of the at least one back-reference and an end offset of the at least one back-reference, the beginning offset and end offset of the at least one back-reference corresponding to offset locations of the revised pattern.

4. The method of claim 3 wherein the back-reference processing nodes enable a determination of at least one of the following: the beginning offset of the at least one back-reference corresponding to a first offset of the sequence of characters, the end offset of the at least one back-reference corresponding to a second offset of the sequence of characters, and a length of the at least one back-reference within the sequence of characters.

5. The method of claim 2 wherein generating the rNFA graph further includes:

determining locations of the given regular expression pattern including the capture group associated with the at least one back-reference of the given regular expression pattern; and

inserting capture group processing nodes into the rNFA graph corresponding to locations associated with a beginning offset of the capture group and an end offset of the capture group, the beginning offset and end offset of the capture group corresponding to offset locations of the revised pattern.

6. The method of claim 5 wherein the capture group processing nodes enable a determination of at least one of the following: the beginning offset of the capture group corresponding to a first offset of the sequence of characters, the end offset of the capture group corresponding to a second offset of the sequence of characters, and a length of the capture group within the sequence of characters.

7. An apparatus, the apparatus comprising:

a multi-layer protocol processor implemented in hardware, the processor configured to inspect content of data received from a network and to implement a compiler configured to:

improve inspection performance of the processor by (a) determining whether or not a given regular expression pattern requires a match of at least one back-reference and (b) in response to determining that the given regular expression pattern requires the match and prior to inspecting the content received from the network, generating a reverse non-deterministic finite automata (rNFA) graph for the given regular expression pattern, the rNFA graph including processing nodes for walking a sequence of characters for inspecting the content to enable recognition of the given regular expression pattern in the sequence of characters, the rNFA graph having at least one processing node inserted into the rNFA graph based on the at least one back reference, the apparatus configured to forward the content of the data to the network based on the inspecting.

8. The apparatus of claim 7 wherein the compiler is further configured to:

convert the given regular expression pattern including the at least one back-reference into a revised pattern and replace the at least one back-reference with a capture group corresponding to the at least one back-reference in the revised pattern; and

generate the rNFA graph using the revised pattern.

9. The apparatus of claim 8 wherein the compiler is further configured to determine locations of the given regular expression pattern requiring the match of the at least one back-reference and insert back-reference processing nodes into the rNFA graph corresponding to locations associated with a beginning offset of the at least one back-reference and an end offset of the at least one back-reference, the beginning offset and end offset of the at least one back-reference corresponding to offset locations of the revised pattern.

10. The apparatus of claim 9 wherein the back-reference processing nodes enable a determination of at least one of the following: the beginning offset of the at least one back-reference corresponding to a first offset of the sequence of characters, the end offset of the at least one back-reference corresponding to a second offset of the sequence of characters, and a length of the at least one back-reference within the sequence of characters.

11. The apparatus of claim 8 wherein the compiler is further configured to determine locations of the given regular expression pattern including the capture group associated with the at least one back-reference of the given regular expression pattern and insert capture group processing nodes into the rNFA graph corresponding to locations associated with a beginning offset of the capture group and an end offset of the capture group, the beginning offset and end offset of the capture group corresponding to offset locations of the revised pattern.

12. The apparatus of claim 11 wherein the capture group processing nodes enable a determination of at least one of the following: the beginning offset of the capture group corresponding to a first offset of the sequence of characters, the end offset of the capture group corresponding to a second offset of the sequence of characters, and a length of the capture group within the sequence of characters.

Assignments (6)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 15, 2020
From: CAVIUM INTERNATIONAL
To: MARVELL ASIA PTE, LTD.
Reel/Frame 053179/0320 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 17, 2020
From: CAVIUM, LLC
To: CAVIUM INTERNATIONAL
Reel/Frame 051948/0807 →
CERTIFICATE OF CONVERSION AND CERTIFICATE OF FORMATION Recorded Oct 2, 2018
From: CAVIUM, INC.
To: CAVIUM, LLC
Reel/Frame 047185/0422 →
RELEASE OF SECURITY INTEREST Recorded Jul 6, 2018
From: JP MORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
To: CAVIUM, INC; CAVIUM NETWORKS LLC; QLOGIC CORPORATION
Reel/Frame 046496/0001 →
SECURITY AGREEMENT Recorded Aug 17, 2016
From: CAVIUM, INC.; CAVIUM NETWORKS LLC
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 039715/0449 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 10, 2015
From: GOYAL, RAJAN; BILLA, SATYANARAYANA LAKSHMIPATHI
To: CAVIUM, INC.
Reel/Frame 036999/0799 →
Continuity (2)
Continuation 13303885 · Nov 23, 2011
Related Publication 20160021060A1 · Jan 21, 2016