Pull x86 fixes from Ingo Molnar: "Misc fixes: - EFI boot fix for signed kernels - an AC flags fix related to UBSAN - Hyper-V infinite loop fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyper-v: Fix overflow bug in fill_gva_list() x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation x86/boot: Preserve boot_params.secure_boot from sanitizing
Unified · Split
| @@ -37,12 +37,14 @@ static inline int fill_gva_list(u64 gva_list[], int offset, · 36 unmodified lines | ||
| 37 | 37 | * Lower 12 bits encode the number of additional |
| 38 | 38 | * pages to flush (in addition to the 'cur' page). |
| 39 | 39 | */ |
| 40 | − if (diff >= HV_TLB_FLUSH_UNIT) | |
| 40 | + if (diff >= HV_TLB_FLUSH_UNIT) { | |
| 41 | 41 | gva_list[gva_n] |= ~PAGE_MASK; |
| 42 | − else if (diff) | |
| 42 | + cur += HV_TLB_FLUSH_UNIT; | |
| 43 | + } else if (diff) { | |
| 43 | 44 | gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT; |
| 45 | + cur = end; | |
| 46 | + } | |
| 44 | 47 | |
| 45 | − cur += HV_TLB_FLUSH_UNIT; | |
| 46 | 48 | gva_n++; |
| 47 | 49 | |
| 48 | 50 | } while (cur < end); |
| @@ -70,6 +70,7 @@ static void sanitize_boot_params(struct boot_params *boot_params) · 69 unmodified lines | ||
| 70 | 70 | BOOT_PARAM_PRESERVE(eddbuf_entries), |
| 71 | 71 | BOOT_PARAM_PRESERVE(edd_mbr_sig_buf_entries), |
| 72 | 72 | BOOT_PARAM_PRESERVE(edd_mbr_sig_buffer), |
| 73 | + BOOT_PARAM_PRESERVE(secure_boot), | |
| 73 | 74 | BOOT_PARAM_PRESERVE(hdr), |
| 74 | 75 | BOOT_PARAM_PRESERVE(e820_table), |
| 75 | 76 | BOOT_PARAM_PRESERVE(eddbuf), |
| @@ -444,8 +444,10 @@ __pu_label: \ · 443 unmodified lines | ||
| 444 | 444 | ({ \ |
| 445 | 445 | int __gu_err; \ |
| 446 | 446 | __inttype(*(ptr)) __gu_val; \ |
| 447 | + __typeof__(ptr) __gu_ptr = (ptr); \ | |
| 448 | + __typeof__(size) __gu_size = (size); \ | |
| 447 | 449 | __uaccess_begin_nospec(); \ |
| 448 | − __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \ | |
| 450 | + __get_user_size(__gu_val, __gu_ptr, __gu_size, __gu_err, -EFAULT); \ | |
| 449 | 451 | __uaccess_end(); \ |
| 450 | 452 | (x) = (__force __typeof__(*(ptr)))__gu_val; \ |
| 451 | 453 | __builtin_expect(__gu_err, 0); \ |