libc icon indicating copy to clipboard operation
libc copied to clipboard

Add iopl/ioperm to all linuxes

Open espindola opened this issue 1 year ago • 9 comments

espindola avatar May 24 '24 16:05 espindola

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

rustbot avatar May 24 '24 16:05 rustbot

@JohnTitor is this ok?

espindola avatar Jun 04 '24 07:06 espindola

so, what is the process? I got an email saying @fslongjin approved this, what is next? Do we need another review?

espindola avatar Jul 19 '24 18:07 espindola

These are Linux syscalls so should be available everywhere, not just x86. It should probably mirror ioctl and be at least in unix/linux_like/linux/{gnu,musl,android} (near ioctl). Please try this, CI will test the other platforms for you. The semver tests will need to be updated too.

I don't think there is any good reason to add iopl unless you have the xserver usecase, considering it has been deprecated since 2020 https://github.com/mkerrisk/man-pages/commit/6caf6c4380f2c6d706c3df6dcf2d8c3b9438d724.

  • https://linux.die.net/man/2/ioperm
  • https://man7.org/linux/man-pages/man2/iopl.2.html

@rustbot author

tgross35 avatar Aug 15 '24 11:08 tgross35

iopl is used by https://github.com/pop-os/system76-firmware

I will try to add this to all platforms.

espindola avatar Aug 15 '24 11:08 espindola

Since you mentioned ioctl, I have rebased this on top of my other MR so that there is only one place to add these.

espindola avatar Aug 15 '24 16:08 espindola

These are Linux syscalls so should be available everywhere, not just x86. It should probably mirror ioctl and be at least in unix/linux_like/linux/{gnu,musl,android} (near ioctl). Please try this, CI will test the other platforms for you. The semver tests will need to be updated too.

I just tried, and it looks like it is not available on arm or ppc. OK to leave it as x86_64/i686 only?

espindola avatar Aug 15 '24 16:08 espindola

so, in summary, iopl is needed, and it can't be declared next to iocl, because it is not available everywhere ioctl is.

espindola avatar Aug 23 '24 14:08 espindola

Fyi you can

@rustbot review

To get the labels updated that this is ready for reveiew. I'll take another look.

tgross35 avatar Aug 29 '24 11:08 tgross35