Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_probe.c Create Date:2022-07-28 12:42:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Bitfield type needs to be parsed into a fetch function

Proto:static int __parse_bitfield_probe_arg(const char *bf, const struct fetch_type *t, struct fetch_insn **pcode)

Type:int

Parameter:

TypeParameterName
const char *bf
const struct fetch_type *t
struct fetch_insn **pcode
512  code = pcode
516  If bf != 'b' Then Return 0
519  bw = simple_strtoul - convert a string to an unsigned long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use* This function is obsolete. Please use kstrtoul instead.
521  If bw == 0 || tail != '@' Then Return -EINVAL
524  bf = tail + 1
525  bo = simple_strtoul - convert a string to an unsigned long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use* This function is obsolete. Please use kstrtoul instead.
527  If tail == bf || tail != '/' Then Return -EINVAL
529  code++
530  If op != FETCH_OP_NOP Then Return -EINVAL
532  pcode = code
534  op = Bitfield: .basesize, .lshift, .rshift
535  lshift = BYTES_TO_BITS(Byte size of type ) - bw + bo
536  rshift = BYTES_TO_BITS(Byte size of type ) - bw
537  basesize = Byte size of type
539  Return If BYTES_TO_BITS(Byte size of type ) < bw + bo Then -EINVAL Else 0
Caller
NameDescribe
traceprobe_parse_probe_arg_bodyString length checking wrapper