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

Support aarch64 in walredo seccomp code #3996

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Support aarch64 in walredo seccomp code #3996

merged 2 commits into from
Apr 11, 2023

Commits on Apr 11, 2023

  1. Support aarch64 in walredo seccomp code

    Aarch64 doesn't implement some old syscalls like open and select. Use
    openat instead of open to check if seccomp is supported. Leave both
    select and pselect6 in the allowlist since we don't call select syscall
    directly and may hope that libc will call pselect6 on aarch64.
    
    To check whether some syscall is supported it is possible to use
    `scmp_sys_resolver` from seccopm package:
    
    ```
    > apt install seccopm
    > scmp_sys_resolver -a x86_64 select
    23
    > scmp_sys_resolver -a aarch64 select
    -10101
    > scmp_sys_resolver -a aarch64 pselect6
    72
    ```
    
    Negative value means that syscall is not supported.
    
    Another cross-check is to look up for the actuall syscall table
    in `unistd.h`. To resolve all the macroses one can use `gcc -E` as
    it is done in `dump_sys_aarch64()` function in
    libseccomp/src/arch-syscall-validate.
    kelvich committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    11040cb View commit details
    Browse the repository at this point in the history
  2. Update pgxn/neon_walredo/seccomp.c

    Co-authored-by: Heikki Linnakangas <heikki@neon.tech>
    kelvich and hlinnaka authored Apr 11, 2023
    Configuration menu
    Copy the full SHA
    25d8b3b View commit details
    Browse the repository at this point in the history