diff options
author | Michael Sterritt <sterritt@google.com> | 2021-11-19 15:27:57 -0800 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-12-03 18:09:30 +0100 |
commit | 1d5379d0475419085d3575bd9155f2e558e96390 (patch) | |
tree | 6cb30d68ebca4d0eda9ed38de59d4384029a224a /arch/arm | |
parent | 51523ed1c26758de1af7e58730a656875f72f783 (diff) | |
download | linux-1d5379d0475419085d3575bd9155f2e558e96390.tar.bz2 |
x86/sev: Fix SEV-ES INS/OUTS instructions for word, dword, and qword
Properly type the operands being passed to __put_user()/__get_user().
Otherwise, these routines truncate data for dependent instructions
(e.g., INSW) and only read/write one byte.
This has been tested by sending a string with REP OUTSW to a port and
then reading it back in with REP INSW on the same port.
Previous behavior was to only send and receive the first char of the
size. For example, word operations for "abcd" would only read/write
"ac". With change, the full string is now written and read back.
Fixes: f980f9c31a923 (x86/sev-es: Compile early handler code into kernel image)
Signed-off-by: Michael Sterritt <sterritt@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Marc Orr <marcorr@google.com>
Reviewed-by: Peter Gonda <pgonda@google.com>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Link: https://lkml.kernel.org/r/20211119232757.176201-1-sterritt@google.com
Diffstat (limited to 'arch/arm')
0 files changed, 0 insertions, 0 deletions