Qcloud1223 / COMP461905

Course project for Operating Systems at XJTU: A basic x86-64 dynamic linker.
13 stars 4 forks source link

Issue8 #14

Closed Qcloud1223 closed 2 years ago

Qcloud1223 commented 2 years ago

8 requires the detection of glibc functions, which could be used to subvert the monitoring of autograder.

This branch introduce a shim library and compile-time interposing, so that calls to critical functions would be replaced by the preprocessor, with increments to corresponding counters. Later the autograder checks the shim output and decides whether the code has violated the limitation.

Qcloud1223 commented 2 years ago

This solution has some ungracefulness, though.

The shim function generation using C macros is a nightmare I don't want to look back, mainly for the issue of comma separated list (see the in-line comments and commit log).

The list of shimed functions can be hard to enumerate. Also syscalls are always available.

The autograder is getting more bloated due to the new feature. It would be nice to add some one-liner to create tests.