Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

features: centralize error semantics, remove maxMiscType, etc. #571

Merged
merged 5 commits into from Feb 17, 2022

Commits on Feb 16, 2022

  1. asm: remove Instruction.RewriteJumpOffset()

    As this function is a relatively lean wrapper around setting ins.Offset
    and doesn't do any particular sanity checking to see if e.g. the offset
    is within bounds, it's not clear what benefit this provides being part
    of the exported API.
    
    As its only use is within the test suite where the instruction stream
    is known up front, remove the function for now.
    
    Signed-off-by: Timo Beckers <timo@isovalent.com>
    ti-mo committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    0c1e672 View commit details
    Browse the repository at this point in the history
  2. features: remove maxMiscType and miscType.max()

    As miscTypes cannot be specified by the caller, there's no strong reason
    to input check these arguments. Calls to createMiscProbeAttr() will fail
    when the miscTyps is not implemented anyway.
    
    Signed-off-by: Timo Beckers <timo@isovalent.com>
    ti-mo committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    d9de07e View commit details
    Browse the repository at this point in the history
  3. features: define probe error return semantics in package doc

    Signed-off-by: Timo Beckers <timo@isovalent.com>
    ti-mo committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    c601055 View commit details
    Browse the repository at this point in the history
  4. asm: rename ErrUnsatisfied{,Program}Reference

    The error string was changed when it was exported in cilium#541 and is potentially
    ambiguous.
    
    Signed-off-by: Timo Beckers <timo@isovalent.com>
    ti-mo committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    a27ae6d View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2022

  1. asm: remove fallthrough from FixupReferences

    I keep reading the switch in FixupReferences wrong: I always assume that
    any instruction with a reference will trigger the unsatisfied reference
    error. This isn't the case since only the program reference switch cases
    execute a break.
    
    Make the whole thing easier to understand by copying the error message
    into two places.
    lmb committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    3880052 View commit details
    Browse the repository at this point in the history