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

Support no-op personality(2) bits #10756

Open
EtiennePerot opened this issue Aug 11, 2024 · 0 comments · May be fixed by #10757
Open

Support no-op personality(2) bits #10756

EtiennePerot opened this issue Aug 11, 2024 · 0 comments · May be fixed by #10757
Assignees
Labels
type: enhancement New feature or request

Comments

@EtiennePerot
Copy link
Contributor

EtiennePerot commented Aug 11, 2024

Description

The personality(2) system call is a set of per-task bits that influence task behavior. Most modern Linux applications do not use it as far as I can tell (otherwise I'd expect this system call would have come up before), but PulseAudio does. As part of its core library, it prints a user-visible warning in its logs when it fails:

    if (personality(PER_LINUX) < 0)
        pa_log_warn("Uh, personality() failed: %s", pa_cstrerror(errno));

The PER_LINUX personality is the default personality on Linux, so this is effectively a no-op on Linux. Therefore it should be harmless to have it behave the same way on gVisor: let it be a no-op. (Currently, it fails with EINVAL.)

Is this feature related to a specific bug?

No

Do you have a specific solution in mind?

gVisor should allow no-op personality bits to be set on tasks, and preserve its current behavior (EINVAL) for other personality bits.

@EtiennePerot EtiennePerot added the type: enhancement New feature or request label Aug 11, 2024
@EtiennePerot EtiennePerot self-assigned this Aug 11, 2024
EtiennePerot added a commit to EtiennePerot/gvisor that referenced this issue Aug 11, 2024
EtiennePerot added a commit to EtiennePerot/gvisor that referenced this issue Aug 12, 2024
copybara-service bot pushed a commit that referenced this issue Aug 20, 2024
This PR implements the [`personality(2)` syscall](https://www.man7.org/linux/man-pages/man2/personality.2.html) for personality bits that are no-ops on Linux.

Fixes #10756.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#10757 from EtiennePerot:linux-is-not-a-personality-trait 91d3665
PiperOrigin-RevId: 665427818
copybara-service bot pushed a commit that referenced this issue Aug 20, 2024
This PR implements the [`personality(2)` syscall](https://www.man7.org/linux/man-pages/man2/personality.2.html) for personality bits that are no-ops on Linux.

Fixes #10756.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#10757 from EtiennePerot:linux-is-not-a-personality-trait 91d3665
PiperOrigin-RevId: 665427818
copybara-service bot pushed a commit that referenced this issue Aug 20, 2024
This PR implements the [`personality(2)` syscall](https://www.man7.org/linux/man-pages/man2/personality.2.html) for personality bits that are no-ops on Linux.

Fixes #10756.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#10757 from EtiennePerot:linux-is-not-a-personality-trait 91d3665
PiperOrigin-RevId: 665427818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
1 participant