Force kernel epoch calls

Liang Zhuo brightiup.zhuo at gmail.com
Wed Aug 7 09:11:48 UTC 2019


Hi list,

I have a problem with *epoch* while I am
trying to write an exploit of a FreeBSD
kernel bug. Specifically, many schedules
are managed by epoch system, like *if_d\*
*estroy()* which destroys a *struct ifnet*
object, and *in_pcbfree_**defered()* which
destroys a *struct inpcb* object.

My question is that these schedules will
only be called just before the process
exits by *epoch_call_task() *as follow:

  fork_exit()
   -> gtaskqueue_thread_loop()
    -> gtaskqueue_run_locked()
     -> epoch_call_task()
      -> if_destroy()/in_pcbfree_defered()

But I need to control the time of freeing
of those objects as better as synchronization.
Do do I have any methods to force these calls
in epoch system to be called in userspace?

Thanks,
Brightiup


More information about the freebsd-hackers mailing list