Commit Graph

1 Commits

Author SHA1 Message Date
Dean Deng 8fed97794e Add task work mechanism.
Like task_work in Linux, this allows us to register callbacks to be executed
before returning to userspace. This is needed for kcov support, which requires
coverage information to be up-to-date whenever we are in user mode. We will
provide coverage data through the kcov interface to enable coverage-directed
fuzzing in syzkaller.

One difference from Linux is that task work cannot queue work before the
transition to userspace that it precedes; queued work will be picked up before
the next transition.

PiperOrigin-RevId: 322889984
2020-07-23 16:25:34 -07:00