-
Notifications
You must be signed in to change notification settings - Fork 902
adding op-codes for syscall ipc for shmat/shmdt #7777
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
Conversation
It looks like your commit message got truncated before the signed-off-by part |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending the commit message update, I approve.
We saw this problem on RHEL8. These two OS calls are not defined in the OS headers, but if an application calls either of them, then it can cause a Wrong Answer since the memory hooks don’t intercept correctly.
Unfortunately, our only reliable test case is quite complex, and requires our ppc64le math library.
@markalle can you please check if this affects v3.0.x or v3.1.x on RHEL8, and if so, please cherry-pick there as well? |
These op codes used to be in bits/ipc.h but were removed in glibc in 2015 with a comment saying they should be defined in internal headers: https://sourceware.org/bugzilla/show_bug.cgi?id=18560 and when glibc uses that syscall it seems to do so from its own definitions: https://github.com/bminor/glibc/search?q=IPCOP_shmat&unscoped_q=IPCOP_shmat So I think using #ifndef and defining them if they're not already defined using the values from glibc is the best option. At IBM it was the testing on redhat 8 that found this as an issue (the opcodes being undefined on the system made it select the left undefined so shmat/shmdt memory events went unintercepted). Signed-off-by: Mark Allen <markalle@us.ibm.com>
I updated the commit, I was just meaning for it to describe how IPCOP_shmat/shmat not being defined in the system causes the macro to be false so intercept_shmat/shmdt go undefined |
Read related enhancement here: #7799 |
These op codes used to be in bits/ipc.h but were removed in glibc in 2015
with a comment saying they should be defined in internal headers:
https://sourceware.org/bugzilla/show_bug.cgi?id=18560
and when glibc uses that syscall it seems to do so from its own definitions:
https://github.com/bminor/glibc/search?q=IPCOP_shmat&unscoped_q=IPCOP_shmat
So I think using #ifndef and defining them if they're not already defined
using the values from glibc is the best option.
At IBM it was the testing on redhat 8 that found this as an issue
(the opcodes being undefined on the system made it select the
left undefined so shmat/shmdt memory events went unintercepted).
Signed-off-by: Mark Allen markalle@us.ibm.com