Skip to content

Big endian#97

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

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

Conversation

@fneddy
Copy link

@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.

@fneddy
Copy link
Author

fneddy commented Mar 11, 2026

I'll edit the CHANGELOG and update the PR.

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>
fneddy added 2 commits March 11, 2026 14:19
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>
@fneddy
Copy link
Author

fneddy commented Mar 12, 2026

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

Copy link

@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.

Signed-off-by: Eddy (Eduard) Stefes <eddy@linux.ibm.com>
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.

2 participants