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

gh-69214: Fix fcntl.ioctl() request type #119498

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 24, 2024

Use an 'unsigned long' instead of an 'unsigned int' for the request parameter of fcntl.ioctl() to support requests larger than UINT_MAX.

Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.
@vstinner
Copy link
Member Author

cc @serhiy-storchaka

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

It could be better, because in POSIX its type is int, and on Linux we can make it stricter with bitwise=False , but this is good enough.

@vstinner vstinner merged commit 92fab33 into python:main May 24, 2024
41 checks passed
@vstinner vstinner deleted the ioctl_long branch May 24, 2024 12:31
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2024
Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.
(cherry picked from commit 92fab33)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington-app
Copy link

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

cherry_picker 92fab3356f4c61d4c73606e4fae705c6d8f6213b 3.12

@bedevere-app
Copy link

bedevere-app bot commented May 24, 2024

GH-119504 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 May 24, 2024
@bedevere-app
Copy link

bedevere-app bot commented May 24, 2024

GH-119505 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label May 24, 2024
@vstinner
Copy link
Member Author

Merged, thanks for the review.

vstinner added a commit to vstinner/cpython that referenced this pull request May 24, 2024
Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.

(cherry picked from commit 92fab33)
vstinner added a commit that referenced this pull request May 24, 2024
gh-69214: Fix fcntl.ioctl() request type (#119498)

Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.

(cherry picked from commit 92fab33)
vstinner added a commit that referenced this pull request May 24, 2024
gh-69214: Fix fcntl.ioctl() request type (GH-119498)

Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.
(cherry picked from commit 92fab33)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit to vstinner/cpython that referenced this pull request Jun 1, 2024
vstinner added a commit to vstinner/cpython that referenced this pull request Jun 1, 2024
…GH-119498) (python#119504)"

This reverts commit 0bab0b3.

The change modified how negative values, like termios.TIOCSWINSZ, was
treated and is actually backward incompatible.
vstinner added a commit to vstinner/cpython that referenced this pull request Jun 1, 2024
…#119498) (python#119505)"

This reverts commit 078da88.

The change modified how negative values, like termios.TIOCSWINSZ, was
treated and is actually backward incompatible.
vstinner added a commit that referenced this pull request Jun 1, 2024
…) (#1… (#119905)

Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)"

This reverts commit 078da88.

The change modified how negative values, like termios.TIOCSWINSZ, was
treated and is actually backward incompatible.
vstinner added a commit that referenced this pull request Jun 1, 2024
…9498) (… (#119906)

Revert "[3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (#119504)"

This reverts commit 0bab0b3.

The change modified how negative values, like termios.TIOCSWINSZ, was
treated and is actually backward incompatible.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.
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