Home
last modified time | relevance | path

Searched refs:expected_size (Results 1 – 23 of 23) sorted by relevance

/linux/kernel/bpf/
H A Dcheck_btf.c217 u32 i, s, nr_linfo, ncopy, expected_size, rec_size, prev_offset = 0; in check_btf_line() local
251 expected_size = sizeof(struct bpf_line_info); in check_btf_line()
252 ncopy = min_t(u32, expected_size, rec_size); in check_btf_line()
254 err = bpf_check_uarg_tail_zero(ulinfo, expected_size, rec_size); in check_btf_line()
260 &expected_size, sizeof(expected_size))) in check_btf_line()
345 u32 i, nr_core_relo, ncopy, expected_size, rec_size; in bpf_check_core_relo() local
369 expected_size = sizeof(struct bpf_core_relo); in bpf_check_core_relo()
370 ncopy = min_t(u32, expected_size, rec_size); in bpf_check_core_relo()
377 err = bpf_check_uarg_tail_zero(u_core_relo, expected_size, rec_size); in bpf_check_core_relo()
383 &expected_size, sizeof(expected_size))) in bpf_check_core_relo()
H A Dbtf.c979 static bool __btf_type_int_is_regular(const struct btf_type *t, size_t expected_size) in __btf_type_int_is_regular() argument
988 (expected_size == 0 || nr_bytes == expected_size); in __btf_type_int_is_regular()
1018 u32 expected_offset, u32 expected_size) in btf_member_is_reg_int() argument
1040 BITS_ROUNDUP_BYTES(nr_bits) == expected_size; in btf_member_is_reg_int()
1047 BITS_ROUNDUP_BYTES(nr_bits) != expected_size) in btf_member_is_reg_int()
3813 u32 off, u32 expected_size, in btf_find_field_one() argument
3841 if (expected_size && expected_size != sz * nelems) in btf_find_field_one()
3853 if (expected_size && expected_size != sz * nelems) in btf_find_field_one()
H A Dsyscall.c92 size_t expected_size, in bpf_check_uarg_tail_zero() argument
100 if (actual_size <= expected_size) in bpf_check_uarg_tail_zero()
104 res = memchr_inv(uaddr.kernel + expected_size, 0, in bpf_check_uarg_tail_zero()
105 actual_size - expected_size) == NULL; in bpf_check_uarg_tail_zero()
107 res = check_zeroed_user(uaddr.user + expected_size, in bpf_check_uarg_tail_zero()
108 actual_size - expected_size); in bpf_check_uarg_tail_zero()
/linux/drivers/net/wireless/intel/iwlwifi/fw/
H A Duefi.c87 unsigned int expected_size, in iwl_uefi_get_verified_variable_guid() argument
102 if (var_size < expected_size) { in iwl_uefi_get_verified_variable_guid()
122 unsigned int expected_size, in iwl_uefi_get_verified_variable() argument
127 expected_size, size); in iwl_uefi_get_verified_variable()
501 unsigned long expected_size; in iwl_uefi_get_wrds_table() local
515 expected_size = UEFI_SAR_WRDS_TABLE_SIZE_REV2; in iwl_uefi_get_wrds_table()
519 expected_size = UEFI_SAR_WRDS_TABLE_SIZE_REV3; in iwl_uefi_get_wrds_table()
530 if (size != expected_size) { in iwl_uefi_get_wrds_table()
548 unsigned long expected_size; in iwl_uefi_get_ewrd_table() local
563 expected_size = UEFI_SAR_EWRD_TABLE_SIZE_REV2; in iwl_uefi_get_ewrd_table()
[all …]
H A Dacpi.c110 size_t expected_size) in iwl_acpi_get_dsm_integer() argument
128 if (WARN_ON_ONCE(expected_size > sizeof(le_value))) { in iwl_acpi_get_dsm_integer()
134 if (obj->buffer.length != expected_size) in iwl_acpi_get_dsm_integer()
141 min_t(size_t, expected_size, (size_t)obj->buffer.length)); in iwl_acpi_get_dsm_integer()
191 size_t expected_size = acpi_dsm_size[func]; in iwl_acpi_load_dsm_values() local
202 if (!expected_size) in iwl_acpi_load_dsm_values()
206 if (expected_size != sizeof(u8) && expected_size != sizeof(u32)) in iwl_acpi_load_dsm_values()
210 &iwl_guid, &tmp, expected_size); in iwl_acpi_load_dsm_values()
214 if ((expected_size == sizeof(u8) && tmp != (u8)tmp) || in iwl_acpi_load_dsm_values()
215 (expected_size == sizeof(u32) && tmp != (u32)tmp)) in iwl_acpi_load_dsm_values()
/linux/lib/pldmfw/
H A Dpldmfw.c67 size_t expected_size = offset + length; in pldm_check_fw_space() local
70 if (data->fw->size < expected_size) { in pldm_check_fw_space()
72 data->fw->size, expected_size); in pldm_check_fw_space()
206 u16 expected_size; in pldm_check_desc_tlv_len() local
213 expected_size = 2; in pldm_check_desc_tlv_len()
216 expected_size = 1; in pldm_check_desc_tlv_len()
219 expected_size = 3; in pldm_check_desc_tlv_len()
225 expected_size = 4; in pldm_check_desc_tlv_len()
228 expected_size = 16; in pldm_check_desc_tlv_len()
238 if (size != expected_size) { in pldm_check_desc_tlv_len()
[all …]
/linux/tools/testing/selftests/arm64/fp/
H A Dsve-ptrace.c642 size_t expected_size; in ptrace_set_fpsimd_get_sve_data() local
680 expected_size = SVE_PT_FPSIMD_SIZE(vq, SVE_PT_REGS_FPSIMD); in ptrace_set_fpsimd_get_sve_data()
681 if (read_sve_size < expected_size) { in ptrace_set_fpsimd_get_sve_data()
683 read_sve_size, expected_size); in ptrace_set_fpsimd_get_sve_data()
696 expected_size = SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE); in ptrace_set_fpsimd_get_sve_data()
697 if (read_sve_size < expected_size) { in ptrace_set_fpsimd_get_sve_data()
699 read_sve_size, expected_size); in ptrace_set_fpsimd_get_sve_data()
/linux/drivers/net/wireless/intel/iwlwifi/mvm/
H A Drx.c827 u32 expected_size) in iwl_mvm_verify_stats_len() argument
831 if (WARN_ONCE(iwl_rx_packet_payload_len(pkt) < expected_size, in iwl_mvm_verify_stats_len()
833 iwl_rx_packet_payload_len(pkt), expected_size)) in iwl_mvm_verify_stats_len()
845 if (WARN_ONCE(le16_to_cpu(hdr->size) != expected_size, in iwl_mvm_verify_stats_len()
847 le16_to_cpu(hdr->size), expected_size)) in iwl_mvm_verify_stats_len()
1079 int expected_size; in iwl_mvm_handle_rx_statistics() local
1096 expected_size = sizeof(struct iwl_notif_statistics_v11); in iwl_mvm_handle_rx_statistics()
1098 expected_size = sizeof(struct iwl_notif_statistics_v10); in iwl_mvm_handle_rx_statistics()
1100 expected_size = sizeof(struct iwl_notif_statistics); in iwl_mvm_handle_rx_statistics()
1103 if (WARN_ONCE(iwl_rx_packet_payload_len(pkt) != expected_size, in iwl_mvm_handle_rx_statistics()
/linux/sound/soc/sof/
H A Dipc3-control.c588 size_t expected_size; in sof_ipc3_control_update()
663 &expected_size)) in sof_ipc3_widget_kcontrol_setup()
665 if (check_add_overflow(expected_size, in sof_ipc3_widget_kcontrol_setup()
667 &expected_size)) in sof_ipc3_widget_kcontrol_setup()
674 &expected_size)) in sof_ipc3_widget_kcontrol_setup()
676 if (check_add_overflow(expected_size, in sof_ipc3_widget_kcontrol_setup()
678 &expected_size)) in sof_ipc3_widget_kcontrol_setup()
685 if (cdata->rhdr.hdr.size != expected_size) { in sof_ipc3_widget_kcontrol_setup()
559 size_t expected_size; sof_ipc3_control_update() local
/linux/drivers/gpu/drm/
H A Ddrm_property.c776 ssize_t expected_size, in drm_property_replace_blob_from_id() argument
799 if (expected_size > 0 && in drm_property_replace_blob_from_id()
800 new_blob->length != expected_size) { in drm_property_replace_blob_from_id()
803 new_blob->base.id, new_blob->length, expected_size); in drm_property_replace_blob_from_id()
/linux/drivers/scsi/megaraid/
H A Dmegaraid_sas_fp.c312 u32 expected_size; in MR_ValidateMapInfo() local
325 expected_size = sizeof(struct MR_DRV_RAID_MAP_ALL); in MR_ValidateMapInfo()
327 expected_size = sizeof(struct MR_FW_RAID_MAP_EXT); in MR_ValidateMapInfo()
329 expected_size = struct_size_t(struct MR_FW_RAID_MAP, in MR_ValidateMapInfo()
333 if (le32_to_cpu(pDrvRaidMap->totalSize) != expected_size) { in MR_ValidateMapInfo()
337 (unsigned int)expected_size); in MR_ValidateMapInfo()
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_userq.h199 u64 addr, u64 expected_size, u64 *va_out);
H A Damdgpu_userq.c237 u64 addr, u64 expected_size, in amdgpu_userq_input_va_validate() argument
249 if (!expected_size) in amdgpu_userq_input_va_validate()
253 if (check_add_overflow(start_addr, expected_size - 1, &end_addr)) in amdgpu_userq_input_va_validate()
/linux/drivers/usb/class/
H A Dcdc-acm.c375 unsigned int expected_size, copy_size, alloc_size; in acm_ctrl_irq()
404 * can't get an expected_size. in acm_ctrl_irq()
415 expected_size = sizeof(struct usb_cdc_notification) + in acm_ctrl_irq()
418 if (acm->nb_index != 0 || current_size < expected_size) { in acm_ctrl_irq()
420 if (acm->nb_size < expected_size) { in acm_ctrl_irq()
422 alloc_size = roundup_pow_of_two(expected_size); in acm_ctrl_irq()
437 expected_size - acm->nb_index); in acm_ctrl_irq()
445 if (current_size >= expected_size) { in acm_ctrl_irq()
376 unsigned int expected_size, copy_size, alloc_size; acm_ctrl_irq() local
/linux/drivers/net/wireless/intel/iwlwifi/mld/
H A Dd3.c732 u32 expected_size; in iwl_mld_handle_wake_pkt_notif() local
745 expected_size = le32_to_cpu(notif->wake_packet_length); in iwl_mld_handle_wake_pkt_notif()
750 if (expected_size < actual_size) in iwl_mld_handle_wake_pkt_notif()
751 actual_size = expected_size; in iwl_mld_handle_wake_pkt_notif()
757 wowlan_status->wake_packet_length = expected_size; in iwl_mld_handle_wake_pkt_notif()
/linux/drivers/hwmon/
H A Dasus_atk0110.c333 int const expected_size = old_if ? _HWMON_OLD_PACK_SIZE : in validate_hwmon_pack() local
341 if (obj->package.count != expected_size) { in validate_hwmon_pack()
343 obj->package.count, expected_size); in validate_hwmon_pack()
/linux/drivers/gpu/drm/i915/display/
H A Dintel_bios.c2884 int expected_size; in child_device_size_valid() local
2886 expected_size = child_device_expected_size(display->vbt.version); in child_device_size_valid()
2887 if (expected_size < 0) { in child_device_size_valid()
2888 expected_size = sizeof(struct child_device_config); in child_device_size_valid()
2891 display->vbt.version, expected_size); in child_device_size_valid()
2895 if (size != expected_size) in child_device_size_valid()
2898 size, expected_size, display->vbt.version); in child_device_size_valid()
/linux/include/linux/
H A Dbtf.h234 u32 expected_offset, u32 expected_size);
H A Dbpf.h3086 int bpf_check_uarg_tail_zero(bpfptr_t uaddr, size_t expected_size,
/linux/rust/zerocopy/src/
H A Dlayout.rs1697 let expected_size = in test_validate_rust_layout() localVariable
1699 assert_eq!(expected_size, size, "{}", assert_msg); in test_validate_rust_layout()
/linux/net/packet/
H A Daf_packet.c4733 unsigned long size, expected_size; in packet_mmap()
4744 expected_size = 0; in packet_mmap()
4747 expected_size += rb->pg_vec_len in packet_mmap()
4753 if (expected_size == 0) in packet_mmap()
4757 if (size != expected_size) in packet_mmap()
4724 unsigned long size, expected_size; packet_mmap() local
/linux/fs/btrfs/
H A Dextent-tree.c2434 u32 expected_size; in check_committed_ref() local
2471 expected_size = sizeof(*ei) + btrfs_extent_inline_ref_size(BTRFS_EXTENT_DATA_REF_KEY); in check_committed_ref()
2481 expected_size += btrfs_extent_inline_ref_size(BTRFS_EXTENT_OWNER_REF_KEY); in check_committed_ref()
2487 if (item_size != expected_size) in check_committed_ref()
/linux/net/bluetooth/
H A Dmgmt.c5610 size_t expected_size = sizeof(*cp); in add_adv_patterns_monitor() local
5619 expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern); in add_adv_patterns_monitor()
5620 if (len != expected_size) { in add_adv_patterns_monitor()
5647 size_t expected_size = sizeof(*cp); in add_adv_patterns_monitor_rssi() local
5656 expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern); in add_adv_patterns_monitor_rssi()
5657 if (len != expected_size) { in add_adv_patterns_monitor_rssi()