mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
tools lib traceevent: Add '~' operation within arg_num_eval()
When evaluating values for print flags, if the value included a '~'
operator, the parsing would fail. This broke kmalloc's parsing of:
__print_flags(REC->gfp_flags, "|", {(unsigned
long)((((((( gfp_t)(0x400000u|0x2000000u)) | (( gfp_t)0x40u) |
(( gfp_t)0x80u) | (( gfp_t)0x20000u)) | (( gfp_t)0x02u)) |
(( gfp_t)0x08u)) | (( gfp_t)0x4000u) | (( gfp_t)0x10000u) |
(( gfp_t)0x1000u) | (( gfp_t)0x200u)) & ~(( gfp_t)0x2000000u))
^
|
here
Signed-off-by: Steven Rostedt <[email protected]>
Reported-by: Arnaldo Carvalho de Melo <[email protected]>
Tested-by: David Ahern <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
ea8f75f981
commit
9eb42dee2b
1 changed files with 6 additions and 0 deletions
|
|
@ -2398,6 +2398,12 @@ static int arg_num_eval(struct print_arg *arg, long long *val)
|
|||
break;
|
||||
*val = left + right;
|
||||
break;
|
||||
case '~':
|
||||
ret = arg_num_eval(arg->op.right, &right);
|
||||
if (!ret)
|
||||
break;
|
||||
*val = ~right;
|
||||
break;
|
||||
default:
|
||||
do_warning("unknown op '%s'", arg->op.op);
|
||||
ret = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue