pKVM must validate the host-provided tracing buffer descriptor.
However, if an error is found, the hypervisor would just return 0 to the
host. Fix the return value on validation failure.
While at it, rename the function to hyp_trace_desc_is_valid() and skip
validation for the nVHE mode as we trust host-provided data in that
case.
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile | ||
| cache.S | ||
| clock.c | ||
| debug-sr.c | ||
| early_alloc.c | ||
| events.c | ||
| ffa.c | ||
| gen-hyprel.c | ||
| host.S | ||
| hyp-init.S | ||
| hyp-main.c | ||
| hyp-smp.c | ||
| hyp.lds.S | ||
| list_debug.c | ||
| mem_protect.c | ||
| mm.c | ||
| page_alloc.c | ||
| pkvm.c | ||
| psci-relay.c | ||
| setup.c | ||
| stacktrace.c | ||
| switch.c | ||
| sys_regs.c | ||
| sysreg-sr.c | ||
| timer-sr.c | ||
| tlb.c | ||
| trace.c | ||