Skip to content

Commit 85d9096

Browse files
committed
Merge 4.9.281 into android-4.9-q
Changes in 4.9.281 iio: adc: Fix incorrect exit of for-loop ASoC: intel: atom: Fix reference to PCM buffer address i2c: dev: zero out array used for i2c reads from userspace ACPI: NFIT: Fix support for virtual SPA ranges ppp: Fix generating ifname when empty IFLA_IFNAME is specified net: Fix memory leak in ieee802154_raw_deliver net: bridge: fix memleak in br_add_if() tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets xen/events: Fix race in set_evtchn_to_irq x86/tools: Fix objdump version check again PCI/MSI: Enable and mask MSI-X early PCI/MSI: Do not set invalid bits in MSI mask PCI/MSI: Correct misleading comments PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown() PCI/MSI: Protect msi_desc::masked for multi-MSI PCI/MSI: Mask all unused MSI-X entries PCI/MSI: Enforce that MSI-X table entry is masked for update PCI/MSI: Enforce MSI[X] entry updates to be visible vmlinux.lds.h: Handle clang's module.{c,d}tor sections mac80211: drop data frames without key on encrypted links KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) x86/fpu: Make init_fpstate correct with optimized XSAVE dmaengine: usb-dmac: Fix PM reference leak in usb_dmac_probe() ARM: dts: am43x-epos-evm: Reduce i2c0 bus speed for tps65218 dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available scsi: megaraid_mm: Fix end of loop tests for list_for_each_entry() scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach() scsi: core: Avoid printing an error if target_alloc() returns -ENXIO ARM: dts: nomadik: Fix up interrupt controller node names Bluetooth: hidp: use correct wait queue when removing ctrl_wait dccp: add do-while-0 stubs for dccp_pr_debug macros vhost: Fix the calculation in vhost_overflow() net: 6pack: fix slab-out-of-bounds in decode_data net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32 mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default mmc: dw_mmc: Fix hang on data CRC error ALSA: hda - fix the 'Capture Switch' value change notifications ipack: tpci200: fix many double free issues in tpci200_pci_probe btrfs: prevent rename2 from exchanging a subvol with a directory from different parents ASoC: intel: atom: Fix breakage for PCM buffer address setup locks: print a warning when mount fails due to lack of "mand" support fs: warn about impending deprecation of mandatory locks Linux 4.9.281 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I0f50adb340b9ef3eb12acf7f244b283ab16ae3bf
2 parents 016792f + ee4959c commit 85d9096

42 files changed

Lines changed: 293 additions & 148 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/filesystems/mandatory-locking.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,13 @@ havoc if they lock crucial files. The way around it is to change the file
169169
permissions (remove the setgid bit) before trying to read or write to it.
170170
Of course, that might be a bit tricky if the system is hung :-(
171171

172+
7. The "mand" mount option
173+
--------------------------
174+
Mandatory locking is disabled on all filesystems by default, and must be
175+
administratively enabled by mounting with "-o mand". That mount option
176+
is only allowed if the mounting task has the CAP_SYS_ADMIN capability.
177+
178+
Since kernel v4.5, it is possible to disable mandatory locking
179+
altogether by setting CONFIG_MANDATORY_FILE_LOCKING to "n". A kernel
180+
with this disabled will reject attempts to mount filesystems with the
181+
"mand" mount option with the error status EPERM.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 9
3-
SUBLEVEL = 280
3+
SUBLEVEL = 281
44
EXTRAVERSION =
55
NAME = Roaring Lionus
66

arch/arm/boot/dts/am43x-epos-evm.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@
411411
status = "okay";
412412
pinctrl-names = "default";
413413
pinctrl-0 = <&i2c0_pins>;
414-
clock-frequency = <400000>;
414+
clock-frequency = <100000>;
415415

416416
tps65218: tps65218@24 {
417417
reg = <0x24>;

arch/arm/boot/dts/ste-nomadik-stn8815.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,14 +755,14 @@
755755
status = "disabled";
756756
};
757757

758-
vica: intc@10140000 {
758+
vica: interrupt-controller@10140000 {
759759
compatible = "arm,versatile-vic";
760760
interrupt-controller;
761761
#interrupt-cells = <1>;
762762
reg = <0x10140000 0x20>;
763763
};
764764

765-
vicb: intc@10140020 {
765+
vicb: interrupt-controller@10140020 {
766766
compatible = "arm,versatile-vic";
767767
interrupt-controller;
768768
#interrupt-cells = <1>;

arch/x86/include/asm/fpu/internal.h

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,14 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
221221
}
222222
}
223223

224+
static inline void fxsave(struct fxregs_state *fx)
225+
{
226+
if (IS_ENABLED(CONFIG_X86_32))
227+
asm volatile( "fxsave %[fx]" : [fx] "=m" (*fx));
228+
else
229+
asm volatile("fxsaveq %[fx]" : [fx] "=m" (*fx));
230+
}
231+
224232
/* These macros all use (%edi)/(%rdi) as the single memory argument. */
225233
#define XSAVE ".byte " REX_PREFIX "0x0f,0xae,0x27"
226234
#define XSAVEOPT ".byte " REX_PREFIX "0x0f,0xae,0x37"
@@ -294,28 +302,6 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
294302
: "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \
295303
: "memory")
296304

297-
/*
298-
* This function is called only during boot time when x86 caps are not set
299-
* up and alternative can not be used yet.
300-
*/
301-
static inline void copy_xregs_to_kernel_booting(struct xregs_state *xstate)
302-
{
303-
u64 mask = -1;
304-
u32 lmask = mask;
305-
u32 hmask = mask >> 32;
306-
int err;
307-
308-
WARN_ON(system_state != SYSTEM_BOOTING);
309-
310-
if (static_cpu_has(X86_FEATURE_XSAVES))
311-
XSTATE_OP(XSAVES, xstate, lmask, hmask, err);
312-
else
313-
XSTATE_OP(XSAVE, xstate, lmask, hmask, err);
314-
315-
/* We should never fault when copying to a kernel buffer: */
316-
WARN_ON_FPU(err);
317-
}
318-
319305
/*
320306
* This function is called only during boot time when x86 caps are not set
321307
* up and alternative can not be used yet.

arch/x86/include/asm/svm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
113113
#define V_IGN_TPR_SHIFT 20
114114
#define V_IGN_TPR_MASK (1 << V_IGN_TPR_SHIFT)
115115

116+
#define V_IRQ_INJECTION_BITS_MASK (V_IRQ_MASK | V_INTR_PRIO_MASK | V_IGN_TPR_MASK)
117+
116118
#define V_INTR_MASKING_SHIFT 24
117119
#define V_INTR_MASKING_MASK (1 << V_INTR_MASKING_SHIFT)
118120

arch/x86/kernel/fpu/xstate.c

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,33 @@ static void __init print_xstate_offset_size(void)
407407
}
408408
}
409409

410+
/*
411+
* All supported features have either init state all zeros or are
412+
* handled in setup_init_fpu() individually. This is an explicit
413+
* feature list and does not use XFEATURE_MASK*SUPPORTED to catch
414+
* newly added supported features at build time and make people
415+
* actually look at the init state for the new feature.
416+
*/
417+
#define XFEATURES_INIT_FPSTATE_HANDLED \
418+
(XFEATURE_MASK_FP | \
419+
XFEATURE_MASK_SSE | \
420+
XFEATURE_MASK_YMM | \
421+
XFEATURE_MASK_OPMASK | \
422+
XFEATURE_MASK_ZMM_Hi256 | \
423+
XFEATURE_MASK_Hi16_ZMM | \
424+
XFEATURE_MASK_PKRU | \
425+
XFEATURE_MASK_BNDREGS | \
426+
XFEATURE_MASK_BNDCSR)
427+
410428
/*
411429
* setup the xstate image representing the init state
412430
*/
413431
static void __init setup_init_fpu_buf(void)
414432
{
415433
static int on_boot_cpu __initdata = 1;
416434

435+
BUILD_BUG_ON(XCNTXT_MASK != XFEATURES_INIT_FPSTATE_HANDLED);
436+
417437
WARN_ON_FPU(!on_boot_cpu);
418438
on_boot_cpu = 0;
419439

@@ -432,10 +452,22 @@ static void __init setup_init_fpu_buf(void)
432452
copy_kernel_to_xregs_booting(&init_fpstate.xsave);
433453

434454
/*
435-
* Dump the init state again. This is to identify the init state
436-
* of any feature which is not represented by all zero's.
455+
* All components are now in init state. Read the state back so
456+
* that init_fpstate contains all non-zero init state. This only
457+
* works with XSAVE, but not with XSAVEOPT and XSAVES because
458+
* those use the init optimization which skips writing data for
459+
* components in init state.
460+
*
461+
* XSAVE could be used, but that would require to reshuffle the
462+
* data when XSAVES is available because XSAVES uses xstate
463+
* compaction. But doing so is a pointless exercise because most
464+
* components have an all zeros init state except for the legacy
465+
* ones (FP and SSE). Those can be saved with FXSAVE into the
466+
* legacy area. Adding new features requires to ensure that init
467+
* state is all zeroes or if not to add the necessary handling
468+
* here.
437469
*/
438-
copy_xregs_to_kernel_booting(&init_fpstate.xsave);
470+
fxsave(&init_fpstate.fxsave);
439471
}
440472

441473
static int xfeature_uncompacted_offset(int xfeature_nr)

arch/x86/kvm/svm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3048,7 +3048,11 @@ static bool nested_svm_vmrun(struct vcpu_svm *svm)
30483048
svm->nested.intercept = nested_vmcb->control.intercept;
30493049

30503050
svm_flush_tlb(&svm->vcpu);
3051-
svm->vmcb->control.int_ctl = nested_vmcb->control.int_ctl | V_INTR_MASKING_MASK;
3051+
svm->vmcb->control.int_ctl = nested_vmcb->control.int_ctl &
3052+
(V_TPR_MASK | V_IRQ_INJECTION_BITS_MASK);
3053+
3054+
svm->vmcb->control.int_ctl |= V_INTR_MASKING_MASK;
3055+
30523056
if (nested_vmcb->control.int_ctl & V_INTR_MASKING_MASK)
30533057
svm->vcpu.arch.hflags |= HF_VINTR_MASK;
30543058
else

arch/x86/tools/chkobjdump.awk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ BEGIN {
1010

1111
/^GNU objdump/ {
1212
verstr = ""
13+
gsub(/\(.*\)/, "");
1314
for (i = 3; i <= NF; i++)
1415
if (match($(i), "^[0-9]")) {
1516
verstr = $(i);

drivers/acpi/nfit/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,9 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc,
22582258
struct acpi_nfit_memory_map *memdev = nfit_memdev->memdev;
22592259
struct nd_mapping_desc *mapping;
22602260

2261+
/* range index 0 == unmapped in SPA or invalid-SPA */
2262+
if (memdev->range_index == 0 || spa->range_index == 0)
2263+
continue;
22612264
if (memdev->range_index != spa->range_index)
22622265
continue;
22632266
if (count >= ND_MAX_MAPPINGS) {

0 commit comments

Comments
 (0)