Open nathanlynch opened 2 years ago
Many of the calls in this table are straightforward to convert to an ioctl-based interface: it is more or less obvious how to structure a command, call the ioctl, and process the result. Examples: rtas_get_sysparm
, rtas_display_msg
, rtas_set_sysparm
.
It seems more complex to support rtas_get_vpd
, rtas_platform_dump
, and rtas_lpar_perftools
. These are "sequence-based" calls, in which the caller typically invokes the function multiple times in order to complete the higher-level operation, retrieving the results from the work area 4KB at a time. The difficulties with these are:
rtas_get_vpd
sequence while one is already in progress will disrupt the first sequence.rtas_get_vpd
are coded to invoke the function in a loop until all VPD has been retrieved.Every API in the table above is either "simple" or "sequence-based", with the possible exception of the error injection APIs, which may be in their own category.
Added columns for higher level use case as well as RTAS function category as discussed in earlier comment. "simple" means one-shot, "streaming" covers the sequence-based pattern I described.
All librtas APIs that require passing a "work area" to the underlying RTAS calls use
/dev/mem
to allocate buffers that are addressable by RTAS. When the kernel lockdown feature is enabled, this becomes impossible, and different kernel-user APIs are necessary.This issue is for cataloging the affected APIs and the proposed solutions. Many can be fixed by adding new (likely ioctl-oriented) interfaces to the kernel and supporting code within librtas without requiring changes to librtas clients. Some, like
rtas_cfg_connector
, are fundamentally incompatible with lockdown and modern Linux device configuration architecture, and its users need to be migrated to solutions outside of librtas.rtas_cfg_connector
rtas_display_msg
rtas_errinjct
rtas_errinjct_open
rtas_errinjct
rtas_errinjct_close
rtas_errinjct
rtas_free_rmo_buffer
rtas_get_rmo_buffer
rtas_get_dynamic_sensor
rtas_get_indices
rtas_get_rmo_buffer
rtas_get_sysparm
rtas_get_vpd
ibm,get-vpd
call sequences to be serialized, so existing uses are fragile already.rtas_lpar_perftools
rtas_platform_dump
rtas_physical_attestation
rtas_scan_log_dump
rtas_set_dynamic_indicator
rtas_set_sysparm
rtas_update_nodes
rtas_update_properties
rtas_update_nodes
.