Skip to content

gh-123014: Disable pidfd API on older Android versions #124458

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

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

mhsmith
Copy link
Member

@mhsmith mhsmith commented Sep 24, 2024

Since these system calls may cause a crash, we disable them at build time.

@mhsmith
Copy link
Member Author

mhsmith commented Sep 24, 2024

!buildbot android

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @mhsmith for commit c8568d0 🤖

The command will test the builders whose names match following regular expression: android

The builders matched are:

  • AMD64 Android PR
  • aarch64 Android PR

@mhsmith mhsmith requested a review from vstinner September 24, 2024 20:29
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Makes sense to me; one note inline about documentation.

@@ -0,0 +1,3 @@
:func:`os.pidfd_open` and :func:`signal.pidfd_send_signal` are now
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these methods need addition annotations in the docs to highlight that they're not available?

Copy link
Member

Choose a reason for hiding this comment

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

Ah right, you can write "Android (API level 31 and newer)" in "Availability" of the modified functions.

@bedevere-app
Copy link

bedevere-app bot commented Sep 25, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@mhsmith
Copy link
Member Author

mhsmith commented Sep 25, 2024

I have made the requested changes; please review again.

@bedevere-app
Copy link

bedevere-app bot commented Sep 25, 2024

Thanks for making the requested changes!

@freakboy3742, @vstinner: please review the changes made to this pull request.

Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for the doc update!

@vstinner vstinner merged commit c58c572 into python:main Sep 25, 2024
38 of 41 checks passed
@miss-islington-app
Copy link

Thanks @mhsmith for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @mhsmith and @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c58c572a65eb5b93d054e779df289e975a0b9864 3.13

@vstinner
Copy link
Member

Merged, thanks.

Ah. The automated backport to 3.13 failed. @mhsmith: If you want this fix in 3.13, can you try to backport the change manually (using git cherry-pick -x)?

mhsmith added a commit to mhsmith/cpython that referenced this pull request Sep 25, 2024
@bedevere-app
Copy link

bedevere-app bot commented Sep 25, 2024

GH-124543 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 25, 2024
Yhg1s pushed a commit that referenced this pull request Sep 26, 2024
) (#124543)

gh-123014: Disable pidfd API on older Android versions (#124458)

(cherry picked from commit c58c572)
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.

"disallowed arm64 system call" crashes on Android API levels 26-30
4 participants