History log of /linux-master/tools/power/acpi/tools/pfrut/pfrut.c
Revision Date Author Comments
# 0bc23d8b 08-Mar-2023 Chen Yu <yu.c.chen@intel.com>

ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range

The user provides arbitrary non-numeic value to level and type,
which could bring unexpected behavior. In this case the expected
behavior would be to throw an error.

pfrut -h
usage: pfrut [OPTIONS]
code injection:
-l, --load
-s, --stage
-a, --activate
-u, --update [stage and activate]
-q, --query
-d, --revid
update telemetry:
-G, --getloginfo
-T, --type(0:execution, 1:history)
-L, --level(0, 1, 2, 4)
-R, --read
-D, --revid log

pfrut -T A
pfrut -G
log_level:0
log_type:0
log_revid:2
max_data_size:65536
chunk1_size:0
chunk2_size:1530
rollover_cnt:0
reset_cnt:17

Fix this by restricting the input to be in the expected range.

Reported-by: Hariganesh Govindarajulu <hariganesh.govindarajulu@intel.com>
Suggested-by: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 40083734 25-Aug-2022 Shi junming <junming@nfschina.com>

ACPI: tools: pfrut: Do not initialize ret in main()

The initialization is unnecessary, because ret is always assigned a new
value before reading it.

Signed-off-by: Shi junming <junming@nfschina.com>
[ rjw: Subject edits, new changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 53e85588 21-Dec-2021 Chen Yu <yu.c.chen@intel.com>

ACPI: tools: Introduce utility for firmware updates/telemetry

Introduce a user space tool to make use of the interface exposed by
Platform Firmware Runtime Update and Telemetry drivers.

It can be used for firmware code injection, driver updates and
to retrieve platform firmware telemetry data.

Tested-by: Hongyu Ning <hongyu.ning@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>