Lines Matching +full:fail +full:- +full:safe
1 // SPDX-License-Identifier: GPL-2.0
19 pr_err("Fail: refcount wrapped to %d\n", refcount_read(ref)); in overflow_check()
29 refcount_t over = REFCOUNT_INIT(REFCOUNT_MAX - 1); in lkdtm_REFCOUNT_INC_OVERFLOW()
45 refcount_t over = REFCOUNT_INIT(REFCOUNT_MAX - 1); in lkdtm_REFCOUNT_ADD_OVERFLOW()
94 pr_warn("Still at zero: refcount_inc/add() must not inc-from-0\n"); in check_zero()
97 pr_err("Fail: refcount went crazy: %d\n", refcount_read(ref)); in check_zero()
103 * zero it should either saturate (when inc-from-zero isn't protected)
104 * or stay at zero (when inc-from-zero is protected) and should WARN for both.
123 * over-sub, so we have to track our starting position instead of in check_negative()
124 * looking only at zero-pinning. in check_negative()
127 pr_warn("Still at %d: refcount_inc/add() must not inc-from-0\n", in check_negative()
140 pr_err("Fail: refcount went crazy: %d\n", refcount_read(ref)); in check_negative()
198 pr_info("Fail: zero not detected, incremented to %d\n", in check_from_zero()
210 pr_info("attempting safe refcount_inc_not_zero() from zero\n"); in lkdtm_REFCOUNT_INC_ZERO()
216 pr_err("Fail: refcount went past zero!\n"); in lkdtm_REFCOUNT_INC_ZERO()
218 pr_err("Fail: Zero not detected!?\n"); in lkdtm_REFCOUNT_INC_ZERO()
235 pr_info("attempting safe refcount_add_not_zero() from zero\n"); in lkdtm_REFCOUNT_ADD_ZERO()
241 pr_err("Fail: refcount went past zero\n"); in lkdtm_REFCOUNT_ADD_ZERO()
243 pr_err("Fail: Zero not detected!?\n"); in lkdtm_REFCOUNT_ADD_ZERO()
262 pr_err("Fail: refcount went crazy: %d\n", refcount_read(ref)); in check_saturated()
356 for (i = 0; i < INT_MAX - 1; i++) in lkdtm_ATOMIC_TIMING()
359 for (i = INT_MAX; i > 0; i--) in lkdtm_ATOMIC_TIMING()
364 pr_err("atomic timing: out of sync up/down cycle: %u\n", i - 1); in lkdtm_ATOMIC_TIMING()
373 * cd /sys/kernel/debug/provoke-crash
374 * perf stat -B -- cat <(echo REFCOUNT_TIMING) > DIRECT
381 for (i = 0; i < INT_MAX - 1; i++) in lkdtm_REFCOUNT_TIMING()
384 for (i = INT_MAX; i > 0; i--) in lkdtm_REFCOUNT_TIMING()
389 pr_err("refcount: out of sync up/down cycle: %u\n", i - 1); in lkdtm_REFCOUNT_TIMING()