Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Aug 2019 03:05:15 -0000
From:      Liang Zhuo <brightiup.zhuo@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Force kernel epoch calls
Message-ID:  <CACqxGXUOK2NvsSu52RsZpLq8HA4J8YxL_zbGvbOCgs_26Q9iBA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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_destroy()*
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?

Thanks,
Brightiup



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACqxGXUOK2NvsSu52RsZpLq8HA4J8YxL_zbGvbOCgs_26Q9iBA>