diff options
author | 2021-02-23 12:03:19 +0100 | |
---|---|---|
committer | 2021-03-06 12:08:53 +0100 | |
commit | f3db3365c069c2a8505cdee8033fe3d22d2fe6c0 (patch) | |
tree | fb6b3d6308913caa177bc02746de141c69ab6a08 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Linux 5.12-rc2 (diff) | |
download | wireguard-linux-f3db3365c069c2a8505cdee8033fe3d22d2fe6c0.tar.xz wireguard-linux-f3db3365c069c2a8505cdee8033fe3d22d2fe6c0.zip |
x86/sev-es: Remove subtraction of res variable
vc_decode_insn() calls copy_from_kernel_nofault() by way of
vc_fetch_insn_kernel() to fetch 15 bytes max of opcodes to decode.
copy_from_kernel_nofault() returns negative on error and 0 on success.
The error case is handled by returning ES_EXCEPTION.
In the success case, the ret variable which contains the return value is
0 so there's no need to subtract it from MAX_INSN_SIZE when initializing
the insn buffer for further decoding. Remove it.
No functional changes.
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Link: https://lkml.kernel.org/r/20210223111130.16201-1-bp@alien8.de
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions