auditor

An aarch64 constant-time memory access auditing tool.
git clone git://git.ppad.tech/auditor.git
Log | Files | Refs | README | LICENSE

commit ad414ca37a6c33d3b13606bdabd72cb22c296357
parent d03fc7006031c9dc5eed4db9b0f9d01ada2cbd7e
Author: Jared Tobin <jared@jtobin.io>
Date:   Sun, 17 May 2026 21:05:00 -0230

parser: revert unintended pRegOrShiftedReg switch

The shifted-immediate fix in d03fc70 also bundled an unrelated switch
of pRegOrShiftedReg from pShift to pShiftOrExtend, adding extend-form
support (OpExtendedReg) to non-bracketed register operands. That
change isn't needed for the bolt8 audit asm (no non-bracketed extend
operands appear there) and was outside the scope of the commit
message. Revert to pShift; extend-form support for plain operands
can be revisited if/when a future audit needs it.

Diffstat:
Mlib/Audit/AArch64/Parser.hs | 12+++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/Audit/AArch64/Parser.hs b/lib/Audit/AArch64/Parser.hs @@ -425,16 +425,14 @@ pImmShiftOp = lexeme $ choice , (,) ShA <$> (string' "asr" *> sc *> pShiftAmt) ] --- Parse register once, then optionally check for --- shift or extend suffix. +-- Parse register once, then optionally check for shift suffix. pRegOrShiftedReg :: Parser Operand pRegOrShiftedReg = do r <- pReg - mMod <- optional (pComma *> pShiftOrExtend) - pure $ case mMod of - Just (Left sh) -> OpShiftedReg r sh - Just (Right ex) -> OpExtendedReg r ex - Nothing -> OpReg r + mShift <- optional (pComma *> pShift) + pure $ case mShift of + Just sh -> OpShiftedReg r sh + Nothing -> OpReg r pImm :: Parser Integer pImm = lexeme $ do