Defined in 1 files as a prototype:

Defined in 1 files as a function:

Referenced in 9 files:

Smatch caller information:

drivers/scsi/scsi_debug.c do_device_access() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 2 buf 4096-ptr_max
PARAM_VALUE 2 *buf 0-255
PARAM_VALUE 3 buflen 0-s32max,18446744071562067968-u64max
DATA_SOURCE 4 skip $2 [m]
DATA_SOURCE 5 to_buffer $6
RX_PATH
TASK_NOT_RUNNING
NO_OVERFLOW_SIMPLE 4 skip
UNITS 0 sgl unit_byte
HALF_LOCKED2 &sdev->state_mutex

drivers/scsi/scsi_debug.c do_dout_fetch() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 2 buf 16,4096-ptr_max
PARAM_VALUE 3 buflen 0-u32max
PARAM_VALUE 4 skip 0
PARAM_VALUE 5 to_buffer 1
BUF_SIZE 2 buf 1-510
DATA_SOURCE 2 buf $2
RX_PATH
TASK_NOT_RUNNING
UNITS 0 sgl unit_byte
HALF_LOCKED2 &sdev->state_mutex

drivers/scsi/scsi_debug.c resp_read_tape() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 2 buf 4096-ptr_max
PARAM_VALUE 3 buflen 4
PARAM_VALUE 4 skip 0-4294967295
PARAM_VALUE 5 to_buffer 0
BUF_SIZE 2 buf 4
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL
UNITS 0 sgl unit_byte
HALF_LOCKED2 &sdev->state_mutex

drivers/scsi/scsi_debug.c resp_write_tape() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 2 buf 4096-ptr_max
PARAM_VALUE 3 buflen 4
PARAM_VALUE 4 skip 0-4294967295
PARAM_VALUE 5 to_buffer 1
BUF_SIZE 2 buf 4
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL
UNITS 0 sgl unit_byte
HALF_LOCKED2 &sdev->state_mutex

drivers/scsi/lpfc/lpfc_bsg.c lpfc_rd_obj_emb0_handle_job() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 4 skip 0-s64max
PARAM_VALUE 5 to_buffer 0
BUF_SIZE 2 buf s32min-(-2),1-s32max
RX_PATH
TASK_NOT_RUNNING
NO_OVERFLOW_SIMPLE 4 skip
UNITS 2 buf unit_byte

drivers/crypto/starfive/jh7110-rsa.c starfive_rsa_enc_core() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 1 nents 0-s32max
PARAM_VALUE 3 buflen 1-u32max
PARAM_VALUE 4 skip 0
PARAM_VALUE 5 to_buffer 0
BUF_SIZE 2 buf 256
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL
UNITS 0 sgl unit_byte

lib/scatterlist.c sg_copy_from_buffer() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 4 skip 0
PARAM_VALUE 5 to_buffer 0
BUF_SIZE 0 sgl (-1),64,320
BUF_SIZE 0 sgl (-1),64,320
BUF_SIZE 2 buf s32min-s32max
DATA_SOURCE 0 sgl $0
DATA_SOURCE 1 nents $1
DATA_SOURCE 2 buf $2
DATA_SOURCE 3 buflen $3
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HOST_DATA 0 sgl->length 0-2147483646[c]
HOST_DATA 3 buflen 0-2147483646[c]
USER_DATA 0 sgl->length 1-u32max[c]
USER_DATA 0 sgl->offset 0-2147551739[c]
USER_DATA 1 nents 1-5[c]
USER_DATA 3 buflen 0-s32max,18446744071562067968-u64max[c]
NO_OVERFLOW_SIMPLE 0 sgl->length
UNITS 0 sgl unit_byte
UNITS 2 buf unit_byte
UNITS 3 buflen unit_byte
BYTE_COUNT 2 ==buf3 8050
HALF_LOCKED2 &adapter->driver_cmds.transport_cmd.mutex
HALF_LOCKED2 &ci->lock
HALF_LOCKED2 &dev->thc_bus_lock
HALF_LOCKED2 &ha->optrom_mutex
HALF_LOCKED2 &host->lock
HALF_LOCKED2 &mrioc->bsg_cmds.mutex
HALF_LOCKED2 &pcr->pcr_mutex
HALF_LOCKED2 &ucr->dev_mutex
HALF_LOCKED2 &vub300->cmd_mutex
HALF_LOCKED2 _T->lock
HALF_LOCKED2 ap->lock
HALF_LOCKED2 flags
HALF_LOCKED2 global &ata_scsi_rbuf_lock
HALF_LOCKED2 global &mmc_test_lock
HALF_LOCKED2 tw_dev->host->host_lock

