[Patch?==?utf-8?q? 0/5] Problems with upstream SPECTRE mitigation found in sendmsg/recvmsg syscalls

Fran├žois Legal devel at thom.fr.eu.org
Mon Dec 7 11:52:17 CET 2020

From: Fran├žois LEGAL <devel at thom.fr.eu.org>

The syscall entry code used to copy the struct user_msghdr on the syscall stack, and some registered callbacks (notably in RTNet) were then calling again copy_from/to_user on that struct, which would trigger the SPECTRE mitigation protection.

I ran the iddp/xddp/bufp-label tests which seems ok with the patch, and retested RTNet af_packet part
I did not test the rtcan part as I have no hardware available.

 kernel/cobalt/posix/io.c          | 20 ++------------------
 kernel/drivers/can/rtcan_raw.c    | 37 +++++++++++++++++++++++++++++--------
 kernel/drivers/ipc/bufp.c         | 14 ++++++++++++--
 kernel/drivers/ipc/iddp.c         | 14 ++++++++++++--
 kernel/drivers/ipc/xddp.c         | 14 ++++++++++++--
 5 files changed, 67 insertions(+), 32 deletions(-)

More information about the Xenomai mailing list