[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: refactor issue reporting (PR #135662)
Anatoly Trosinenko via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 29 07:19:47 PDT 2025
================
@@ -198,73 +198,147 @@ raw_ostream &operator<<(raw_ostream &OS, const MCInstReference &);
namespace PAuthGadgetScanner {
+// The report classes are designed to be used in an immutable manner.
+// When an issue report is constructed in multiple steps, an attempt is made
+// to distinguish intermediate and final results at the type level.
+//
+// Here is an overview of issue life-cycle:
+// * an analysis (SrcSafetyAnalysis at now, DstSafetyAnalysis will be added
+// later to support the detection of authentication oracles) computes register
+// state for each instruction in the function.
+// * each instruction is checked to be a gadget of some kind, taking the
+// computed state into account. If a gadget is found, its kind and location
+// are stored into a subclass of Diagnostic wrapped into BriefReport<ReqT>.
----------------
atrosinenko wrote:
Sounds reasonable, thanks!
https://github.com/llvm/llvm-project/pull/135662
More information about the llvm-branch-commits
mailing list