lib/scatterlist.c sg_copy_to_buffer() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 4 skip 0
PARAM_VALUE 5 to_buffer 1
BUF_SIZE 0 sgl (-1),64,320
BUF_SIZE 0 sgl (-1),64,320
BUF_SIZE 2 buf s32min-s32max
DATA_SOURCE 0 sgl $0
DATA_SOURCE 1 nents $1
DATA_SOURCE 2 buf $2
DATA_SOURCE 3 buflen $3
NOSPEC 3 buflen
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HOST_DATA 0 sgl->length 0-2147483646[c]
HOST_DATA 3 buflen 1-4350,4294963202-u32max[c]
USER_DATA 0 sgl->length 1-u32max[c]
USER_DATA 0 sgl->offset 0-2147551739[c]
USER_DATA 3 buflen 0-u32max,18446744071562067968-u64max[c]
NO_OVERFLOW_SIMPLE 0 sgl->length
NO_OVERFLOW_SIMPLE 1 nents
UNITS 0 sgl unit_byte
UNITS 2 buf unit_byte
UNITS 3 buflen unit_byte
BYTE_COUNT 2 ==buf3 8050
HALF_LOCKED2 &adapter->driver_cmds.transport_cmd.mutex
HALF_LOCKED2 &ctrl->mbox_lock
HALF_LOCKED2 &ha->optrom_mutex
HALF_LOCKED2 &host->lock
HALF_LOCKED2 &ioc->transport_cmds.mutex
HALF_LOCKED2 &lport->lp_mutex
HALF_LOCKED2 &mrioc->bsg_cmds.mutex
HALF_LOCKED2 &pcr->pcr_mutex
HALF_LOCKED2 &ucr->dev_mutex
HALF_LOCKED2 &vub300->cmd_mutex
HALF_LOCKED2 _T->lock
HALF_LOCKED2 ap->lock
HALF_LOCKED2 bh
HALF_LOCKED2 flags
HALF_LOCKED2 global &mmc_test_lock
HALF_LOCKED2 irq_flags
HALF_LOCKED2 shost->host_lock

lib/scatterlist.c sg_pcopy_from_buffer() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 5 to_buffer 0
BUF_SIZE 0 sgl (-1)-0,32-4096
BUF_SIZE 0 sgl (-1)-0,32-4096
BUF_SIZE 2 buf s32min-s32max
DATA_SOURCE 0 sgl $0
DATA_SOURCE 1 nents $1
DATA_SOURCE 2 buf $2
DATA_SOURCE 3 buflen $3
DATA_SOURCE 4 skip $4
NOSPEC 3 buflen
NOSPEC 3 buflen
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
USER_DATA 3 buflen 1-s32max
NO_OVERFLOW_SIMPLE 0 sgl->length
NO_OVERFLOW_SIMPLE 1 nents
NO_OVERFLOW_SIMPLE 4 skip
UNITS 0 sgl unit_byte
UNITS 2 buf unit_byte
UNITS 3 buflen unit_byte
UNITS 4 skip unit_byte
BYTE_COUNT 2 ==buf3 8050
USER_PTR 2 buf
HALF_LOCKED2 &host->lock

lib/scatterlist.c sg_pcopy_to_buffer() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 5 to_buffer 1
BUF_SIZE 0 sgl (-1),1-s32max
BUF_SIZE 0 sgl (-1),1-s32max
BUF_SIZE 2 buf s32min-(-1),1-s32max
BUF_SIZE 2 buf s32min-(-1),1-s32max
DATA_SOURCE 0 sgl $0
DATA_SOURCE 1 nents $1
DATA_SOURCE 2 buf $2
DATA_SOURCE 3 buflen $3
DATA_SOURCE 4 skip $4
NOSPEC 3 buflen
NOSPEC 4 skip
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HOST_DATA 0 sgl->length 0-2147483646[c]
HOST_DATA 3 buflen 0-4350,4294963202-u32max[c]
HOST_DATA 4 skip 0-4294967295[c]
USER_DATA 0 sgl->length 1-u32max[c]
USER_DATA 0 sgl->offset 0-2147551739[c]
USER_DATA 3 buflen 0-u64max
USER_DATA 4 skip 0-4294967295[c]
NO_OVERFLOW_SIMPLE 1 nents
UNITS 0 sgl unit_byte
UNITS 2 buf unit_byte
UNITS 3 buflen unit_byte
UNITS 4 skip unit_byte
BYTE_COUNT 2 ==buf3 8050
USER_PTR 2 buf
HALF_LOCKED2 &ctx->queue->queuelock
HALF_LOCKED2 &host->lock
HALF_LOCKED2 &of->mutex
HALF_LOCKED2 &pdev->lock
HALF_LOCKED2 &pool->lock
HALF_LOCKED2 &xhci->lock
HALF_LOCKED2 bh
HALF_LOCKED2 flags

