diff options
author | Jann Horn <[email protected]> | 2019-04-04 13:11:28 +0200 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2019-04-10 22:40:25 +0200 |
commit | 7e94a7b659eefedda82cde97229a26f319fb1182 (patch) | |
tree | 2a2ecc5eb53754522f0c3112bb6626c3f23ed13e /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 79a3aaa7b82e3106be97842dedfd8429248896e6 (diff) |
x86/microcode/intel: Refactor Intel microcode blob loading
Change generic_load_microcode() to use the iov_iter API instead of a
clumsy open-coded version which has to pay attention to __user data
or kernel data, depending on the loading method. This allows to avoid
explicit casting between user and kernel pointers.
Because the iov_iter API makes it hard to read the same location twice,
as a side effect, also fix a double-read of the microcode header (which
could e.g. lead to out-of-bounds reads in microcode_sanity_check()).
Not that it matters much, only root is allowed to load microcode
anyway...
[ bp: Massage a bit, sort function-local variables. ]
Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: x86-ml <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions