Lines Matching refs:mod
131 local mod="$1"
133 modprobe --dry-run "$mod" &>/dev/null
137 local mod="$1"
139 if [[ $(modinfo "$mod" | awk '/^livepatch:/{print $NF}') == "Y" ]]; then
147 local mod="$1"; shift
149 local msg="% modprobe $mod $*"
151 ret=$(modprobe "$mod" "$@" 2>&1)
158 die "failed to load module $mod"
166 local mod="$1"; shift
168 assert_mod "$mod" ||
169 skip "unable to load module ${mod}, verify CONFIG_TEST_LIVEPATCH=m and run self-tests as root"
171 is_livepatch_mod "$mod" &&
172 die "use load_lp() to load the livepatch module $mod"
174 __load_mod "$mod" "$@"
182 local mod="$1"; shift
184 assert_mod "$mod" ||
185 skip "unable to load module ${mod}, verify CONFIG_TEST_LIVEPATCH=m and run self-tests as root"
187 is_livepatch_mod "$mod" ||
188 die "module $mod is not a livepatch"
190 __load_mod "$mod" "$@"
194 die "failed to load module $mod (sysfs)"
201 local mod="$1"; shift
203 load_lp_nowait "$mod" "$@"
214 local mod="$1"; shift
216 local msg="% modprobe $mod $*"
218 ret=$(modprobe "$mod" "$@" 2>&1)
220 die "$mod unexpectedly loaded"
228 local mod="$1"
232 die "failed to unload module $mod (refcnt)"
234 log "% rmmod $mod"
235 ret=$(rmmod "$mod" 2>&1)
242 die "failed to unload module $mod (/sys/module)"
254 local mod="$1"
256 log "% echo 0 > /sys/kernel/livepatch/$mod/enabled"
257 echo 0 > /sys/kernel/livepatch/"$mod"/enabled
262 die "failed to disable livepatch $mod"
269 local mod="$1"; shift
272 log "% echo $ret > /sys/module/$mod/parameters/pre_patch_ret"
273 echo "$ret" > /sys/module/"$mod"/parameters/pre_patch_ret
277 die "failed to set pre_patch_ret parameter for $mod module"
319 local mod="$1"; shift
323 local path="$KLP_SYSFS_DIR/$mod/$rel_path"
335 local mod="$1"; shift
339 local path="$KLP_SYSFS_DIR/$mod/$rel_path"