Skip to content

Big endian#97

Open
fneddy wants to merge 6 commits intorust-vmm:mainfrom
fneddy:big_endian
Open

Big endian#97
fneddy wants to merge 6 commits intorust-vmm:mainfrom
fneddy:big_endian

Conversation

@fneddy
Copy link
Copy Markdown

@fneddy fneddy commented Mar 11, 2026

Summary of the PR

added big endian support and as first big-endian platform s390x.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

TODO

@fneddy
Copy link
Copy Markdown
Author

fneddy commented Mar 11, 2026

I'll edit the CHANGELOG and update the PR.

@fneddy fneddy force-pushed the big_endian branch 3 times, most recently from 7bd088e to 8abe282 Compare March 12, 2026 09:42
@fneddy
Copy link
Copy Markdown
Author

fneddy commented Mar 12, 2026

Ok. I think all the tests are actually not my fault. this is ready for review.

Copy link
Copy Markdown

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I appreciate explaining the clearing of errno in one of the commit messages.

@alindima
Copy link
Copy Markdown
Collaborator

alindima commented Apr 1, 2026

Thanks for the contribution! We've never added support for a target platform that we cannot run in the rust-vmm CI. AFAIK there's no such CI runner yet in the rust-vmm CI, is there?

Otherwise, we'd be merging code without any quality guarantee that it works (I, for one, don't have such a machine to test even) so I'm afraid we can't proceed unless support is added for it in the CI (like we did for riscv also: rust-vmm/rust-vmm-ci#159)

@fneddy
Copy link
Copy Markdown
Author

fneddy commented Apr 1, 2026

thx I will look into it!

@rbradford
Copy link
Copy Markdown

rust-vmm doesn't support big endian architectures.

@fneddy
Copy link
Copy Markdown
Author

fneddy commented Apr 2, 2026

there are other projects that depend on seccompiler that are interesting for big-endian. I would request an action runner at https://github.com/IBM/actionspz/ if that's ok.

@petreeftime
Copy link
Copy Markdown
Collaborator

Under supported platform: https://github.com/rust-vmm/seccompiler/blob/main/README.md#supported-platforms, should add Experimental s390 support.

fneddy added 6 commits April 7, 2026 16:33
big-endian:
- added endian switch to SeccompCondition::get_data_offsets everything
  else is endianness independent.
- fixed tests to have endianness specific data offsets

Signed-off-by: Eddy (Eduard) Stefes <eddy@linux.ibm.com>
s390:
- add s390x to generate_syscall_tables and the generates code
- add flags and switches for s390x to the backend

test:
- there is no guarantee that errno is 0 at main entry or thread entry
  in fact on s390x its 2 ENOENT as rust startup code will try to
  getauxval(AT_MINSIGSTKSZ) that is not defined. Also getpid WILL NOT
  reset errno to 0 if it suceeded.
  Therefore add errno crate and set errno at start of the test to 0.

Signed-off-by: Eddy (Eduard) Stefes <eddy@linux.ibm.com>
Signed-off-by: Eddy (Eduard) Stefes <eddy@linux.ibm.com>
Signed-off-by: Eddy (Eduard) Stefes <eddy@linux.ibm.com>
Signed-off-by: Eddy (Eduard) Stefes <eddy@linux.ibm.com>
added s390x to supported platforms section in readme. Marked it as Experimental

Signed-off-by: Eddy (Eduard) Stefes <eddy@linux.ibm.com>
@alindima
Copy link
Copy Markdown
Collaborator

alindima commented Apr 9, 2026

Under supported platform: https://github.com/rust-vmm/seccompiler/blob/main/README.md#supported-platforms, should add Experimental s390 support.

We shouldn't do this without CI validating that it works. Otherwise, what stops us from adding all targets we can think of, not testing them, and just releasing possibly broken code (even if documented as experimental)

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.

5 participants