Commit 19e4147a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

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
parents 262f7eed 4030b4c5
...@@ -37,12 +37,14 @@ static inline int fill_gva_list(u64 gva_list[], int offset, ...@@ -37,12 +37,14 @@ static inline int fill_gva_list(u64 gva_list[], int offset,
* Lower 12 bits encode the number of additional * Lower 12 bits encode the number of additional
* pages to flush (in addition to the 'cur' page). * pages to flush (in addition to the 'cur' page).
*/ */
if (diff >= HV_TLB_FLUSH_UNIT) if (diff >= HV_TLB_FLUSH_UNIT) {
gva_list[gva_n] |= ~PAGE_MASK; gva_list[gva_n] |= ~PAGE_MASK;
else if (diff) cur += HV_TLB_FLUSH_UNIT;
} else if (diff) {
gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT; gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT;
cur = end;
}
cur += HV_TLB_FLUSH_UNIT;
gva_n++; gva_n++;
} while (cur < end); } while (cur < end);
......
...@@ -70,6 +70,7 @@ static void sanitize_boot_params(struct boot_params *boot_params) ...@@ -70,6 +70,7 @@ static void sanitize_boot_params(struct boot_params *boot_params)
BOOT_PARAM_PRESERVE(eddbuf_entries), BOOT_PARAM_PRESERVE(eddbuf_entries),
BOOT_PARAM_PRESERVE(edd_mbr_sig_buf_entries), BOOT_PARAM_PRESERVE(edd_mbr_sig_buf_entries),
BOOT_PARAM_PRESERVE(edd_mbr_sig_buffer), BOOT_PARAM_PRESERVE(edd_mbr_sig_buffer),
BOOT_PARAM_PRESERVE(secure_boot),
BOOT_PARAM_PRESERVE(hdr), BOOT_PARAM_PRESERVE(hdr),
BOOT_PARAM_PRESERVE(e820_table), BOOT_PARAM_PRESERVE(e820_table),
BOOT_PARAM_PRESERVE(eddbuf), BOOT_PARAM_PRESERVE(eddbuf),
......
...@@ -444,8 +444,10 @@ __pu_label: \ ...@@ -444,8 +444,10 @@ __pu_label: \
({ \ ({ \
int __gu_err; \ int __gu_err; \
__inttype(*(ptr)) __gu_val; \ __inttype(*(ptr)) __gu_val; \
__typeof__(ptr) __gu_ptr = (ptr); \
__typeof__(size) __gu_size = (size); \
__uaccess_begin_nospec(); \ __uaccess_begin_nospec(); \
__get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \ __get_user_size(__gu_val, __gu_ptr, __gu_size, __gu_err, -EFAULT); \
__uaccess_end(); \ __uaccess_end(); \
(x) = (__force __typeof__(*(ptr)))__gu_val; \ (x) = (__force __typeof__(*(ptr)))__gu_val; \
__builtin_expect(__gu_err, 0); \ __builtin_expect(__gu_err, 0); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment