Vector35 / Vector35/binaryninja-api

Generic Intrinsic support

Offen
#7,233 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Component: API Component: Core Effort: High Impact: High
Vorherrschende Sprache
C++
Sterne
1.3k
Forks
298
Ø Merge
5 T. 5 Std.
Gemergte PRs (30 T.)
19

Beschreibung

We've identified a need for a "generic intrinsics" These intrinsics would be identified through either lifting or pattern matching. Here are few examples are:

  • min/max
  • floor/ceiling/round
  • align/extract_bits/clear_bits
  • memcpy

The idea is that we would reserve space in the intrinsic identifier field (maybe by setting the top bit) and these would be for internal use only.

enum BNGenericIntrinsic : uint32_t {
   MIN_INTRINSIC = 0x80000000,
   MAX_INTRINSIC,
   FLOOR_INTRINSIC,
   ...
 };

We would likely want to convert the existing builtin_* synthetic builtins to this new, more extensible, system. This system would need to additionally support cross references. Our current cross reference system is based on a uint64_t which is insufficient for representing a cross reference to something that really doesn't exist within the address space. There are a couple of solutions to this:

  • Expand the representation of what our definition of 'memory' is to support these types of situations
  • Use a mechanism like relocations use which is essentially a symbolic cross reference. So rather than address-based cross references we'd have ones based on a symbol (+ addend)
  • The final not-good option would be to continue to use the synthetic_builtins section which has some unfortunate consequences in some cases.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Start by reviewing the existing builtin_* synthetic builtins and the current uint64_t cross-reference system. Compare the proposed identifier scheme with the three cross-reference options; done requires a decided design for generic intrinsics, including the listed examples, cross references, and migration of existing synthetic builtins.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
reverse-engineering
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.