|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v7 48/50] x86/mce: pass the error-injection callfunc payload by value
Per-CPU stack mappings, to come as part of Address Space Isolation,
give some contexts page-tables which map only the stack of the CPU
they run on. A CPU in such a context cannot reach another CPU's
stack, so pointers into a caller's stack cannot be dereferenced by
call-function callees.
do_mca() copies the hypercall argument into a stack local and then,
for XEN_MC_msrinject, points another CPU at its embedded struct
xen_mc_msrinject (144 bytes, the largest by-value payload in the
tree) via on_selected_cpus(). The XEN_MC_mceinject calls pass no
payload.
Switch to on_selected_cpus_obj(), passing the structure by value.
The call is synchronous (@wait == 1) and x86_mc_msrinject() only
reads the payload, so behaviour is unchanged.
No functional change.
Groundwork for per-CPU stack mappings, which take away a CPU's access
to other CPUs' stacks: besides get_cpu_current(), cross-CPU rendezvous
and call-function payloads are what reads another CPU's stack at run
time.
Assisted-by: Claude Code:claude-opus-4-8, Claude Code:claude-opus-5-5
Signed-off-by: George Dunlap <gwd@xxxxxxxxxxxxxx>
---
Changes in v7:
- New in this version.
---
xen/arch/x86/cpu/mcheck/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c
index 842a80977c..e435e13ad7 100644
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -1532,8 +1532,8 @@ long do_mca(XEN_GUEST_HANDLE_PARAM(xen_mc_t) u_xen_mc)
add_taint(TAINT_ERROR_INJECT);
- on_selected_cpus(cpumask_of(target), x86_mc_msrinject,
- mc_msrinject, 1);
+ on_selected_cpus_obj(cpumask_of(target), x86_mc_msrinject,
+ mc_msrinject, 1);
break;
--
2.56.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |