Class: SeccompTools::Explain::Qword

Inherits:
Struct
  • Object
show all
Defined in:
lib/seccomp-tools/explain/qword.rb

Overview

A 64-bit fact reassembled from 32-bit word checks (see QwordFusion); base is the field's byte offset in seccomp_data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#baseObject

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



9
10
11
# File 'lib/seccomp-tools/explain/qword.rb', line 9

def base
  @base
end

#opObject

Returns the value of attribute op

Returns:

  • (Object)

    the current value of op



9
10
11
# File 'lib/seccomp-tools/explain/qword.rb', line 9

def op
  @op
end

#valObject

Returns the value of attribute val

Returns:

  • (Object)

    the current value of val



9
10
11
# File 'lib/seccomp-tools/explain/qword.rb', line 9

def val
  @val
end

Instance Method Details

#keyObject

Mirrors Symbolic::Constraint#key (a string) so fused condition lists can still be compared; the q prefix keeps it distinct from any constraint key, which starts with an operand char.



12
13
14
# File 'lib/seccomp-tools/explain/qword.rb', line 12

def key
  "q#{base},#{op},#{val}"
end

#plain_data_fact?(_offset = nil) ⇒ Boolean Also known as: plain_data_eq?

A SeccompTools::Explain::Qword is a whole-field fact, never a single plain-word one, so it matches neither predicate. Defining them lets the fusion code treat a mixed list uniformly, without an is_a? guard on every access.

Returns:

  • (Boolean)


19
# File 'lib/seccomp-tools/explain/qword.rb', line 19

def plain_data_fact?(_offset = nil) = false