Documented in 1 files:
Defined in 1 files as a prototype:
Defined in 1 files as a function:
Referenced in 26 files:
- arch/powerpc/kernel/kprobes.c, line 83
- drivers/base/dd.c, line 405
- drivers/crypto/ccp/sfs.c, line 64
- drivers/gpu/drm/drm_modes.c
- drivers/gpu/drm/i915/i915_gpu_error.c, line 2377
- drivers/leds/uleds.c
- drivers/misc/eeprom/idt_89hpesx.c, line 915
- drivers/s390/char/vmlogrdr.c, line 224
- drivers/s390/net/qeth_l3_sys.c, line 402
- drivers/spi/spi.c, line 680
- drivers/tty/hvc/hvc_iucv.c, line 756
- drivers/usb/typec/ucsi/ucsi_ccg.c
- fs/binfmt_script.c, line 59
- fs/nfs/dir.c, line 744
- fs/smb/client/connect.c, line 2247
- init/main.c, line 537
- kernel/bpf/helpers.c, line 829
- kernel/bpf/verifier.c, line 8164
- kernel/module/kallsyms.c, line 427
- lib/kobject_uevent.c, line 76
- lib/string.c, line 394
- lib/tests/string_kunit.c
- mm/slub.c, line 2016
- net/netfilter/xt_recent.c, line 599
- security/apparmor/lib.c, line 196
- sound/soc/intel/catpt/dsp.c, line 484
Smatch caller information:
mm/slub.c kmem_cache_flags() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 0 | *s | 10,32,44-47,58-59,64,124 |
| PARAM_VALUE | 1 | count | 0-9223372036854771712,9223372036854779904-u64max |
| PARAM_VALUE | 2 | c | 42 |
| CAPPED_DATA | 0 | *s | 1 |
| HALF_LOCKED2 | global &slab_mutex |
drivers/crypto/ccp/sfs.c send_sfs_update_package() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 3582394748923146240 |
| PARAM_VALUE | 1 | count | 64 |
| PARAM_VALUE | 2 | c | 0 |
| BUF_SIZE | 0 | s | 64 |
| BUF_SIZE | 0 | s | 64 |
| DATA_SOURCE | 0 | s | $1 |
| USER_DATA | 0 | *s | 0-255 |
| USER_PTR | 0 | s | |
| LOCK2 | _T->lock |
lib/kobject_uevent.c kobject_action_type() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 1-1000000000 |
| PARAM_VALUE | 2 | c | 32 |
| DATA_SOURCE | 0 | s | $0 |
| DATA_SOURCE | 1 | count | $1 [m] |
| NOSPEC | 1 | count | |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &of->mutex | ||
| HALF_LOCKED2 | &of->prealloc_mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct kernfs_open_file)->mutex |
sound/soc/intel/catpt/dsp.c catpt_coredump() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 0-18446744073709547519 |
| PARAM_VALUE | 1 | count | 1-u64max |
| PARAM_VALUE | 2 | c | 32 |
| BUF_SIZE | 0 | s | (-1),100 |
| BUF_SIZE | 0 | s | (-1),100 |
| CAPPED_DATA | 0 | s | 1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | _T->lock |
lib/tests/string_kunit.c string_test_strnchr() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 7889892878477561856 |
| PARAM_VALUE | 1 | count | 0-13 |
| PARAM_VALUE | 2 | c | 0-255 |
| BUF_SIZE | 0 | s | 13 |
| BUF_SIZE | 0 | s | 13 |
| STR_LEN | 0 | s | 12 |
| STR_LEN | 0 | s | 12 |
| TERMINATED | 0 | s | 1 |
lib/tests/string_kunit.c string_test_strnchr() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4602998933304729600 |
| PARAM_VALUE | 1 | count | 0 |
| PARAM_VALUE | 2 | c | 0 |
| BUF_SIZE | 0 | s | 1 |
| STR_LEN | 0 | s | 0 |
| STR_LEN | 0 | s | 0 |
| TERMINATED | 0 | s | 1 |
lib/tests/string_kunit.c string_test_strnchr() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4602998933304729600 |
| PARAM_VALUE | 1 | count | 1 |
| PARAM_VALUE | 2 | c | 0 |
| BUF_SIZE | 0 | s | 1 |
| STR_LEN | 0 | s | 0 |
| STR_LEN | 0 | s | 0 |
| TERMINATED | 0 | s | 1 |
lib/tests/string_kunit.c string_test_strnchr() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4602998933304729600 |
| PARAM_VALUE | 1 | count | 1 |
| PARAM_VALUE | 2 | c | 97 |
| BUF_SIZE | 0 | s | 1 |
| STR_LEN | 0 | s | 0 |
| STR_LEN | 0 | s | 0 |
| TERMINATED | 0 | s | 1 |
lib/tests/string_kunit.c string_test_strnchr() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 0 |
| PARAM_VALUE | 1 | count | 0 |
| PARAM_VALUE | 2 | c | 0 |
init/main.c unknown_bootoption() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 0 | *s | 0-127 |
| PARAM_VALUE | 1 | count | 0-1010101 |
| PARAM_VALUE | 2 | c | 46 |
| CAPPED_DATA | 1 | count | 1 |
| CAPPED_DATA | 1 | count | 1 |
| DATA_SOURCE | 0 | s | $0 |
| DATA_SOURCE | 1 | count | r __fortify_strlen |
| STR_LEN | 0 | s | (-1),10,13-14,17,19,23 |
| STR_LEN | 0 | s | (-1),10,13-14,17,19,23 |
| USER_DATA | 0 | *s | 0-127 |
| HALF_LOCKED2 | irq |
drivers/spi/spi.c __spi_register_driver() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 128 |
| PARAM_VALUE | 2 | c | 44 |
| BUF_SIZE | 0 | s | 128 |
| UNITS | 1 | count | unit_byte |
security/apparmor/lib.c aa_splitn_fqname() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 0-9223372036854771712,9223372036854779904-u64max |
| PARAM_VALUE | 2 | c | 58 |
| USER_DATA | 0 | *s | 0-255 |
| USER_PTR | 0 | s |
fs/nfs/dir.c nfs_prime_dcache() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 1-u64max |
| PARAM_VALUE | 2 | c | 47 |
| BUF_SIZE | 0 | s | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | s | s32min-(-2),1-s32max |
| CAPPED_DATA | 1 | count | 1 |
| BIT_INFO | 1 | count | 0x0,0x0 |
| TERMINATED | 0 | s | 1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 0 | *s | 0-255 |
| UNITS | 0 | s | unit_byte |
| UNITS | 1 | count | unit_byte |
| USER_PTR | 0 | s | |
| HALF_LOCKED2 | &dir_fp->readdir_lock | ||
| HALF_LOCKED2 | &inode->i_rwsem | ||
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct inode)->i_rwsem |
drivers/usb/typec/ucsi/ucsi_ccg.c do_flash() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 2 | c | 58 |
| BUF_SIZE | 0 | s | 1-s32max |
| UNITS | 0 | s | unit_byte |
| UNITS | 1 | count | unit_byte |
| HALF_LOCKED2 | &pool->lock |
drivers/usb/typec/ucsi/ucsi_ccg.c do_flash() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 2 | c | 58 |
| UNITS | 0 | s | unit_byte |
| UNITS | 1 | count | unit_byte |
| HALF_LOCKED2 | &pool->lock |
net/netfilter/xt_recent.c recent_mt_proc_write() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 6820087964317372417 |
| PARAM_VALUE | 1 | count | 0-46 |
| PARAM_VALUE | 2 | c | 58 |
| DATA_SOURCE | 1 | count | $2 [m] |
| USER_DATA | 1 | count | 1-46[c] |
| UNITS | 1 | count | unit_byte |
fs/smb/client/connect.c cifs_set_cifscreds() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 2 | c | 58 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 1 | count | unit_byte |
| LOCK2 | &key->sem | ||
| HALF_LOCKED2 | &inode->i_rwsem | ||
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct key)->sem |
drivers/base/dd.c __device_set_driver_override() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 1-u64max |
| PARAM_VALUE | 1 | count | 1-1010101 |
| PARAM_VALUE | 2 | c | 10 |
| BUF_SIZE | 0 | s | (-1),9,11-12,14,32 |
| BUF_SIZE | 0 | s | (-1),9,11-12,14,32 |
| CAPPED_DATA | 1 | count | 1 |
| CAPPED_DATA | 1 | count | 1 |
| DATA_SOURCE | 0 | s | $1 |
| DATA_SOURCE | 1 | count | r __fortify_strlen |
| STR_LEN | 0 | s | (-1)-13 |
| STR_LEN | 0 | s | (-1)-13 |
| NOSPEC | 1 | count | |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 1 | count | unit_byte |
| HALF_LOCKED2 | &of->mutex |
drivers/gpu/drm/drm_modes.c drm_mode_parse_cmdline_named_mode() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 1-u32max |
| PARAM_VALUE | 2 | c | 61 |
| BUF_SIZE | 0 | s | (-1),2,5,8-11,13-20,23,29-30,62,64,70 |
| BUF_SIZE | 0 | s | (-1),2,5,8-11,13-20,23,29-30,62,64,70 |
| DATA_SOURCE | 0 | s | $0 |
| DATA_SOURCE | 1 | count | $1 |
| STR_LEN | 0 | s | (-1),1,4,7-10,12-19,21-22,28-29,61,63,69 |
| STR_LEN | 0 | s | (-1),1,4,7-10,12-19,21-22,28-29,61,63,69 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
drivers/gpu/drm/drm_modes.c drm_mode_parse_command_line_for_connector() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 1-u64max |
| PARAM_VALUE | 2 | c | 45 |
| BUF_SIZE | 0 | s | (-1),2,5,8-11,13-20,23,29-30,62,64,70 |
| BUF_SIZE | 0 | s | (-1),2,5,8-11,13-20,23,29-30,62,64,70 |
| DATA_SOURCE | 0 | s | $0 |
| STR_LEN | 0 | s | (-1),1,4,7-10,12-19,21-22,28-29,61,63,69 |
| STR_LEN | 0 | s | (-1),1,4,7-10,12-19,21-22,28-29,61,63,69 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
drivers/gpu/drm/drm_modes.c drm_mode_parse_command_line_for_connector() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 2 | c | 45 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
drivers/gpu/drm/drm_modes.c drm_mode_parse_command_line_for_connector() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 1-u64max |
| PARAM_VALUE | 2 | c | 64 |
| BUF_SIZE | 0 | s | (-1),2,5,8-11,13-20,23,29-30,62,64,70 |
| BUF_SIZE | 0 | s | (-1),2,5,8-11,13-20,23,29-30,62,64,70 |
| DATA_SOURCE | 0 | s | $0 |
| STR_LEN | 0 | s | (-1),1,4,7-10,12-19,21-22,28-29,61,63,69 |
| STR_LEN | 0 | s | (-1),1,4,7-10,12-19,21-22,28-29,61,63,69 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
kernel/module/kallsyms.c __module_kallsyms_lookup_name() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 56 |
| PARAM_VALUE | 2 | c | 58 |
| BUF_SIZE | 0 | s | s32min,(-10),(-1)-s32max |
| BUF_SIZE | 0 | s | s32min,(-10),(-1)-s32max |
| DATA_SOURCE | 0 | s | $0 |
| STR_LEN | 0 | s | (-1),71 |
| STR_LEN | 0 | s | (-1),71 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 0 | *s | 1-255 |
| UNITS | 1 | count | unit_byte |
| USER_PTR | 0 | s | |
| LOCK2 | rcu_read |
fs/binfmt_script.c load_script() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | count | 256 |
| PARAM_VALUE | 2 | c | 10 |
| BUF_SIZE | 0 | s | 256 |
| UNITS | 1 | count | unit_byte |
kernel/bpf/verifier.c check_arg_const_str() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 0-u32max |
| PARAM_VALUE | 2 | c | 0 |
| UNITS | 0 | s | unit_byte |
| UNITS | 1 | count | unit_byte |
drivers/leds/uleds.c uleds_write() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 64 |
| PARAM_VALUE | 2 | c | 47 |
| BUF_SIZE | 0 | s | 64 |
| BUF_SIZE | 0 | s | 64 |
| USER_DATA | 0 | *s | 0-255 |
| UNITS | 1 | count | unit_byte |
| USER_PTR | 0 | s | |
| LOCK2 | &udev->mutex | ||
| TYPE_LOCK | (struct uleds_device)->mutex |
drivers/leds/uleds.c uleds_write() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 64 |
| PARAM_VALUE | 2 | c | 0 |
| BUF_SIZE | 0 | s | 64 |
| BUF_SIZE | 0 | s | 64 |
| USER_DATA | 0 | *s | 0-255 |
| UNITS | 1 | count | unit_byte |
| USER_PTR | 0 | s | |
| LOCK2 | &udev->mutex | ||
| TYPE_LOCK | (struct uleds_device)->mutex |
kernel/bpf/helpers.c bpf_bprintf_prepare() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 2 | c | 0 |
| DATA_SOURCE | 0 | s | $0 |
| DATA_SOURCE | 1 | count | $1 |
| STR_LEN | 0 | s | (-1)-s32max |
| STR_LEN | 0 | s | (-1)-s32max |
| UNITS | 0 | s | unit_byte |
drivers/misc/eeprom/idt_89hpesx.c idt_dbgfs_csr_write() -> strnchr()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | s | 4096-ptr_max |
| PARAM_VALUE | 1 | count | 0-1000000000,2147479552 |
| PARAM_VALUE | 2 | c | 58 |
| BUF_SIZE | 0 | s | 1-1000000001,2147479553 |
| BUF_SIZE | 0 | s | 1-1000000001,2147479553 |
| DATA_SOURCE | 0 | s | r memdup_user_nul |
| DATA_SOURCE | 1 | count | $2 |
| FUZZY_MAX | 1 | count | 2147479552 |
| TERMINATED | 0 | s | 1 |
| USER_DATA | 0 | *s | 0-255 |
| USER_DATA | 1 | count | 0-1000000000 |
| USER_PTR | 0 | s |