This is the 4.9.180 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlzxMLAACgkQONu9yGCS aT649BAArnTG3L6VW6B/Z3bIhKIFPaeXI19wpF7UsaG4pnYXq6gJIGRJFLM6jWJd /jvDB43ysPAsZHjSNsBGn6qJZ6scUFr2E4K+Q5oSOmjlFn6N8HCoUApKFC1Nw4U3 MTnNOgYhdRlw1ffep4E7fqDbpPvZ+YcWFGaRQ9I8bho6E3uNM/psa9XYeJ+bEZnA iCTjDM/sr85tF7KTCy0QVw2kzYyIAnQGPzbL3V5iLhUU+wvIV6ccH3jyloa3KX1s N3sQIlwWh2Od2EvIHVkOGar1/ZMDZUN8Yj6DIrkP8QLy5fbRViOWwKS6RSt9GhQn 5vY+uq9+4/KXZhVm5V9MmL8AJ1hrbFO3G/O4DMhV7Wb5Ou471m/ZcQaxIJBMhkgh Mh115DVkF3b7bcQZFz955AopKmUCsF6AwdiX9cfvWfMkTiBhUwzgFczdeXZIiU8s ZjbErG88yYDFJvc7ra3OBlNDw/hWixLv6xWCpUFUPEKWUf708V7TXIs+n1B1FBz2 hSq8y18JvquuXVMRe/IhzUWkYDIQWmA6QzSIRrt/0X6WuNW3Bj1r6LpOGdrJzM5Y lPKKAu7sNdDx7k91QST8mqmUN181XQ8mYd2dYS1a5LGBq+UAXw2IHokAHj74oCz5 KdMaony//lOAjkubD6YJ3f8naMEF09Qah907dlyApw6V28pTnkI= =LFsk -----END PGP SIGNATURE----- Merge 4.9.180 into android-4.9 Changes in 4.9.180 ext4: do not delete unlinked inode from orphan list on failed truncate KVM: x86: fix return value for reserved EFER bio: fix improper use of smp_mb__before_atomic() Revert "scsi: sd: Keep disk read-only when re-reading partition" crypto: vmx - CTR: always increment IV as quadword kvm: svm/avic: fix off-by-one in checking host APIC ID libnvdimm/namespace: Fix label tracking error arm64: Save and restore OSDLR_EL1 across suspend/resume gfs2: Fix sign extension bug in gfs2_update_stats Btrfs: do not abort transaction at btrfs_update_root() after failure to COW path Btrfs: fix race between ranged fsync and writeback of adjacent ranges btrfs: sysfs: don't leak memory when failing add fsid fbdev: fix divide error in fb_var_to_videomode hugetlb: use same fault hash key for shared and private mappings fbdev: fix WARNING in __alloc_pages_nodemask bug media: cpia2: Fix use-after-free in cpia2_exit media: vivid: use vfree() instead of kfree() for dev->bitmap_cap ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit at76c50x-usb: Don't register led_trigger if usb_register_driver failed perf tools: No need to include bitops.h in util.h tools include: Adopt linux/bits.h Revert "btrfs: Honour FITRIM range constraints during free space trim" gfs2: Fix lru_count going negative cxgb4: Fix error path in cxgb4_init_module mmc: core: Verify SD bus width dmaengine: tegra210-dma: free dma controller in remove() net: ena: gcc 8: fix compilation warning ASoC: hdmi-codec: unlock the device on startup errors powerpc/boot: Fix missing check of lseek() return value ASoC: imx: fix fiq dependencies spi: pxa2xx: fix SCR (divisor) calculation brcm80211: potential NULL dereference in brcmf_cfg80211_vndr_cmds_dcmd_handler() ARM: vdso: Remove dependency with the arch_timer driver internals arm64: Fix compiler warning from pte_unmap() with -Wunused-but-set-variable sched/cpufreq: Fix kobject memleak scsi: qla2xxx: Fix a qla24xx_enable_msix() error path iwlwifi: pcie: don't crash on invalid RX interrupt rtc: 88pm860x: prevent use-after-free on device remove w1: fix the resume command API dmaengine: pl330: _stop: clear interrupt status mac80211/cfg80211: update bss channel on channel switch ASoC: fsl_sai: Update is_slave_mode with correct value mwifiex: prevent an array overflow net: cw1200: fix a NULL pointer dereference crypto: sun4i-ss - Fix invalid calculation of hash end bcache: return error immediately in bch_journal_replay() bcache: fix failure in journal relplay bcache: add failure check to run_cache_set() for journal replay bcache: avoid clang -Wunintialized warning x86/build: Move _etext to actual end of .text smpboot: Place the __percpu annotation correctly x86/mm: Remove in_nmi() warning from 64-bit implementation of vmalloc_fault() mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions HID: logitech-hidpp: use RAP instead of FAP to get the protocol version pinctrl: pistachio: fix leaked of_node references dmaengine: at_xdmac: remove BUG_ON macro in tasklet media: coda: clear error return value before picture run media: ov6650: Move v4l2_clk_get() to ov6650_video_probe() helper media: au0828: stop video streaming only when last user stops media: ov2659: make S_FMT succeed even if requested format doesn't match audit: fix a memory leak bug media: au0828: Fix NULL pointer dereference in au0828_analog_stream_enable() media: pvrusb2: Prevent a buffer overflow powerpc/numa: improve control of topology updates sched/core: Check quota and period overflow at usec to nsec conversion sched/core: Handle overflow in cpu_shares_write_u64 USB: core: Don't unbind interfaces following device reset failure x86/irq/64: Limit IST stack overflow check to #DB stack i40e: don't allow changes to HW VLAN stripping on active port VLANs arm64: vdso: Fix clock_getres() for CLOCK_REALTIME RDMA/cxgb4: Fix null pointer dereference on alloc_skb failure hwmon: (vt1211) Use request_muxed_region for Super-IO accesses hwmon: (smsc47m1) Use request_muxed_region for Super-IO accesses hwmon: (smsc47b397) Use request_muxed_region for Super-IO accesses hwmon: (pc87427) Use request_muxed_region for Super-IO accesses hwmon: (f71805f) Use request_muxed_region for Super-IO accesses scsi: libsas: Do discovery on empty PHY to update PHY info mmc: core: make pwrseq_emmc (partially) support sleepy GPIO controllers mmc_spi: add a status check for spi_sync_locked mmc: sdhci-of-esdhc: add erratum eSDHC5 support mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support PM / core: Propagate dev->power.wakeup_path when no callbacks extcon: arizona: Disable mic detect if running when driver is removed s390: cio: fix cio_irb declaration cpufreq: ppc_cbe: fix possible object reference leak cpufreq/pasemi: fix possible object reference leak cpufreq: pmac32: fix possible object reference leak x86/build: Keep local relocations with ld.lld iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion iio: hmc5843: fix potential NULL pointer dereferences iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data rtlwifi: fix a potential NULL pointer dereference mwifiex: Fix mem leak in mwifiex_tm_cmd brcmfmac: fix missing checks for kmemdup b43: shut up clang -Wuninitialized variable warning brcmfmac: convert dev_init_lock mutex to completion brcmfmac: fix race during disconnect when USB completion is in progress brcmfmac: fix Oops when bringing up interface during USB disconnect scsi: ufs: Fix regulator load and icc-level configuration scsi: ufs: Avoid configuring regulator with undefined voltage range arm64: cpu_ops: fix a leaked reference by adding missing of_node_put x86/uaccess, signal: Fix AC=1 bloat x86/ia32: Fix ia32_restore_sigcontext() AC leak chardev: add additional check for minor range overlap HID: core: move Usage Page concatenation to Main item ASoC: eukrea-tlv320: fix a leaked reference by adding missing of_node_put ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put cxgb3/l2t: Fix undefined behaviour spi: tegra114: reset controller on probe media: wl128x: prevent two potential buffer overflows virtio_console: initialize vtermno value for ports tty: ipwireless: fix missing checks for ioremap x86/mce: Fix machine_check_poll() tests for error types rcutorture: Fix cleanup path for invalid torture_type strings rcuperf: Fix cleanup path for invalid perf_type strings usb: core: Add PM runtime calls to usb_hcd_platform_shutdown scsi: qla4xxx: avoid freeing unallocated dma memory dmaengine: tegra210-adma: use devm_clk_*() helpers media: m88ds3103: serialize reset messages in m88ds3103_set_frontend media: go7007: avoid clang frame overflow warning with KASAN scsi: lpfc: Fix FDMI manufacturer attribute value media: saa7146: avoid high stack usage with clang scsi: lpfc: Fix SLI3 commands being issued on SLI4 devices spi : spi-topcliff-pch: Fix to handle empty DMA buffers spi: rspi: Fix sequencer reset during initialization spi: Fix zero length xfer bug ASoC: davinci-mcasp: Fix clang warning without CONFIG_PM drm: Wake up next in drm_read() chain if we are forced to putback the event Linux 4.9.180 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
719bdd91b8
139 changed files with 821 additions and 358 deletions
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 179
|
||||
SUBLEVEL = 180
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@
|
|||
#define BPIALL __ACCESS_CP15(c7, 0, c5, 6)
|
||||
#define ICIALLU __ACCESS_CP15(c7, 0, c5, 0)
|
||||
|
||||
#define CNTVCT __ACCESS_CP15_64(1, c14)
|
||||
|
||||
extern unsigned long cr_alignment; /* defined in entry-armv.S */
|
||||
|
||||
static inline unsigned long get_cr(void)
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/time.h>
|
||||
#include <asm/arch_timer.h>
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/bug.h>
|
||||
#include <asm/cp15.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/vdso_datapage.h>
|
||||
|
|
@ -123,7 +123,8 @@ static notrace u64 get_ns(struct vdso_data *vdata)
|
|||
u64 cycle_now;
|
||||
u64 nsec;
|
||||
|
||||
cycle_now = arch_counter_get_cntvct();
|
||||
isb();
|
||||
cycle_now = read_sysreg(CNTVCT);
|
||||
|
||||
cycle_delta = (cycle_now - vdata->cs_cycle_last) & vdata->cs_mask;
|
||||
|
||||
|
|
|
|||
|
|
@ -413,6 +413,8 @@ static inline phys_addr_t pmd_page_paddr(pmd_t pmd)
|
|||
return pmd_val(pmd) & PHYS_MASK & (s32)PAGE_MASK;
|
||||
}
|
||||
|
||||
static inline void pte_unmap(pte_t *pte) { }
|
||||
|
||||
/* Find an entry in the third-level page table. */
|
||||
#define pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
||||
|
||||
|
|
@ -421,7 +423,6 @@ static inline phys_addr_t pmd_page_paddr(pmd_t pmd)
|
|||
|
||||
#define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr))
|
||||
#define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir), (addr))
|
||||
#define pte_unmap(pte) do { } while (0)
|
||||
#define pte_unmap_nested(pte) do { } while (0)
|
||||
|
||||
#define pte_set_fixmap(addr) ((pte_t *)set_fixmap_offset(FIX_PTE, addr))
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ struct vdso_data {
|
|||
__u32 tz_minuteswest; /* Whacky timezone stuff */
|
||||
__u32 tz_dsttime;
|
||||
__u32 use_syscall;
|
||||
__u32 hrtimer_res;
|
||||
};
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ int main(void)
|
|||
DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
|
||||
DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
|
||||
DEFINE(CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC_RAW);
|
||||
DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
|
||||
DEFINE(CLOCK_REALTIME_RES, offsetof(struct vdso_data, hrtimer_res));
|
||||
DEFINE(CLOCK_REALTIME_COARSE, CLOCK_REALTIME_COARSE);
|
||||
DEFINE(CLOCK_MONOTONIC_COARSE,CLOCK_MONOTONIC_COARSE);
|
||||
DEFINE(CLOCK_COARSE_RES, LOW_RES_NSEC);
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ static const char *__init cpu_read_enable_method(int cpu)
|
|||
pr_err("%s: missing enable-method property\n",
|
||||
dn->full_name);
|
||||
}
|
||||
of_node_put(dn);
|
||||
} else {
|
||||
enable_method = acpi_get_enable_method(cpu);
|
||||
if (!enable_method) {
|
||||
|
|
|
|||
|
|
@ -217,6 +217,9 @@ void update_vsyscall(struct timekeeper *tk)
|
|||
vdso_data->wtm_clock_sec = tk->wall_to_monotonic.tv_sec;
|
||||
vdso_data->wtm_clock_nsec = tk->wall_to_monotonic.tv_nsec;
|
||||
|
||||
/* Read without the seqlock held by clock_getres() */
|
||||
WRITE_ONCE(vdso_data->hrtimer_res, hrtimer_resolution);
|
||||
|
||||
if (!use_syscall) {
|
||||
/* tkr_mono.cycle_last == tkr_raw.cycle_last */
|
||||
vdso_data->cs_cycle_last = tk->tkr_mono.cycle_last;
|
||||
|
|
|
|||
|
|
@ -301,13 +301,14 @@ ENTRY(__kernel_clock_getres)
|
|||
ccmp w0, #CLOCK_MONOTONIC_RAW, #0x4, ne
|
||||
b.ne 1f
|
||||
|
||||
ldr x2, 5f
|
||||
adr vdso_data, _vdso_data
|
||||
ldr w2, [vdso_data, #CLOCK_REALTIME_RES]
|
||||
b 2f
|
||||
1:
|
||||
cmp w0, #CLOCK_REALTIME_COARSE
|
||||
ccmp w0, #CLOCK_MONOTONIC_COARSE, #0x4, ne
|
||||
b.ne 4f
|
||||
ldr x2, 6f
|
||||
ldr x2, 5f
|
||||
2:
|
||||
cbz x1, 3f
|
||||
stp xzr, x2, [x1]
|
||||
|
|
@ -321,8 +322,6 @@ ENTRY(__kernel_clock_getres)
|
|||
svc #0
|
||||
ret
|
||||
5:
|
||||
.quad CLOCK_REALTIME_RES
|
||||
6:
|
||||
.quad CLOCK_COARSE_RES
|
||||
.cfi_endproc
|
||||
ENDPROC(__kernel_clock_getres)
|
||||
|
|
|
|||
|
|
@ -223,7 +223,11 @@ main(int ac, char **av)
|
|||
PUT_16(E_PHNUM, np + 2);
|
||||
|
||||
/* write back */
|
||||
lseek(fd, (long) 0, SEEK_SET);
|
||||
i = lseek(fd, (long) 0, SEEK_SET);
|
||||
if (i < 0) {
|
||||
perror("lseek");
|
||||
exit(1);
|
||||
}
|
||||
i = write(fd, buf, n);
|
||||
if (i < 0) {
|
||||
perror("write");
|
||||
|
|
|
|||
|
|
@ -1574,6 +1574,9 @@ int start_topology_update(void)
|
|||
{
|
||||
int rc = 0;
|
||||
|
||||
if (!topology_updates_enabled)
|
||||
return 0;
|
||||
|
||||
if (firmware_has_feature(FW_FEATURE_PRRN)) {
|
||||
if (!prrn_enabled) {
|
||||
prrn_enabled = 1;
|
||||
|
|
@ -1603,6 +1606,9 @@ int stop_topology_update(void)
|
|||
{
|
||||
int rc = 0;
|
||||
|
||||
if (!topology_updates_enabled)
|
||||
return 0;
|
||||
|
||||
if (prrn_enabled) {
|
||||
prrn_enabled = 0;
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
@ -1648,11 +1654,13 @@ static ssize_t topology_write(struct file *file, const char __user *buf,
|
|||
|
||||
kbuf[read_len] = '\0';
|
||||
|
||||
if (!strncmp(kbuf, "on", 2))
|
||||
if (!strncmp(kbuf, "on", 2)) {
|
||||
topology_updates_enabled = true;
|
||||
start_topology_update();
|
||||
else if (!strncmp(kbuf, "off", 3))
|
||||
} else if (!strncmp(kbuf, "off", 3)) {
|
||||
stop_topology_update();
|
||||
else
|
||||
topology_updates_enabled = false;
|
||||
} else
|
||||
return -EINVAL;
|
||||
|
||||
return count;
|
||||
|
|
@ -1667,9 +1675,7 @@ static const struct file_operations topology_ops = {
|
|||
|
||||
static int topology_update_init(void)
|
||||
{
|
||||
/* Do not poll for changes if disabled at boot */
|
||||
if (topology_updates_enabled)
|
||||
start_topology_update();
|
||||
start_topology_update();
|
||||
|
||||
if (!proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops))
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export REALMODE_CFLAGS
|
|||
export BITS
|
||||
|
||||
ifdef CONFIG_X86_NEED_RELOCS
|
||||
LDFLAGS_vmlinux := --emit-relocs
|
||||
LDFLAGS_vmlinux := --emit-relocs --discard-none
|
||||
endif
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -60,9 +60,8 @@
|
|||
} while (0)
|
||||
|
||||
#define RELOAD_SEG(seg) { \
|
||||
unsigned int pre = GET_SEG(seg); \
|
||||
unsigned int pre = (seg) | 3; \
|
||||
unsigned int cur = get_user_seg(seg); \
|
||||
pre |= 3; \
|
||||
if (pre != cur) \
|
||||
set_user_seg(seg, pre); \
|
||||
}
|
||||
|
|
@ -71,6 +70,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
|
|||
struct sigcontext_32 __user *sc)
|
||||
{
|
||||
unsigned int tmpflags, err = 0;
|
||||
u16 gs, fs, es, ds;
|
||||
void __user *buf;
|
||||
u32 tmp;
|
||||
|
||||
|
|
@ -78,16 +78,10 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
|
|||
current->restart_block.fn = do_no_restart_syscall;
|
||||
|
||||
get_user_try {
|
||||
/*
|
||||
* Reload fs and gs if they have changed in the signal
|
||||
* handler. This does not handle long fs/gs base changes in
|
||||
* the handler, but does not clobber them at least in the
|
||||
* normal case.
|
||||
*/
|
||||
RELOAD_SEG(gs);
|
||||
RELOAD_SEG(fs);
|
||||
RELOAD_SEG(ds);
|
||||
RELOAD_SEG(es);
|
||||
gs = GET_SEG(gs);
|
||||
fs = GET_SEG(fs);
|
||||
ds = GET_SEG(ds);
|
||||
es = GET_SEG(es);
|
||||
|
||||
COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx);
|
||||
COPY(dx); COPY(cx); COPY(ip); COPY(ax);
|
||||
|
|
@ -105,6 +99,17 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
|
|||
buf = compat_ptr(tmp);
|
||||
} get_user_catch(err);
|
||||
|
||||
/*
|
||||
* Reload fs and gs if they have changed in the signal
|
||||
* handler. This does not handle long fs/gs base changes in
|
||||
* the handler, but does not clobber them at least in the
|
||||
* normal case.
|
||||
*/
|
||||
RELOAD_SEG(gs);
|
||||
RELOAD_SEG(fs);
|
||||
RELOAD_SEG(ds);
|
||||
RELOAD_SEG(es);
|
||||
|
||||
err |= fpu__restore_sig(buf, 1);
|
||||
|
||||
force_iret();
|
||||
|
|
|
|||
|
|
@ -673,20 +673,50 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
|
|||
|
||||
barrier();
|
||||
m.status = mce_rdmsrl(msr_ops.status(i));
|
||||
|
||||
/* If this entry is not valid, ignore it */
|
||||
if (!(m.status & MCI_STATUS_VAL))
|
||||
continue;
|
||||
|
||||
|
||||
/*
|
||||
* Uncorrected or signalled events are handled by the exception
|
||||
* handler when it is enabled, so don't process those here.
|
||||
*
|
||||
* TBD do the same check for MCI_STATUS_EN here?
|
||||
* If we are logging everything (at CPU online) or this
|
||||
* is a corrected error, then we must log it.
|
||||
*/
|
||||
if (!(flags & MCP_UC) &&
|
||||
(m.status & (mca_cfg.ser ? MCI_STATUS_S : MCI_STATUS_UC)))
|
||||
continue;
|
||||
if ((flags & MCP_UC) || !(m.status & MCI_STATUS_UC))
|
||||
goto log_it;
|
||||
|
||||
/*
|
||||
* Newer Intel systems that support software error
|
||||
* recovery need to make additional checks. Other
|
||||
* CPUs should skip over uncorrected errors, but log
|
||||
* everything else.
|
||||
*/
|
||||
if (!mca_cfg.ser) {
|
||||
if (m.status & MCI_STATUS_UC)
|
||||
continue;
|
||||
goto log_it;
|
||||
}
|
||||
|
||||
/* Log "not enabled" (speculative) errors */
|
||||
if (!(m.status & MCI_STATUS_EN))
|
||||
goto log_it;
|
||||
|
||||
/*
|
||||
* Log UCNA (SDM: 15.6.3 "UCR Error Classification")
|
||||
* UC == 1 && PCC == 0 && S == 0
|
||||
*/
|
||||
if (!(m.status & MCI_STATUS_PCC) && !(m.status & MCI_STATUS_S))
|
||||
goto log_it;
|
||||
|
||||
/*
|
||||
* Skip anything else. Presumption is that our read of this
|
||||
* bank is racing with a machine check. Leave the log alone
|
||||
* for do_machine_check() to deal with it.
|
||||
*/
|
||||
continue;
|
||||
|
||||
log_it:
|
||||
error_seen = true;
|
||||
|
||||
mce_read_aux(&m, i);
|
||||
|
|
|
|||
|
|
@ -25,9 +25,18 @@ int sysctl_panic_on_stackoverflow;
|
|||
/*
|
||||
* Probabilistic stack overflow check:
|
||||
*
|
||||
* Only check the stack in process context, because everything else
|
||||
* runs on the big interrupt stacks. Checking reliably is too expensive,
|
||||
* so we just check from interrupts.
|
||||
* Regular device interrupts can enter on the following stacks:
|
||||
*
|
||||
* - User stack
|
||||
*
|
||||
* - Kernel task stack
|
||||
*
|
||||
* - Interrupt stack if a device driver reenables interrupts
|
||||
* which should only happen in really old drivers.
|
||||
*
|
||||
* - Debug IST stack
|
||||
*
|
||||
* All other contexts are invalid.
|
||||
*/
|
||||
static inline void stack_overflow_check(struct pt_regs *regs)
|
||||
{
|
||||
|
|
@ -52,8 +61,8 @@ static inline void stack_overflow_check(struct pt_regs *regs)
|
|||
return;
|
||||
|
||||
oist = this_cpu_ptr(&orig_ist);
|
||||
estack_top = (u64)oist->ist[0] - EXCEPTION_STKSZ + STACK_TOP_MARGIN;
|
||||
estack_bottom = (u64)oist->ist[N_EXCEPTION_STACKS - 1];
|
||||
estack_bottom = (u64)oist->ist[DEBUG_STACK];
|
||||
estack_top = estack_bottom - DEBUG_STKSZ + STACK_TOP_MARGIN;
|
||||
if (regs->sp >= estack_top && regs->sp <= estack_bottom)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -129,16 +129,6 @@ static int restore_sigcontext(struct pt_regs *regs,
|
|||
COPY_SEG_CPL3(cs);
|
||||
COPY_SEG_CPL3(ss);
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/*
|
||||
* Fix up SS if needed for the benefit of old DOSEMU and
|
||||
* CRIU.
|
||||
*/
|
||||
if (unlikely(!(uc_flags & UC_STRICT_RESTORE_SS) &&
|
||||
user_64bit_mode(regs)))
|
||||
force_valid_ss(regs);
|
||||
#endif
|
||||
|
||||
get_user_ex(tmpflags, &sc->flags);
|
||||
regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
|
||||
regs->orig_ax = -1; /* disable syscall checks */
|
||||
|
|
@ -147,6 +137,15 @@ static int restore_sigcontext(struct pt_regs *regs,
|
|||
buf = (void __user *)buf_val;
|
||||
} get_user_catch(err);
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/*
|
||||
* Fix up SS if needed for the benefit of old DOSEMU and
|
||||
* CRIU.
|
||||
*/
|
||||
if (unlikely(!(uc_flags & UC_STRICT_RESTORE_SS) && user_64bit_mode(regs)))
|
||||
force_valid_ss(regs);
|
||||
#endif
|
||||
|
||||
err |= fpu__restore_sig(buf, IS_ENABLED(CONFIG_X86_32));
|
||||
|
||||
force_iret();
|
||||
|
|
@ -458,6 +457,7 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,
|
|||
{
|
||||
struct rt_sigframe __user *frame;
|
||||
void __user *fp = NULL;
|
||||
unsigned long uc_flags;
|
||||
int err = 0;
|
||||
|
||||
frame = get_sigframe(&ksig->ka, regs, sizeof(struct rt_sigframe), &fp);
|
||||
|
|
@ -470,9 +470,11 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
uc_flags = frame_uc_flags(regs);
|
||||
|
||||
put_user_try {
|
||||
/* Create the ucontext. */
|
||||
put_user_ex(frame_uc_flags(regs), &frame->uc.uc_flags);
|
||||
put_user_ex(uc_flags, &frame->uc.uc_flags);
|
||||
put_user_ex(0, &frame->uc.uc_link);
|
||||
save_altstack_ex(&frame->uc.uc_stack, regs->sp);
|
||||
|
||||
|
|
@ -538,6 +540,7 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
|
|||
{
|
||||
#ifdef CONFIG_X86_X32_ABI
|
||||
struct rt_sigframe_x32 __user *frame;
|
||||
unsigned long uc_flags;
|
||||
void __user *restorer;
|
||||
int err = 0;
|
||||
void __user *fpstate = NULL;
|
||||
|
|
@ -552,9 +555,11 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
uc_flags = frame_uc_flags(regs);
|
||||
|
||||
put_user_try {
|
||||
/* Create the ucontext. */
|
||||
put_user_ex(frame_uc_flags(regs), &frame->uc.uc_flags);
|
||||
put_user_ex(uc_flags, &frame->uc.uc_flags);
|
||||
put_user_ex(0, &frame->uc.uc_link);
|
||||
compat_save_altstack_ex(&frame->uc.uc_stack, regs->sp);
|
||||
put_user_ex(0, &frame->uc.uc__pad0);
|
||||
|
|
|
|||
|
|
@ -111,11 +111,11 @@ SECTIONS
|
|||
*(.text.__x86.indirect_thunk)
|
||||
__indirect_thunk_end = .;
|
||||
#endif
|
||||
|
||||
/* End of text section */
|
||||
_etext = .;
|
||||
} :text = 0x9090
|
||||
|
||||
/* End of text section */
|
||||
_etext = .;
|
||||
|
||||
NOTES :text :note
|
||||
|
||||
EXCEPTION_TABLE(16) :text = 0x9090
|
||||
|
|
|
|||
|
|
@ -1518,7 +1518,11 @@ static void avic_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
|||
if (!kvm_vcpu_apicv_active(vcpu))
|
||||
return;
|
||||
|
||||
if (WARN_ON(h_physical_id >= AVIC_MAX_PHYSICAL_ID_COUNT))
|
||||
/*
|
||||
* Since the host physical APIC id is 8 bits,
|
||||
* we can support host APIC ID upto 255.
|
||||
*/
|
||||
if (WARN_ON(h_physical_id > AVIC_PHYSICAL_ID_ENTRY_HOST_PHYSICAL_ID_MASK))
|
||||
return;
|
||||
|
||||
entry = READ_ONCE(*(svm->avic_physical_id_cache));
|
||||
|
|
|
|||
|
|
@ -1109,7 +1109,7 @@ static int set_efer(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
|||
u64 efer = msr_info->data;
|
||||
|
||||
if (efer & efer_reserved_bits)
|
||||
return false;
|
||||
return 1;
|
||||
|
||||
if (!msr_info->host_initiated) {
|
||||
if (!__kvm_valid_efer(vcpu, efer))
|
||||
|
|
|
|||
|
|
@ -430,8 +430,6 @@ static noinline int vmalloc_fault(unsigned long address)
|
|||
if (!(address >= VMALLOC_START && address < VMALLOC_END))
|
||||
return -1;
|
||||
|
||||
WARN_ON_ONCE(in_nmi());
|
||||
|
||||
/*
|
||||
* Copy kernel mappings over when needed. This can also
|
||||
* happen within a race in page table update. In the later
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue