History

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

Linus Torvalds committed 7 years ago

Commit 19e41472 parents 262f7ee 4030b4c3 files · +9 −4Browse files

Unified · Split

3 files
  1. arch/x86/hyperv/mmu.c +5 −3
  2. arch/x86/include/asm/bootparam_utils.h +1 −0
  3. arch/x86/include/asm/uaccess.h +3 −1
arch/x86/hyperv/mmu.c+5−3
@@ -37,12 +37,14 @@ static inline int fill_gva_list(u64 gva_list[], int offset, · 36 unmodified lines
3737 * Lower 12 bits encode the number of additional
3838 * pages to flush (in addition to the 'cur' page).
3939 */
40− if (diff >= HV_TLB_FLUSH_UNIT)
40+ if (diff >= HV_TLB_FLUSH_UNIT) {
4141 gva_list[gva_n] |= ~PAGE_MASK;
42− else if (diff)
42+ cur += HV_TLB_FLUSH_UNIT;
43+ } else if (diff) {
4344 gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT;
45+ cur = end;
46+ }
4447
45− cur += HV_TLB_FLUSH_UNIT;
4648 gva_n++;
4749
4850 } while (cur < end);
arch/x86/include/asm/bootparam_utils.h+1−0
@@ -70,6 +70,7 @@ static void sanitize_boot_params(struct boot_params *boot_params) · 69 unmodified lines
7070 BOOT_PARAM_PRESERVE(eddbuf_entries),
7171 BOOT_PARAM_PRESERVE(edd_mbr_sig_buf_entries),
7272 BOOT_PARAM_PRESERVE(edd_mbr_sig_buffer),
73+ BOOT_PARAM_PRESERVE(secure_boot),
7374 BOOT_PARAM_PRESERVE(hdr),
7475 BOOT_PARAM_PRESERVE(e820_table),
7576 BOOT_PARAM_PRESERVE(eddbuf),
arch/x86/include/asm/uaccess.h+3−1
@@ -444,8 +444,10 @@ __pu_label: \ · 443 unmodified lines
444444 ({ \
445445 int __gu_err; \
446446 __inttype(*(ptr)) __gu_val; \
447+ __typeof__(ptr) __gu_ptr = (ptr); \
448+ __typeof__(size) __gu_size = (size); \
447449 __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); \
449451 __uaccess_end(); \
450452 (x) = (__force __typeof__(*(ptr)))__gu_val; \
451453 __builtin_expect(__gu_err, 0); \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t