Created
October 29, 2019 07:46
-
-
Save Low-power/12c2656a5d5933dfe79c7981ed434a9f to your computer and use it in GitHub Desktop.
kgdb(1) script for clearing VV_TEXT flag from every vnode in kFreeBSD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has no copyright assigned and is placed in the Public Domain. | |
# No warranty is given. | |
# Usage: kgdb -w < clear-all-vnodes-text-flag.gdb | |
set $p = mountlist.tqh_first | |
while $p != 0 | |
set $v = $p->mnt_nvnodelist.tqh_first | |
while $v != 0 | |
if $v->v_type == VREG | |
#set $v->v_vflag &= ~VV_TEXT | |
set $v->v_vflag &= ~0x20 | |
end | |
set $v = $v->v_nmntvnodes.tqe_next | |
end | |
set $p = $p->mnt_list.tqe_next | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment