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

Rollup of multiple PRs #371

Merged
merged 5 commits into from
Jul 30, 2024
Merged

Rollup of multiple PRs #371

merged 5 commits into from
Jul 30, 2024

Conversation

dvdhrm
Copy link
Member

@dvdhrm dvdhrm commented Jul 30, 2024

This is a rollup of #366 and #369, including minor adjustments on top.

pobrn and others added 5 commits July 30, 2024 14:09
…aling

Newer Linux kernels do not unset `F_SEAL_SEAL` when `MFD_NOEXEC_SEAL`
is supplied to `memfd_create()`[0]. Currently, `misc_memfd()`
has a workaround for this peculiarity of the kernel, however,
this workaround will break.

Avoid the breakage by checking if the kernel added `F_SEAL_SEAL`,
and only try to add it if it is not already present.

Note that this kernel uAPI change does not affect dbus-broker's
normal operations since it never attempts to create a memfd with
`MFD_NOEXEC_SEAL` and without `MFD_ALLOW_SEALING`. Only the test
suite would be broken on newer kernels without this change.

[0]: https://lore.kernel.org/linux-mm/20240524033933.135049-1-jeffxu@google.com/

(break long comments to ensure 80ch limit)
Signed-off-by: David Rheinsberg <david@readahead.eu>
We do not overload return types, but use explicit return pointers.
Change the misc_memfd_get_seals() function to store seals in an explicit
output argument.

Signed-off-by: David Rheinsberg <david@readahead.eu>
Use the memfd helpers rather than directly invoking ioctls. This
consolidates error handling in the helper.

Signed-off-by: David Rheinsberg <david@readahead.eu>
Reported-by: Tomas Korbar <tkorbar@redhat.com>
Signed-off-by: Jeffrey Bosboom <jbosboom@jeffreybosboom.com>
Signed-off-by: David Rheinsberg <david@readahead.eu>
Use the latest checkout action to silence deprecation warnings.

Signed-off-by: David Rheinsberg <david@readahead.eu>
@dvdhrm dvdhrm merged commit a39ab3e into bus1:main Jul 30, 2024
31 of 32 checks passed
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.

3 participants