Module: SeccompTools::Const::Endian
- Defined in:
- lib/seccomp-tools/const.rb
Overview
Endianness constants.
Constant Summary collapse
- AUDIT_ARCH_LE =
__AUDIT_ARCH_LEfromuapi/linux/audit.h: the bit anAUDIT_ARCH_*value carries iff the architecture is little-endian. The kernel encodes endianness in the arch token itself, so it never needs to be guessed from an architecture's name. 0x40000000- ENDIAN =
Endianness of each architecture as a pack/unpack format modifier, derived from the Audit::ARCH values instead of being maintained by hand.
Audit::ARCH_NAME.transform_values do |name| Audit::ARCH[name].anybits?(AUDIT_ARCH_LE) ? '<' : '>' end.freeze
Class Method Summary collapse
-
.big?(arch) ⇒ Boolean
Whether
archis big-endian, i.e.
Class Method Details
.big?(arch) ⇒ Boolean
Whether arch is big-endian, i.e. stores the high 32-bit word of a 64-bit seccomp_data
field (+instruction_pointer+ or an argument) first. See arch_arg_offset_lo/hi in
libseccomp and the syscall_arg macro of the kernel's seccomp selftests.
249 250 251 |
# File 'lib/seccomp-tools/const.rb', line 249 def self.big?(arch) ENDIAN[arch] == '>' end |