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

Fix argument order of clone() for s390x in seccomp filter #3777

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented Aug 6, 2020

From: @julian-klode

clone() is a mad syscall with about 4 different argument orders. While
most of them agree that argument 0 is flags, s390 and s390x have the
flags argument second - A0 is the child stack pointer there.

[smcv: Add an explanatory comment; also test __CRIS__ for completeness]

Bug-Debian: https://bugs.debian.org/964541
Bug-Ubuntu: https://launchpad.net/bugs/1886814


For reference see clone(2), https://github.com/systemd/systemd/blob/master/src/basic/raw-clone.h and kernel source.

I'm told that this change is necessary and sufficient to make flatpak-builder work on s390x, for everyone who wants to be able to build desktop applications for their non-GUI-capable IBM mainframe (if such users even exist).

This is currently considered to be a release-critical bug in Debian and Ubuntu, because those distributions don't distinguish between architectures where desktop-oriented packages are practically useful and architectures where they are not.

clone() is a mad syscall with about 4 different argument orders. While
most of them agree that argument 0 is flags, s390 and s390x have the
flags argument second - A0 is the child stack pointer there.

[smcv: Add an explanatory comment; also test __CRIS__ for completeness]

Bug-Debian: https://bugs.debian.org/964541
Bug-Ubuntu: https://launchpad.net/bugs/1886814
Signed-off-by: Simon McVittie <smcv@collabora.com>
gnomesysadmins pushed a commit to GNOME/gnome-desktop that referenced this pull request Aug 6, 2020
From flatpak/flatpak#3777

clone() is a mad syscall with about 4 different argument orders. While
most of them agree that argument 0 is flags, s390 and s390x have the
flags argument second - A0 is the child stack pointer there.

[smcv: Add an explanatory comment; also test __CRIS__, for completeness;
apply change from Flatpak to the copy of this code in gnome-desktop]

Bug-Debian: https://bugs.debian.org/964541
Bug-Ubuntu: https://launchpad.net/bugs/1886814
Signed-off-by: Simon McVittie <smcv@collabora.com>
@AsciiWolf
Copy link
Contributor

I believe you can actually run GUI apps on s390 machines using VNC or other remote desktop protocols. :)

ashkulz pushed a commit to qtwebkit/webkit-mirror that referenced this pull request Aug 8, 2020
…390x

https://bugs.webkit.org/show_bug.cgi?id=215212

Reviewed by Michael Catanzaro.

Patch based on this Flatpak pull request:
flatpak/flatpak#3777

No new tests needed.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::setupSeccomp): Add preprocessor guard to choose the correct
clone() system call argument on S390.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@265326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@alexlarsson alexlarsson merged commit 8ba141c into flatpak:master Aug 10, 2020
gnomesysadmins pushed a commit to GNOME/gnome-desktop that referenced this pull request Aug 10, 2020
From flatpak/flatpak#3777

clone() is a mad syscall with about 4 different argument orders. While
most of them agree that argument 0 is flags, s390 and s390x have the
flags argument second - A0 is the child stack pointer there.

[smcv: Add an explanatory comment; also test __CRIS__, for completeness;
apply change from Flatpak to the copy of this code in gnome-desktop]

Bug-Debian: https://bugs.debian.org/964541
Bug-Ubuntu: https://launchpad.net/bugs/1886814
Signed-off-by: Simon McVittie <smcv@collabora.com>
gnomesysadmins pushed a commit to GNOME/gnome-desktop that referenced this pull request Aug 11, 2020
From flatpak/flatpak#3777

clone() is a mad syscall with about 4 different argument orders. While
most of them agree that argument 0 is flags, s390 and s390x have the
flags argument second - A0 is the child stack pointer there.

[smcv: Add an explanatory comment; also test __CRIS__, for completeness;
apply change from Flatpak to the copy of this code in gnome-desktop]

Bug-Debian: https://bugs.debian.org/964541
Bug-Ubuntu: https://launchpad.net/bugs/1886814
Signed-off-by: Simon McVittie <smcv@collabora.com>
bertogg pushed a commit to Igalia/webkit that referenced this pull request Aug 18, 2020
…ccomp filter on s390x

https://bugs.webkit.org/show_bug.cgi?id=215212

Reviewed by Michael Catanzaro.

Patch based on this Flatpak pull request:
flatpak/flatpak#3777

No new tests needed.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::setupSeccomp): Add preprocessor guard to choose the correct
clone() system call argument on S390.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.28@265737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JonWBedard pushed a commit to WebKit/WebKit that referenced this pull request Dec 1, 2022
…ccomp filter on s390x

https://bugs.webkit.org/show_bug.cgi?id=215212

Reviewed by Michael Catanzaro.

Patch based on this Flatpak pull request:
flatpak/flatpak#3777

No new tests needed.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::setupSeccomp): Add preprocessor guard to choose the correct
clone() system call argument on S390.
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.

None yet

4 participants