-
Notifications
You must be signed in to change notification settings - Fork 269
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
Adds an over-approximation for syscall function #7937
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #7937 +/- ##
===========================================
- Coverage 78.75% 78.62% -0.14%
===========================================
Files 1701 1701
Lines 196224 195975 -249
===========================================
- Hits 154540 154086 -454
- Misses 41684 41889 +205 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Felipe R. Monteiro <[email protected]>
5b1db44
to
dc6b6a7
Compare
|
||
int main() | ||
{ | ||
long int rc; |
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.
should this also use the APPLE env to change the type as in the definition ?
// https://man7.org/linux/man-pages/man2/syscall.2.html and | ||
// https://www.gnu.org/software/libc/manual/html_node/System-Calls.html. | ||
// | ||
// sysno is the system call number. The remaining arguments are the arguments |
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.
Some system calls take pointer arguments and write data to the objects pointed to by these pointers.
To be overaproximating shouldn't this abstraction havoc all pointer arguments that were given to the syscall
function ? This would maybe require handling this internally when typechecking calls to syscall.
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.
this lists all signatures for linux :
https://github.com/torvalds/linux/blob/master/include/linux/syscalls.h
I wouldn't say it resolves the issue in that in does not model the side effects of the called function. I think @tautschnig was suggesting to swtich on the syscall ID and call the function in question if we already have a model of it. Otherwise the syscall should havoc non-const pointer arguments to overapproximate effects of the call. The CPROVER library has models for settime32/gettime32/semaphore, random, etc. |
Resolves #7646.