Skip to content

Add s390x (64-bit) syscall architecture support - #48

Open
spotrh wants to merge 1 commit into
google:masterfrom
spotrh:s390x-support
Open

spotrh wants to merge 1 commit into
google:masterfrom
spotrh:s390x-support

Conversation

@spotrh

@spotrh spotrh commented Oct 6, 2026

Copy link
Copy Markdown

Adds the s390x target architecture so kafel can build and apply seccomp-bpf policies on IBM Z 64bit (s390x). s390x was the only common 64-bit Linux architecture not already supported.

  • New src/syscalls/s390x_syscalls.c covering the s390 common + 64-bit ABI (381 syscalls). Argument descriptors are reused from the amd64 list for syscalls shared with the generic 64-bit Linux ABI; s390-specific and nullary syscalls use an empty argument list.
  • KAFEL_TARGET_ARCH_S390X (1 << 9) added to the kafel_target_arch enum; KAFEL_TARGET_ARCHS_ALL updated to (1 << 10) - 1.
  • s390x default-arch detection in src/common.h and test/runner/harness.h.
  • src/syscall.c: SYSCALL_LIST_DECL, syscall_lists entry (guarded by AUDIT_ARCH_S390X), kafel_arch_to_string case, and arch name map entries ("s390x", "s390").
  • src/Makefile: s390x_syscalls.c added to SYSCALL_LISTS and the depend list.

I have signed the Google ICLA.

Adds the s390x target architecture so kafel can build and apply
seccomp-bpf policies on IBM Z (s390x). s390x was the only common
64-bit Linux architecture not already supported.

  - New src/syscalls/s390x_syscalls.c covering the s390 common + 64-bit
    ABI (381 syscalls). Argument descriptors are reused from the amd64
    list for syscalls shared with the generic 64-bit Linux ABI;
    s390-specific and nullary syscalls use an empty argument list.
  - KAFEL_TARGET_ARCH_S390X (1 << 9) added to the kafel_target_arch
    enum; KAFEL_TARGET_ARCHS_ALL updated to (1 << 10) - 1.
  - __s390x__ default-arch detection in src/common.h and
    test/runner/harness.h.
  - src/syscall.c: SYSCALL_LIST_DECL, syscall_lists entry (guarded by
    AUDIT_ARCH_S390X), kafel_arch_to_string case, and arch name map
    entries ("s390x", "s390").
  - src/Makefile: s390x_syscalls.c added to SYSCALL_LISTS and the
    depend list.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant