From: Alex Smith <alex.smith(a)imgtec.com>
A spinlock is held while updating the internal copy of the IRQ mask,
but not while writing it to the actual IMASK register. After the lock
is released, an IRQ can occur before the IMASK register is written.
If handling this IRQ causes the mask to be changed, when the handler
returns back to the middle of the first mask update, a stale value
will be written to the mask register.
If this causes an IRQ to become unmasked that cannot have its status
cleared by writing a 1 to it in the IREG register, e.g. the SDIO IRQ,
then we can end up stuck with the same IRQ repeatedly being fired but
not handled. Normally the MMC IRQ handler attempts to clear any
unexpected IRQs by writing IREG, but for those that cannot be cleared
in this way then the IRQ will just repeatedly fire.
This was resulting in lockups after a while of using Wi-Fi on the
CI20 (GitHub issue #19).
Resolve by holding the spinlock until after the IMASK register has
been updated.
Cc: stable(a)vger.kernel.org
Link: https://github.com/MIPS/CI20_linux/issues/19
Fixes: 61bfbdb85687 ("MMC: Add support for the controller on JZ4740 SoCs.")
Tested-by: Mathieu Malaterre <malat(a)debian.org>
Signed-off-by: Alex Smith <alex.smith(a)imgtec.com>
---
drivers/mmc/host/jz4740_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 712e08d9a45e..a0168e9e4fce 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -362,9 +362,9 @@ static void jz4740_mmc_set_irq_enabled(struct jz4740_mmc_host *host,
host->irq_mask &= ~irq;
else
host->irq_mask |= irq;
- spin_unlock_irqrestore(&host->lock, flags);
writew(host->irq_mask, host->base + JZ_REG_MMC_IMASK);
+ spin_unlock_irqrestore(&host->lock, flags);
}
static void jz4740_mmc_clock_enable(struct jz4740_mmc_host *host,
--
2.16.2
Since commit 04c8b0f82c7d ("irqchip/gic: Make locking a BL_SWITCHER only
feature") coupled CPU idle freezes from time to time on Exynos4210. Later
commit 313c8c16ee62 ("PM / CPU: replace raw_notifier with atomic_notifier")
changed the context in which the CPU idle code is executed, what results
in fully reproducible freeze all the time. However, almost the same coupled
CPU idle code works fine on Exynos3250 regarless of the changes made in
the mentioned commits.
It turned out that the IPI call used on Exynos4210 is conflicting with the
change done in the first mentioned commit in GIC. Fix this by using the
same code path as for Exynos3250, instead of the IPI call for
synchronization with second CPU core, call dsb_sev() directly.
Tested on Exynos4210-based Trats and Origen boards.
Signed-off-by: Marek Szyprowski <m.szyprowski(a)samsung.com>
CC: stable(a)vger.kernel.org # v4.13+
---
arch/arm/mach-exynos/pm.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index dc4346ecf16d..a1055a2b8d54 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -271,11 +271,7 @@ static int exynos_cpu0_enter_aftr(void)
goto fail;
call_firmware_op(cpu_boot, 1);
-
- if (soc_is_exynos3250())
- dsb_sev();
- else
- arch_send_wakeup_ipi_mask(cpumask_of(1));
+ dsb_sev();
}
}
fail:
--
2.15.0
There are only 19 PIOB pins having primary names PB0-PB18. Not all of them
have a 'C' function. So the pinctrl property mask ends up being the same as the
other SoC of the at91sam9x5 series.
Reported-by: Marek Sieranski <marek.sieranski(a)microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre(a)microchip.com>
Cc: <stable(a)vger.kernel.org> # v3.8+
---
arch/arm/boot/dts/at91sam9g25.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/at91sam9g25.dtsi b/arch/arm/boot/dts/at91sam9g25.dtsi
index a7da0dd0c98f..0898213f3bb2 100644
--- a/arch/arm/boot/dts/at91sam9g25.dtsi
+++ b/arch/arm/boot/dts/at91sam9g25.dtsi
@@ -21,7 +21,7 @@
atmel,mux-mask = <
/* A B C */
0xffffffff 0xffe0399f 0xc000001c /* pioA */
- 0x0007ffff 0x8000fe3f 0x00000000 /* pioB */
+ 0x0007ffff 0x00047e3f 0x00000000 /* pioB */
0x80000000 0x07c0ffff 0xb83fffff /* pioC */
0x003fffff 0x003f8000 0x00000000 /* pioD */
>;
--
2.15.1
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: rc: oops in ir_timer_keyup after device unplug
Author: Sean Young <sean(a)mess.org>
Date: Tue Mar 6 08:57:57 2018 -0500
If there is IR in the raw kfifo when ir_raw_event_unregister() is called,
then kthread_stop() causes ir_raw_event_thread to be scheduled, decode
some scancodes and re-arm timer_keyup. The timer_keyup then fires when
the rc device is long gone.
Cc: stable(a)vger.kernel.org
Signed-off-by: Sean Young <sean(a)mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
drivers/media/rc/rc-main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 4a952108ba1e..8621761a680f 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1932,12 +1932,12 @@ void rc_unregister_device(struct rc_dev *dev)
if (!dev)
return;
- del_timer_sync(&dev->timer_keyup);
- del_timer_sync(&dev->timer_repeat);
-
if (dev->driver_type == RC_DRIVER_IR_RAW)
ir_raw_event_unregister(dev);
+ del_timer_sync(&dev->timer_keyup);
+ del_timer_sync(&dev->timer_repeat);
+
rc_free_rx_device(dev);
mutex_lock(&dev->lock);
On Wed, 21 Mar 2018 10:08:03 +0100
Gerd Hoffmann <kraxel(a)redhat.com> wrote:
> On unknown/unhandled ioctls the driver should return an error, so
> userspace knows it tried to use something unsupported.
>
> Cc: stable(a)vger.kernel.org
> Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
> ---
> drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
> index 021f722e24..be881d53c2 100644
> --- a/drivers/gpu/drm/i915/gvt/kvmgt.c
> +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
> @@ -1284,7 +1284,7 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
>
> }
>
> - return 0;
> + return -EINVAL;
> }
>
> static ssize_t
Absolutely, but I'd prefer to continue the standard behavior among
other vfio drivers, and adopted from elsewhere in the kernel, to use
-ENOTTY for an unhandled ioctl, reserving -EINVAL as an error in
options for a supported ioctl. Thanks,
Alex
This is the start of the stable review cycle for the 4.15.12 release.
There are 52 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed Mar 21 18:07:15 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.15.12-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.15.12-rc1
Al Cooper <al.cooper(a)broadcom.com>
phy: phy-brcm-usb-init: Power down USB 3.0 PHY when XHCI disabled
Al Cooper <al.cooper(a)broadcom.com>
phy: phy-brcm-usb-init: DRD mode can cause crash on startup
Al Cooper <al.cooper(a)broadcom.com>
phy: phy-brcm-usb-init: Some Low Speed keyboards fail on 7271
Al Cooper <alcooperx(a)gmail.com>
phy: phy-brcm-usb: Fix two DT properties to match bindings doc
Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
usb: gadget: udc: renesas_usb3: fix oops in renesas_usb3_remove()
Enric Balletbo i Serra <enric.balletbo(a)collabora.com>
usb: dwc3: of-simple: fix oops by unbalanced clk disable call
Manu Gautam <mgautam(a)codeaurora.org>
usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode
Thinh Nguyen <Thinh.Nguyen(a)synopsys.com>
usb: dwc3: Fix GDBGFIFOSPACE_TYPE values
Wei Yongjun <weiyongjun1(a)huawei.com>
USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
Amelie Delaunay <amelie.delaunay(a)st.com>
dt-bindings: usb: fix the STM32F7 DWC2 OTG HS core binding
Amelie Delaunay <amelie.delaunay(a)st.com>
usb: dwc2: fix STM32F7 USB OTG HS compatible
Bill Kuzeja <William.Kuzeja(a)stratus.com>
scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure
Himanshu Madhani <hmadhani(a)redhat.com>
scsi: qla2xxx: Fix logo flag for qlt_free_session_done()
Quinn Tran <quinn.tran(a)cavium.com>
scsi: qla2xxx: Fix NULL pointer access for fcport structure
Himanshu Madhani <himanshu.madhani(a)cavium.com>
scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que
Nikolay Borisov <nborisov(a)suse.com>
btrfs: Fix memory barriers usage with device stats counters
Zygo Blaxell <ce3g8jdj(a)umail.furryterror.org>
btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes
Nikolay Borisov <nborisov(a)suse.com>
btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device
Hans van Kranenburg <hans.van.kranenburg(a)mendix.com>
btrfs: alloc_chunk: fix DUP stripe size handling
Edmund Nadolski <enadolski(a)suse.com>
btrfs: add missing initialization in btrfs_check_shared
Dmitriy Gorokh <Dmitriy.Gorokh(a)wdc.com>
btrfs: Fix NULL pointer exception in find_bio_stripe
Amir Goldstein <amir73il(a)gmail.com>
xfs: preserve i_rdev when recycling a reclaimable inode
Israel Rukshin <israelr(a)mellanox.com>
nvme: fix subsystem multiple controllers support check
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis
Tejun Heo <tj(a)kernel.org>
RDMAVT: Fix synchronization around percpu_ref
Tejun Heo <tj(a)kernel.org>
fs/aio: Use RCU accessors for kioctx_table->table[]
Tejun Heo <tj(a)kernel.org>
fs/aio: Add explicit RCU grace period when freeing kioctx
Al Viro <viro(a)zeniv.linux.org.uk>
lock_parent() needs to recheck if dentry got __dentry_kill'ed under it
Marc Zyngier <marc.zyngier(a)arm.com>
KVM: arm/arm64: vgic: Don't populate multiple LRs with the same vintid
Marc Zyngier <marc.zyngier(a)arm.com>
kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3
Christoffer Dall <cdall(a)kernel.org>
KVM: arm/arm64: Reset mapped IRQs on VM reset
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
KVM: arm/arm64: Reduce verbosity of KVM init log
Eric W. Biederman <ebiederm(a)xmission.com>
fs: Teach path_connected to handle nfs filesystems with multiple roots.
Michel Dänzer <michel.daenzer(a)amd.com>
drm/amdgpu/dce: Don't turn off DP sink when disconnected
Christian König <christian.koenig(a)amd.com>
drm/radeon: fix prime teardown order
Christian König <christian.koenig(a)amd.com>
drm/amdgpu: fix prime teardown order
Māris Nartišs <maris.nartiss(a)gmail.com>
drm/nouveau/mmu: ALIGN_DOWN correct variable
Lukas Wunner <lukas(a)wunner.de>
drm/nouveau/bl: Fix oops on driver unbind
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Clear client entry before deleting else at closing
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Fix possible UAF in snd_seq_check_queue()
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda - Revert power_save option default value
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats()
John David Anglin <dave.anglin(a)bell.net>
parisc: Handle case where flush_cache_range is called with no context
Toshi Kani <toshi.kani(a)hpe.com>
x86/mm: Fix vmalloc_fault to use pXd_large
Tom Lendacky <thomas.lendacky(a)amd.com>
KVM: x86: Fix device passthrough when SME is active
Alexander Sergeyev <sergeev917(a)gmail.com>
x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist
Andy Whitcroft <apw(a)canonical.com>
x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels
Andy Lutomirski <luto(a)kernel.org>
x86/vm86/32: Fix POPF emulation
Andy Lutomirski <luto(a)kernel.org>
selftests/x86/entry_from_vm86: Add test cases for POPF
Andy Lutomirski <luto(a)kernel.org>
selftests/x86/entry_from_vm86: Exit with 1 if we fail
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
x86/cpufeatures: Add Intel PCONFIG cpufeature
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
x86/cpufeatures: Add Intel Total Memory Encryption cpufeature
-------------
Diffstat:
Documentation/devicetree/bindings/usb/dwc2.txt | 2 +-
Makefile | 4 +-
arch/parisc/kernel/cache.c | 41 +++++++++---
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/include/asm/nospec-branch.h | 5 +-
arch/x86/kernel/cpu/intel.c | 3 +-
arch/x86/kernel/vm86_32.c | 3 +-
arch/x86/kvm/mmu.c | 4 +-
arch/x86/mm/fault.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 31 ++++-----
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 -
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +
drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 +-
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +-
drivers/gpu/drm/radeon/radeon_gem.c | 2 -
drivers/gpu/drm/radeon/radeon_object.c | 2 +
drivers/infiniband/sw/rdmavt/mr.c | 10 +--
drivers/irqchip/irq-gic-v3-its.c | 9 ++-
drivers/nvme/host/core.c | 18 +++++-
drivers/phy/broadcom/phy-brcm-usb-init.c | 22 +++----
drivers/phy/broadcom/phy-brcm-usb.c | 4 +-
drivers/scsi/qla2xxx/qla_init.c | 13 ++--
drivers/scsi/qla2xxx/qla_mid.c | 6 +-
drivers/scsi/qla2xxx/qla_os.c | 59 ++++++++++-------
drivers/scsi/qla2xxx/qla_target.c | 1 +
drivers/usb/dwc2/params.c | 6 +-
drivers/usb/dwc3/core.c | 36 ++++++-----
drivers/usb/dwc3/core.h | 16 ++---
drivers/usb/dwc3/dwc3-of-simple.c | 1 +
drivers/usb/gadget/udc/bdc/bdc_pci.c | 1 +
drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
fs/aio.c | 44 ++++++++-----
fs/btrfs/backref.c | 12 +++-
fs/btrfs/raid56.c | 1 +
fs/btrfs/volumes.c | 30 ++++++---
fs/btrfs/volumes.h | 12 ++++
fs/dcache.c | 11 +++-
fs/namei.c | 5 +-
fs/nfs/super.c | 2 +
fs/xfs/xfs_icache.c | 2 +
include/kvm/arm_vgic.h | 1 +
include/linux/fs.h | 1 +
include/linux/irqchip/arm-gic-v3.h | 1 +
include/linux/irqchip/arm-gic.h | 1 +
sound/core/oss/pcm_oss.c | 10 +--
sound/core/seq/seq_clientmgr.c | 4 +-
sound/core/seq/seq_prioq.c | 28 ++++-----
sound/core/seq/seq_prioq.h | 6 +-
sound/core/seq/seq_queue.c | 28 +++------
sound/pci/hda/hda_intel.c | 9 ++-
tools/testing/selftests/x86/entry_from_vm86.c | 32 ++++++++--
virt/kvm/arm/arch_timer.c | 6 +-
virt/kvm/arm/hyp/vgic-v3-sr.c | 3 +-
virt/kvm/arm/mmu.c | 6 +-
virt/kvm/arm/vgic/vgic-v2.c | 11 +++-
virt/kvm/arm/vgic/vgic-v3.c | 9 ++-
virt/kvm/arm/vgic/vgic.c | 87 +++++++++++++++++++++-----
virt/kvm/arm/vgic/vgic.h | 2 +
58 files changed, 461 insertions(+), 222 deletions(-)
This is the start of the stable review cycle for the 4.14.29 release.
There are 41 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed Mar 21 18:07:09 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.29-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.29-rc1
Thinh Nguyen <Thinh.Nguyen(a)synopsys.com>
usb: dwc3: Fix GDBGFIFOSPACE_TYPE values
Wei Yongjun <weiyongjun1(a)huawei.com>
USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
Bill Kuzeja <William.Kuzeja(a)stratus.com>
scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure
Himanshu Madhani <hmadhani(a)redhat.com>
scsi: qla2xxx: Fix logo flag for qlt_free_session_done()
Quinn Tran <quinn.tran(a)cavium.com>
scsi: qla2xxx: Fix NULL pointer access for fcport structure
Himanshu Madhani <himanshu.madhani(a)cavium.com>
scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que
Nikolay Borisov <nborisov(a)suse.com>
btrfs: Fix memory barriers usage with device stats counters
Zygo Blaxell <ce3g8jdj(a)umail.furryterror.org>
btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes
Nikolay Borisov <nborisov(a)suse.com>
btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device
Hans van Kranenburg <hans.van.kranenburg(a)mendix.com>
btrfs: alloc_chunk: fix DUP stripe size handling
Edmund Nadolski <enadolski(a)suse.com>
btrfs: add missing initialization in btrfs_check_shared
Dmitriy Gorokh <Dmitriy.Gorokh(a)wdc.com>
btrfs: Fix NULL pointer exception in find_bio_stripe
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis
Tejun Heo <tj(a)kernel.org>
RDMAVT: Fix synchronization around percpu_ref
Tejun Heo <tj(a)kernel.org>
fs/aio: Use RCU accessors for kioctx_table->table[]
Tejun Heo <tj(a)kernel.org>
fs/aio: Add explicit RCU grace period when freeing kioctx
Al Viro <viro(a)zeniv.linux.org.uk>
lock_parent() needs to recheck if dentry got __dentry_kill'ed under it
Marc Zyngier <marc.zyngier(a)arm.com>
KVM: arm/arm64: vgic: Don't populate multiple LRs with the same vintid
Marc Zyngier <marc.zyngier(a)arm.com>
kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
KVM: arm/arm64: Reduce verbosity of KVM init log
Eric W. Biederman <ebiederm(a)xmission.com>
fs: Teach path_connected to handle nfs filesystems with multiple roots.
Michel Dänzer <michel.daenzer(a)amd.com>
drm/amdgpu/dce: Don't turn off DP sink when disconnected
Christian König <christian.koenig(a)amd.com>
drm/radeon: fix prime teardown order
Christian König <christian.koenig(a)amd.com>
drm/amdgpu: fix prime teardown order
Lukas Wunner <lukas(a)wunner.de>
drm/nouveau/bl: Fix oops on driver unbind
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Clear client entry before deleting else at closing
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Fix possible UAF in snd_seq_check_queue()
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda - Revert power_save option default value
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats()
John David Anglin <dave.anglin(a)bell.net>
parisc: Handle case where flush_cache_range is called with no context
Toshi Kani <toshi.kani(a)hpe.com>
x86/mm: Fix vmalloc_fault to use pXd_large
Tom Lendacky <thomas.lendacky(a)amd.com>
KVM: x86: Fix device passthrough when SME is active
Alexander Sergeyev <sergeev917(a)gmail.com>
x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist
Andy Whitcroft <apw(a)canonical.com>
x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels
Andy Lutomirski <luto(a)kernel.org>
x86/vm86/32: Fix POPF emulation
Andy Lutomirski <luto(a)kernel.org>
selftests/x86/entry_from_vm86: Add test cases for POPF
Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
selftests/x86: Add tests for the STR and SLDT instructions
Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
selftests/x86: Add tests for User-Mode Instruction Prevention
Andy Lutomirski <luto(a)kernel.org>
selftests/x86/entry_from_vm86: Exit with 1 if we fail
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
x86/cpufeatures: Add Intel PCONFIG cpufeature
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
x86/cpufeatures: Add Intel Total Memory Encryption cpufeature
-------------
Diffstat:
Makefile | 4 +-
arch/parisc/kernel/cache.c | 41 +++++++--
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/include/asm/nospec-branch.h | 5 +-
arch/x86/kernel/cpu/intel.c | 3 +-
arch/x86/kernel/vm86_32.c | 3 +-
arch/x86/kvm/mmu.c | 4 +-
arch/x86/mm/fault.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 31 +++----
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 -
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +
drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 +-
drivers/gpu/drm/radeon/radeon_gem.c | 2 -
drivers/gpu/drm/radeon/radeon_object.c | 2 +
drivers/infiniband/sw/rdmavt/mr.c | 10 ++-
drivers/irqchip/irq-gic-v3-its.c | 9 +-
drivers/scsi/qla2xxx/qla_init.c | 13 ++-
drivers/scsi/qla2xxx/qla_mid.c | 6 +-
drivers/scsi/qla2xxx/qla_os.c | 59 ++++++++-----
drivers/scsi/qla2xxx/qla_target.c | 1 +
drivers/usb/dwc3/core.h | 16 ++--
drivers/usb/gadget/udc/bdc/bdc_pci.c | 1 +
fs/aio.c | 44 +++++++---
fs/btrfs/backref.c | 12 ++-
fs/btrfs/raid56.c | 1 +
fs/btrfs/volumes.c | 30 +++++--
fs/btrfs/volumes.h | 12 +++
fs/dcache.c | 11 ++-
fs/namei.c | 5 +-
fs/nfs/super.c | 2 +
include/linux/fs.h | 1 +
include/linux/irqchip/arm-gic-v3.h | 1 +
include/linux/irqchip/arm-gic.h | 1 +
sound/core/oss/pcm_oss.c | 10 ++-
sound/core/seq/seq_clientmgr.c | 4 +-
sound/core/seq/seq_prioq.c | 28 +++---
sound/core/seq/seq_prioq.h | 6 +-
sound/core/seq/seq_queue.c | 28 ++----
sound/pci/hda/hda_intel.c | 9 +-
tools/testing/selftests/x86/entry_from_vm86.c | 117 ++++++++++++++++++++++++-
virt/kvm/arm/arch_timer.c | 2 +-
virt/kvm/arm/hyp/vgic-v3-sr.c | 3 +-
virt/kvm/arm/mmu.c | 6 +-
virt/kvm/arm/vgic/vgic-v2.c | 11 ++-
virt/kvm/arm/vgic/vgic-v3.c | 9 +-
virt/kvm/arm/vgic/vgic.c | 61 ++++++++++---
virt/kvm/arm/vgic/vgic.h | 2 +
47 files changed, 456 insertions(+), 186 deletions(-)
On Tue, Mar 20, 2018 at 05:50:27PM +0000, Harsh Shandilya wrote:
> On Tue 20 Mar, 2018, 2:14 AM Greg Kroah-Hartman, <gregkh(a)linuxfoundation.org>
> wrote:
>
> > This is the start of the stable review cycle for the 3.18.101 release.
> > There are 68 patches in this series, all will be posted as a response
> > to this one. If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Wed Mar 21 17:17:59 UTC 2018.
> > Anything received after that time might be too late.
> >
> > The whole patch series can be found in one patch at:
> >
> > https://www.kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.18.101-r…
> > or in the git tree and branch at:
> > git://
> > git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> > linux-3.18.y
> > and the diffstat can be found below.
> >
>
> No merge issues with the CAF msm-3.18 tree, no regressions noticed on the
> OnePlus3T.
Wonderful, thanks for testing and letting me know.
greg k-h
Sehr geehrte Damen und Herren,
nach unserem Besuch Ihrer Homepage möchten wir Ihnen ein Angebot von Produkten vorstellen, das Ihnen ermöglichen wird, den Verkauf Ihrer Produkte sowie Dienstleistungen deutlich zu erhöhen.
Ich biete Ihnen den ganz neuen Adressenkatalog der Österreicher Unternehmen an, in dem sich direkte Kontaktdaten der Firmeninhaber und Manager befinden.
Die Datenbanken der Firmen sind in für Sie interessante und relevante Zielgruppen untergliedert.
Die Firmenangaben beinhalten:
Name der Firma, Ansprechpartner, E-mail Adresse, Tel. + Fax-Nr., PLZ, Ort, Straße etc.
***
1. Österreich 2018 ( 104 000 ) - 149 EUR ( bis zum 21.03.2018 )
***
Die Verwendungsmöglichkeiten der Datenbanken sind praktisch unbegrenzt und Sie können durch Verwendung
der von uns entwickelten Programme des personalisierten Versendens von Angeboten u.ä. mittels
E-mailing bzw. Fax effektive und sichere Werbekampagnen damit durchführen.
Bitte informieren Sie sich über die weiteren Details einmal unverbindlich auf unseren Webseite:
http://www.gbcdb.net/?page=catalog
MfG
Thomas Stein
http://www.gbcdb.net/?page=catalog
From: Jeremy Boone <jeremy.boone(a)nccgroup.trust>
commit 3be23274755ee85771270a23af7691dc9b3a95db upstream
Discrete TPMs are often connected over slow serial buses which, on
some platforms, can have glitches causing bit flips. If a bit does
flip it could cause an overrun if it's in one of the size parameters,
so sanity check that we're not overrunning the provided buffer when
doing a memcpy().
Signed-off-by: Jeremy Boone <jeremy.boone(a)nccgroup.trust>
Cc: stable(a)vger.kernel.org
Signed-off-by: James Bottomley <James.Bottomley(a)HansenPartnership.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
---
Backported to v4.9
v2: fixed the upstream ID
drivers/char/tpm/tpm-interface.c | 5 +++++
drivers/char/tpm/tpm2-cmd.c | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index d0ac2d56520f..830d7e30e508 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -1078,6 +1078,11 @@ int tpm_get_random(u32 chip_num, u8 *out, size_t max)
break;
recd = be32_to_cpu(tpm_cmd.params.getrandom_out.rng_data_len);
+ if (recd > num_bytes) {
+ total = -EFAULT;
+ break;
+ }
+
memcpy(dest, tpm_cmd.params.getrandom_out.rng_data, recd);
dest += recd;
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 17896d654033..a5780ebe15ef 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -668,6 +668,11 @@ static int tpm2_unseal_cmd(struct tpm_chip *chip,
if (!rc) {
data_len = be16_to_cpup(
(__be16 *) &buf.data[TPM_HEADER_SIZE + 4]);
+ if (data_len < MIN_KEY_SIZE || data_len > MAX_KEY_SIZE + 1) {
+ rc = -EFAULT;
+ goto out;
+ }
+
data = &buf.data[TPM_HEADER_SIZE + 6];
memcpy(payload->key, data, data_len - 1);
@@ -675,6 +680,7 @@ static int tpm2_unseal_cmd(struct tpm_chip *chip,
payload->migratable = data[data_len - 1];
}
+out:
tpm_buf_destroy(&buf);
return rc;
}
--
2.15.1
From: Jeremy Boone <jeremy.boone(a)nccgroup.trust>
commit 3be23274755ee85771270a23af7691dc9b3a95db upstream
Discrete TPMs are often connected over slow serial buses which, on
some platforms, can have glitches causing bit flips. If a bit does
flip it could cause an overrun if it's in one of the size parameters,
so sanity check that we're not overrunning the provided buffer when
doing a memcpy().
Signed-off-by: Jeremy Boone <jeremy.boone(a)nccgroup.trust>
Cc: stable(a)vger.kernel.org
Signed-off-by: James Bottomley <James.Bottomley(a)HansenPartnership.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
---
Backported to v4.4.
v2: fixed the upstream ID
drivers/char/tpm/tpm-interface.c | 5 +++++
drivers/char/tpm/tpm2-cmd.c | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index aaa5fa95dede..36afc1a21699 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -1040,6 +1040,11 @@ int tpm_get_random(u32 chip_num, u8 *out, size_t max)
break;
recd = be32_to_cpu(tpm_cmd.params.getrandom_out.rng_data_len);
+ if (recd > num_bytes) {
+ total = -EFAULT;
+ break;
+ }
+
memcpy(dest, tpm_cmd.params.getrandom_out.rng_data, recd);
dest += recd;
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 286bd090a488..389a009b83f2 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -622,6 +622,11 @@ static int tpm2_unseal_cmd(struct tpm_chip *chip,
if (!rc) {
data_len = be16_to_cpup(
(__be16 *) &buf.data[TPM_HEADER_SIZE + 4]);
+ if (data_len < MIN_KEY_SIZE || data_len > MAX_KEY_SIZE + 1) {
+ rc = -EFAULT;
+ goto out;
+ }
+
data = &buf.data[TPM_HEADER_SIZE + 6];
memcpy(payload->key, data, data_len - 1);
@@ -629,6 +634,7 @@ static int tpm2_unseal_cmd(struct tpm_chip *chip,
payload->migratable = data[data_len - 1];
}
+out:
tpm_buf_destroy(&buf);
return rc;
}
--
2.15.1
Tree/Branch: v3.2.101
Git describe: v3.2.101
Commit: 68f705428e Linux 3.2.101
Build Time: 0 min 4 sec
Passed: 0 / 5 ( 0.00 %)
Failed: 5 / 5 (100.00 %)
Errors: 6
Warnings: 20
Section Mismatches: 0
Failed defconfigs:
x86_64-allnoconfig
arm-allmodconfig
arm-allnoconfig
x86_64-allmodconfig
x86_64-defconfig
Errors:
x86_64-allnoconfig
/home/broonie/build/linux-stable/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
/home/broonie/build/linux-stable/kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
arm-allnoconfig
/home/broonie/build/linux-stable/arch/arm/include/asm/div64.h:77:7: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function)
/home/broonie/build/linux-stable/arch/arm/include/asm/glue-cache.h:129:2: error: #error Unknown cache maintenance model
/home/broonie/build/linux-stable/arch/arm/include/asm/glue-df.h:107:2: error: #error Unknown data abort handler type
/home/broonie/build/linux-stable/arch/arm/include/asm/glue-pf.h:54:2: error: #error Unknown prefetch abort handler type
x86_64-allmodconfig
/home/broonie/build/linux-stable/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
/home/broonie/build/linux-stable/kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
x86_64-defconfig
/home/broonie/build/linux-stable/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
/home/broonie/build/linux-stable/kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
2 warnings 0 mismatches : arm-allmodconfig
19 warnings 0 mismatches : arm-allnoconfig
-------------------------------------------------------------------------------
Errors summary: 6
3 /home/broonie/build/linux-stable/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
3 /home/broonie/build/linux-stable/kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
1 /home/broonie/build/linux-stable/arch/arm/include/asm/glue-pf.h:54:2: error: #error Unknown prefetch abort handler type
1 /home/broonie/build/linux-stable/arch/arm/include/asm/glue-df.h:107:2: error: #error Unknown data abort handler type
1 /home/broonie/build/linux-stable/arch/arm/include/asm/glue-cache.h:129:2: error: #error Unknown cache maintenance model
1 /home/broonie/build/linux-stable/arch/arm/include/asm/div64.h:77:7: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function)
Warnings Summary: 20
2 .config:27:warning: symbol value '' invalid for PHYS_OFFSET
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:342:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:272:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:265:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:131:35: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:127:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:121:3: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:120:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/system.h:114:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/swab.h:25:28: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/processor.h:82:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/processor.h:102:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/irqflags.h:11:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/fpstate.h:32:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/cachetype.h:33:7: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/cachetype.h:28:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/cacheflush.h:196:7: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/cacheflush.h:194:7: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/bitops.h:217:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 /home/broonie/build/linux-stable/arch/arm/include/asm/atomic.h:30:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
x86_64-allnoconfig : FAIL, 2 errors, 0 warnings, 0 section mismatches
Errors:
/home/broonie/build/linux-stable/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
/home/broonie/build/linux-stable/kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 0 errors, 2 warnings, 0 section mismatches
Warnings:
.config:27:warning: symbol value '' invalid for PHYS_OFFSET
.config:27:warning: symbol value '' invalid for PHYS_OFFSET
-------------------------------------------------------------------------------
arm-allnoconfig : FAIL, 4 errors, 19 warnings, 0 section mismatches
Errors:
/home/broonie/build/linux-stable/arch/arm/include/asm/div64.h:77:7: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function)
/home/broonie/build/linux-stable/arch/arm/include/asm/glue-cache.h:129:2: error: #error Unknown cache maintenance model
/home/broonie/build/linux-stable/arch/arm/include/asm/glue-df.h:107:2: error: #error Unknown data abort handler type
/home/broonie/build/linux-stable/arch/arm/include/asm/glue-pf.h:54:2: error: #error Unknown prefetch abort handler type
Warnings:
/home/broonie/build/linux-stable/arch/arm/include/asm/irqflags.h:11:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:114:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:120:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:121:3: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:127:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:131:35: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:265:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:272:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/system.h:342:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/bitops.h:217:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/swab.h:25:28: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/fpstate.h:32:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/processor.h:82:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/processor.h:102:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/atomic.h:30:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/cachetype.h:28:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/cachetype.h:33:7: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/cacheflush.h:194:7: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
/home/broonie/build/linux-stable/arch/arm/include/asm/cacheflush.h:196:7: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
-------------------------------------------------------------------------------
x86_64-allmodconfig : FAIL, 2 errors, 0 warnings, 0 section mismatches
Errors:
/home/broonie/build/linux-stable/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
/home/broonie/build/linux-stable/kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
-------------------------------------------------------------------------------
x86_64-defconfig : FAIL, 2 errors, 0 warnings, 0 section mismatches
Errors:
/home/broonie/build/linux-stable/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
/home/broonie/build/linux-stable/kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
Tree/Branch: v3.16.56
Git describe: v3.16.56
Commit: a413cc78bc Linux 3.16.56
Build Time: 29 min 33 sec
Passed: 8 / 8 (100.00 %)
Failed: 0 / 8 ( 0.00 %)
Errors: 0
Warnings: 4
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
1 warnings 0 mismatches : x86_64-allnoconfig
1 warnings 0 mismatches : arm64-allmodconfig
1 warnings 0 mismatches : x86_64-defconfig
2 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Warnings Summary: 4
2 ../ipc/sem.c:377:6: warning: '___p1' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../drivers/platform/x86/eeepc-laptop.c:279:10: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1346:17: warning: unused variable 'kdev' [-Wunused-variable]
1 ../arch/x86/kernel/cpu/common.c:1032:13: warning: 'syscall32_cpu_init' defined but not used [-Wunused-function]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
x86_64-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../arch/x86/kernel/cpu/common.c:1032:13: warning: 'syscall32_cpu_init' defined but not used [-Wunused-function]
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1346:17: warning: unused variable 'kdev' [-Wunused-variable]
-------------------------------------------------------------------------------
x86_64-defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/platform/x86/eeepc-laptop.c:279:10: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../ipc/sem.c:377:6: warning: '___p1' may be used uninitialized in this function [-Wmaybe-uninitialized]
../ipc/sem.c:377:6: warning: '___p1' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm-multi_v7_defconfig
arm-allnoconfig
arm-multi_v5_defconfig
The patch titled
Subject: mm/hmm: hmm_pfns_bad() was accessing wrong struct
has been added to the -mm tree. Its filename is
mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-hmm-hmm_pfns_bad-was-accessing-…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-hmm-hmm_pfns_bad-was-accessing-…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Jérôme Glisse <jglisse(a)redhat.com>
Subject: mm/hmm: hmm_pfns_bad() was accessing wrong struct
The private field of mm_walk struct point to an hmm_vma_walk struct and
not to the hmm_range struct desired. Fix to get proper struct pointer.
Link: http://lkml.kernel.org/r/20180320020038.3360-6-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse(a)redhat.com>
Cc: Evgeny Baskakov <ebaskakov(a)nvidia.com>
Cc: Ralph Campbell <rcampbell(a)nvidia.com>
Cc: Mark Hairgrove <mhairgrove(a)nvidia.com>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: Balbir Singh <bsingharora(a)gmail.com>
Cc: Jason Gunthorpe <jgg(a)mellanox.com>
Cc: Logan Gunthorpe <logang(a)deltatee.com>
Cc: Stephen Bates <sbates(a)raithlin.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
diff -puN mm/hmm.c~mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct mm/hmm.c
--- a/mm/hmm.c~mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct
+++ a/mm/hmm.c
@@ -312,7 +312,8 @@ static int hmm_pfns_bad(unsigned long ad
unsigned long end,
struct mm_walk *walk)
{
- struct hmm_range *range = walk->private;
+ struct hmm_vma_walk *hmm_vma_walk = walk->private;
+ struct hmm_range *range = hmm_vma_walk->range;
hmm_pfn_t *pfns = range->pfns;
unsigned long i;
_
Patches currently in -mm which might be from jglisse(a)redhat.com are
mm-hmm-fix-header-file-if-else-endif-maze-v2.patch
mm-hmm-unregister-mmu_notifier-when-last-hmm-client-quit.patch
mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct.patch
mm-hmm-use-struct-for-hmm_vma_fault-hmm_vma_get_pfns-parameters-v2.patch
mm-hmm-remove-hmm_pfn_read-flag-and-ignore-peculiar-architecture-v2.patch
mm-hmm-use-uint64_t-for-hmm-pfn-instead-of-defining-hmm_pfn_t-to-ulong-v2.patch
mm-hmm-cleanup-special-vma-handling-vm_special.patch
mm-hmm-do-not-differentiate-between-empty-entry-or-missing-directory-v2.patch
mm-hmm-rename-hmm_pfn_device_unaddressable-to-hmm_pfn_device_private.patch
mm-hmm-move-hmm_pfns_clear-closer-to-where-it-is-use.patch
mm-hmm-factor-out-pte-and-pmd-handling-to-simplify-hmm_vma_walk_pmd.patch
mm-hmm-change-hmm_vma_fault-to-allow-write-fault-on-page-basis.patch
mm-hmm-use-device-driver-encoding-for-hmm-pfn-v2.patch
The patch titled
Subject: mm/hmm: HMM should have a callback before MM is destroyed v2
has been added to the -mm tree. Its filename is
mm-hmm-hmm-should-have-a-callback-before-mm-is-destroyed-v2.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-hmm-hmm-should-have-a-callback-…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-hmm-hmm-should-have-a-callback-…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Ralph Campbell <rcampbell(a)nvidia.com>
Subject: mm/hmm: HMM should have a callback before MM is destroyed v2
The hmm_mirror_register() function registers a callback for when the CPU
pagetable is modified. Normally, the device driver will call
hmm_mirror_unregister() when the process using the device is finished.
However, if the process exits uncleanly, the struct_mm can be destroyed
with no warning to the device driver.
Link: http://lkml.kernel.org/r/20180320020038.3360-4-jglisse@redhat.com
Signed-off-by: Ralph Campbell <rcampbell(a)nvidia.com>
Signed-off-by: Jérôme Glisse <jglisse(a)redhat.com>
Cc: Evgeny Baskakov <ebaskakov(a)nvidia.com>
Cc: Mark Hairgrove <mhairgrove(a)nvidia.com>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: Balbir Singh <bsingharora(a)gmail.com>
Cc: Jason Gunthorpe <jgg(a)mellanox.com>
Cc: Logan Gunthorpe <logang(a)deltatee.com>
Cc: Stephen Bates <sbates(a)raithlin.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
diff -puN include/linux/hmm.h~mm-hmm-hmm-should-have-a-callback-before-mm-is-destroyed-v2 include/linux/hmm.h
--- a/include/linux/hmm.h~mm-hmm-hmm-should-have-a-callback-before-mm-is-destroyed-v2
+++ a/include/linux/hmm.h
@@ -218,6 +218,16 @@ enum hmm_update_type {
* @update: callback to update range on a device
*/
struct hmm_mirror_ops {
+ /* release() - release hmm_mirror
+ *
+ * @mirror: pointer to struct hmm_mirror
+ *
+ * This is called when the mm_struct is being released.
+ * The callback should make sure no references to the mirror occur
+ * after the callback returns.
+ */
+ void (*release)(struct hmm_mirror *mirror);
+
/* sync_cpu_device_pagetables() - synchronize page tables
*
* @mirror: pointer to struct hmm_mirror
diff -puN mm/hmm.c~mm-hmm-hmm-should-have-a-callback-before-mm-is-destroyed-v2 mm/hmm.c
--- a/mm/hmm.c~mm-hmm-hmm-should-have-a-callback-before-mm-is-destroyed-v2
+++ a/mm/hmm.c
@@ -160,6 +160,21 @@ static void hmm_invalidate_range(struct
up_read(&hmm->mirrors_sem);
}
+static void hmm_release(struct mmu_notifier *mn, struct mm_struct *mm)
+{
+ struct hmm *hmm = mm->hmm;
+ struct hmm_mirror *mirror;
+ struct hmm_mirror *mirror_next;
+
+ down_write(&hmm->mirrors_sem);
+ list_for_each_entry_safe(mirror, mirror_next, &hmm->mirrors, list) {
+ list_del_init(&mirror->list);
+ if (mirror->ops->release)
+ mirror->ops->release(mirror);
+ }
+ up_write(&hmm->mirrors_sem);
+}
+
static void hmm_invalidate_range_start(struct mmu_notifier *mn,
struct mm_struct *mm,
unsigned long start,
@@ -185,6 +200,7 @@ static void hmm_invalidate_range_end(str
}
static const struct mmu_notifier_ops hmm_mmu_notifier_ops = {
+ .release = hmm_release,
.invalidate_range_start = hmm_invalidate_range_start,
.invalidate_range_end = hmm_invalidate_range_end,
};
@@ -230,7 +246,7 @@ void hmm_mirror_unregister(struct hmm_mi
struct hmm *hmm = mirror->hmm;
down_write(&hmm->mirrors_sem);
- list_del(&mirror->list);
+ list_del_init(&mirror->list);
up_write(&hmm->mirrors_sem);
}
EXPORT_SYMBOL(hmm_mirror_unregister);
_
Patches currently in -mm which might be from rcampbell(a)nvidia.com are
mm-hmm-documentation-editorial-update-to-hmm-documentation.patch
mm-hmm-hmm-should-have-a-callback-before-mm-is-destroyed-v2.patch
The patch titled
Subject: mm/hmm: fix header file if/else/endif maze v2
has been added to the -mm tree. Its filename is
mm-hmm-fix-header-file-if-else-endif-maze-v2.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-hmm-fix-header-file-if-else-end…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-hmm-fix-header-file-if-else-end…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Jérôme Glisse <jglisse(a)redhat.com>
Subject: mm/hmm: fix header file if/else/endif maze v2
The #if/#else/#endif for IS_ENABLED(CONFIG_HMM) were wrong. Because of
this after multiple include there was multiple definition of both
hmm_mm_init() and hmm_mm_destroy() leading to build failure if HMM was
enabled (CONFIG_HMM set).
Link: http://lkml.kernel.org/r/20180320020038.3360-3-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse(a)redhat.com>
Acked-by: Balbir Singh <bsingharora(a)gmail.com>
Cc: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Ralph Campbell <rcampbell(a)nvidia.com>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: Evgeny Baskakov <ebaskakov(a)nvidia.com>
Cc: Jason Gunthorpe <jgg(a)mellanox.com>
Cc: Logan Gunthorpe <logang(a)deltatee.com>
Cc: Mark Hairgrove <mhairgrove(a)nvidia.com>
Cc: Stephen Bates <sbates(a)raithlin.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
diff -puN include/linux/hmm.h~mm-hmm-fix-header-file-if-else-endif-maze-v2 include/linux/hmm.h
--- a/include/linux/hmm.h~mm-hmm-fix-header-file-if-else-endif-maze-v2
+++ a/include/linux/hmm.h
@@ -498,23 +498,16 @@ struct hmm_device {
struct hmm_device *hmm_device_new(void *drvdata);
void hmm_device_put(struct hmm_device *hmm_device);
#endif /* CONFIG_DEVICE_PRIVATE || CONFIG_DEVICE_PUBLIC */
-#endif /* IS_ENABLED(CONFIG_HMM) */
/* Below are for HMM internal use only! Not to be used by device driver! */
-#if IS_ENABLED(CONFIG_HMM_MIRROR)
void hmm_mm_destroy(struct mm_struct *mm);
static inline void hmm_mm_init(struct mm_struct *mm)
{
mm->hmm = NULL;
}
-#else /* IS_ENABLED(CONFIG_HMM_MIRROR) */
-static inline void hmm_mm_destroy(struct mm_struct *mm) {}
-static inline void hmm_mm_init(struct mm_struct *mm) {}
-#endif /* IS_ENABLED(CONFIG_HMM_MIRROR) */
-
-
#else /* IS_ENABLED(CONFIG_HMM) */
static inline void hmm_mm_destroy(struct mm_struct *mm) {}
static inline void hmm_mm_init(struct mm_struct *mm) {}
+#endif /* IS_ENABLED(CONFIG_HMM) */
#endif /* LINUX_HMM_H */
_
Patches currently in -mm which might be from jglisse(a)redhat.com are
mm-hmm-fix-header-file-if-else-endif-maze-v2.patch
mm-hmm-unregister-mmu_notifier-when-last-hmm-client-quit.patch
mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct.patch
mm-hmm-use-struct-for-hmm_vma_fault-hmm_vma_get_pfns-parameters-v2.patch
mm-hmm-remove-hmm_pfn_read-flag-and-ignore-peculiar-architecture-v2.patch
mm-hmm-use-uint64_t-for-hmm-pfn-instead-of-defining-hmm_pfn_t-to-ulong-v2.patch
mm-hmm-cleanup-special-vma-handling-vm_special.patch
mm-hmm-do-not-differentiate-between-empty-entry-or-missing-directory-v2.patch
mm-hmm-rename-hmm_pfn_device_unaddressable-to-hmm_pfn_device_private.patch
mm-hmm-move-hmm_pfns_clear-closer-to-where-it-is-use.patch
mm-hmm-factor-out-pte-and-pmd-handling-to-simplify-hmm_vma_walk_pmd.patch
mm-hmm-change-hmm_vma_fault-to-allow-write-fault-on-page-basis.patch
mm-hmm-use-device-driver-encoding-for-hmm-pfn-v2.patch