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

Better handling of unavailable syscalls #3

Open
josephcsible opened this issue May 24, 2020 · 1 comment
Open

Better handling of unavailable syscalls #3

josephcsible opened this issue May 24, 2020 · 1 comment

Comments

@josephcsible
Copy link
Contributor

For syscalls that the PS4 doesn't have available, we currently punt by always returning -1. There seems to be two broad categories for how we can usually do this better, though:

  1. Syscalls that really have no equivalent at all, like fanotify_init, should set errno to ENOSYS, so that the caller will have a clue about why it actually failed, instead of getting a random unrelated error.
  2. Syscalls that can be emulated in userspace with only slight degradation, like pipe2, should do that instead of failing entirely. In fact, in that case it looks like the code to do that is already there; we just #ifdef'ed out a bit too much.
@Cryptogenic
Copy link
Member

For point #2, I handled the pipe2 instance, however I'll try to take another pass to see which other syscalls can be done this way. If you can think of any other ones, feel free to mention them :)

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

No branches or pull requests

2 participants