lib/crypto/chacha20poly1305.c chacha20poly1305_crypt_sg_inplace() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 0 sgl 5825206934603898880,8602473687787020288,8874928654564466688
PARAM_VALUE 1 nents 0-s32max
PARAM_VALUE 2 *buf 0-255
PARAM_VALUE 3 buflen 16
PARAM_VALUE 4 skip 0-s32max
BUF_SIZE 0 sgl 96,800
BUF_SIZE 0 sgl 96,800
BUF_SIZE 2 buf 16
DATA_SOURCE 0 sgl $0
DATA_SOURCE 4 skip $1
NOCHECK_CALL
UNITS 3 buflen unit_byte
UNITS 4 skip unit_byte

drivers/scsi/qla2xxx/qla_edif.c qla_edif_consume_dbell() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 2 buf 7063325310143823872
PARAM_VALUE 3 buflen 8-s32max
PARAM_VALUE 5 to_buffer 0
BUF_SIZE 2 buf 72
RX_PATH
TASK_NOT_RUNNING
NO_OVERFLOW_SIMPLE 4 skip
UNITS 4 skip unit_byte
HALF_LOCKED2 &vha->hw->tgt.sess_lock

drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c create_aead_null_output_list() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 1 nents 0-s32max
PARAM_VALUE 5 to_buffer 1
BUF_SIZE 2 buf 64
DATA_SOURCE 3 buflen $2
RX_PATH
TASK_NOT_RUNNING
HOST_DATA 0 sgl->length 0-2147483646[c]
USER_DATA 0 sgl->length 1-u32max[c]
USER_DATA 0 sgl->offset 0-2147551739[c]
NO_OVERFLOW_SIMPLE 0 sgl->length
UNITS 0 sgl unit_byte
UNITS 3 buflen unit_byte
UNITS 4 skip unit_byte

drivers/crypto/ccree/cc_buffer_mgr.c cc_copy_sg_portion() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 1 nents 0-s32max,4294967274
PARAM_VALUE 3 buflen 0-u32max
BUF_SIZE 0 sgl (-1),64
BUF_SIZE 0 sgl (-1),64
BUF_SIZE 2 buf 32,128
DATA_SOURCE 0 sgl $2
DATA_SOURCE 1 nents r sg_nents_for_len
DATA_SOURCE 2 buf $1
DATA_SOURCE 4 skip $3
BIT_INFO 1 nents 0x0,0x7fffffff
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL
HOST_DATA 0 sgl->length 0-2147483646[c]
USER_DATA 0 sgl->length 1-u32max[c]
USER_DATA 0 sgl->offset 0-2147551739[c]
UNITS 0 sgl unit_byte
UNITS 3 buflen unit_byte
UNITS 4 skip unit_byte

drivers/crypto/marvell/octeontx/otx_cptvf_algs.c create_aead_null_output_list() -> sg_copy_buffer()

Type Parameter Key Value
PARAM_VALUE 1 nents 0-s32max
PARAM_VALUE 5 to_buffer 1
BUF_SIZE 2 buf 64
DATA_SOURCE 3 buflen $2
RX_PATH
TASK_NOT_RUNNING
HOST_DATA 0 sgl->length 0-2147483646[c]
USER_DATA 0 sgl->length 1-u32max[c]
USER_DATA 0 sgl->offset 0-2147551739[c]
NO_OVERFLOW_SIMPLE 0 sgl->length
UNITS 0 sgl unit_byte
UNITS 3 buflen unit_byte
UNITS 4 skip unit_byte