]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Validate config term maximum value
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 17 Jul 2015 16:33:50 +0000 (19:33 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 6 Aug 2015 19:49:28 +0000 (16:49 -0300)
commita7332b737674a28f6dfc8a64e4d65ea2e61fc797
tree55795acedd7e8433dde154f13d15518424f75091
parentd7c3fc7f53c37fd9d0b3aeb1a411422ff7dac746
perf tools: Validate config term maximum value

Currently the value of a PMU config term is silently truncated if it is
too big. This is an impediment to validating the value for other
criteria later on i.e.  the user provides an invalid value that gets
truncated to a valid one.

The maximum value validation is only done for the parser where the error
is passed back to the user. In other cases the silent truncation
continues so as not to affect tools that perhaps rely on it.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1437150840-31811-16-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/pmu.c