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

Kernel module IOCTL numbers should be generated with <ioctl.h> macros #249

Closed
nickmooney opened this issue Jun 26, 2017 · 2 comments
Closed
Labels

Comments

@nickmooney
Copy link

Best practices for kernel modules dictate that IOCTL numbers should be generated with the _IO, _IOR, _IOW, _IOWR macros rather than laid down sequentially from 0.

This is partially for versioning purposes and partially to ensure that sending an IOCTL to the wrong device does not silently succeed.

@ErikBjorge ErikBjorge added the bug label Jun 26, 2017
@nickmooney
Copy link
Author

Looking at this issue further, it seems the IOCTL numbers are defined using the correct macros (in drivers/linux/include/chipsec.h), but without a unique parameter given as the first argument to the macro, giving the same result as if they were not used.

BrentHoltsclaw added a commit to BrentHoltsclaw/chipsec that referenced this issue Jan 7, 2019
changed drivers/linux/include/chipsec.h to start from 'C'
added logic to compute ioctl base based upon changes to chipsec.h above
BrentHoltsclaw added a commit to BrentHoltsclaw/chipsec that referenced this issue Jan 7, 2019
changed drivers/linux/include/chipsec.h to start from 'C'
added logic to compute ioctl base based upon changes to chipsec.h above
BrentHoltsclaw added a commit to BrentHoltsclaw/chipsec that referenced this issue Jan 14, 2019
changed drivers/linux/include/chipsec.h to start from 'C'
added logic to compute ioctl base based upon changes to chipsec.h above
ErikBjorge pushed a commit that referenced this issue Jan 17, 2019
changed drivers/linux/include/chipsec.h to start from 'C'
added logic to compute ioctl base based upon changes to chipsec.h above
@BrentHoltsclaw
Copy link
Member

This should be fixed and merged within #506. Please reopen the issue if there are farther concerns. Thanks

0xfede7c8 pushed a commit to 0xfede7c8/chipsec that referenced this issue Jul 16, 2019
changed drivers/linux/include/chipsec.h to start from 'C'
added logic to compute ioctl base based upon changes to chipsec.h above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants