Lines Matching refs:mod
114 local mod="$1"
116 modprobe --dry-run "$mod" &>/dev/null
120 local mod="$1"
122 if [[ $(modinfo "$mod" | awk '/^livepatch:/{print $NF}') == "Y" ]]; then
130 local mod="$1"; shift
132 local msg="% modprobe $mod $*"
134 ret=$(modprobe "$mod" "$@" 2>&1)
141 die "failed to load module $mod"
149 local mod="$1"; shift
151 assert_mod "$mod" ||
152 skip "unable to load module ${mod}, verify CONFIG_TEST_LIVEPATCH=m and run self-tests as root"
154 is_livepatch_mod "$mod" &&
155 die "use load_lp() to load the livepatch module $mod"
157 __load_mod "$mod" "$@"
165 local mod="$1"; shift
167 assert_mod "$mod" ||
168 skip "unable to load module ${mod}, verify CONFIG_TEST_LIVEPATCH=m and run self-tests as root"
170 is_livepatch_mod "$mod" ||
171 die "module $mod is not a livepatch"
173 __load_mod "$mod" "$@"
177 die "failed to load module $mod (sysfs)"
184 local mod="$1"; shift
186 load_lp_nowait "$mod" "$@"
197 local mod="$1"; shift
199 local msg="% modprobe $mod $*"
201 ret=$(modprobe "$mod" "$@" 2>&1)
203 die "$mod unexpectedly loaded"
211 local mod="$1"
215 die "failed to unload module $mod (refcnt)"
217 log "% rmmod $mod"
218 ret=$(rmmod "$mod" 2>&1)
225 die "failed to unload module $mod (/sys/module)"
237 local mod="$1"
239 log "% echo 0 > /sys/kernel/livepatch/$mod/enabled"
240 echo 0 > /sys/kernel/livepatch/"$mod"/enabled
245 die "failed to disable livepatch $mod"
252 local mod="$1"; shift
255 log "% echo $ret > /sys/module/$mod/parameters/pre_patch_ret"
256 echo "$ret" > /sys/module/"$mod"/parameters/pre_patch_ret
260 die "failed to set pre_patch_ret parameter for $mod module"