diff options
author | Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de> | 2019-10-10 13:21:01 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2019-10-10 16:38:30 +0300 |
commit | 0935e5f7527ccd46163b42e1540409c98e29fe17 (patch) | |
tree | 72d60fba3ce3028f90099e95a99de7d16f9624a7 /drivers/crypto | |
parent | 4fb7d08707565d27ec84a364d011043ade8c38b4 (diff) | |
download | linux-0935e5f7527ccd46163b42e1540409c98e29fe17.tar.xz |
x86/jailhouse: Improve setup data version comparison
Soon, setup_data will contain information on passed-through platform
UARTs. This requires some preparational work for the sanity check of the
header and the check of the version.
Use the following strategy:
1. Ensure that the header declares at least enough space for the
version and the compatible_version as it must hold that fields for
any version. The location and semantics of header+version fields
will never change.
2. Copy over data -- as much as as possible. The length is either
limited by the header length or the length of setup_data.
3. Things are now in place -- sanity check if the header length
complies the actual version.
For future versions of the setup_data, only step 3 requires alignment.
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: jailhouse-dev@googlegroups.com
Cc: Juergen Gross <jgross@suse.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20191010102102.421035-2-ralf.ramsauer@oth-regensburg.de
Diffstat (limited to 'drivers/crypto')
0 files changed, 0 insertions, 0 deletions