The patch below was submitted to be applied to the 4.18-stable tree.
I fail to see how this patch meets the stable kernel rules as found at
Documentation/process/stable-kernel-rules.rst.
I could be totally wrong, and if so, please respond to
<stable(a)vger.kernel.org> and let me know why this patch should be
applied. Otherwise, it is now dropped from my patch queues, never to be
seen again.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 7288bde1f9df6c1475675419bdd7725ce84dec56 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd(a)arndb.de>
Date: Mon, 20 Aug 2018 23:37:50 +0200
Subject: [PATCH] x86: kvm: avoid unused variable warning
Removing one of the two accesses of the maxphyaddr variable led to
a harmless warning:
arch/x86/kvm/x86.c: In function 'kvm_set_mmio_spte_mask':
arch/x86/kvm/x86.c:6563:6: error: unused variable 'maxphyaddr' [-Werror=unused-variable]
Removing the #ifdef seems to be the nicest workaround, as it
makes the code look cleaner than adding another #ifdef.
Fixes: 28a1f3ac1d0c ("kvm: x86: Set highest physical address bits in non-present/reserved SPTEs")
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
Cc: stable(a)vger.kernel.org # L1TF
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f7dff0457846..14ee9a814888 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6576,14 +6576,12 @@ static void kvm_set_mmio_spte_mask(void)
/* Set the present bit. */
mask |= 1ull;
-#ifdef CONFIG_X86_64
/*
* If reserved bit is not supported, clear the present bit to disable
* mmio page fault.
*/
- if (maxphyaddr == 52)
+ if (IS_ENABLED(CONFIG_X86_64) && maxphyaddr == 52)
mask &= ~1ull;
-#endif
kvm_mmu_set_mmio_spte_mask(mask, mask);
}
This is the start of the stable review cycle for the 4.4.154 release.
There are 80 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 Sep 5 16:49:18 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.4.154-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.4.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.4.154-rc1
Scott Bauer <scott.bauer(a)intel.com>
cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
Mike Christie <mchristi(a)redhat.com>
iscsi target: fix session creation failure handling
Bart Van Assche <bart.vanassche(a)wdc.com>
scsi: core: Avoid that SCSI device removal through sysfs triggers a deadlock
Bart Van Assche <bart.vanassche(a)wdc.com>
scsi: sysfs: Introduce sysfs_{un,}break_active_protection()
Paul Burton <paul.burton(a)mips.com>
MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Correct the 64-bit DSP accumulator register size
Masami Hiramatsu <mhiramat(a)kernel.org>
kprobes: Make list and blacklist root user read only
Sebastian Ott <sebott(a)linux.ibm.com>
s390/pci: fix out of bounds access during irq setup
Julian Wiedmann <jwi(a)linux.ibm.com>
s390/qdio: reset old sbal_state flags
Martin Schwidefsky <schwidefsky(a)de.ibm.com>
s390: fix br_r1_trampoline for machines without exrl
Andi Kleen <ak(a)linux.intel.com>
x86/spectre: Add missing family 6 check to microcode check
Nick Desaulniers <ndesaulniers(a)google.com>
x86/irqflags: Mark native_restore_fl extern inline
Dan Carpenter <dan.carpenter(a)oracle.com>
pinctrl: freescale: off by one in imx1_pinconf_group_dbg_show()
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
ASoC: sirf: Fix potential NULL pointer dereference
Jerome Brunet <jbrunet(a)baylibre.com>
ASoC: dpcm: don't merge format from invalid codec dai
Mikulas Patocka <mpatocka(a)redhat.com>
udl-kms: fix crash due to uninitialized memory
Mikulas Patocka <mpatocka(a)redhat.com>
udl-kms: handle allocation failure
Mikulas Patocka <mpatocka(a)redhat.com>
udl-kms: change down_interruptible to down
Kirill Tkhai <ktkhai(a)virtuozzo.com>
fuse: Add missed unlock_page() to fuse_readpages_fill()
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: Fix oops at process_init_reply()
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: umount should wait for all requests
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: fix unlocked access to processing queue
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: fix double request_end()
Andrey Ryabinin <aryabinin(a)virtuozzo.com>
fuse: Don't access pipe->buffers without pipe_lock()
Rian Hunter <rian(a)alum.mit.edu>
x86/process: Re-export start_thread()
Vlastimil Babka <vbabka(a)suse.cz>
x86/speculation/l1tf: Suggest what to do on systems with too much RAM
Vlastimil Babka <vbabka(a)suse.cz>
x86/speculation/l1tf: Fix off-by-one error when warning that system has too much RAM
Vlastimil Babka <vbabka(a)suse.cz>
x86/speculation/l1tf: Fix overflow in l1tf_pfn_limit() on 32bit
Punit Agrawal <punit.agrawal(a)arm.com>
KVM: arm/arm64: Skip updating PMD entry if no change
Punit Agrawal <punit.agrawal(a)arm.com>
KVM: arm/arm64: Skip updating PTE entry if no change
Greg Hackmann <ghackmann(a)android.com>
arm64: mm: check for upper PAGE_SHIFT bits in pfn_valid()
Eric Sandeen <sandeen(a)redhat.com>
ext4: reset error code in ext4_find_entry in fallback
Arnd Bergmann <arnd(a)arndb.de>
ext4: sysfs: print ext4_super_block fields as little-endian
Theodore Ts'o <tytso(a)mit.edu>
ext4: check for NUL characters in extended attribute's name
Claudio Imbrenda <imbrenda(a)linux.vnet.ibm.com>
s390/kvm: fix deadlock when killed by oom
Josef Bacik <josef(a)toxicpanda.com>
btrfs: don't leak ret from do_chunk_alloc
Steve French <stfrench(a)microsoft.com>
smb3: don't request leases in symlink creation and query
Steve French <stfrench(a)microsoft.com>
smb3: Do not send SMB3 SET_INFO if nothing changed
Nicholas Mc Guire <hofrat(a)osadl.org>
cifs: check kmalloc before use
Steve French <stfrench(a)microsoft.com>
cifs: add missing debug entries for kconfig options
jie@chenjie6@huwei.com <jie@chenjie6@huwei.com>
mm/memory.c: check return value of ioremap_prot
Jim Gill <jgill(a)vmware.com>
scsi: vmw_pvscsi: Return DID_RESET for status SAM_STAT_COMMAND_TERMINATED
Johannes Thumshirn <jthumshirn(a)suse.de>
scsi: fcoe: drop frames in ELS LOGO error path
Colin Ian King <colin.king(a)canonical.com>
drivers: net: lmc: fix case value for target abort error
Randy Dunlap <rdunlap(a)infradead.org>
arc: fix type warnings in arc/mm/cache.c
Randy Dunlap <rdunlap(a)infradead.org>
arc: fix build errors in arc/include/asm/delay.h
Govindarajulu Varadarajan <gvaradar(a)cisco.com>
enic: handle mtu change for vf properly
Rafał Miłecki <rafal(a)milecki.pl>
Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum"
Calvin Walton <calvin.walton(a)kepstin.ca>
tools/power turbostat: Read extended processor family from CPUID
Li Wang <liwang(a)redhat.com>
zswap: re-check zswap_is_full() after do zswap_shrink()
Masami Hiramatsu <mhiramat(a)kernel.org>
selftests/ftrace: Add snapshot and tracing_on test case
Kiran Kumar Modukuri <kiran.modukuri(a)gmail.com>
cachefiles: Wait rather than BUG'ing on "Unexpected object collision"
Kiran Kumar Modukuri <kiran.modukuri(a)gmail.com>
cachefiles: Fix refcounting bug in backing-file read monitoring
Kiran Kumar Modukuri <kiran.modukuri(a)gmail.com>
fscache: Allow cancelled operations to be enqueued
Shubhrajyoti Datta <shubhrajyoti.datta(a)xilinx.com>
net: axienet: Fix double deregister of mdio
Sudarsana Reddy Kalluru <sudarsana.kalluru(a)cavium.com>
bnx2x: Fix invalid memory access in rss hash config path.
Guenter Roeck <linux(a)roeck-us.net>
media: staging: omap4iss: Include asm/cacheflush.h after generic includes
Alexander Sverdlin <alexander.sverdlin(a)nokia.com>
i2c: davinci: Avoid zero value of CLKH
Nicholas Mc Guire <hofrat(a)osadl.org>
can: mpc5xxx_can: check of_iomap return before use
Randy Dunlap <rdunlap(a)infradead.org>
net: prevent ISA drivers from building on PPC32
Florian Westphal <fw(a)strlen.de>
atl1c: reserve min skb headroom
Sudarsana Reddy Kalluru <sudarsana.kalluru(a)cavium.com>
qed: Fix possible race for the link state value.
YueHaibing <yuehaibing(a)huawei.com>
net: caif: Add a missing rcu_read_unlock() in caif_flow_cb
Len Brown <len.brown(a)intel.com>
tools/power turbostat: fix -S on UP systems
Eugeniu Rosca <roscaeugeniu(a)gmail.com>
usb: gadget: f_uac2: fix endianness of 'struct cntrl_*_lay3'
Peter Senna Tschudin <peter.senna(a)gmail.com>
tools: usb: ffs-test: Fix build on big endian systems
Randy Dunlap <rdunlap(a)infradead.org>
usb/phy: fix PPC64 build errors in phy-fsl-usb.c
Jia-Ju Bai <baijiaju1990(a)gmail.com>
usb: gadget: r8a66597: Fix a possible sleep-in-atomic-context bugs in r8a66597_queue()
Jia-Ju Bai <baijiaju1990(a)gmail.com>
usb: gadget: r8a66597: Fix two possible sleep-in-atomic-context bugs in init_controller()
Lucas Stach <l.stach(a)pengutronix.de>
drm/imx: imx-ldb: check if channel is enabled before printing warning
Lucas Stach <l.stach(a)pengutronix.de>
drm/imx: imx-ldb: disable LDB on driver bind
Varun Prakash <varun(a)chelsio.com>
scsi: libiscsi: fix possible NULL pointer dereference in case of TMF
Sean Paul <seanpaul(a)chromium.org>
drm/bridge: adv7511: Reset registers on hotplug
Bernd Edlinger <bernd.edlinger(a)hotmail.de>
nl80211: Add a missing break in parse_station_flags
mpubbise(a)codeaurora.org <mpubbise(a)codeaurora.org>
mac80211: add stations tied to AP_VLANs during hw reconfig
Florian Westphal <fw(a)strlen.de>
xfrm: free skb if nlsk pointer is NULL
Tommi Rantala <tommi.t.rantala(a)nokia.com>
xfrm: fix missing dst_release() after policy blocking lbcast and multicast
Eyal Birger <eyal.birger(a)gmail.com>
vti6: fix PMTU caching and reporting on xmit
yujuan.qi <yujuan.qi(a)mediatek.com>
Cipso: cipso_v4_optptr enter infinite loop
Ethan Zhao <ethan.zhao(a)oracle.com>
sched/sysctl: Check user input value of sysctl_sched_time_avg
-------------
Diffstat:
Makefile | 4 +-
arch/arc/include/asm/delay.h | 3 +
arch/arc/mm/cache.c | 7 +-
arch/arm/kvm/mmu.c | 42 +++++++++---
arch/arm64/mm/init.c | 6 +-
arch/mips/bcm47xx/setup.c | 6 --
arch/mips/include/asm/mipsregs.h | 3 -
arch/mips/include/asm/processor.h | 2 +-
arch/mips/kernel/ptrace.c | 2 +-
arch/mips/kernel/ptrace32.c | 2 +-
arch/mips/lib/multi3.c | 6 +-
arch/s390/include/asm/qdio.h | 1 -
arch/s390/mm/fault.c | 2 +
arch/s390/net/bpf_jit_comp.c | 2 -
arch/s390/pci/pci.c | 2 +
arch/x86/include/asm/irqflags.h | 3 +-
arch/x86/include/asm/processor.h | 4 +-
arch/x86/kernel/cpu/bugs.c | 4 ++
arch/x86/kernel/cpu/intel.c | 3 +
arch/x86/kernel/process_64.c | 1 +
arch/x86/mm/init.c | 4 +-
arch/x86/mm/mmap.c | 2 +-
drivers/cdrom/cdrom.c | 2 +-
drivers/gpu/drm/i2c/adv7511.c | 12 ++++
drivers/gpu/drm/imx/imx-ldb.c | 9 ++-
drivers/gpu/drm/udl/udl_fb.c | 2 +-
drivers/gpu/drm/udl/udl_main.c | 35 +++++-----
drivers/i2c/busses/i2c-davinci.c | 8 ++-
drivers/net/can/mscan/mpc5xxx_can.c | 5 ++
drivers/net/ethernet/3com/Kconfig | 2 +-
drivers/net/ethernet/amd/Kconfig | 4 +-
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 1 +
.../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 13 +++-
drivers/net/ethernet/cirrus/Kconfig | 1 +
drivers/net/ethernet/cisco/enic/enic_main.c | 78 ++++++++--------------
drivers/net/ethernet/qlogic/qed/qed_mcp.c | 1 +
drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 1 +
drivers/net/wan/lmc/lmc_main.c | 2 +-
drivers/pinctrl/freescale/pinctrl-imx1-core.c | 2 +-
drivers/s390/cio/qdio_main.c | 5 +-
drivers/scsi/fcoe/fcoe_ctlr.c | 4 +-
drivers/scsi/libiscsi.c | 12 ++--
drivers/scsi/scsi_sysfs.c | 20 +++++-
drivers/scsi/vmw_pvscsi.c | 11 ++-
drivers/staging/media/omap4iss/iss_video.c | 3 +-
drivers/target/iscsi/iscsi_target_login.c | 35 ++++++----
drivers/usb/gadget/function/f_uac2.c | 20 +++---
drivers/usb/gadget/udc/r8a66597-udc.c | 6 +-
drivers/usb/phy/phy-fsl-usb.c | 4 +-
fs/btrfs/extent-tree.c | 2 +-
fs/cachefiles/namei.c | 1 -
fs/cachefiles/rdwr.c | 17 +++--
fs/cifs/cifs_debug.c | 30 +++++++--
fs/cifs/inode.c | 2 +
fs/cifs/link.c | 4 +-
fs/cifs/sess.c | 6 ++
fs/cifs/smb2inode.c | 2 +-
fs/ext4/namei.c | 1 +
fs/ext4/sysfs.c | 13 +++-
fs/ext4/xattr.c | 2 +
fs/fscache/operation.c | 6 +-
fs/fuse/dev.c | 39 +++++++++--
fs/fuse/file.c | 1 +
fs/fuse/fuse_i.h | 1 +
fs/fuse/inode.c | 23 +++----
fs/sysfs/file.c | 44 ++++++++++++
include/linux/sysfs.h | 14 ++++
kernel/kprobes.c | 4 +-
kernel/sysctl.c | 3 +-
mm/memory.c | 3 +
mm/zswap.c | 9 +++
net/caif/caif_dev.c | 4 +-
net/ipv4/cipso_ipv4.c | 12 +++-
net/ipv6/ip6_vti.c | 11 +--
net/mac80211/util.c | 3 +-
net/wireless/nl80211.c | 1 +
net/xfrm/xfrm_policy.c | 3 +
net/xfrm/xfrm_user.c | 10 +--
sound/soc/sirf/sirf-usp.c | 7 +-
sound/soc/soc-pcm.c | 8 +++
tools/power/x86/turbostat/turbostat.c | 8 +--
.../selftests/ftrace/test.d/00basic/snapshot.tc | 28 ++++++++
tools/usb/ffs-test.c | 19 +++++-
83 files changed, 514 insertions(+), 236 deletions(-)
Hello - Two issues were reported to Ubuntu in the IRDA subsystem. IRDA is no
longer present in the upstream kernel as of 4.17 but the stable tree is
affected.
This patch set addresses the issues in 4.14 to 4.17.
Tyler
From: Randy Dunlap <rdunlap(a)infradead.org>
[ Upstream commit 914b087ff9e0e9a399a4927fa30793064afc0178 ]
When $DEPMOD is not found, only print a warning instead of exiting
with an error message and error status:
Warning: 'make modules_install' requires /sbin/depmod. Please install it.
This is probably in the kmod package.
Change the Error to a Warning because "not all build hosts for cross
compiling Linux are Linux systems and are able to provide a working
port of depmod, especially at the file patch /sbin/depmod."
I.e., "make modules_install" may be used to copy/install the
loadable modules files to a target directory on a build system and
then transferred to an embedded device where /sbin/depmod is run
instead of it being run on the build system.
Fixes: 934193a654c1 ("kbuild: verify that $DEPMOD is installed")
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Reported-by: H. Nikolaus Schaller <hns(a)goldelico.com>
Cc: stable(a)vger.kernel.org
Cc: Lucas De Marchi <lucas.demarchi(a)profusion.mobi>
Cc: Lucas De Marchi <lucas.de.marchi(a)gmail.com>
Cc: Michal Marek <michal.lkml(a)markovi.net>
Cc: Jessica Yu <jeyu(a)kernel.org>
Cc: Chih-Wei Huang <cwhuang(a)linux.org.tw>
Signed-off-by: Masahiro Yamada <yamada.masahiro(a)socionext.com>
Signed-off-by: Maxim Zhukov <mussitantesmortem(a)gmail.com>
---
scripts/depmod.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index ea1e96921e3b..baedaef53ca0 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -15,9 +15,9 @@ if ! test -r System.map ; then
fi
if [ -z $(command -v $DEPMOD) ]; then
- echo "'make modules_install' requires $DEPMOD. Please install it." >&2
+ echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
echo "This is probably in the kmod package." >&2
- exit 1
+ exit 0
fi
# older versions of depmod don't support -P <symbol-prefix>
--
2.19.0
From: Randy Dunlap <rdunlap(a)infradead.org>
[ Upstream commit 914b087ff9e0e9a399a4927fa30793064afc0178 ]
When $DEPMOD is not found, only print a warning instead of exiting
with an error message and error status:
Warning: 'make modules_install' requires /sbin/depmod. Please install it.
This is probably in the kmod package.
Change the Error to a Warning because "not all build hosts for cross
compiling Linux are Linux systems and are able to provide a working
port of depmod, especially at the file patch /sbin/depmod."
I.e., "make modules_install" may be used to copy/install the
loadable modules files to a target directory on a build system and
then transferred to an embedded device where /sbin/depmod is run
instead of it being run on the build system.
Fixes: 934193a654c1 ("kbuild: verify that $DEPMOD is installed")
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Reported-by: H. Nikolaus Schaller <hns(a)goldelico.com>
Cc: stable(a)vger.kernel.org
Cc: Lucas De Marchi <lucas.demarchi(a)profusion.mobi>
Cc: Lucas De Marchi <lucas.de.marchi(a)gmail.com>
Cc: Michal Marek <michal.lkml(a)markovi.net>
Cc: Jessica Yu <jeyu(a)kernel.org>
Cc: Chih-Wei Huang <cwhuang(a)linux.org.tw>
Signed-off-by: Masahiro Yamada <yamada.masahiro(a)socionext.com>
Signed-off-by: Maxim Zhukov <mussitantesmortem(a)gmail.com>
---
scripts/depmod.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index ea1e96921e3b..baedaef53ca0 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -15,9 +15,9 @@ if ! test -r System.map ; then
fi
if [ -z $(command -v $DEPMOD) ]; then
- echo "'make modules_install' requires $DEPMOD. Please install it." >&2
+ echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
echo "This is probably in the kmod package." >&2
- exit 1
+ exit 0
fi
# older versions of depmod don't support -P <symbol-prefix>
--
2.19.0
From: Randy Dunlap <rdunlap(a)infradead.org>
[ Upstream commit 914b087ff9e0e9a399a4927fa30793064afc0178 ]
When $DEPMOD is not found, only print a warning instead of exiting
with an error message and error status:
Warning: 'make modules_install' requires /sbin/depmod. Please install it.
This is probably in the kmod package.
Change the Error to a Warning because "not all build hosts for cross
compiling Linux are Linux systems and are able to provide a working
port of depmod, especially at the file patch /sbin/depmod."
I.e., "make modules_install" may be used to copy/install the
loadable modules files to a target directory on a build system and
then transferred to an embedded device where /sbin/depmod is run
instead of it being run on the build system.
Fixes: 934193a654c1 ("kbuild: verify that $DEPMOD is installed")
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Reported-by: H. Nikolaus Schaller <hns(a)goldelico.com>
Cc: stable(a)vger.kernel.org
Cc: Lucas De Marchi <lucas.demarchi(a)profusion.mobi>
Cc: Lucas De Marchi <lucas.de.marchi(a)gmail.com>
Cc: Michal Marek <michal.lkml(a)markovi.net>
Cc: Jessica Yu <jeyu(a)kernel.org>
Cc: Chih-Wei Huang <cwhuang(a)linux.org.tw>
Signed-off-by: Masahiro Yamada <yamada.masahiro(a)socionext.com>
Signed-off-by: Maxim Zhukov <mussitantesmortem(a)gmail.com>
---
scripts/depmod.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index ea1e96921e3b..baedaef53ca0 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -15,9 +15,9 @@ if ! test -r System.map ; then
fi
if [ -z $(command -v $DEPMOD) ]; then
- echo "'make modules_install' requires $DEPMOD. Please install it." >&2
+ echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
echo "This is probably in the kmod package." >&2
- exit 1
+ exit 0
fi
# older versions of depmod don't support -P <symbol-prefix>
--
2.19.0
From: Randy Dunlap <rdunlap(a)infradead.org>
[ Upstream commit 914b087ff9e0e9a399a4927fa30793064afc0178 ]
When $DEPMOD is not found, only print a warning instead of exiting
with an error message and error status:
Warning: 'make modules_install' requires /sbin/depmod. Please install it.
This is probably in the kmod package.
Change the Error to a Warning because "not all build hosts for cross
compiling Linux are Linux systems and are able to provide a working
port of depmod, especially at the file patch /sbin/depmod."
I.e., "make modules_install" may be used to copy/install the
loadable modules files to a target directory on a build system and
then transferred to an embedded device where /sbin/depmod is run
instead of it being run on the build system.
Fixes: 934193a654c1 ("kbuild: verify that $DEPMOD is installed")
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Reported-by: H. Nikolaus Schaller <hns(a)goldelico.com>
Cc: stable(a)vger.kernel.org
Cc: Lucas De Marchi <lucas.demarchi(a)profusion.mobi>
Cc: Lucas De Marchi <lucas.de.marchi(a)gmail.com>
Cc: Michal Marek <michal.lkml(a)markovi.net>
Cc: Jessica Yu <jeyu(a)kernel.org>
Cc: Chih-Wei Huang <cwhuang(a)linux.org.tw>
Signed-off-by: Masahiro Yamada <yamada.masahiro(a)socionext.com>
Signed-off-by: Maxim Zhukov <mussitantesmortem(a)gmail.com>
---
scripts/depmod.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index f41b0a4b575c..cf5b2b24b3cf 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -16,9 +16,9 @@ if ! test -r System.map ; then
fi
if [ -z $(command -v $DEPMOD) ]; then
- echo "'make modules_install' requires $DEPMOD. Please install it." >&2
+ echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
echo "This is probably in the kmod package." >&2
- exit 1
+ exit 0
fi
# older versions of depmod don't support -P <symbol-prefix>
--
2.19.0
The ceph_ioctl function is used both for files and directories, but only
the files support doing that in 32-bit compat mode.
For consistency, add the same compat handler to the dir operations
as well.
Cc: stable(a)vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
fs/ceph/dir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 82928cea0209..da73f29d7faa 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -1489,6 +1489,7 @@ const struct file_operations ceph_dir_fops = {
.open = ceph_open,
.release = ceph_release,
.unlocked_ioctl = ceph_ioctl,
+ .compat_ioctl = ceph_ioctl,
.fsync = ceph_fsync,
.lock = ceph_lock,
.flock = ceph_flock,
--
2.18.0
A transparent huge page is represented by a single entry on an LRU list.
Therefore, we can only make unevictable an entire compound page, not
individual subpages.
If a user tries to mlock() part of a huge page, we want the rest of the
page to be reclaimable.
We handle this by keeping PTE-mapped huge pages on normal LRU lists: the
PMD on border of VM_LOCKED VMA will be split into PTE table.
Introduction of THP migration breaks the rules around mlocking THP
pages. If we had a single PMD mapping of the page in mlocked VMA, the
page will get mlocked, regardless of PTE mappings of the page.
For tmpfs/shmem it's easy to fix by checking PageDoubleMap() in
remove_migration_pmd().
Anon THP pages can only be shared between processes via fork(). Mlocked
page can only be shared if parent mlocked it before forking, otherwise
CoW will be triggered on mlock().
For Anon-THP, we can fix the issue by munlocking the page on removing PTE
migration entry for the page. PTEs for the page will always come after
mlocked PMD: rmap walks VMAs from oldest to newest.
Test-case:
#include <unistd.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <linux/mempolicy.h>
#include <numaif.h>
int main(void)
{
unsigned long nodemask = 4;
void *addr;
addr = mmap((void *)0x20000000UL, 2UL << 20, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_LOCKED, -1, 0);
if (fork()) {
wait(NULL);
return 0;
}
mlock(addr, 4UL << 10);
mbind(addr, 2UL << 20, MPOL_PREFERRED | MPOL_F_RELATIVE_NODES,
&nodemask, 4, MPOL_MF_MOVE | MPOL_MF_MOVE_ALL);
return 0;
}
Signed-off-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Reported-by: Vegard Nossum <vegard.nossum(a)gmail.com>
Fixes: 616b8371539a ("mm: thp: enable thp migration in generic path")
Cc: <stable(a)vger.kernel.org> [v4.14+]
Cc: Zi Yan <zi.yan(a)cs.rutgers.edu>
Cc: Naoya Horiguchi <n-horiguchi(a)ah.jp.nec.com>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
---
mm/huge_memory.c | 2 +-
mm/migrate.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 533f9b00147d..00704060b7f7 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2931,7 +2931,7 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new)
else
page_add_file_rmap(new, true);
set_pmd_at(mm, mmun_start, pvmw->pmd, pmde);
- if (vma->vm_flags & VM_LOCKED)
+ if ((vma->vm_flags & VM_LOCKED) && !PageDoubleMap(new))
mlock_vma_page(new);
update_mmu_cache_pmd(vma, address, pvmw->pmd);
}
diff --git a/mm/migrate.c b/mm/migrate.c
index d6a2e89b086a..01dad96b25b5 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -275,6 +275,9 @@ static bool remove_migration_pte(struct page *page, struct vm_area_struct *vma,
if (vma->vm_flags & VM_LOCKED && !PageTransCompound(new))
mlock_vma_page(new);
+ if (PageTransCompound(new) && PageMlocked(page))
+ clear_page_mlock(page);
+
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, pvmw.address, pvmw.pte);
}
--
2.18.0
Upstream commit f7c90c2aa4004808dff777ba6ae2c7294dd06851
("x86/xen: don't write ptes directly in 32-bit PV guests") should be
considered for stable kernels from 4.14 up (I'll send backports for
older kernels when I know you are taking the patch).
The patch avoids 32-bit Xen PV guests creating intermediate L1TF
vulnerable PTEs.
Juergen
Upstream commit b2d7a075a1ccef2fb321d595802190c8e9b39004
("x86/pae: use 64 bit atomic xchg function in
native_ptep_get_and_clear") should be considered for stable kernels from
4.17 up (I'll send backports for older kernels when I know you are
taking the patch).
The patch seems not only to avoid intermediate L1TF vulnerable PTEs,
but there are reports of it fixing the issue mentioned in
https://bugzilla.kernel.org/show_bug.cgi?id=198497
Juergen
From: Adrian Hunter <adrian.hunter(a)intel.com>
Commit 1c5aae7710bb ("perf machine: Create maps for x86 PTI entry
trampolines") revealed a problem with maps__find_symbol_by_name() that
resulted in probes not being found e.g.
$ sudo perf probe xsk_mmap
xsk_mmap is out of .text, skip it.
Probe point 'xsk_mmap' not found.
Error: Failed to add events.
maps__find_symbol_by_name() can optionally return the map of the found
symbol. It can get the map wrong because, in fact, the symbol is found
on the map's dso, not allowing for the possibility that the dso has more
than one map. Fix by always checking the map contains the symbol.
Reported-by: Björn Töpel <bjorn.topel(a)intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter(a)intel.com>
Tested-by: Björn Töpel <bjorn.topel(a)intel.com>
Cc: Jiri Olsa <jolsa(a)redhat.com>
Cc: stable(a)vger.kernel.org
Fixes: 1c5aae7710bb ("perf machine: Create maps for x86 PTI entry trampolines")
Link: http://lkml.kernel.org/r/20180907085116.25782-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
---
tools/perf/util/map.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 36d0763311ef..6a6929f208b4 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -576,6 +576,13 @@ struct symbol *map_groups__find_symbol(struct map_groups *mg,
return NULL;
}
+static bool map__contains_symbol(struct map *map, struct symbol *sym)
+{
+ u64 ip = map->unmap_ip(map, sym->start);
+
+ return ip >= map->start && ip < map->end;
+}
+
struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name,
struct map **mapp)
{
@@ -591,6 +598,10 @@ struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name,
if (sym == NULL)
continue;
+ if (!map__contains_symbol(pos, sym)) {
+ sym = NULL;
+ continue;
+ }
if (mapp != NULL)
*mapp = pos;
goto out;
--
2.14.4
This is the start of the stable review cycle for the 4.4.143 release.
There are 31 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 Sun Jul 22 12:13:28 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.4.143-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.4.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.4.143-rc1
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
net/nfc: Avoid stalls when nfc_alloc_send_skb() returned NULL.
Santosh Shilimkar <santosh.shilimkar(a)oracle.com>
rds: avoid unenecessary cong_update in loop transport
Eric Biggers <ebiggers(a)google.com>
KEYS: DNS: fix parsing multiple options
Florian Westphal <fw(a)strlen.de>
netfilter: ebtables: reject non-bridge targets
Paul Burton <paul.burton(a)mips.com>
MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
Paul Burton <paul.burton(a)mips.com>
MIPS: Call dump_stack() from show_regs()
Ping-Ke Shih <pkshih(a)realtek.com>
rtlwifi: rtl8821ae: fix firmware is not ready to run
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
net: cxgb3_main: fix potential Spectre v1
Alex Vesker <valex(a)mellanox.com>
net/mlx5: Fix command interface race in polling mode
Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
net_sched: blackhole: tell upper qdisc about dropped packets
Jason Wang <jasowang(a)redhat.com>
vhost_net: validate sock before trying to put its fd
Ilpo Järvinen <ilpo.jarvinen(a)helsinki.fi>
tcp: prevent bogus FRTO undos with non-SACK flows
Yuchung Cheng <ycheng(a)google.com>
tcp: fix Fast Open key endianness
Jiri Slaby <jslaby(a)suse.cz>
r8152: napi hangup fix after disconnect
Sudarsana Reddy Kalluru <sudarsana.kalluru(a)cavium.com>
qed: Limit msix vectors in kdump kernel to the minimum required count.
Eric Dumazet <edumazet(a)google.com>
net: sungem: fix rx checksum support
Alex Vesker <valex(a)mellanox.com>
net/mlx5: Fix incorrect raw command length parsing
Eric Dumazet <edumazet(a)google.com>
net: dccp: switch rx_tstamp_last_feedback to monotonic clock
Eric Dumazet <edumazet(a)google.com>
net: dccp: avoid crash in ccid3_hc_rx_send_feedback()
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
atm: zatm: Fix potential Spectre v1
Christian Lamparter <chunkeey(a)googlemail.com>
crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak
Christian Lamparter <chunkeey(a)googlemail.com>
crypto: crypto4xx - remove bad list_del
Jonas Gorski <jonas.gorski(a)gmail.com>
bcm63xx_enet: do not write to random DMA channel on BCM6345
Jonas Gorski <jonas.gorski(a)gmail.com>
bcm63xx_enet: correct clock usage
alex chen <alex.chen(a)huawei.com>
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent
David S. Miller <davem(a)davemloft.net>
Revert "sit: reload iphdr in ipip6_rcv"
H. Peter Anvin <hpa(a)linux.intel.com>
x86/asm: Add _ASM_ARG* constants for argument registers to <asm/asm.h>
Nick Desaulniers <ndesaulniers(a)google.com>
compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
David Rientjes <rientjes(a)google.com>
compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled
Linus Torvalds <torvalds(a)linux-foundation.org>
compiler, clang: properly override 'inline' for clang
David Rientjes <rientjes(a)google.com>
compiler, clang: suppress warning for unused static inline functions
-------------
Diffstat:
Makefile | 4 +-
arch/mips/kernel/process.c | 31 +++++++++++-
arch/mips/kernel/traps.c | 1 +
arch/x86/include/asm/asm.h | 59 +++++++++++++++++++++++
drivers/atm/zatm.c | 2 +
drivers/crypto/amcc/crypto4xx_core.c | 23 +++++----
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 34 +++++++++----
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 2 +
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 8 ++--
drivers/net/ethernet/qlogic/qed/qed_main.c | 9 ++++
drivers/net/ethernet/sun/sungem.c | 22 +++++----
drivers/net/usb/r8152.c | 3 +-
drivers/net/wireless/realtek/rtlwifi/core.c | 1 -
drivers/vhost/net.c | 3 +-
fs/ocfs2/cluster/nodemanager.c | 63 +++++++++++++++++++++----
include/linux/compiler-gcc.h | 35 ++++++++++----
net/bridge/netfilter/ebtables.c | 13 +++++
net/dccp/ccids/ccid3.c | 16 ++++---
net/dns_resolver/dns_key.c | 28 ++++++-----
net/ipv4/sysctl_net_ipv4.c | 18 +++++--
net/ipv4/tcp_input.c | 9 ++++
net/ipv6/sit.c | 1 -
net/nfc/llcp_commands.c | 9 ++--
net/rds/loop.c | 1 +
net/rds/rds.h | 5 ++
net/rds/recv.c | 5 ++
net/sched/sch_blackhole.c | 2 +-
27 files changed, 320 insertions(+), 87 deletions(-)
Hi stable kernel maintainers,
please squash these amdgpu fixes together and backport them to all
applicable stable branches:
15e6b76880e65be24250e30986084b5569b7a06f "drm/amdgpu: Warn and update
pin_size values when
destroying a pinned BO"
456607d816d89a442a3d5ec98b02c8bc950b5228 "drm/amdgpu: Don't warn on
destroying a pinned BO"
(These depend on commits a5ccfe5c20740f2fbf00291490cdf8d2373ec255 and
ddc21af4d0f37f42b33c54cb69b215997fe5b082, which already have Cc: stable)
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
Subject: x86/tsc: Prevent result truncation on 32 bit
From: Chuanhua Lei <chuanhua.lei(a)linux.intel.com>
Date: Thu Sep 6 18:03:23 2018 +0800
From: Chuanhua Lei <chuanhua.lei(a)linux.intel.com>
Commit 17f6bac2249356c795339e03a0742cd79be3cab8 upstream.
Loops per jiffy is calculated by multiplying tsc_khz with 1e3 and then
dividing it by HZ.
Both tsc_khz and the temporary variable holding the multiplication result
are of type unsigned long, so on 32bit the result is truncated to the lower
32bit.
Use u64 as type for the temporary variable and cast tsc_khz to it before
multiplying.
[ tglx: Backport to stable. Due to massive code changes is the upstream
commit not applicable anymore. The issue has gone unnoticed in
kernels pre 4.19 because the bogus LPJ value gets fixed up in a
later stage of early boot, but it still might cause subtle and hard
to debug issues between these two points. ]
Fixes: dd759d93f4dd ("x86/timers: Add simple udelay calibration")
Signed-off-by: Chuanhua Lei <chuanhua.lei(a)linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: yixin.zhu(a)linux.intel.com
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Len Brown <len.brown(a)intel.com>
Cc: Pavel Tatashin <pavel.tatashin(a)microsoft.com>
Cc: Rajvi Jingar <rajvi.jingar(a)intel.com>
Cc: Dou Liyang <douly.fnst(a)cn.fujitsu.com>
Cc: Ville Syrjala <ville.syrjala(a)linux.intel.com>
Link: https://lkml.kernel.org/r/1536228203-18701-1-git-send-email-chuanhua.lei@li…
---
arch/x86/kernel/tsc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1343,7 +1343,7 @@ device_initcall(init_tsc_clocksource);
void __init tsc_early_delay_calibrate(void)
{
- unsigned long lpj;
+ u64 lpj;
if (!boot_cpu_has(X86_FEATURE_TSC))
return;
@@ -1355,7 +1355,7 @@ void __init tsc_early_delay_calibrate(vo
if (!tsc_khz)
return;
- lpj = tsc_khz * 1000;
+ lpj = (u64)tsc_khz * 1000;
do_div(lpj, HZ);
loops_per_jiffy = lpj;
}
commit 6209c285e7a5e68dbcdf8fd2456c6dd68433806b upstream.
Since Haswell we have no color range indication either in the pipe or
port registers for DP. Instead, there's a separate register for setting
the DP Main Stream Attributes (MSA) directly. The MSA register
definition makes no references to colorimetry, just a vague reference to
the DP spec. The connection to the color range was lost.
Apparently we've failed to set the proper MSA bit for limited, or CEA,
range ever since the first DDI platforms. We've started setting other
MSA parameters since commit dae847991a43 ("drm/i915: add
intel_ddi_set_pipe_settings").
Without the crucial bit of information, the DP sink has no way of
knowing the source is actually transmitting limited range RGB, leading
to "washed out" colors. With the colorimetry information, compliant
sinks should be able to handle the limited range properly. Native
(i.e. non-LSPCON) HDMI was not affected because we do pass the color
range via AVI infoframes.
Though not the root cause, the problem was made worse for DDI platforms
with commit 55bc60db5988 ("drm/i915: Add "Automatic" mode for the
"Broadcast RGB" property"), which selects limited range RGB
automatically based on the mode, as per the DP, HDMI and CEA specs.
After all these years, the fix boils down to flipping one bit.
[Per testing reports, this fixes DP sinks, but not the LSPCON. My
educated guess is that the LSPCON fails to turn the CEA range MSA into
AVI infoframes for HDMI.]
Reported-by: Michał Kopeć <mkopec12(a)gmail.com>
Reported-by: N. W. <nw9165-3201(a)yahoo.com>
Reported-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
Reported-by: Tom Yan <tom.ty89(a)gmail.com>
Tested-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=100023
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107476
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94921
Cc: Paulo Zanoni <paulo.r.zanoni(a)intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Cc: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org> # v3.9+
Reviewed-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180814060001.18224-1-jani.n…
(cherry picked from commit dc5977da99ea28094b8fa4e9bacbd29bedc41de5)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_ddi.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 7720569f2024..6e048ee88e3f 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -8825,6 +8825,7 @@ enum skl_power_gate {
#define TRANS_MSA_10_BPC (2<<5)
#define TRANS_MSA_12_BPC (3<<5)
#define TRANS_MSA_16_BPC (4<<5)
+#define TRANS_MSA_CEA_RANGE (1<<3)
/* LCPLL Control */
#define LCPLL_CTL _MMIO(0x130040)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index fed26d6e4e27..e195c287c263 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1659,6 +1659,10 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
WARN_ON(transcoder_is_dsi(cpu_transcoder));
temp = TRANS_MSA_SYNC_CLK;
+
+ if (crtc_state->limited_color_range)
+ temp |= TRANS_MSA_CEA_RANGE;
+
switch (crtc_state->pipe_bpp) {
case 18:
temp |= TRANS_MSA_6_BPC;
--
2.11.0
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 6209c285e7a5e68dbcdf8fd2456c6dd68433806b Mon Sep 17 00:00:00 2001
From: Jani Nikula <jani.nikula(a)intel.com>
Date: Tue, 14 Aug 2018 09:00:01 +0300
Subject: [PATCH] drm/i915: set DP Main Stream Attribute for color range on DDI
platforms
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since Haswell we have no color range indication either in the pipe or
port registers for DP. Instead, there's a separate register for setting
the DP Main Stream Attributes (MSA) directly. The MSA register
definition makes no references to colorimetry, just a vague reference to
the DP spec. The connection to the color range was lost.
Apparently we've failed to set the proper MSA bit for limited, or CEA,
range ever since the first DDI platforms. We've started setting other
MSA parameters since commit dae847991a43 ("drm/i915: add
intel_ddi_set_pipe_settings").
Without the crucial bit of information, the DP sink has no way of
knowing the source is actually transmitting limited range RGB, leading
to "washed out" colors. With the colorimetry information, compliant
sinks should be able to handle the limited range properly. Native
(i.e. non-LSPCON) HDMI was not affected because we do pass the color
range via AVI infoframes.
Though not the root cause, the problem was made worse for DDI platforms
with commit 55bc60db5988 ("drm/i915: Add "Automatic" mode for the
"Broadcast RGB" property"), which selects limited range RGB
automatically based on the mode, as per the DP, HDMI and CEA specs.
After all these years, the fix boils down to flipping one bit.
[Per testing reports, this fixes DP sinks, but not the LSPCON. My
educated guess is that the LSPCON fails to turn the CEA range MSA into
AVI infoframes for HDMI.]
Reported-by: Michał Kopeć <mkopec12(a)gmail.com>
Reported-by: N. W. <nw9165-3201(a)yahoo.com>
Reported-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
Reported-by: Tom Yan <tom.ty89(a)gmail.com>
Tested-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=100023
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107476
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94921
Cc: Paulo Zanoni <paulo.r.zanoni(a)intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Cc: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org> # v3.9+
Reviewed-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180814060001.18224-1-jani.n…
(cherry picked from commit dc5977da99ea28094b8fa4e9bacbd29bedc41de5)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 91e7483228e1..08ec7446282e 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -9201,6 +9201,7 @@ enum skl_power_gate {
#define TRANS_MSA_10_BPC (2 << 5)
#define TRANS_MSA_12_BPC (3 << 5)
#define TRANS_MSA_16_BPC (4 << 5)
+#define TRANS_MSA_CEA_RANGE (1 << 3)
/* LCPLL Control */
#define LCPLL_CTL _MMIO(0x130040)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 39d66f8493fa..8761513f3532 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1685,6 +1685,10 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
WARN_ON(transcoder_is_dsi(cpu_transcoder));
temp = TRANS_MSA_SYNC_CLK;
+
+ if (crtc_state->limited_color_range)
+ temp |= TRANS_MSA_CEA_RANGE;
+
switch (crtc_state->pipe_bpp) {
case 18:
temp |= TRANS_MSA_6_BPC;
Building x86_64:tools/perf ... failed
--------------
Error log:
tools/perf/util/python.c:
In function ‘get_md’:
tools/perf/util/python.c:987:9: error: ‘struct perf_mmap’ has no member named ‘cpu’
At top level:
cc1: error: unrecognized command line option ‘-Wno-cast-function-type’ [-Werror]
cc1: all warnings being treated as errors error: command 'gcc' failed with exit status 1
Guenter
On Tue, Sep 11, 2018 at 12:14:30PM +0200, gregkh(a)linuxfoundation.org wrote:
>
> This is a note to let you know that I've just added the patch titled
>
> tracing: Handle CC_FLAGS_FTRACE more accurately
>
> to the 4.14-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
...
> to the 4.18-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
...
> to the 4.4-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
...
> to the 4.9-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>
I believe there is no need to backport this patch in neither of stable
branches listed above. This patch is the first one in the patch series:
http://lkml.kernel.org/r/cover.thread-aa7b8d.your-ad-here.call-01533557518-…
The patch series adds s390 support for utilizing newly available for s390
in gcc 9 flags -fentry -mrecord-mcount and -mnop-mcount, and adds generic
-mnop-mcount support. And there is no benefit in backporting just the
first one.
Moreover this patch cause kernel recompile for intdeb-pkg and tar%pkg
targets (i.e. make targz-pkg), because those targets call make recursively
(they do extra "make modules_install"), and exported variable cause
duplicated build flags in sub-make.
There is a potential fix:
https://www.spinics.net/lists/linux-kbuild/msg19297.html
> The filename of the patch is:
> tracing-handle-cc_flags_ftrace-more-accurately.patch
> and it can be found in the queue-4.9 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable(a)vger.kernel.org> know about it.
>
>
> From foo@baz Tue Sep 11 12:09:55 CEST 2018
> From: Vasily Gorbik <gor(a)linux.ibm.com>
> Date: Mon, 6 Aug 2018 15:17:42 +0200
> Subject: tracing: Handle CC_FLAGS_FTRACE more accurately
>
> From: Vasily Gorbik <gor(a)linux.ibm.com>
>
> [ Upstream commit f28bc3c32c059ab4d13f52155fabd3e20f477f65 ]
>
> CC_FLAGS_FTRACE is exported and later used to remove ftrace relevant
> build flags from files which should be built without ftrace support.
> For that reason add -mfentry to CC_FLAGS_FTRACE as well. That fixes
> a problem with vdso32 build on s390, where -mfentry could not be used
> together with -m31 flag.
>
> At the same time flags like -pg and -mfentry are not relevant for asm
> files, so avoid adding them to KBUILD_AFLAGS.
>
> Introduce CC_FLAGS_USING instead of CC_USING_FENTRY to collect
> -DCC_USING_FENTRY (and future alike) which are relevant for both
> KBUILD_CFLAGS and KBUILD_AFLAGS.
>
> Link: http://lkml.kernel.org/r/patch-1.thread-aa7b8d.git-42971afe87de.your-ad-her…
>
> Signed-off-by: Vasily Gorbik <gor(a)linux.ibm.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
> Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
> ---
> Makefile | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> --- a/Makefile
> +++ b/Makefile
> @@ -760,12 +760,15 @@ ifdef CONFIG_FUNCTION_TRACER
> ifndef CC_FLAGS_FTRACE
> CC_FLAGS_FTRACE := -pg
> endif
> -export CC_FLAGS_FTRACE
> ifdef CONFIG_HAVE_FENTRY
> -CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY)
> + ifeq ($(call cc-option-yn, -mfentry),y)
> + CC_FLAGS_FTRACE += -mfentry
> + CC_FLAGS_USING += -DCC_USING_FENTRY
> + endif
> endif
> -KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_USING_FENTRY)
> -KBUILD_AFLAGS += $(CC_USING_FENTRY)
> +export CC_FLAGS_FTRACE
> +KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_FLAGS_USING)
> +KBUILD_AFLAGS += $(CC_FLAGS_USING)
> ifdef CONFIG_DYNAMIC_FTRACE
> ifdef CONFIG_HAVE_C_RECORDMCOUNT
> BUILD_C_RECORDMCOUNT := y
>
>
> Patches currently in stable-queue which might be from gor(a)linux.ibm.com are
>
> queue-4.9/tracing-handle-cc_flags_ftrace-more-accurately.patch
>
The nr_dentry_unused per-cpu counter tracks dentries in both the
LRU lists and the shrink lists where the DCACHE_LRU_LIST bit is set.
The shrink_dcache_sb() function moves dentries from the LRU list to a
shrink list and subtracts the dentry count from nr_dentry_unused. This
is incorrect as the nr_dentry_unused count Will also be decremented in
shrink_dentry_list() via d_shrink_del(). To fix this double decrement,
the decrement in the shrink_dcache_sb() function is taken out.
Fixes: 4e717f5c1083 ("list_lru: remove special case function list_lru_dispose_all."
Cc: stable(a)vger.kernel.org
Signed-off-by: Waiman Long <longman(a)redhat.com>
Reviewed-by: Dave Chinner <dchinner(a)redhat.com>
---
fs/dcache.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 2e7e8d8..cb515f1 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1202,15 +1202,11 @@ static enum lru_status dentry_lru_isolate_shrink(struct list_head *item,
*/
void shrink_dcache_sb(struct super_block *sb)
{
- long freed;
-
do {
LIST_HEAD(dispose);
- freed = list_lru_walk(&sb->s_dentry_lru,
+ list_lru_walk(&sb->s_dentry_lru,
dentry_lru_isolate_shrink, &dispose, 1024);
-
- this_cpu_sub(nr_dentry_unused, freed);
shrink_dentry_list(&dispose);
} while (list_lru_count(&sb->s_dentry_lru) > 0);
}
--
1.8.3.1
The patch below does not apply to the 4.18-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From b2b599fb54f90ae395ddc51f0d49e4f28244a8f8 Mon Sep 17 00:00:00 2001
From: Hang Yuan <hang.yuan(a)linux.intel.com>
Date: Wed, 29 Aug 2018 17:15:56 +0800
Subject: [PATCH] drm/i915/gvt: move intel_runtime_pm_get out of spin_lock in
stop_schedule
pm_runtime_get_sync in intel_runtime_pm_get might sleep if i915
device is not active. When stop vgpu schedule, the device may be
inactive. So need to move runtime_pm_get out of spin_lock/unlock.
Fixes: b24881e0b0b6("drm/i915/gvt: Add runtime_pm_get/put into gvt_switch_mmio
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hang Yuan <hang.yuan(a)linux.intel.com>
Signed-off-by: Xiong Zhang <xiong.y.zhang(a)intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw(a)linux.intel.com>
diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.c b/drivers/gpu/drm/i915/gvt/mmio_context.c
index 42e1e6bdcc2c..e872f4847fbe 100644
--- a/drivers/gpu/drm/i915/gvt/mmio_context.c
+++ b/drivers/gpu/drm/i915/gvt/mmio_context.c
@@ -562,11 +562,9 @@ void intel_gvt_switch_mmio(struct intel_vgpu *pre,
* performace for batch mmio read/write, so we need
* handle forcewake mannually.
*/
- intel_runtime_pm_get(dev_priv);
intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
switch_mmio(pre, next, ring_id);
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
- intel_runtime_pm_put(dev_priv);
}
/**
diff --git a/drivers/gpu/drm/i915/gvt/sched_policy.c b/drivers/gpu/drm/i915/gvt/sched_policy.c
index 09d7bb72b4ff..985fe81794dd 100644
--- a/drivers/gpu/drm/i915/gvt/sched_policy.c
+++ b/drivers/gpu/drm/i915/gvt/sched_policy.c
@@ -426,6 +426,7 @@ void intel_vgpu_stop_schedule(struct intel_vgpu *vgpu)
&vgpu->gvt->scheduler;
int ring_id;
struct vgpu_sched_data *vgpu_data = vgpu->sched_data;
+ struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
if (!vgpu_data->active)
return;
@@ -444,6 +445,7 @@ void intel_vgpu_stop_schedule(struct intel_vgpu *vgpu)
scheduler->current_vgpu = NULL;
}
+ intel_runtime_pm_get(dev_priv);
spin_lock_bh(&scheduler->mmio_context_lock);
for (ring_id = 0; ring_id < I915_NUM_ENGINES; ring_id++) {
if (scheduler->engine_owner[ring_id] == vgpu) {
@@ -452,5 +454,6 @@ void intel_vgpu_stop_schedule(struct intel_vgpu *vgpu)
}
}
spin_unlock_bh(&scheduler->mmio_context_lock);
+ intel_runtime_pm_put(dev_priv);
mutex_unlock(&vgpu->gvt->sched_lock);
}
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 6209c285e7a5e68dbcdf8fd2456c6dd68433806b Mon Sep 17 00:00:00 2001
From: Jani Nikula <jani.nikula(a)intel.com>
Date: Tue, 14 Aug 2018 09:00:01 +0300
Subject: [PATCH] drm/i915: set DP Main Stream Attribute for color range on DDI
platforms
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since Haswell we have no color range indication either in the pipe or
port registers for DP. Instead, there's a separate register for setting
the DP Main Stream Attributes (MSA) directly. The MSA register
definition makes no references to colorimetry, just a vague reference to
the DP spec. The connection to the color range was lost.
Apparently we've failed to set the proper MSA bit for limited, or CEA,
range ever since the first DDI platforms. We've started setting other
MSA parameters since commit dae847991a43 ("drm/i915: add
intel_ddi_set_pipe_settings").
Without the crucial bit of information, the DP sink has no way of
knowing the source is actually transmitting limited range RGB, leading
to "washed out" colors. With the colorimetry information, compliant
sinks should be able to handle the limited range properly. Native
(i.e. non-LSPCON) HDMI was not affected because we do pass the color
range via AVI infoframes.
Though not the root cause, the problem was made worse for DDI platforms
with commit 55bc60db5988 ("drm/i915: Add "Automatic" mode for the
"Broadcast RGB" property"), which selects limited range RGB
automatically based on the mode, as per the DP, HDMI and CEA specs.
After all these years, the fix boils down to flipping one bit.
[Per testing reports, this fixes DP sinks, but not the LSPCON. My
educated guess is that the LSPCON fails to turn the CEA range MSA into
AVI infoframes for HDMI.]
Reported-by: Michał Kopeć <mkopec12(a)gmail.com>
Reported-by: N. W. <nw9165-3201(a)yahoo.com>
Reported-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
Reported-by: Tom Yan <tom.ty89(a)gmail.com>
Tested-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=100023
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107476
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94921
Cc: Paulo Zanoni <paulo.r.zanoni(a)intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Cc: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org> # v3.9+
Reviewed-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180814060001.18224-1-jani.n…
(cherry picked from commit dc5977da99ea28094b8fa4e9bacbd29bedc41de5)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 91e7483228e1..08ec7446282e 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -9201,6 +9201,7 @@ enum skl_power_gate {
#define TRANS_MSA_10_BPC (2 << 5)
#define TRANS_MSA_12_BPC (3 << 5)
#define TRANS_MSA_16_BPC (4 << 5)
+#define TRANS_MSA_CEA_RANGE (1 << 3)
/* LCPLL Control */
#define LCPLL_CTL _MMIO(0x130040)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 39d66f8493fa..8761513f3532 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1685,6 +1685,10 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
WARN_ON(transcoder_is_dsi(cpu_transcoder));
temp = TRANS_MSA_SYNC_CLK;
+
+ if (crtc_state->limited_color_range)
+ temp |= TRANS_MSA_CEA_RANGE;
+
switch (crtc_state->pipe_bpp) {
case 18:
temp |= TRANS_MSA_6_BPC;
The patch below does not apply to the 4.18-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 6209c285e7a5e68dbcdf8fd2456c6dd68433806b Mon Sep 17 00:00:00 2001
From: Jani Nikula <jani.nikula(a)intel.com>
Date: Tue, 14 Aug 2018 09:00:01 +0300
Subject: [PATCH] drm/i915: set DP Main Stream Attribute for color range on DDI
platforms
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since Haswell we have no color range indication either in the pipe or
port registers for DP. Instead, there's a separate register for setting
the DP Main Stream Attributes (MSA) directly. The MSA register
definition makes no references to colorimetry, just a vague reference to
the DP spec. The connection to the color range was lost.
Apparently we've failed to set the proper MSA bit for limited, or CEA,
range ever since the first DDI platforms. We've started setting other
MSA parameters since commit dae847991a43 ("drm/i915: add
intel_ddi_set_pipe_settings").
Without the crucial bit of information, the DP sink has no way of
knowing the source is actually transmitting limited range RGB, leading
to "washed out" colors. With the colorimetry information, compliant
sinks should be able to handle the limited range properly. Native
(i.e. non-LSPCON) HDMI was not affected because we do pass the color
range via AVI infoframes.
Though not the root cause, the problem was made worse for DDI platforms
with commit 55bc60db5988 ("drm/i915: Add "Automatic" mode for the
"Broadcast RGB" property"), which selects limited range RGB
automatically based on the mode, as per the DP, HDMI and CEA specs.
After all these years, the fix boils down to flipping one bit.
[Per testing reports, this fixes DP sinks, but not the LSPCON. My
educated guess is that the LSPCON fails to turn the CEA range MSA into
AVI infoframes for HDMI.]
Reported-by: Michał Kopeć <mkopec12(a)gmail.com>
Reported-by: N. W. <nw9165-3201(a)yahoo.com>
Reported-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
Reported-by: Tom Yan <tom.ty89(a)gmail.com>
Tested-by: Nicholas Stommel <nicholas.stommel(a)gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=100023
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107476
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94921
Cc: Paulo Zanoni <paulo.r.zanoni(a)intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Cc: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org> # v3.9+
Reviewed-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180814060001.18224-1-jani.n…
(cherry picked from commit dc5977da99ea28094b8fa4e9bacbd29bedc41de5)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 91e7483228e1..08ec7446282e 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -9201,6 +9201,7 @@ enum skl_power_gate {
#define TRANS_MSA_10_BPC (2 << 5)
#define TRANS_MSA_12_BPC (3 << 5)
#define TRANS_MSA_16_BPC (4 << 5)
+#define TRANS_MSA_CEA_RANGE (1 << 3)
/* LCPLL Control */
#define LCPLL_CTL _MMIO(0x130040)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 39d66f8493fa..8761513f3532 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1685,6 +1685,10 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
WARN_ON(transcoder_is_dsi(cpu_transcoder));
temp = TRANS_MSA_SYNC_CLK;
+
+ if (crtc_state->limited_color_range)
+ temp |= TRANS_MSA_CEA_RANGE;
+
switch (crtc_state->pipe_bpp) {
case 18:
temp |= TRANS_MSA_6_BPC;
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 05c72e77ccda89ff624108b1b59a0fc43843f343 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala(a)linux.intel.com>
Date: Tue, 17 Jul 2018 20:42:14 +0300
Subject: [PATCH] drm/i915: Nuke the LVDS lid notifier
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We broke the LVDS notifier resume thing in (presumably) commit
e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") as
we no longer duplicate the current state in the LVDS notifier and
thus we never resume it properly either.
Instead of trying to fix it again let's just kill off the lid
notifier entirely. None of the machines tested thus far have
apparently needed it. Originally the lid notifier was added to
work around cases where the VBIOS was clobbering some of the
hardware state behind the driver's back, mostly on Thinkpads.
We now have a few report of Thinkpads working just fine without
the notifier. So maybe it was misdiagnosed originally, or
something else has changed (ACPI video stuff perhaps?).
If we do end up finding a machine where the VBIOS is still causing
problems I would suggest that we first try setting various bits in
the VBIOS scratch registers. There are several to choose from that
may instruct the VBIOS to steer clear.
With the notifier gone we'll also stop looking at the panel status
in ->detect().
v2: Nuke enum modeset_restore (Rodrigo)
Cc: stable(a)vger.kernel.org
Cc: Wolfgang Draxinger <wdraxinger.maillist(a)draxit.de>
Cc: Vito Caputo <vcaputo(a)pengaru.com>
Cc: kitsunyan <kitsunyan(a)airmail.cc>
Cc: Joonas Saarinen <jza(a)saunalahti.fi>
Tested-by: Vito Caputo <vcaputo(a)pengaru.com> # Thinkapd X61s
Tested-by: kitsunyan <kitsunyan(a)airmail.cc> # ThinkPad X200
Tested-by: Joonas Saarinen <jza(a)saunalahti.fi> # Fujitsu Siemens U9210
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105902
References: https://lists.freedesktop.org/archives/intel-gfx/2018-June/169315.html
References: https://bugs.freedesktop.org/show_bug.cgi?id=21230
Fixes: e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.")
Signed-off-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180717174216.22252-1-ville.…
Reviewed-by: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 337b1aad5212..343e79a44abd 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -900,7 +900,6 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,
spin_lock_init(&dev_priv->uncore.lock);
mutex_init(&dev_priv->sb_lock);
- mutex_init(&dev_priv->modeset_restore_lock);
mutex_init(&dev_priv->av_mutex);
mutex_init(&dev_priv->wm.wm_mutex);
mutex_init(&dev_priv->pps_mutex);
@@ -1570,11 +1569,6 @@ static int i915_drm_suspend(struct drm_device *dev)
struct pci_dev *pdev = dev_priv->drm.pdev;
pci_power_t opregion_target_state;
- /* ignore lid events during suspend */
- mutex_lock(&dev_priv->modeset_restore_lock);
- dev_priv->modeset_restore = MODESET_SUSPENDED;
- mutex_unlock(&dev_priv->modeset_restore_lock);
-
disable_rpm_wakeref_asserts(dev_priv);
/* We do a lot of poking in a lot of registers, make sure they work
@@ -1770,10 +1764,6 @@ static int i915_drm_resume(struct drm_device *dev)
intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING, false);
- mutex_lock(&dev_priv->modeset_restore_lock);
- dev_priv->modeset_restore = MODESET_DONE;
- mutex_unlock(&dev_priv->modeset_restore_lock);
-
intel_opregion_notify_adapter(dev_priv, PCI_D0);
enable_rpm_wakeref_asserts(dev_priv);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 08d4303abb14..995656f51b57 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1002,12 +1002,6 @@ struct i915_gem_mm {
#define I915_ENGINE_WEDGED_TIMEOUT (60 * HZ) /* Reset but no recovery? */
-enum modeset_restore {
- MODESET_ON_LID_OPEN,
- MODESET_DONE,
- MODESET_SUSPENDED,
-};
-
#define DP_AUX_A 0x40
#define DP_AUX_B 0x10
#define DP_AUX_C 0x20
@@ -1730,8 +1724,6 @@ struct drm_i915_private {
unsigned long quirks;
- enum modeset_restore modeset_restore;
- struct mutex modeset_restore_lock;
struct drm_atomic_state *modeset_restore_state;
struct drm_modeset_acquire_ctx reset_ctx;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index bb06744d28a4..a35404119257 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -44,8 +44,6 @@
/* Private structure for the integrated LVDS support */
struct intel_lvds_connector {
struct intel_connector base;
-
- struct notifier_block lid_notifier;
};
struct intel_lvds_pps {
@@ -452,26 +450,9 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder,
return true;
}
-/*
- * Detect the LVDS connection.
- *
- * Since LVDS doesn't have hotlug, we use the lid as a proxy. Open means
- * connected and closed means disconnected. We also send hotplug events as
- * needed, using lid status notification from the input layer.
- */
static enum drm_connector_status
intel_lvds_detect(struct drm_connector *connector, bool force)
{
- struct drm_i915_private *dev_priv = to_i915(connector->dev);
- enum drm_connector_status status;
-
- DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
- connector->base.id, connector->name);
-
- status = intel_panel_detect(dev_priv);
- if (status != connector_status_unknown)
- return status;
-
return connector_status_connected;
}
@@ -496,117 +477,6 @@ static int intel_lvds_get_modes(struct drm_connector *connector)
return 1;
}
-static int intel_no_modeset_on_lid_dmi_callback(const struct dmi_system_id *id)
-{
- DRM_INFO("Skipping forced modeset for %s\n", id->ident);
- return 1;
-}
-
-/* The GPU hangs up on these systems if modeset is performed on LID open */
-static const struct dmi_system_id intel_no_modeset_on_lid[] = {
- {
- .callback = intel_no_modeset_on_lid_dmi_callback,
- .ident = "Toshiba Tecra A11",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "TECRA A11"),
- },
- },
-
- { } /* terminating entry */
-};
-
-/*
- * Lid events. Note the use of 'modeset':
- * - we set it to MODESET_ON_LID_OPEN on lid close,
- * and set it to MODESET_DONE on open
- * - we use it as a "only once" bit (ie we ignore
- * duplicate events where it was already properly set)
- * - the suspend/resume paths will set it to
- * MODESET_SUSPENDED and ignore the lid open event,
- * because they restore the mode ("lid open").
- */
-static int intel_lid_notify(struct notifier_block *nb, unsigned long val,
- void *unused)
-{
- struct intel_lvds_connector *lvds_connector =
- container_of(nb, struct intel_lvds_connector, lid_notifier);
- struct drm_connector *connector = &lvds_connector->base.base;
- struct drm_device *dev = connector->dev;
- struct drm_i915_private *dev_priv = to_i915(dev);
-
- if (dev->switch_power_state != DRM_SWITCH_POWER_ON)
- return NOTIFY_OK;
-
- mutex_lock(&dev_priv->modeset_restore_lock);
- if (dev_priv->modeset_restore == MODESET_SUSPENDED)
- goto exit;
- /*
- * check and update the status of LVDS connector after receiving
- * the LID nofication event.
- */
- connector->status = connector->funcs->detect(connector, false);
-
- /* Don't force modeset on machines where it causes a GPU lockup */
- if (dmi_check_system(intel_no_modeset_on_lid))
- goto exit;
- if (!acpi_lid_open()) {
- /* do modeset on next lid open event */
- dev_priv->modeset_restore = MODESET_ON_LID_OPEN;
- goto exit;
- }
-
- if (dev_priv->modeset_restore == MODESET_DONE)
- goto exit;
-
- /*
- * Some old platform's BIOS love to wreak havoc while the lid is closed.
- * We try to detect this here and undo any damage. The split for PCH
- * platforms is rather conservative and a bit arbitrary expect that on
- * those platforms VGA disabling requires actual legacy VGA I/O access,
- * and as part of the cleanup in the hw state restore we also redisable
- * the vga plane.
- */
- if (!HAS_PCH_SPLIT(dev_priv))
- intel_display_resume(dev);
-
- dev_priv->modeset_restore = MODESET_DONE;
-
-exit:
- mutex_unlock(&dev_priv->modeset_restore_lock);
- return NOTIFY_OK;
-}
-
-static int
-intel_lvds_connector_register(struct drm_connector *connector)
-{
- struct intel_lvds_connector *lvds = to_lvds_connector(connector);
- int ret;
-
- ret = intel_connector_register(connector);
- if (ret)
- return ret;
-
- lvds->lid_notifier.notifier_call = intel_lid_notify;
- if (acpi_lid_notifier_register(&lvds->lid_notifier)) {
- DRM_DEBUG_KMS("lid notifier registration failed\n");
- lvds->lid_notifier.notifier_call = NULL;
- }
-
- return 0;
-}
-
-static void
-intel_lvds_connector_unregister(struct drm_connector *connector)
-{
- struct intel_lvds_connector *lvds = to_lvds_connector(connector);
-
- if (lvds->lid_notifier.notifier_call)
- acpi_lid_notifier_unregister(&lvds->lid_notifier);
-
- intel_connector_unregister(connector);
-}
-
/**
* intel_lvds_destroy - unregister and free LVDS structures
* @connector: connector to free
@@ -639,8 +509,8 @@ static const struct drm_connector_funcs intel_lvds_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.atomic_get_property = intel_digital_connector_atomic_get_property,
.atomic_set_property = intel_digital_connector_atomic_set_property,
- .late_register = intel_lvds_connector_register,
- .early_unregister = intel_lvds_connector_unregister,
+ .late_register = intel_connector_register,
+ .early_unregister = intel_connector_unregister,
.destroy = intel_lvds_destroy,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = intel_digital_connector_duplicate_state,
@@ -1114,8 +984,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
* 2) check for VBT data
* 3) check to see if LVDS is already on
* if none of the above, no panel
- * 4) make sure lid is open
- * if closed, act like it's not there for now
*/
/*
This is a note to let you know that I've just added the patch titled
vmbus: don't return values for uninitalized channels
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 6712cc9c22117a8af9f3df272b4a44fd2e4201cd Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen(a)networkplumber.org>
Date: Mon, 20 Aug 2018 21:16:40 +0000
Subject: vmbus: don't return values for uninitalized channels
For unsupported device types, the vmbus channel ringbuffer is never
initialized, and therefore reading the sysfs files will return garbage
or cause a kernel OOPS.
Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info")
Signed-off-by: Stephen Hemminger <sthemmin(a)microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys(a)microsoft.com>
Cc: <stable(a)vger.kernel.org> # 4.15
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/hv/vmbus_drv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index b1b548a21f91..c71cc857b649 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1291,6 +1291,9 @@ static ssize_t vmbus_chan_attr_show(struct kobject *kobj,
if (!attribute->show)
return -EIO;
+ if (chan->state != CHANNEL_OPENED_STATE)
+ return -EINVAL;
+
return attribute->show(chan, buf);
}
--
2.18.0
This is a note to let you know that I've just added the patch titled
Tools: hv: Fix a bug in the key delete code
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 86503bd35dec0ce363e9fdbf5299927422ed3899 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys(a)microsoft.com>
Date: Fri, 10 Aug 2018 23:06:07 +0000
Subject: Tools: hv: Fix a bug in the key delete code
Fix a bug in the key delete code - the num_records range
from 0 to num_records-1.
Signed-off-by: K. Y. Srinivasan <kys(a)microsoft.com>
Reported-by: David Binderman <dcb314(a)hotmail.com>
Cc: <stable(a)vger.kernel.org>
Reviewed-by: Michael Kelley <mikelley(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
tools/hv/hv_kvp_daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index dbf6e8bd98ba..bbb2a8ef367c 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -286,7 +286,7 @@ static int kvp_key_delete(int pool, const __u8 *key, int key_size)
* Found a match; just move the remaining
* entries up.
*/
- if (i == num_records) {
+ if (i == (num_records - 1)) {
kvp_file_info[pool].num_records--;
kvp_update_file(pool);
return 0;
--
2.18.0
This is a note to let you know that I've just added the patch titled
misc: ibmvsm: Fix wrong assignment of return code
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From c55e9318871cd06e4aa10f5023cc2dcdfbb08577 Mon Sep 17 00:00:00 2001
From: "Bryant G. Ly" <bryantly(a)linux.ibm.com>
Date: Mon, 6 Aug 2018 08:31:00 -0500
Subject: misc: ibmvsm: Fix wrong assignment of return code
Currently the assignment is flipped and rc is always 0.
Signed-off-by: Bryant G. Ly <bryantly(a)linux.ibm.com>
Fixes: 0eca353e7ae7 ("misc: IBM Virtual Management Channel Driver (VMC)")
Reviewed-by: Bradley Warrum <bwarrum(a)us.ibm.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/ibmvmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c
index 8f82bb9d11e2..b8aaa684c397 100644
--- a/drivers/misc/ibmvmc.c
+++ b/drivers/misc/ibmvmc.c
@@ -2131,7 +2131,7 @@ static int ibmvmc_init_crq_queue(struct crq_server_adapter *adapter)
retrc = plpar_hcall_norets(H_REG_CRQ,
vdev->unit_address,
queue->msg_token, PAGE_SIZE);
- retrc = rc;
+ rc = retrc;
if (rc == H_RESOURCE)
rc = ibmvmc_reset_crq_queue(adapter);
--
2.18.0
This is a note to let you know that I've just added the patch titled
android: binder: fix the race mmap and alloc_new_buf_locked
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From da1b9564e85b1d7baf66cbfabcab27e183a1db63 Mon Sep 17 00:00:00 2001
From: Minchan Kim <minchan(a)kernel.org>
Date: Thu, 23 Aug 2018 14:29:56 +0900
Subject: android: binder: fix the race mmap and alloc_new_buf_locked
There is RaceFuzzer report like below because we have no lock to close
below the race between binder_mmap and binder_alloc_new_buf_locked.
To close the race, let's use memory barrier so that if someone see
alloc->vma is not NULL, alloc->vma_vm_mm should be never NULL.
(I didn't add stable mark intentionallybecause standard android
userspace libraries that interact with binder (libbinder & libhwbinder)
prevent the mmap/ioctl race. - from Todd)
"
Thread interleaving:
CPU0 (binder_alloc_mmap_handler) CPU1 (binder_alloc_new_buf_locked)
===== =====
// drivers/android/binder_alloc.c
// #L718 (v4.18-rc3)
alloc->vma = vma;
// drivers/android/binder_alloc.c
// #L346 (v4.18-rc3)
if (alloc->vma == NULL) {
...
// alloc->vma is not NULL at this point
return ERR_PTR(-ESRCH);
}
...
// #L438
binder_update_page_range(alloc, 0,
(void *)PAGE_ALIGN((uintptr_t)buffer->data),
end_page_addr);
// In binder_update_page_range() #L218
// But still alloc->vma_vm_mm is NULL here
if (need_mm && mmget_not_zero(alloc->vma_vm_mm))
alloc->vma_vm_mm = vma->vm_mm;
Crash Log:
==================================================================
BUG: KASAN: null-ptr-deref in __atomic_add_unless include/asm-generic/atomic-instrumented.h:89 [inline]
BUG: KASAN: null-ptr-deref in atomic_add_unless include/linux/atomic.h:533 [inline]
BUG: KASAN: null-ptr-deref in mmget_not_zero include/linux/sched/mm.h:75 [inline]
BUG: KASAN: null-ptr-deref in binder_update_page_range+0xece/0x18e0 drivers/android/binder_alloc.c:218
Write of size 4 at addr 0000000000000058 by task syz-executor0/11184
CPU: 1 PID: 11184 Comm: syz-executor0 Not tainted 4.18.0-rc3 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x16e/0x22c lib/dump_stack.c:113
kasan_report_error mm/kasan/report.c:352 [inline]
kasan_report+0x163/0x380 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x140/0x1a0 mm/kasan/kasan.c:267
kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
__atomic_add_unless include/asm-generic/atomic-instrumented.h:89 [inline]
atomic_add_unless include/linux/atomic.h:533 [inline]
mmget_not_zero include/linux/sched/mm.h:75 [inline]
binder_update_page_range+0xece/0x18e0 drivers/android/binder_alloc.c:218
binder_alloc_new_buf_locked drivers/android/binder_alloc.c:443 [inline]
binder_alloc_new_buf+0x467/0xc30 drivers/android/binder_alloc.c:513
binder_transaction+0x125b/0x4fb0 drivers/android/binder.c:2957
binder_thread_write+0xc08/0x2770 drivers/android/binder.c:3528
binder_ioctl_write_read.isra.39+0x24f/0x8e0 drivers/android/binder.c:4456
binder_ioctl+0xa86/0xf34 drivers/android/binder.c:4596
vfs_ioctl fs/ioctl.c:46 [inline]
do_vfs_ioctl+0x154/0xd40 fs/ioctl.c:686
ksys_ioctl+0x94/0xb0 fs/ioctl.c:701
__do_sys_ioctl fs/ioctl.c:708 [inline]
__se_sys_ioctl fs/ioctl.c:706 [inline]
__x64_sys_ioctl+0x43/0x50 fs/ioctl.c:706
do_syscall_64+0x167/0x4b0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
"
Signed-off-by: Todd Kjos <tkjos(a)google.com>
Signed-off-by: Minchan Kim <minchan(a)kernel.org>
Reviewed-by: Martijn Coenen <maco(a)android.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/android/binder_alloc.c | 43 +++++++++++++++++++++++++++-------
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 3f3b7b253445..64fd96eada31 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -332,6 +332,35 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
return vma ? -ENOMEM : -ESRCH;
}
+
+static inline void binder_alloc_set_vma(struct binder_alloc *alloc,
+ struct vm_area_struct *vma)
+{
+ if (vma)
+ alloc->vma_vm_mm = vma->vm_mm;
+ /*
+ * If we see alloc->vma is not NULL, buffer data structures set up
+ * completely. Look at smp_rmb side binder_alloc_get_vma.
+ * We also want to guarantee new alloc->vma_vm_mm is always visible
+ * if alloc->vma is set.
+ */
+ smp_wmb();
+ alloc->vma = vma;
+}
+
+static inline struct vm_area_struct *binder_alloc_get_vma(
+ struct binder_alloc *alloc)
+{
+ struct vm_area_struct *vma = NULL;
+
+ if (alloc->vma) {
+ /* Look at description in binder_alloc_set_vma */
+ smp_rmb();
+ vma = alloc->vma;
+ }
+ return vma;
+}
+
static struct binder_buffer *binder_alloc_new_buf_locked(
struct binder_alloc *alloc,
size_t data_size,
@@ -348,7 +377,7 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
size_t size, data_offsets_size;
int ret;
- if (alloc->vma == NULL) {
+ if (!binder_alloc_get_vma(alloc)) {
binder_alloc_debug(BINDER_DEBUG_USER_ERROR,
"%d: binder_alloc_buf, no vma\n",
alloc->pid);
@@ -723,9 +752,7 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
buffer->free = 1;
binder_insert_free_buffer(alloc, buffer);
alloc->free_async_space = alloc->buffer_size / 2;
- barrier();
- alloc->vma = vma;
- alloc->vma_vm_mm = vma->vm_mm;
+ binder_alloc_set_vma(alloc, vma);
mmgrab(alloc->vma_vm_mm);
return 0;
@@ -754,10 +781,10 @@ void binder_alloc_deferred_release(struct binder_alloc *alloc)
int buffers, page_count;
struct binder_buffer *buffer;
- BUG_ON(alloc->vma);
-
buffers = 0;
mutex_lock(&alloc->mutex);
+ BUG_ON(alloc->vma);
+
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
@@ -900,7 +927,7 @@ int binder_alloc_get_allocated_count(struct binder_alloc *alloc)
*/
void binder_alloc_vma_close(struct binder_alloc *alloc)
{
- WRITE_ONCE(alloc->vma, NULL);
+ binder_alloc_set_vma(alloc, NULL);
}
/**
@@ -935,7 +962,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
index = page - alloc->pages;
page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
- vma = alloc->vma;
+ vma = binder_alloc_get_vma(alloc);
if (vma) {
if (!mmget_not_zero(alloc->vma_vm_mm))
goto err_mmget;
--
2.18.0
This is a note to let you know that I've just added the patch titled
mei: bus: need to unlink client before freeing
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 34f1166afd67f9f48a08c52f36180048908506a4 Mon Sep 17 00:00:00 2001
From: Tomas Winkler <tomas.winkler(a)intel.com>
Date: Mon, 27 Aug 2018 22:40:16 +0300
Subject: mei: bus: need to unlink client before freeing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In case a client fails to connect in mei_cldev_enable(), the
caller won't call the mei_cldev_disable leaving the client
in a linked stated. Upon driver unload the client structure
will be freed in mei_cl_bus_dev_release(), leaving a stale pointer
on a fail_list. This will eventually end up in crash
during power down flow in mei_cl_set_disonnected().
RIP: mei_cl_set_disconnected+0x5/0x260[mei]
Call trace:
mei_cl_all_disconnect+0x22/0x30
mei_reset+0x194/0x250
__synchronize_hardirq+0x43/0x50
_cond_resched+0x15/0x30
mei_me_intr_clear+0x20/0x100
mei_stop+0x76/0xb0
mei_me_shutdown+0x3f/0x80
pci_device_shutdown+0x34/0x60
kernel_restart+0x0e/0x30
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200455
Fixes: 'c110cdb17148 ("mei: bus: make a client pointer always available")'
Cc: <stable(a)vger.kernel.org> 4.10+
Tested-by: Georg Müller <georgmueller(a)gmx.net>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/bus.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 13c6c9a2248a..fc3872fe7b25 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -521,17 +521,15 @@ int mei_cldev_enable(struct mei_cl_device *cldev)
cl = cldev->cl;
+ mutex_lock(&bus->device_lock);
if (cl->state == MEI_FILE_UNINITIALIZED) {
- mutex_lock(&bus->device_lock);
ret = mei_cl_link(cl);
- mutex_unlock(&bus->device_lock);
if (ret)
- return ret;
+ goto out;
/* update pointers */
cl->cldev = cldev;
}
- mutex_lock(&bus->device_lock);
if (mei_cl_is_connected(cl)) {
ret = 0;
goto out;
@@ -875,12 +873,13 @@ static void mei_cl_bus_dev_release(struct device *dev)
mei_me_cl_put(cldev->me_cl);
mei_dev_bus_put(cldev->bus);
+ mei_cl_unlink(cldev->cl);
kfree(cldev->cl);
kfree(cldev);
}
static const struct device_type mei_cl_device_type = {
- .release = mei_cl_bus_dev_release,
+ .release = mei_cl_bus_dev_release,
};
/**
--
2.18.0
This is a note to let you know that I've just added the patch titled
mei: bus: fix hw module get/put balance
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 69bf5313035926b0b6a6578de4f3168a8f5c19b8 Mon Sep 17 00:00:00 2001
From: Tomas Winkler <tomas.winkler(a)intel.com>
Date: Mon, 27 Aug 2018 22:40:15 +0300
Subject: mei: bus: fix hw module get/put balance
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In case the device is not connected it doesn't 'get'
hw module and hence should not 'put' it on disable.
Cc: <stable(a)vger.kernel.org> 4.16+
Fixes:'commit 257355a44b99 ("mei: make module referencing local to the bus.c")'
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200455
Tested-by: Georg Müller <georgmueller(a)gmx.net>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/bus.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 7bba62a72921..13c6c9a2248a 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -616,9 +616,8 @@ int mei_cldev_disable(struct mei_cl_device *cldev)
if (err < 0)
dev_err(bus->dev, "Could not disconnect from the ME client\n");
-out:
mei_cl_bus_module_put(cldev);
-
+out:
/* Flush queues and remove any pending read */
mei_cl_flush_queues(cl, NULL);
mei_cl_unlink(cl);
--
2.18.0
This is a note to let you know that I've just added the patch titled
mei: ignore not found client in the enumeration
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 8d2d8935d30cc2acc57a3196dc10dfa8d5cbcdab Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Date: Mon, 6 Aug 2018 17:47:33 +0300
Subject: mei: ignore not found client in the enumeration
Some of the ME clients are available only for BIOS operation and are
removed during hand off to an OS. However the removal is not instant.
A client may be visible on the client list when the mei driver requests
for enumeration, while the subsequent request for properties will be
answered with client not found error value. The default behavior
for an error is to perform client reset while this error is harmless and
the link reset should be prevented. This issue started to be visible due to
suspend/resume timing changes. Currently reported only on the Haswell
based system.
Fixes:
[33.564957] mei_me 0000:00:16.0: hbm: properties response: wrong status = 1 CLIENT_NOT_FOUND
[33.564978] mei_me 0000:00:16.0: mei_irq_read_handler ret = -71.
[33.565270] mei_me 0000:00:16.0: unexpected reset: dev_state = INIT_CLIENTS fw status = 1E000255 60002306 00000200 00004401 00000000 00000010
Cc: <stable(a)vger.kernel.org>
Reported-by: Heiner Kallweit <hkallweit1(a)gmail.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/hbm.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index 09e233d4c0de..e56f3e72d57a 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -1161,15 +1161,18 @@ int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
props_res = (struct hbm_props_response *)mei_msg;
- if (props_res->status) {
+ if (props_res->status == MEI_HBMS_CLIENT_NOT_FOUND) {
+ dev_dbg(dev->dev, "hbm: properties response: %d CLIENT_NOT_FOUND\n",
+ props_res->me_addr);
+ } else if (props_res->status) {
dev_err(dev->dev, "hbm: properties response: wrong status = %d %s\n",
props_res->status,
mei_hbm_status_str(props_res->status));
return -EPROTO;
+ } else {
+ mei_hbm_me_cl_add(dev, props_res);
}
- mei_hbm_me_cl_add(dev, props_res);
-
/* request property for the next client */
if (mei_hbm_prop_req(dev, props_res->me_addr + 1))
return -EIO;
--
2.18.0
On 9/11/18 4:20 PM, Thomas Gleixner wrote:
> On Tue, 11 Sep 2018, Boris Ostrovsky wrote:
>
>> For unprivileged Xen PV guests this is normal memory and ioremap will
>> not be able to properly map it.
>>
>> While at it, since ioremap may return NULL, add a test for pointer's
>> validity.
> I assume this goes back to very dead kernels, so that should go with a Cc
> stable, right?
>
Yes, I forgot to add those (and now I did), thanks for pointing this out.
It has to go at least all the way back to 4.13 since before
f7eaf6e00fd58 ("x86/boot: Move EISA setup to a separate file"), just by
luck, early_ioremap() worked for the guests.
-boris
Hi Doug and Jason,
Here are two patches that should probably land in the RC. The first one ensures
we don't index beyond the end of an array. The other is more subtle but arguably
more important. The bug it fixes results in incorrect IRQ bits to be set and the
result is we do not get an interrupt for an error and have to wait for another
interrupt to fire to see said error.
---
Dennis Dalessandro (1):
IB/hfi1: Ensure ucast_dlid access doesnt exceed bounds
Michael J. Ruhl (1):
IB/hfi1: set_intr_bits uses incorrect source for register modification
drivers/infiniband/hw/hfi1/chip.c | 2 +-
drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
--
-Denny
With commit 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of
of_find_node_by_phandle()"), a G3 PowerMac fails to boot. The root cause
is the DT for this system has no phandle properties when booted with
BootX. of_populate_phandle_cache() does not handle the case of no
phandles correctly. The problem is roundup_pow_of_two() for 0 is
undefined. The implementation subtracts 1 underflowing and then things
are in the weeds.
Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of of_find_node_by_phandle()")
Cc: stable(a)vger.kernel.org # 4.17+
Reported-by: Finn Thain <fthain(a)telegraphics.com.au>
Tested-by: Stan Johnson <userm57(a)yahoo.com>
Cc: Frank Rowand <frowand.list(a)gmail.com>
Cc: Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
Signed-off-by: Rob Herring <robh(a)kernel.org>
---
Here's a formal patch of what Stan tested. Will send to Linus this week.
Rob
drivers/of/base.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index a055cd1ef96d..17ae594b7014 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -140,6 +140,9 @@ void of_populate_phandle_cache(void)
if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
phandles++;
+ if (!phandles)
+ goto out;
+
cache_entries = roundup_pow_of_two(phandles);
phandle_cache_mask = cache_entries - 1;
--
2.17.1
Hi all,
Three fixes that worth to have in the @stable, as we've hit them on v4.9
stable.
And for linux-next - adding lockdep asserts for line discipline changing
code, verifying that write ldisc sem will be held forthwith.
The last patch is optional and probably, timeout can be dropped for
read_lock(). I'll do it if everyone agrees.
Rong Chen, could you kindly re-run this version to see if the lockup
from v1 still happens? I wasn't able to reproduce it..
Thanks,
Dima
Changes since v2:
- Added reviewed-by tags
- Hopefully, fixed reported by 0-day issue.
- Added optional fix for wait_readers decrement
Changes since v1:
- Added tested-by/reported-by tags
- Dropped 3/4 (locking tty pair for lockdep sake),
Because of that - not adding lockdep_assert_held() in tty_ldisc_open()
- Added 4/4 cleanup to inc tty->count only on success of
tty_ldisc_reinit()
- lock ldisc without (5*HZ) timeout in tty_reopen()
v1 link:
lkml.kernel.org/r/<20180829022353.23568-1-dima(a)arista.com>
Huuge cc list:
Cc: Daniel Axtens <dja(a)axtens.net>
Cc: Dmitry Vyukov <dvyukov(a)google.com>
Cc: Michael Neuling <mikey(a)neuling.org>
Cc: Mikulas Patocka <mpatocka(a)redhat.com>
Cc: Nathan March <nathan(a)gt.net>
Cc: Pasi Kärkkäinen <pasik(a)iki.fi>
Cc: Peter Hurley <peter(a)hurleysoftware.com>
Cc: "Rong, Chen" <rong.a.chen(a)intel.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work(a)gmail.com>
Cc: Tan Xiaojun <tanxiaojun(a)huawei.com>
Cc: Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
(please, ignore if I Cc'ed you mistakenly)
Dmitry Safonov (6):
tty: Drop tty->count on tty_reopen() failure
tty/ldsem: Update waiter->task before waking up reader
tty: Hold tty_ldisc_lock() during tty_reopen()
tty/lockdep: Add ldisc_sem asserts
tty: Simplify tty->count math in tty_reopen()
tty/ldsem: Decrement wait_readers on timeouted down_read()
drivers/tty/tty_io.c | 12 ++++++++----
drivers/tty/tty_ldisc.c | 5 +++++
drivers/tty/tty_ldsem.c | 5 ++++-
3 files changed, 17 insertions(+), 5 deletions(-)
--
2.13.6
Hi,
If you have photos for editing, please send email to: hansrekan(a)outlook.com
We have 12 in house image editors and we can help you for cutting out your
photos, or path the photos.
Includes retouching if needed.
Used for products photos or portrait photos, catalog photos.
You may drop us one photo, we can send you the testing work.
Thanks,
Aaron Williams
Email: hansrekan(a)outlook.com
Hi,
If you have photos for editing, please send email to: hansrekan(a)outlook.com
We have 12 in house image editors and we can help you for cutting out your
photos, or path the photos.
Includes retouching if needed.
Used for products photos or portrait photos, catalog photos.
You may drop us one photo, we can send you the testing work.
Thanks,
Aaron Williams
Email: hansrekan(a)outlook.com
Hi,
If you have photos for editing, please send email to: hansrekan(a)outlook.com
We have 12 in house image editors and we can help you for cutting out your
photos, or path the photos.
Includes retouching if needed.
Used for products photos or portrait photos, catalog photos.
You may drop us one photo, we can send you the testing work.
Thanks,
Aaron Williams
Email: hansrekan(a)outlook.com
Two fixes for potential and real issues.
Looks worth to have in stables as we've hit it on v4.9 stable.
And for linux-next - adding lockdep asserts for line discipline changing
code, verifying that write ldisc sem will be held forthwith.
I couldn't verify that holding write lock fixes the issue as we've hit
it only once and I've failed in reproducing it.
But searching in lkml, Cc'ing here people who probably had the same
crash (and in hope someone of them could give tested-by):
Cc: Daniel Axtens <dja(a)axtens.net>
Cc: Dmitry Vyukov <dvyukov(a)google.com>
Cc: Michael Neuling <mikey(a)neuling.org>
Cc: Mikulas Patocka <mpatocka(a)redhat.com>
Cc: Pasi Kärkkäinen <pasik(a)iki.fi>
Cc: Peter Hurley <peter(a)hurleysoftware.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work(a)gmail.com>
Cc: Tan Xiaojun <tanxiaojun(a)huawei.com>
(please, ignore if I Cc'ed you mistakenly)
Dmitry Safonov (4):
tty: Drop tty->count on tty_reopen() failure
tty: Hold tty_ldisc_lock() during tty_reopen()
tty: Lock tty pair in tty_init_dev()
tty/lockdep: Add ldisc_sem asserts
drivers/tty/tty_io.c | 21 +++++++++++++++------
drivers/tty/tty_ldisc.c | 12 ++++++++----
include/linux/tty.h | 4 ++++
3 files changed, 27 insertions(+), 10 deletions(-)
--
2.13.6
This is a note to let you know that I've just added the patch titled
Revert "cdc-acm: implement put_char() and flush_chars()"
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From df3aa13c7bbb307e172c37f193f9a7aa058d4739 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum(a)suse.com>
Date: Wed, 5 Sep 2018 17:56:46 +0200
Subject: Revert "cdc-acm: implement put_char() and flush_chars()"
This reverts commit a81cf9799ad7299b03a4dff020d9685f9ac5f3e0.
The patch causes a regression, which I cannot find the reason for.
So let's revert for now, as a revert hurts only performance.
Original report:
I was trying to resolve the problem with Oliver but we don't get any conclusion
for 5 months, so I am now sending this to mail list and cdc_acm authors.
I am using simple request-response protocol to obtain the boiller parameters
in constant intervals.
A simple one transaction is:
1. opening the /dev/ttyACM0
2. sending the following 10-bytes request to the device:
unsigned char req[] = {0x02, 0xfe, 0x01, 0x05, 0x08, 0x02, 0x01, 0x69, 0xab, 0x03};
3. reading response (frame of 74 bytes length).
4. closing the descriptor
I am doing this transaction with 5 seconds intervals.
Before the bad commit everything was working correctly: I've got a requests and
a responses in a timely manner.
After the bad commit more time I am using the kernel module, more problems I have.
The graph [2] is showing the problem.
As you can see after module load all seems fine but after about 30 minutes I've got
a plenty of EAGAINs when doing read()'s and trying to read back the data.
When I rmmod and insmod the cdc_acm module again, then the situation is starting
over again: running ok shortly after load, and more time it is running, more EAGAINs
I have when calling read().
As a bonus I can see the problem on the device itself:
The device is configured as you can see here on this screen [3].
It has two transmision LEDs: TX and RX. Blink duration is set for 100ms.
This is a recording before the bad commit when all is working fine: [4]
And this is with the bad commit: [5]
As you can see the TX led is blinking wrongly long (indicating transmission?)
and I have problems doing read() calls (EAGAIN).
Reported-by: Mariusz Bialonczyk <manio(a)skyboo.net>
Signed-off-by: Oliver Neukum <oneukum(a)suse.com>
Fixes: a81cf9799ad7 ("cdc-acm: implement put_char() and flush_chars()")
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/class/cdc-acm.c | 73 -------------------------------------
drivers/usb/class/cdc-acm.h | 1 -
2 files changed, 74 deletions(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 27346d69f393..f9b40a9dc4d3 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -780,20 +780,9 @@ static int acm_tty_write(struct tty_struct *tty,
}
if (acm->susp_count) {
- if (acm->putbuffer) {
- /* now to preserve order */
- usb_anchor_urb(acm->putbuffer->urb, &acm->delayed);
- acm->putbuffer = NULL;
- }
usb_anchor_urb(wb->urb, &acm->delayed);
spin_unlock_irqrestore(&acm->write_lock, flags);
return count;
- } else {
- if (acm->putbuffer) {
- /* at this point there is no good way to handle errors */
- acm_start_wb(acm, acm->putbuffer);
- acm->putbuffer = NULL;
- }
}
stat = acm_start_wb(acm, wb);
@@ -804,66 +793,6 @@ static int acm_tty_write(struct tty_struct *tty,
return count;
}
-static void acm_tty_flush_chars(struct tty_struct *tty)
-{
- struct acm *acm = tty->driver_data;
- struct acm_wb *cur;
- int err;
- unsigned long flags;
-
- spin_lock_irqsave(&acm->write_lock, flags);
-
- cur = acm->putbuffer;
- if (!cur) /* nothing to do */
- goto out;
-
- acm->putbuffer = NULL;
- err = usb_autopm_get_interface_async(acm->control);
- if (err < 0) {
- cur->use = 0;
- acm->putbuffer = cur;
- goto out;
- }
-
- if (acm->susp_count)
- usb_anchor_urb(cur->urb, &acm->delayed);
- else
- acm_start_wb(acm, cur);
-out:
- spin_unlock_irqrestore(&acm->write_lock, flags);
- return;
-}
-
-static int acm_tty_put_char(struct tty_struct *tty, unsigned char ch)
-{
- struct acm *acm = tty->driver_data;
- struct acm_wb *cur;
- int wbn;
- unsigned long flags;
-
-overflow:
- cur = acm->putbuffer;
- if (!cur) {
- spin_lock_irqsave(&acm->write_lock, flags);
- wbn = acm_wb_alloc(acm);
- if (wbn >= 0) {
- cur = &acm->wb[wbn];
- acm->putbuffer = cur;
- }
- spin_unlock_irqrestore(&acm->write_lock, flags);
- if (!cur)
- return 0;
- }
-
- if (cur->len == acm->writesize) {
- acm_tty_flush_chars(tty);
- goto overflow;
- }
-
- cur->buf[cur->len++] = ch;
- return 1;
-}
-
static int acm_tty_write_room(struct tty_struct *tty)
{
struct acm *acm = tty->driver_data;
@@ -1987,8 +1916,6 @@ static const struct tty_operations acm_ops = {
.cleanup = acm_tty_cleanup,
.hangup = acm_tty_hangup,
.write = acm_tty_write,
- .put_char = acm_tty_put_char,
- .flush_chars = acm_tty_flush_chars,
.write_room = acm_tty_write_room,
.ioctl = acm_tty_ioctl,
.throttle = acm_tty_throttle,
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index eacc116e83da..ca06b20d7af9 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -96,7 +96,6 @@ struct acm {
unsigned long read_urbs_free;
struct urb *read_urbs[ACM_NR];
struct acm_rb read_buffers[ACM_NR];
- struct acm_wb *putbuffer; /* for acm_tty_put_char() */
int rx_buflimit;
spinlock_t read_lock;
u8 *notification_buffer; /* to reassemble fragmented notifications */
--
2.18.0
We need that to adjust the len of the 2nd transfer (called data in
spi-mem) if it's too long to fit in a SPI message or SPI transfer.
Fixes: c36ff266dc82 ("spi: Extend the core to ease integration of SPI memory controllers")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chuanhua Han <chuanhua.han(a)nxp.com>
Reviewed-by: Boris Brezillon <boris.brezillon(a)bootlin.com>
---
Changes in v5:
-Add the validation check after the op->data.nbytes assignment
-Assign the "len" variable after defining it
-Remove the brackets on both sides of "opt-> data.nbytes"
Changes in v4:
-Rename variable name "opcode_addr_dummy_sum" to "len"
-The comparison of "spi_max_message_size(mem->spi)" and "len" was removed
-Adjust their order when comparing the sizes of "spi_max_message_size(mem->spi)" and "len"
-Changing the "unsigned long" type in the code to "size_t"
Changes in v3:
-Rename variable name "val" to "opcode_addr_dummy_sum"
-Place the legitimacy of the transfer size(i.e., "spi_max_message_size(mem->spi)" and
"opcode_addr_dummy_sum") into "if (! ctlr - > mem_ops | |! ctlr-> mem_ops->exec_op) {"
structure and add "spi_max_transfer_size(mem->spi) and opcode_addr_dummy_sum"
-Adjust the formatting alignment of the code
-"(unsigned long)op->data.nbytes" was modified to "(unsigned long)(op->data.nbytes)"
Changes in v2:
-Place the adjusted transfer bytes code in spi_mem_adjust_op_size() and check
spi_max_message_size(mem->spi) value before subtracting opcode, addr and dummy bytes
-Change the code from fsl-espi controller to generic code(The adjustment of spi transmission
length was originally modified in the "drivers/spi/spi-fsl-espi.c" file, and now the adjustment
of transfer length is made in the "drivers/spi/spi-mem.c" file)
drivers/spi/spi-mem.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index e43842c..eb72dba 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -346,10 +346,25 @@ EXPORT_SYMBOL_GPL(spi_mem_get_name);
int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)
{
struct spi_controller *ctlr = mem->spi->controller;
+ size_t len;
+
+ len = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes;
if (ctlr->mem_ops && ctlr->mem_ops->adjust_op_size)
return ctlr->mem_ops->adjust_op_size(mem, op);
+ if (!ctlr->mem_ops || !ctlr->mem_ops->exec_op) {
+ if (len > spi_max_transfer_size(mem->spi))
+ return -EINVAL;
+
+ op->data.nbytes = min3((size_t)op->data.nbytes,
+ spi_max_transfer_size(mem->spi),
+ spi_max_message_size(mem->spi) -
+ len);
+ if (!op->data.nbytes)
+ return -EINVAL;
+ }
+
return 0;
}
EXPORT_SYMBOL_GPL(spi_mem_adjust_op_size);
--
2.7.4
This is the start of the stable review cycle for the 4.18.7 release.
There are 145 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 Sun Sep 9 21:08:26 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.18.7-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.18.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.18.7-rc1
James Morse <james.morse(a)arm.com>
arm64: mm: always enable CONFIG_HOLES_IN_ZONE
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
cpuidle: menu: Retain tick when shallow state is selected
Jan Kara <jack(a)suse.cz>
udf: Fix mounting of Win7 created UDF filesystems
Jeremy Cline <jcline(a)redhat.com>
fs/quota: Fix spectre gadget in do_quotactl
Horia Geantă <horia.geanta(a)nxp.com>
crypto: caam/qi - fix error path in xts setkey
Horia Geantă <horia.geanta(a)nxp.com>
crypto: caam/jr - fix descriptor DMA unmapping
Horia Geantă <horia.geanta(a)nxp.com>
crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
crypto: arm64/sm4-ce - check for the right CPU feature bit
Dave Watson <davejwatson(a)fb.com>
crypto: aesni - Use unaligned loads from gcm_context_data
Ondrej Mosnacek <omosnace(a)redhat.com>
crypto: vmx - Fix sleep-in-atomic bugs
Adrian Hunter <adrian.hunter(a)intel.com>
perf auxtrace: Fix queue resize
Dan Williams <dan.j.williams(a)intel.com>
mm, dev_pagemap: Do not clear ->mapping on final put
Eddie.Horng <eddie.horng(a)mediatek.com>
cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kconfig: fix "Can't open ..." in parallel build
Shan Hai <shan.hai(a)oracle.com>
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Vishal Verma <vishal.l.verma(a)intel.com>
libnvdimm: fix ars_status output length calculation
Keith Busch <keith.busch(a)intel.com>
libnvdimm: Use max contiguous area for namespace size
Christian Brauner <christian(a)brauner.io>
getxattr: use correct xattr length
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: set line_length in dlfb_ops_set_par
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: handle allocation failure
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: make a local copy of fb_ops
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: set optimal write delay
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: don't switch if we are switching to the same videomode
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: fix display corruption of the last line
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: fix semaphore value leak
Mikulas Patocka <mpatocka(a)redhat.com>
fb: fix lost console when the user unplugs a USB adapter
Vignesh R <vigneshr(a)ti.com>
pwm: tiehrpwm: Fix disabling of output of PWMs
Vignesh R <vigneshr(a)ti.com>
pwm: tiehrpwm: Don't use emulation mode bits to control PWM output
Richard Weinberger <richard(a)nod.at>
ubifs: Fix synced_i_size calculation for xattr inodes
Richard Weinberger <richard(a)nod.at>
ubifs: Fix directory size calculation for symlinks
Richard Weinberger <richard(a)nod.at>
ubifs: xattr: Don't operate on deleted inodes
Richard Weinberger <richard(a)nod.at>
ubifs: Check data node size before truncate
Richard Weinberger <richard(a)nod.at>
Revert "UBIFS: Fix potential integer overflow in allocation"
Richard Weinberger <richard(a)nod.at>
ubifs: Fix memory leak in lprobs self-check
Jann Horn <jannh(a)google.com>
userns: move user access out of the mutex
Jann Horn <jannh(a)google.com>
sys: don't hold uts_sem while accessing userspace memory
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Fix dev iotlb pfsid use
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Add definitions for PFSID
Dmitry Osipenko <digetx(a)gmail.com>
iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have IPMMU-VMSA
Peter Zijlstra <peterz(a)infradead.org>
mm/tlb: Remove tlb_remove_table() non-concurrent condition
David Rivshin <DRivshin(a)allworx.com>
pwm: omap-dmtimer: Return -EPROBE_DEFER if no dmtimer platform data
Roger Quadros <rogerq(a)ti.com>
ARM: dts: am57xx-idk: Enable dual role for USB2 port
Jon Hunter <jonathanh(a)nvidia.com>
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Trond Myklebust <trondmy(a)gmail.com>
NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
Trond Myklebust <trondmy(a)gmail.com>
NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
Bill Baker <Bill.Baker(a)Oracle.com>
NFSv4 client live hangs after live data migration recovery
Amir Goldstein <amir73il(a)gmail.com>
nfsd: fix leaked file lock with nfs exported overlayfs
Dan Carpenter <dan.carpenter(a)oracle.com>
pnfs/blocklayout: off by one in bl_map_stripe()
Maciej S. Szmigiero <mail(a)maciej.szmigiero.name>
block, bfq: return nbytes and not zero from struct cftype .write() method
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: increase ranges in ___invalidate_{i,d}cache_all
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: limit offsets in __loop_cache_{all,page}
Paul Mackerras <paulus(a)ozlabs.org>
KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: VMX: fixes for vmentry_l1d_flush module parameter
Hans de Goede <hdegoede(a)redhat.com>
i2c: designware: Re-init controllers with pm_disabled set on resume
Lihua Yao <ylhuajnu(a)163.com>
ALSA: ac97: fix unbalanced pm_runtime_enable
Lihua Yao <ylhuajnu(a)163.com>
ALSA: ac97: fix check of pm_runtime_get_sync failure
Lihua Yao <ylhuajnu(a)163.com>
ALSA: ac97: fix device initialization in the compat layer
zhangyi (F) <yi.zhang(a)huawei.com>
PM / sleep: wakeup: Fix build error caused by missing SRCU support
Henry Willard <henry.willard(a)oracle.com>
cpufreq: governor: Avoid accessing invalid governor_data
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
cpuidle: menu: Handle stopped tick more aggressively
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
sched: idle: Avoid retaining the tick when it has been stopped
Peter Kalauskas <peskal(a)google.com>
drivers/block/zram/zram_drv.c: fix bug storing backing_dev
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
ACPICA: Clear status of all events when entering sleep states
Erik Schmauss <erik.schmauss(a)intel.com>
ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
Amir Goldstein <amir73il(a)gmail.com>
ovl: fix wrong use of impure dir cache in ovl_iterate()
Rafael David Tinoco <rafael.tinoco(a)linaro.org>
mfd: hi655x: Fix regmap area declared size for hi655x
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
uprobes: Use synchronize_rcu() not synchronize_sched()
Kamalesh Babulal <kamalesh(a)linux.vnet.ibm.com>
livepatch: Validate module/old func name length
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
printk/tracing: Do not trace printk_nmi_enter()
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing/blktrace: Fix to allow setting same value
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing: Do not call start/stop() functions when tracing_on does not change
Johan Hovold <johan(a)kernel.org>
rtc: omap: fix potential crash on power off
Johan Hovold <johan(a)kernel.org>
rtc: omap: fix resource leak in registration error path
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix VMCI use when balloon built into kernel
Nadav Amit <namit(a)vmware.com>
vmw_balloon: VMCI_DOORBELL_SET does not check status
Nadav Amit <namit(a)vmware.com>
vmw_balloon: do not use 2MB without batching
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix inflation of 64-bit GFNs
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
eventpoll.h: wrap casts in () properly
Chanwoo Choi <cw00.choi(a)samsung.com>
extcon: Release locking when sending the notification of connector state
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix return value for ad952x_store()
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix displayed phase
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
iio: sca3000: Fix missing return in switch
Dexuan Cui <decui(a)microsoft.com>
Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
Dexuan Cui <decui(a)microsoft.com>
Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer()
Tycho Andersen <tycho(a)tycho.ws>
uart: fix race between uart_put_char() and uart_shutdown()
Mikulas Patocka <mpatocka(a)redhat.com>
dm writecache: fix a crash due to reading past end of dirty_bitmap
Mikulas Patocka <mpatocka(a)redhat.com>
dm crypt: don't decrease device limits
Ilya Dryomov <idryomov(a)gmail.com>
dm cache metadata: set dirty on all cache blocks after a crash
Mike Snitzer <snitzer(a)redhat.com>
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Hou Tao <houtao1(a)huawei.com>
dm thin: stop no_space_timeout worker when switching to write-mode
Mikulas Patocka <mpatocka(a)redhat.com>
dm integrity: change 'suspending' variable from bool to int
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/client.c: version pointer uninitialized
jiangyiwen <jiangyiwen(a)huawei.com>
9p/virtio: fix off-by-one error in sg list bounds check
piaojun <piaojun(a)huawei.com>
fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
Tomas Bortoli <tomasbortoli(a)gmail.com>
9p: fix multiple NULL-pointer-dereferences
Bart Van Assche <bart.vanassche(a)wdc.com>
RDMA/rxe: Set wqe->status correctly if an unexpected response is received
Bart Van Assche <bart.vanassche(a)wdc.com>
ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
Bart Van Assche <bart.vanassche(a)wdc.com>
ib_srpt: Fix a use-after-free in srpt_close_ch()
Leon Romanovsky <leon(a)kernel.org>
RDMA/mlx5: Fix shift overflow in mlx5_ib_create_wq
Jason Gunthorpe <jgg(a)ziepe.ca>
overflow.h: Add arithmetic shift helper
Bart Van Assche <bart.vanassche(a)wdc.com>
IB/srpt: Support HCAs with more than two ports
Bart Van Assche <bart.vanassche(a)wdc.com>
IB/srpt: Fix srpt_cm_req_recv() error path (2/2)
Bart Van Assche <bart.vanassche(a)wdc.com>
IB/srpt: Fix srpt_cm_req_recv() error path (1/2)
Jason Gunthorpe <jgg(a)ziepe.ca>
IB/mlx5: Fix leaking stack memory to userspace
Parav Pandit <parav(a)mellanox.com>
IB/mlx5: Honor cnt_set_id_valid flag instead of set_id
Frederic Barrat <fbarrat(a)linux.ibm.com>
ocxl: Fix page fault handler in case of fault on dying process
Vaibhav Jain <vaibhav(a)linux.ibm.com>
cxl: Fix wrong comparison in cxl_adapter_context_get()
Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
powerpc/powernv/pci: Work around races in PCI bridge enabling
Luke Dashjr <luke(a)dashjr.org>
powerpc64/ftrace: Include ftrace.h needed for enable/disable calls
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc/nohash: fix pte_access_permitted()
Ram Pai <linuxram(a)us.ibm.com>
powerpc/pkeys: Preallocate execute-only key
Ram Pai <linuxram(a)us.ibm.com>
powerpc/pkeys: Fix calculation of total pkeys.
Ram Pai <linuxram(a)us.ibm.com>
powerpc/pkeys: Save the pkey registers before fork
Ram Pai <linuxram(a)us.ibm.com>
powerpc/pkeys: key allocation/deallocation must not change pkey registers
Ram Pai <linuxram(a)us.ibm.com>
powerpc/pkeys: Deny read/write/execute by default
Ram Pai <linuxram(a)us.ibm.com>
powerpc/pkeys: Give all threads control of their key permissions
Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com>
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/64s: Fix page table fragment refcount race vs speculative references
Hari Bathini <hbathini(a)linux.ibm.com>
powerpc/fadump: handle crash memory ranges array index overflow
Yannik Sembritzki <yannik(a)sembritzki.me>
Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
Yannik Sembritzki <yannik(a)sembritzki.me>
Replace magic for trusting the secondary keyring with #define
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
mailbox: xgene-slimpro: Fix potential NULL pointer dereference
Javier Martinez Canillas <javierm(a)redhat.com>
media: Revert "[media] tvp5150: fix pad format frame height"
Daniel Mack <daniel(a)zonque.org>
libertas: fix suspend and resume for SDIO connected cards
Michel Dänzer <michel.daenzer(a)amd.com>
dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace
John Johansen <john.johansen(a)canonical.com>
apparmor: fix bad debug check in apparmor_secid_to_secctx()
Bart Van Assche <bart.vanassche(a)wdc.com>
block: Ensure that a request queue is dissociated from the cgroup controller
Bart Van Assche <bart.vanassche(a)wdc.com>
block: Introduce blk_exit_queue()
Bart Van Assche <bart.vanassche(a)wdc.com>
blkcg: Introduce blkg_root_lookup()
Ming Lei <ming.lei(a)redhat.com>
block: really disable runtime-pm for blk-mq
xiao jin <jin.xiao(a)intel.com>
block: blk_init_allocated_queue() set q->fq as NULL in the fail case
Mikulas Patocka <mpatocka(a)redhat.com>
block: fix infinite loop if the device loses discard capability
Markus Stockhausen <stockhausen(a)collogia.de>
readahead: stricter check for bdi io_pages
Sergei Shtylyov <sergei.shtylyov(a)cogentembedded.com>
mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
Sergei Shtylyov <sergei.shtylyov(a)cogentembedded.com>
mmc: renesas_sdhi_internal_dmac: mask DMAC interrupts
Adrian Hunter <adrian.hunter(a)intel.com>
mmc: block: Fix unsupported parallel dispatch of requests
Janek Kotas <jank(a)cadence.com>
spi: cadence: Change usleep_range() to udelay(), for atomic context
Krzysztof Kozlowski <krzk(a)kernel.org>
spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
Mika Westerberg <mika.westerberg(a)linux.intel.com>
spi: pxa2xx: Add support for Intel Ice Lake
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
spi: davinci: fix a NULL pointer dereference
Chirantan Ekbote <chirantan(a)chromium.org>
9p/net: Fix zero-copy path in the 9p virtio transport
Alexander Aring <aring(a)mojatatu.com>
net: mac802154: tx: expand tailroom if necessary
Alexander Aring <aring(a)mojatatu.com>
net: 6lowpan: fix reserved space for single frames
Boqun Feng <boqun.feng(a)gmail.com>
rcu: Make expedited GPs handle CPU 0 being offline
-------------
Diffstat:
Makefile | 4 +-
arch/alpha/kernel/osf_sys.c | 51 +++++----
arch/arm/boot/dts/am571x-idk.dts | 4 -
arch/arm/boot/dts/am572x-idk-common.dtsi | 4 -
arch/arm/boot/dts/am57xx-idk-common.dtsi | 7 +-
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 +
arch/arm64/Kconfig | 1 -
arch/arm64/crypto/sm4-ce-glue.c | 2 +-
arch/powerpc/include/asm/fadump.h | 3 -
arch/powerpc/include/asm/nohash/pgtable.h | 9 +-
arch/powerpc/include/asm/pkeys.h | 11 --
arch/powerpc/kernel/fadump.c | 91 +++++++++++++---
arch/powerpc/kernel/process.c | 1 +
arch/powerpc/kvm/book3s_hv.c | 1 +
arch/powerpc/mm/mmu_context_book3s64.c | 8 +-
arch/powerpc/mm/mmu_context_iommu.c | 17 +--
arch/powerpc/mm/pgtable-book3s64.c | 17 +--
arch/powerpc/mm/pkeys.c | 134 ++++++++----------------
arch/powerpc/platforms/powernv/pci-ioda.c | 37 +++++++
arch/powerpc/platforms/pseries/ras.c | 2 +-
arch/sparc/kernel/sys_sparc_32.c | 22 ++--
arch/sparc/kernel/sys_sparc_64.c | 20 ++--
arch/x86/crypto/aesni-intel_asm.S | 66 ++++++------
arch/x86/kernel/kexec-bzimage64.c | 2 +-
arch/x86/kvm/vmx.c | 26 +++--
arch/xtensa/include/asm/cacheasm.h | 69 +++++++-----
block/bfq-cgroup.c | 3 +-
block/blk-core.c | 61 ++++++-----
block/blk-lib.c | 10 ++
block/blk-sysfs.c | 15 +++
block/blk.h | 1 +
certs/system_keyring.c | 3 +-
crypto/asymmetric_keys/pkcs7_key_type.c | 2 +-
drivers/acpi/acpica/hwsleep.c | 11 +-
drivers/acpi/acpica/psloop.c | 17 +--
drivers/block/zram/zram_drv.c | 7 +-
drivers/cpufreq/cpufreq_governor.c | 12 ++-
drivers/cpuidle/governors/menu.c | 47 ++++++---
drivers/crypto/caam/caamalg_qi.c | 6 +-
drivers/crypto/caam/caampkc.c | 20 ++--
drivers/crypto/caam/jr.c | 3 +-
drivers/crypto/vmx/aes_cbc.c | 30 +++---
drivers/crypto/vmx/aes_xts.c | 21 ++--
drivers/dma-buf/reservation.c | 6 +-
drivers/extcon/extcon.c | 3 +-
drivers/hv/channel.c | 40 ++++---
drivers/hv/channel_mgmt.c | 10 +-
drivers/i2c/busses/i2c-designware-master.c | 1 -
drivers/i2c/busses/i2c-designware-platdrv.c | 7 +-
drivers/iio/accel/sca3000.c | 1 +
drivers/iio/frequency/ad9523.c | 4 +-
drivers/infiniband/hw/mlx5/main.c | 2 +-
drivers/infiniband/hw/mlx5/qp.c | 6 +-
drivers/infiniband/sw/rxe/rxe_comp.c | 1 +
drivers/infiniband/ulp/srpt/ib_srpt.c | 34 ++++--
drivers/infiniband/ulp/srpt/ib_srpt.h | 4 +-
drivers/iommu/dmar.c | 6 +-
drivers/iommu/intel-iommu.c | 18 +++-
drivers/iommu/ipmmu-vmsa.c | 7 ++
drivers/mailbox/mailbox-xgene-slimpro.c | 6 +-
drivers/md/bcache/writeback.c | 4 +-
drivers/md/dm-cache-metadata.c | 13 ++-
drivers/md/dm-crypt.c | 10 +-
drivers/md/dm-integrity.c | 6 +-
drivers/md/dm-thin.c | 2 +
drivers/md/dm-writecache.c | 2 +-
drivers/media/i2c/tvp5150.c | 2 +-
drivers/mfd/hi655x-pmic.c | 2 +-
drivers/misc/cxl/main.c | 2 +-
drivers/misc/ocxl/link.c | 24 +++--
drivers/misc/vmw_balloon.c | 67 +++++++-----
drivers/mmc/core/queue.c | 12 ++-
drivers/mmc/core/queue.h | 1 +
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 10 +-
drivers/net/wireless/marvell/libertas/dev.h | 1 +
drivers/net/wireless/marvell/libertas/if_sdio.c | 30 ++++--
drivers/nvdimm/bus.c | 4 +-
drivers/nvdimm/dimm_devs.c | 31 ++++++
drivers/nvdimm/namespace_devs.c | 6 +-
drivers/nvdimm/nd-core.h | 8 ++
drivers/nvdimm/region_devs.c | 24 +++++
drivers/pwm/pwm-omap-dmtimer.c | 5 +-
drivers/pwm/pwm-tiehrpwm.c | 14 +--
drivers/rtc/rtc-omap.c | 18 ++--
drivers/spi/spi-cadence.c | 2 +-
drivers/spi/spi-davinci.c | 2 +-
drivers/spi/spi-fsl-dspi.c | 24 ++---
drivers/spi/spi-pxa2xx.c | 4 +
drivers/tty/serial/serial_core.c | 17 ++-
drivers/video/fbdev/core/fbmem.c | 38 +++++--
drivers/video/fbdev/udlfb.c | 105 ++++++++++---------
fs/9p/xattr.c | 6 +-
fs/lockd/clntlock.c | 2 +-
fs/lockd/clntproc.c | 2 +-
fs/lockd/svclock.c | 16 +--
fs/lockd/svcsubs.c | 4 +-
fs/nfs/blocklayout/dev.c | 2 +-
fs/nfs/callback_proc.c | 14 ++-
fs/nfs/nfs4proc.c | 9 +-
fs/nfs/pnfs_nfs.c | 16 ++-
fs/nfsd/nfs4state.c | 2 +-
fs/overlayfs/readdir.c | 19 +++-
fs/quota/quota.c | 2 +
fs/ubifs/dir.c | 5 +-
fs/ubifs/journal.c | 21 +++-
fs/ubifs/lprops.c | 8 +-
fs/ubifs/xattr.c | 24 +++++
fs/udf/super.c | 31 +++---
fs/xattr.c | 2 +-
include/linux/blk-cgroup.h | 18 ++++
include/linux/hyperv.h | 2 +
include/linux/intel-iommu.h | 8 +-
include/linux/lockd/lockd.h | 4 +-
include/linux/mm_types.h | 5 +-
include/linux/overflow.h | 31 ++++++
include/linux/sunrpc/clnt.h | 1 +
include/linux/verification.h | 6 ++
include/uapi/linux/eventpoll.h | 8 +-
include/video/udlfb.h | 5 +-
kernel/livepatch/core.c | 6 ++
kernel/memremap.c | 1 -
kernel/power/Kconfig | 1 +
kernel/printk/printk_safe.c | 4 +-
kernel/rcu/tree_exp.h | 9 +-
kernel/sched/idle.c | 2 +-
kernel/sys.c | 95 ++++++++---------
kernel/trace/blktrace.c | 4 +
kernel/trace/trace.c | 4 +-
kernel/trace/trace_uprobe.c | 2 +-
kernel/user_namespace.c | 24 ++---
kernel/utsname_sysctl.c | 41 +++++---
mm/hmm.c | 2 +
mm/memory.c | 9 --
mm/readahead.c | 12 ++-
net/9p/client.c | 2 +-
net/9p/trans_fd.c | 7 +-
net/9p/trans_rdma.c | 3 +
net/9p/trans_virtio.c | 13 ++-
net/9p/trans_xen.c | 3 +
net/ieee802154/6lowpan/tx.c | 21 +++-
net/mac802154/tx.c | 15 ++-
net/sunrpc/clnt.c | 28 +++--
scripts/kconfig/Makefile | 5 +-
security/apparmor/secid.c | 1 -
security/commoncap.c | 2 +-
sound/ac97/bus.c | 4 +-
sound/ac97/snd_ac97_compat.c | 19 +++-
tools/perf/util/auxtrace.c | 3 +
148 files changed, 1374 insertions(+), 766 deletions(-)
This is the start of the stable review cycle for the 4.14.69 release.
There are 89 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 Sun Sep 9 21:08:28 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.69-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.69-rc1
James Morse <james.morse(a)arm.com>
arm64: mm: always enable CONFIG_HOLES_IN_ZONE
Jeremy Cline <jcline(a)redhat.com>
fs/quota: Fix spectre gadget in do_quotactl
Horia Geantă <horia.geanta(a)nxp.com>
crypto: caam/qi - fix error path in xts setkey
Horia Geantă <horia.geanta(a)nxp.com>
crypto: caam/jr - fix descriptor DMA unmapping
Horia Geantă <horia.geanta(a)nxp.com>
crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
Ondrej Mosnacek <omosnace(a)redhat.com>
crypto: vmx - Fix sleep-in-atomic bugs
Adrian Hunter <adrian.hunter(a)intel.com>
perf auxtrace: Fix queue resize
Eddie.Horng <eddie.horng(a)mediatek.com>
cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()
Shan Hai <shan.hai(a)oracle.com>
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Vishal Verma <vishal.l.verma(a)intel.com>
libnvdimm: fix ars_status output length calculation
Christian Brauner <christian(a)brauner.io>
getxattr: use correct xattr length
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: set optimal write delay
Mikulas Patocka <mpatocka(a)redhat.com>
fb: fix lost console when the user unplugs a USB adapter
Vignesh R <vigneshr(a)ti.com>
pwm: tiehrpwm: Fix disabling of output of PWMs
Vignesh R <vigneshr(a)ti.com>
pwm: tiehrpwm: Don't use emulation mode bits to control PWM output
Richard Weinberger <richard(a)nod.at>
ubifs: Fix synced_i_size calculation for xattr inodes
Richard Weinberger <richard(a)nod.at>
ubifs: xattr: Don't operate on deleted inodes
Richard Weinberger <richard(a)nod.at>
ubifs: Check data node size before truncate
Richard Weinberger <richard(a)nod.at>
Revert "UBIFS: Fix potential integer overflow in allocation"
Richard Weinberger <richard(a)nod.at>
ubifs: Fix memory leak in lprobs self-check
Jann Horn <jannh(a)google.com>
userns: move user access out of the mutex
Jann Horn <jannh(a)google.com>
sys: don't hold uts_sem while accessing userspace memory
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Fix dev iotlb pfsid use
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Add definitions for PFSID
Peter Zijlstra <peterz(a)infradead.org>
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Jon Hunter <jonathanh(a)nvidia.com>
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Trond Myklebust <trondmy(a)gmail.com>
NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
Trond Myklebust <trondmy(a)gmail.com>
NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
Bill Baker <Bill.Baker(a)Oracle.com>
NFSv4 client live hangs after live data migration recovery
Dan Carpenter <dan.carpenter(a)oracle.com>
pnfs/blocklayout: off by one in bl_map_stripe()
Maciej S. Szmigiero <mail(a)maciej.szmigiero.name>
block, bfq: return nbytes and not zero from struct cftype .write() method
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: increase ranges in ___invalidate_{i,d}cache_all
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: limit offsets in __loop_cache_{all,page}
Paul Mackerras <paulus(a)ozlabs.org>
KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: VMX: fixes for vmentry_l1d_flush module parameter
zhangyi (F) <yi.zhang(a)huawei.com>
PM / sleep: wakeup: Fix build error caused by missing SRCU support
Henry Willard <henry.willard(a)oracle.com>
cpufreq: governor: Avoid accessing invalid governor_data
Peter Kalauskas <peskal(a)google.com>
drivers/block/zram/zram_drv.c: fix bug storing backing_dev
Amir Goldstein <amir73il(a)gmail.com>
ovl: fix wrong use of impure dir cache in ovl_iterate()
Rafael David Tinoco <rafael.tinoco(a)linaro.org>
mfd: hi655x: Fix regmap area declared size for hi655x
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
uprobes: Use synchronize_rcu() not synchronize_sched()
Kamalesh Babulal <kamalesh(a)linux.vnet.ibm.com>
livepatch: Validate module/old func name length
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
printk/tracing: Do not trace printk_nmi_enter()
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing/blktrace: Fix to allow setting same value
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing: Do not call start/stop() functions when tracing_on does not change
Johan Hovold <johan(a)kernel.org>
rtc: omap: fix potential crash on power off
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix VMCI use when balloon built into kernel
Nadav Amit <namit(a)vmware.com>
vmw_balloon: VMCI_DOORBELL_SET does not check status
Nadav Amit <namit(a)vmware.com>
vmw_balloon: do not use 2MB without batching
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix inflation of 64-bit GFNs
Chanwoo Choi <cw00.choi(a)samsung.com>
extcon: Release locking when sending the notification of connector state
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix return value for ad952x_store()
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix displayed phase
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
iio: sca3000: Fix missing return in switch
Dexuan Cui <decui(a)microsoft.com>
Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
Tycho Andersen <tycho(a)tycho.ws>
uart: fix race between uart_put_char() and uart_shutdown()
Mikulas Patocka <mpatocka(a)redhat.com>
dm crypt: don't decrease device limits
Ilya Dryomov <idryomov(a)gmail.com>
dm cache metadata: set dirty on all cache blocks after a crash
Mike Snitzer <snitzer(a)redhat.com>
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Hou Tao <houtao1(a)huawei.com>
dm thin: stop no_space_timeout worker when switching to write-mode
Mikulas Patocka <mpatocka(a)redhat.com>
dm integrity: change 'suspending' variable from bool to int
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/client.c: version pointer uninitialized
jiangyiwen <jiangyiwen(a)huawei.com>
9p/virtio: fix off-by-one error in sg list bounds check
piaojun <piaojun(a)huawei.com>
fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
Tomas Bortoli <tomasbortoli(a)gmail.com>
9p: fix multiple NULL-pointer-dereferences
Bart Van Assche <bart.vanassche(a)wdc.com>
RDMA/rxe: Set wqe->status correctly if an unexpected response is received
Bart Van Assche <bart.vanassche(a)wdc.com>
ib_srpt: Fix a use-after-free in srpt_close_ch()
Vaibhav Jain <vaibhav(a)linux.ibm.com>
cxl: Fix wrong comparison in cxl_adapter_context_get()
Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
powerpc/powernv/pci: Work around races in PCI bridge enabling
Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com>
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Hari Bathini <hbathini(a)linux.ibm.com>
powerpc/fadump: handle crash memory ranges array index overflow
Yannik Sembritzki <yannik(a)sembritzki.me>
Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
Yannik Sembritzki <yannik(a)sembritzki.me>
Replace magic for trusting the secondary keyring with #define
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
mailbox: xgene-slimpro: Fix potential NULL pointer dereference
Javier Martinez Canillas <javierm(a)redhat.com>
media: Revert "[media] tvp5150: fix pad format frame height"
Daniel Mack <daniel(a)zonque.org>
libertas: fix suspend and resume for SDIO connected cards
Matthew Auld <matthew.auld(a)intel.com>
drm/i915/userptr: reject zero user_size
Ming Lei <ming.lei(a)redhat.com>
block: really disable runtime-pm for blk-mq
xiao jin <jin.xiao(a)intel.com>
block: blk_init_allocated_queue() set q->fq as NULL in the fail case
Markus Stockhausen <stockhausen(a)collogia.de>
readahead: stricter check for bdi io_pages
Sergei Shtylyov <sergei.shtylyov(a)cogentembedded.com>
mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
Janek Kotas <jank(a)cadence.com>
spi: cadence: Change usleep_range() to udelay(), for atomic context
Krzysztof Kozlowski <krzk(a)kernel.org>
spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
Mika Westerberg <mika.westerberg(a)linux.intel.com>
spi: pxa2xx: Add support for Intel Ice Lake
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
spi: davinci: fix a NULL pointer dereference
Chirantan Ekbote <chirantan(a)chromium.org>
9p/net: Fix zero-copy path in the 9p virtio transport
Alexander Aring <aring(a)mojatatu.com>
net: mac802154: tx: expand tailroom if necessary
Alexander Aring <aring(a)mojatatu.com>
net: 6lowpan: fix reserved space for single frames
-------------
Diffstat:
Makefile | 4 +-
arch/alpha/kernel/osf_sys.c | 51 +++++++------
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 +
arch/arm64/Kconfig | 1 -
arch/powerpc/include/asm/fadump.h | 3 -
arch/powerpc/kernel/fadump.c | 91 +++++++++++++++++++----
arch/powerpc/mm/mmu_context_iommu.c | 17 +++--
arch/powerpc/platforms/powernv/pci-ioda.c | 37 ++++++++++
arch/powerpc/platforms/pseries/ras.c | 2 +-
arch/sparc/kernel/sys_sparc_32.c | 22 +++---
arch/sparc/kernel/sys_sparc_64.c | 20 +++---
arch/x86/kernel/kexec-bzimage64.c | 2 +-
arch/x86/kvm/vmx.c | 26 ++++---
arch/xtensa/include/asm/cacheasm.h | 69 +++++++++++-------
block/bfq-cgroup.c | 3 +-
block/blk-core.c | 7 +-
certs/system_keyring.c | 3 +-
crypto/asymmetric_keys/pkcs7_key_type.c | 2 +-
drivers/block/zram/zram_drv.c | 7 +-
drivers/cpufreq/cpufreq_governor.c | 12 +++-
drivers/crypto/caam/caamalg_qi.c | 6 +-
drivers/crypto/caam/caampkc.c | 20 +++---
drivers/crypto/caam/jr.c | 3 +-
drivers/crypto/vmx/aes_cbc.c | 30 ++++----
drivers/crypto/vmx/aes_xts.c | 21 ++++--
drivers/extcon/extcon.c | 3 +-
drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +
drivers/hv/channel.c | 40 ++++++-----
drivers/hv/channel_mgmt.c | 6 ++
drivers/iio/accel/sca3000.c | 1 +
drivers/iio/frequency/ad9523.c | 4 +-
drivers/infiniband/sw/rxe/rxe_comp.c | 1 +
drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-
drivers/iommu/dmar.c | 6 +-
drivers/iommu/intel-iommu.c | 18 ++++-
drivers/mailbox/mailbox-xgene-slimpro.c | 6 +-
drivers/md/bcache/writeback.c | 4 +-
drivers/md/dm-cache-metadata.c | 13 ++--
drivers/md/dm-crypt.c | 10 +--
drivers/md/dm-integrity.c | 6 +-
drivers/md/dm-thin.c | 2 +
drivers/media/i2c/tvp5150.c | 2 +-
drivers/mfd/hi655x-pmic.c | 2 +-
drivers/misc/cxl/main.c | 2 +-
drivers/misc/vmw_balloon.c | 67 ++++++++++-------
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +-
drivers/net/wireless/marvell/libertas/dev.h | 1 +
drivers/net/wireless/marvell/libertas/if_sdio.c | 30 ++++++--
drivers/nvdimm/bus.c | 4 +-
drivers/pwm/pwm-tiehrpwm.c | 14 +---
drivers/rtc/rtc-omap.c | 14 ++--
drivers/spi/spi-cadence.c | 2 +-
drivers/spi/spi-davinci.c | 2 +-
drivers/spi/spi-fsl-dspi.c | 24 +++----
drivers/spi/spi-pxa2xx.c | 4 ++
drivers/tty/serial/serial_core.c | 17 +++--
drivers/video/fbdev/core/fbmem.c | 38 ++++++++--
fs/9p/xattr.c | 6 +-
fs/nfs/blocklayout/dev.c | 2 +-
fs/nfs/callback_proc.c | 14 ++--
fs/nfs/nfs4proc.c | 9 ++-
fs/nfs/pnfs_nfs.c | 16 ++---
fs/overlayfs/readdir.c | 19 ++++-
fs/quota/quota.c | 2 +
fs/ubifs/journal.c | 21 ++++--
fs/ubifs/lprops.c | 8 +--
fs/ubifs/xattr.c | 24 +++++++
fs/xattr.c | 2 +-
include/linux/hyperv.h | 2 +
include/linux/intel-iommu.h | 8 ++-
include/linux/sunrpc/clnt.h | 1 +
include/linux/verification.h | 6 ++
include/video/udlfb.h | 2 +-
kernel/livepatch/core.c | 6 ++
kernel/power/Kconfig | 1 +
kernel/printk/printk_safe.c | 4 +-
kernel/sys.c | 95 ++++++++++++-------------
kernel/trace/blktrace.c | 4 ++
kernel/trace/trace.c | 4 +-
kernel/trace/trace_uprobe.c | 2 +-
kernel/user_namespace.c | 24 +++----
kernel/utsname_sysctl.c | 41 ++++++-----
mm/memory.c | 9 ---
mm/readahead.c | 12 +++-
net/9p/client.c | 2 +-
net/9p/trans_fd.c | 7 +-
net/9p/trans_rdma.c | 3 +
net/9p/trans_virtio.c | 13 +++-
net/9p/trans_xen.c | 3 +
net/ieee802154/6lowpan/tx.c | 21 +++++-
net/mac802154/tx.c | 15 +++-
net/sunrpc/clnt.c | 28 +++++---
security/commoncap.c | 2 +-
tools/perf/util/auxtrace.c | 3 +
94 files changed, 831 insertions(+), 421 deletions(-)
The patch below was submitted to be applied to the 4.18-stable tree.
I fail to see how this patch meets the stable kernel rules as found at
Documentation/process/stable-kernel-rules.rst.
I could be totally wrong, and if so, please respond to
<stable(a)vger.kernel.org> and let me know why this patch should be
applied. Otherwise, it is now dropped from my patch queues, never to be
seen again.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From d806afa495e2e2a1a726e26c5e44f27818e804c1 Mon Sep 17 00:00:00 2001
From: Yi Wang <wang.yi59(a)zte.com.cn>
Date: Thu, 16 Aug 2018 13:42:39 +0800
Subject: [PATCH] x86/kvm/vmx: Fix coding style in vmx_setup_l1d_flush()
Substitute spaces with tab. No functional changes.
Signed-off-by: Yi Wang <wang.yi59(a)zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2(a)zte.com.cn>
Message-Id: <1534398159-48509-1-git-send-email-wang.yi59(a)zte.com.cn>
Cc: stable(a)vger.kernel.org # L1TF
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 1519f030fd73..31e90e83fdd6 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -219,15 +219,15 @@ static int vmx_setup_l1d_flush(enum vmx_l1d_flush_state l1tf)
return 0;
}
- if (boot_cpu_has(X86_FEATURE_ARCH_CAPABILITIES)) {
- u64 msr;
-
- rdmsrl(MSR_IA32_ARCH_CAPABILITIES, msr);
- if (msr & ARCH_CAP_SKIP_VMENTRY_L1DFLUSH) {
- l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_NOT_REQUIRED;
- return 0;
- }
- }
+ if (boot_cpu_has(X86_FEATURE_ARCH_CAPABILITIES)) {
+ u64 msr;
+
+ rdmsrl(MSR_IA32_ARCH_CAPABILITIES, msr);
+ if (msr & ARCH_CAP_SKIP_VMENTRY_L1DFLUSH) {
+ l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_NOT_REQUIRED;
+ return 0;
+ }
+ }
/* If set to auto use the default l1tf mitigation method */
if (l1tf == VMENTER_L1D_FLUSH_AUTO) {
This is the start of the stable review cycle for the 4.9.126 release.
There are 63 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 Sun Sep 9 21:09:58 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.9.126-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.9.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.9.126-rc1
Jeremy Cline <jcline(a)redhat.com>
fs/quota: Fix spectre gadget in do_quotactl
Horia Geantă <horia.geanta(a)nxp.com>
crypto: caam/jr - fix descriptor DMA unmapping
Ondrej Mosnacek <omosnace(a)redhat.com>
crypto: vmx - Fix sleep-in-atomic bugs
Adrian Hunter <adrian.hunter(a)intel.com>
perf auxtrace: Fix queue resize
Shan Hai <shan.hai(a)oracle.com>
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
printk/tracing: Do not trace printk_nmi_enter()
Vishal Verma <vishal.l.verma(a)intel.com>
libnvdimm: fix ars_status output length calculation
Christian Brauner <christian(a)brauner.io>
getxattr: use correct xattr length
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: set optimal write delay
Mikulas Patocka <mpatocka(a)redhat.com>
fb: fix lost console when the user unplugs a USB adapter
Vignesh R <vigneshr(a)ti.com>
pwm: tiehrpwm: Fix disabling of output of PWMs
Richard Weinberger <richard(a)nod.at>
ubifs: Fix synced_i_size calculation for xattr inodes
Richard Weinberger <richard(a)nod.at>
ubifs: Check data node size before truncate
Richard Weinberger <richard(a)nod.at>
Revert "UBIFS: Fix potential integer overflow in allocation"
Richard Weinberger <richard(a)nod.at>
ubifs: Fix memory leak in lprobs self-check
Jann Horn <jannh(a)google.com>
userns: move user access out of the mutex
Jann Horn <jannh(a)google.com>
sys: don't hold uts_sem while accessing userspace memory
Al Viro <viro(a)zeniv.linux.org.uk>
osf_getdomainname(): use copy_to_user()
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Fix dev iotlb pfsid use
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Add definitions for PFSID
Peter Zijlstra <peterz(a)infradead.org>
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Yannik Sembritzki <yannik(a)sembritzki.me>
Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
Yannik Sembritzki <yannik(a)sembritzki.me>
Replace magic for trusting the secondary keyring with #define
Jon Hunter <jonathanh(a)nvidia.com>
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Bill Baker <Bill.Baker(a)Oracle.com>
NFSv4 client live hangs after live data migration recovery
Dan Carpenter <dan.carpenter(a)oracle.com>
pnfs/blocklayout: off by one in bl_map_stripe()
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: increase ranges in ___invalidate_{i,d}cache_all
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: limit offsets in __loop_cache_{all,page}
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: VMX: fixes for vmentry_l1d_flush module parameter
zhangyi (F) <yi.zhang(a)huawei.com>
PM / sleep: wakeup: Fix build error caused by missing SRCU support
Tomas Bortoli <tomasbortoli(a)gmail.com>
9p: fix multiple NULL-pointer-dereferences
Rafael David Tinoco <rafael.tinoco(a)linaro.org>
mfd: hi655x: Fix regmap area declared size for hi655x
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
uprobes: Use synchronize_rcu() not synchronize_sched()
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing/blktrace: Fix to allow setting same value
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing: Do not call start/stop() functions when tracing_on does not change
Johan Hovold <johan(a)kernel.org>
rtc: omap: fix potential crash on power off
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix VMCI use when balloon built into kernel
Nadav Amit <namit(a)vmware.com>
vmw_balloon: VMCI_DOORBELL_SET does not check status
Nadav Amit <namit(a)vmware.com>
vmw_balloon: do not use 2MB without batching
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix inflation of 64-bit GFNs
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix return value for ad952x_store()
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix displayed phase
Tycho Andersen <tycho(a)tycho.ws>
uart: fix race between uart_put_char() and uart_shutdown()
Mike Snitzer <snitzer(a)redhat.com>
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Hou Tao <houtao1(a)huawei.com>
dm thin: stop no_space_timeout worker when switching to write-mode
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/client.c: version pointer uninitialized
jiangyiwen <jiangyiwen(a)huawei.com>
9p/virtio: fix off-by-one error in sg list bounds check
piaojun <piaojun(a)huawei.com>
fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
Bart Van Assche <bart.vanassche(a)wdc.com>
RDMA/rxe: Set wqe->status correctly if an unexpected response is received
Bart Van Assche <bart.vanassche(a)wdc.com>
ib_srpt: Fix a use-after-free in srpt_close_ch()
Vaibhav Jain <vaibhav(a)linux.ibm.com>
cxl: Fix wrong comparison in cxl_adapter_context_get()
Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
powerpc/powernv/pci: Work around races in PCI bridge enabling
Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com>
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Hari Bathini <hbathini(a)linux.ibm.com>
powerpc/fadump: handle crash memory ranges array index overflow
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
mailbox: xgene-slimpro: Fix potential NULL pointer dereference
Daniel Mack <daniel(a)zonque.org>
libertas: fix suspend and resume for SDIO connected cards
Matthew Auld <matthew.auld(a)intel.com>
drm/i915/userptr: reject zero user_size
Krzysztof Kozlowski <krzk(a)kernel.org>
spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
spi: davinci: fix a NULL pointer dereference
Chirantan Ekbote <chirantan(a)chromium.org>
9p/net: Fix zero-copy path in the 9p virtio transport
Alexander Aring <aring(a)mojatatu.com>
net: mac802154: tx: expand tailroom if necessary
Alexander Aring <aring(a)mojatatu.com>
net: 6lowpan: fix reserved space for single frames
-------------
Diffstat:
Makefile | 4 +-
arch/alpha/kernel/osf_sys.c | 64 ++++++++---------
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 +
arch/powerpc/include/asm/fadump.h | 3 -
arch/powerpc/kernel/fadump.c | 91 +++++++++++++++++++----
arch/powerpc/platforms/powernv/pci-ioda.c | 37 ++++++++++
arch/powerpc/platforms/pseries/ras.c | 2 +-
arch/sparc/kernel/sys_sparc_32.c | 22 +++---
arch/sparc/kernel/sys_sparc_64.c | 20 +++---
arch/x86/kernel/kexec-bzimage64.c | 2 +-
arch/x86/kvm/vmx.c | 26 ++++---
arch/xtensa/include/asm/cacheasm.h | 69 +++++++++++-------
certs/system_keyring.c | 3 +-
crypto/asymmetric_keys/pkcs7_key_type.c | 2 +-
drivers/crypto/caam/jr.c | 3 +-
drivers/crypto/vmx/aes_cbc.c | 30 ++++----
drivers/crypto/vmx/aes_xts.c | 21 ++++--
drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +
drivers/iio/frequency/ad9523.c | 4 +-
drivers/infiniband/sw/rxe/rxe_comp.c | 1 +
drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-
drivers/iommu/dmar.c | 6 +-
drivers/iommu/intel-iommu.c | 18 ++++-
drivers/mailbox/mailbox-xgene-slimpro.c | 6 +-
drivers/md/bcache/writeback.c | 4 +-
drivers/md/dm-cache-metadata.c | 3 +-
drivers/md/dm-thin.c | 2 +
drivers/mfd/hi655x-pmic.c | 2 +-
drivers/misc/cxl/main.c | 2 +-
drivers/misc/vmw_balloon.c | 67 ++++++++++-------
drivers/net/wireless/marvell/libertas/dev.h | 1 +
drivers/net/wireless/marvell/libertas/if_sdio.c | 30 ++++++--
drivers/nvdimm/bus.c | 4 +-
drivers/pwm/pwm-tiehrpwm.c | 2 +
drivers/rtc/rtc-omap.c | 14 ++--
drivers/spi/spi-davinci.c | 2 +-
drivers/spi/spi-fsl-dspi.c | 24 +++----
drivers/tty/serial/serial_core.c | 17 +++--
drivers/video/fbdev/core/fbmem.c | 38 ++++++++--
fs/9p/xattr.c | 6 +-
fs/nfs/blocklayout/dev.c | 2 +-
fs/nfs/nfs4proc.c | 9 ++-
fs/quota/quota.c | 2 +
fs/ubifs/journal.c | 18 ++++-
fs/ubifs/lprops.c | 8 +--
fs/xattr.c | 2 +-
include/linux/intel-iommu.h | 8 ++-
include/linux/sunrpc/clnt.h | 1 +
include/linux/verification.h | 6 ++
include/video/udlfb.h | 2 +-
kernel/power/Kconfig | 1 +
kernel/printk/nmi.c | 4 +-
kernel/sys.c | 95 ++++++++++++-------------
kernel/trace/blktrace.c | 4 ++
kernel/trace/trace.c | 4 +-
kernel/trace/trace_uprobe.c | 2 +-
kernel/user_namespace.c | 24 +++----
kernel/utsname_sysctl.c | 41 ++++++-----
mm/memory.c | 9 ---
net/9p/client.c | 2 +-
net/9p/trans_fd.c | 7 +-
net/9p/trans_rdma.c | 3 +
net/9p/trans_virtio.c | 13 +++-
net/ieee802154/6lowpan/tx.c | 21 +++++-
net/mac802154/tx.c | 15 +++-
net/sunrpc/clnt.c | 28 +++++---
tools/perf/util/auxtrace.c | 3 +
67 files changed, 653 insertions(+), 340 deletions(-)
This is the start of the stable review cycle for the 4.4.155 release.
There are 47 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 Sun Sep 9 21:08:44 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.4.155-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.4.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.4.155-rc1
Dave Airlie <airlied(a)redhat.com>
drm/drivers: add support for using the arch wc mapping API.
Dave Airlie <airlied(a)redhat.com>
x86/io: add interface to reserve io memtype for a resource range. (v1.1)
Jeremy Cline <jcline(a)redhat.com>
fs/quota: Fix spectre gadget in do_quotactl
Adrian Hunter <adrian.hunter(a)intel.com>
perf auxtrace: Fix queue resize
Shan Hai <shan.hai(a)oracle.com>
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Christian Brauner <christian(a)brauner.io>
getxattr: use correct xattr length
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: set optimal write delay
Mikulas Patocka <mpatocka(a)redhat.com>
fb: fix lost console when the user unplugs a USB adapter
Vignesh R <vigneshr(a)ti.com>
pwm: tiehrpwm: Fix disabling of output of PWMs
Richard Weinberger <richard(a)nod.at>
ubifs: Fix synced_i_size calculation for xattr inodes
Richard Weinberger <richard(a)nod.at>
ubifs: Check data node size before truncate
Richard Weinberger <richard(a)nod.at>
Revert "UBIFS: Fix potential integer overflow in allocation"
Richard Weinberger <richard(a)nod.at>
ubifs: Fix memory leak in lprobs self-check
Jann Horn <jannh(a)google.com>
userns: move user access out of the mutex
Jann Horn <jannh(a)google.com>
sys: don't hold uts_sem while accessing userspace memory
Al Viro <viro(a)zeniv.linux.org.uk>
osf_getdomainname(): use copy_to_user()
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Fix dev iotlb pfsid use
Jacob Pan <jacob.jun.pan(a)linux.intel.com>
iommu/vt-d: Add definitions for PFSID
Peter Zijlstra <peterz(a)infradead.org>
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Jon Hunter <jonathanh(a)nvidia.com>
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Dan Carpenter <dan.carpenter(a)oracle.com>
pnfs/blocklayout: off by one in bl_map_stripe()
zhangyi (F) <yi.zhang(a)huawei.com>
PM / sleep: wakeup: Fix build error caused by missing SRCU support
Tomas Bortoli <tomasbortoli(a)gmail.com>
9p: fix multiple NULL-pointer-dereferences
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
uprobes: Use synchronize_rcu() not synchronize_sched()
Snild Dolkow <snild(a)sony.com>
kthread, tracing: Don't expose half-written comm when creating kthreads
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing/blktrace: Fix to allow setting same value
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing: Do not call start/stop() functions when tracing_on does not change
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix VMCI use when balloon built into kernel
Nadav Amit <namit(a)vmware.com>
vmw_balloon: VMCI_DOORBELL_SET does not check status
Nadav Amit <namit(a)vmware.com>
vmw_balloon: do not use 2MB without batching
Nadav Amit <namit(a)vmware.com>
vmw_balloon: fix inflation of 64-bit GFNs
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix return value for ad952x_store()
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix displayed phase
Mike Snitzer <snitzer(a)redhat.com>
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Jiri Slaby <jslaby(a)suse.cz>
x86/mm/pat: Fix L1TF stable backport for CPA, 2nd call
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/client.c: version pointer uninitialized
jiangyiwen <jiangyiwen(a)huawei.com>
9p/virtio: fix off-by-one error in sg list bounds check
piaojun <piaojun(a)huawei.com>
fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com>
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Hari Bathini <hbathini(a)linux.ibm.com>
powerpc/fadump: handle crash memory ranges array index overflow
Matthew Auld <matthew.auld(a)intel.com>
drm/i915/userptr: reject zero user_size
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
spi: davinci: fix a NULL pointer dereference
Ben Hutchings <ben.hutchings(a)codethink.co.uk>
net: lan78xx: Fix misplaced tasklet_schedule() call
Chirantan Ekbote <chirantan(a)chromium.org>
9p/net: Fix zero-copy path in the 9p virtio transport
Alexander Aring <aring(a)mojatatu.com>
net: mac802154: tx: expand tailroom if necessary
Alexander Aring <aring(a)mojatatu.com>
net: 6lowpan: fix reserved space for single frames
-------------
Diffstat:
Makefile | 4 +-
arch/alpha/kernel/osf_sys.c | 64 +++++++++-----------
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 +
arch/powerpc/include/asm/fadump.h | 3 -
arch/powerpc/kernel/fadump.c | 91 +++++++++++++++++++++++-----
arch/powerpc/platforms/pseries/ras.c | 2 +-
arch/sparc/kernel/sys_sparc_32.c | 22 ++++---
arch/sparc/kernel/sys_sparc_64.c | 20 ++++---
arch/x86/include/asm/io.h | 6 ++
arch/x86/mm/pageattr.c | 2 +-
arch/x86/mm/pat.c | 14 +++++
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++
drivers/gpu/drm/ast/ast_ttm.c | 6 ++
drivers/gpu/drm/cirrus/cirrus_ttm.c | 7 +++
drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +
drivers/gpu/drm/mgag200/mgag200_ttm.c | 7 +++
drivers/gpu/drm/nouveau/nouveau_ttm.c | 8 +++
drivers/gpu/drm/radeon/radeon_object.c | 5 ++
drivers/iio/frequency/ad9523.c | 4 +-
drivers/iommu/dmar.c | 6 +-
drivers/iommu/intel-iommu.c | 18 +++++-
drivers/md/bcache/writeback.c | 4 +-
drivers/md/dm-cache-metadata.c | 3 +-
drivers/misc/vmw_balloon.c | 67 +++++++++++++--------
drivers/net/usb/lan78xx.c | 4 +-
drivers/pwm/pwm-tiehrpwm.c | 2 +
drivers/spi/spi-davinci.c | 2 +-
drivers/video/fbdev/core/fbmem.c | 38 ++++++++++--
fs/9p/xattr.c | 6 +-
fs/nfs/blocklayout/dev.c | 2 +-
fs/quota/quota.c | 2 +
fs/ubifs/journal.c | 18 +++++-
fs/ubifs/lprops.c | 8 +--
fs/xattr.c | 2 +-
include/linux/intel-iommu.h | 8 ++-
include/linux/io.h | 22 +++++++
include/video/udlfb.h | 2 +-
kernel/kthread.c | 8 ++-
kernel/power/Kconfig | 1 +
kernel/sys.c | 95 ++++++++++++++----------------
kernel/trace/blktrace.c | 4 ++
kernel/trace/trace.c | 4 +-
kernel/trace/trace_uprobe.c | 2 +-
kernel/user_namespace.c | 22 ++++---
kernel/utsname_sysctl.c | 41 ++++++++-----
mm/memory.c | 9 ---
net/9p/client.c | 2 +-
net/9p/trans_fd.c | 7 ++-
net/9p/trans_rdma.c | 3 +
net/9p/trans_virtio.c | 13 +++-
net/ieee802154/6lowpan/tx.c | 21 ++++++-
net/mac802154/tx.c | 15 ++++-
tools/perf/util/auxtrace.c | 3 +
53 files changed, 510 insertions(+), 228 deletions(-)
This is the start of the stable review cycle for the 3.18.122 release.
There are 29 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 Sun Sep 9 21:08:52 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.122-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.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 3.18.122-rc1
Shan Hai <shan.hai(a)oracle.com>
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Christian Brauner <christian(a)brauner.io>
getxattr: use correct xattr length
Mikulas Patocka <mpatocka(a)redhat.com>
udlfb: set optimal write delay
Mikulas Patocka <mpatocka(a)redhat.com>
fb: fix lost console when the user unplugs a USB adapter
Vignesh R <vigneshr(a)ti.com>
pwm: tiehrpwm: Fix disabling of output of PWMs
Richard Weinberger <richard(a)nod.at>
ubifs: Fix synced_i_size calculation for xattr inodes
Richard Weinberger <richard(a)nod.at>
Revert "UBIFS: Fix potential integer overflow in allocation"
Richard Weinberger <richard(a)nod.at>
ubifs: Fix memory leak in lprobs self-check
Jann Horn <jannh(a)google.com>
userns: move user access out of the mutex
Eric W. Biederman <ebiederm(a)xmission.com>
userns; Correct the comment in map_write
Jann Horn <jannh(a)google.com>
sys: don't hold uts_sem while accessing userspace memory
Al Viro <viro(a)zeniv.linux.org.uk>
osf_getdomainname(): use copy_to_user()
Peter Zijlstra <peterz(a)infradead.org>
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Jon Hunter <jonathanh(a)nvidia.com>
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Dan Carpenter <dan.carpenter(a)oracle.com>
pnfs/blocklayout: off by one in bl_map_stripe()
Tomas Bortoli <tomasbortoli(a)gmail.com>
9p: fix multiple NULL-pointer-dereferences
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
uprobes: Use synchronize_rcu() not synchronize_sched()
Snild Dolkow <snild(a)sony.com>
kthread, tracing: Don't expose half-written comm when creating kthreads
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing/blktrace: Fix to allow setting same value
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing: Do not call start/stop() functions when tracing_on does not change
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix return value for ad952x_store()
Lars-Peter Clausen <lars(a)metafoo.de>
iio: ad9523: Fix displayed phase
Mike Snitzer <snitzer(a)redhat.com>
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
Tomas Bortoli <tomasbortoli(a)gmail.com>
net/9p/client.c: version pointer uninitialized
jiangyiwen <jiangyiwen(a)huawei.com>
9p/virtio: fix off-by-one error in sg list bounds check
Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com>
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Hari Bathini <hbathini(a)linux.ibm.com>
powerpc/fadump: handle crash memory ranges array index overflow
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
spi: davinci: fix a NULL pointer dereference
-------------
Diffstat:
Makefile | 4 +-
arch/alpha/kernel/osf_sys.c | 64 +++++++++++------------
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 +
arch/powerpc/include/asm/fadump.h | 3 --
arch/powerpc/kernel/fadump.c | 91 +++++++++++++++++++++++++++------
arch/powerpc/platforms/pseries/ras.c | 2 +-
arch/sparc/kernel/sys_sparc_32.c | 22 ++++----
arch/sparc/kernel/sys_sparc_64.c | 20 +++++---
drivers/iio/frequency/ad9523.c | 4 +-
drivers/md/bcache/writeback.c | 4 +-
drivers/md/dm-cache-metadata.c | 3 +-
drivers/pwm/pwm-tiehrpwm.c | 2 +
drivers/spi/spi-davinci.c | 2 +-
drivers/video/fbdev/core/fbmem.c | 38 +++++++++++---
fs/nfs/blocklayout/dev.c | 2 +-
fs/ubifs/journal.c | 7 ++-
fs/ubifs/lprops.c | 8 +--
fs/xattr.c | 2 +-
include/video/udlfb.h | 2 +-
kernel/kthread.c | 8 ++-
kernel/sys.c | 95 +++++++++++++++++------------------
kernel/trace/blktrace.c | 4 ++
kernel/trace/trace.c | 4 +-
kernel/trace/trace_uprobe.c | 2 +-
kernel/user_namespace.c | 22 ++++----
kernel/utsname_sysctl.c | 41 +++++++++------
mm/memory.c | 9 ----
net/9p/client.c | 2 +-
net/9p/trans_fd.c | 7 ++-
net/9p/trans_rdma.c | 3 ++
net/9p/trans_virtio.c | 6 ++-
31 files changed, 299 insertions(+), 185 deletions(-)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi Greg,
Pleae pull commits for Linux 3.18 .
I've sent a review request for all commits over a week ago and all
comments were addressed.
Thanks,
Sasha
=====
The following changes since commit a5f9be3576c3f9dd871f68eaf482278c0b3a6df2:
Linux 3.18.120 (2018-08-28 07:21:37 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git tags/for-greg-3.18-10092018
for you to fetch changes up to 0941bb2358f61b4d3c1eb989bffadbb4aae2dc5c:
btrfs: Don't remove block group that still has pinned down bytes (2018-08-30 10:40:46 -0400)
- ----------------------------------------------------------------
for-greg-3.18-10092018
- ----------------------------------------------------------------
Aleh Filipovich (1):
platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360
Andrey Ryabinin (1):
mm/fadvise.c: fix signed overflow UBSAN complaint
Arnd Bergmann (1):
reiserfs: change j_timestamp type to time64_t
Breno Leitao (1):
selftests/powerpc: Kill child processes on SIGINT
Dan Carpenter (2):
powerpc: Fix size calculation using resource_size()
scsi: aic94xx: fix an error code in aic94xx_init()
Ernesto A. Fernández (1):
hfs: prevent crash on exit from failed search
Guenter Roeck (1):
mfd: sm501: Set coherent_dma_mask when creating subdevices
Ian Abbott (1):
staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice
Jann Horn (1):
fork: don't copy inconsistent signal handler state to child
Jean-Philippe Brucker (1):
net/9p: fix error path of p9_virtio_probe
John Pittman (1):
dm kcopyd: avoid softlockup in run_complete_job
Mahesh Salgaonkar (1):
powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX.
Misono Tomohiro (1):
btrfs: replace: Reset on-disk dev stats value after replace
OGAWA Hirofumi (1):
fat: validate ->i_start before using
Qu Wenruo (2):
btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized
btrfs: Don't remove block group that still has pinned down bytes
Randy Dunlap (1):
scripts: modpost: check memory allocation results
Ronnie Sahlberg (1):
cifs: check if SMB2 PDU size has been padded and suppress the warning
Stefan Haberland (1):
s390/dasd: fix hanging offline processing due to canceled worker
Steve French (2):
smb3: fix reset of bytes read and written stats
SMB3: Number of requests sent should be displayed for SMB3 not just CIFS
Tan Hu (1):
ipvs: fix race between ip_vs_conn_new() and ip_vs_del_dest()
Tetsuo Handa (1):
hfsplus: don't return 0 when fill_super() failed
Thomas Petazzoni (1):
PCI: mvebu: Fix I/O space end address calculation
arch/powerpc/platforms/pseries/ras.c | 2 +-
arch/powerpc/sysdev/mpic_msgr.c | 2 +-
drivers/md/dm-kcopyd.c | 2 ++
drivers/mfd/sm501.c | 1 +
drivers/pci/host/pci-mvebu.c | 2 +-
drivers/platform/x86/asus-nb-wmi.c | 1 +
drivers/s390/block/dasd_eckd.c | 7 +++++--
drivers/scsi/aic94xx/aic94xx_init.c | 4 +++-
drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++-
fs/btrfs/dev-replace.c | 6 ++++++
fs/btrfs/extent-tree.c | 2 +-
fs/btrfs/relocation.c | 23 ++++++++++++-----------
fs/cifs/cifs_debug.c | 8 ++++++++
fs/cifs/smb2misc.c | 7 +++++++
fs/cifs/smb2pdu.c | 2 +-
fs/fat/cache.c | 19 ++++++++++++-------
fs/fat/fat.h | 5 +++++
fs/fat/fatent.c | 6 +++---
fs/hfs/brec.c | 7 ++++---
fs/hfsplus/super.c | 4 +++-
fs/reiserfs/reiserfs.h | 2 +-
kernel/fork.c | 2 ++
mm/fadvise.c | 8 ++++++--
net/9p/trans_virtio.c | 3 ++-
net/netfilter/ipvs/ip_vs_core.c | 15 +++++++++++----
scripts/mod/modpost.c | 8 ++++----
tools/testing/selftests/powerpc/harness.c | 18 ++++++++++++------
27 files changed, 117 insertions(+), 52 deletions(-)
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAluWf4wACgkQ3qZv95d3
LNw2mw//czETmy7MjuRhH3z4KEh29RvoKJ0kTJ/hIGDleoy6MhHx603vBiT7mtcI
v35sXHjCT77mUE3PkoRoWwrLtFiGxCZ6txZ1Zutwz8lCUem9gaw40KehjCxdGH/U
jejRP+sgYYKuVNgXn7pPk97GINNIqytc3B5lDwAz0VgWGX6fpITtAr9xSrbc+fuP
Zc+DBs0YUxtfj2KTCgYN+73fUZOPauubowxPX+UVfIwtxUcgejJO1JyNi0uIhqbj
ebpkUiozS37+loouRKR46vfKcSohU9ZWW9I+hO6nx47i6LqtARjyDV99glgX8zaE
9bt8kWKPVx6AAcY1jQwMvx2VeRaTouPfG9u9kUlMHvzNbnRQ2xnRpmXLMqcHFyQG
Wgf6EIXT1o9HG08B4pAAELTY1UacnVeHH0+GxhU9hhcU969Mu5H0e3sVymgyWZBm
TOF650ITUjTAT+BtfMf/A7/jGmRoVV6Vl0372ePXkgIG6Kwq3AgwMJRzR8FCX8M0
ualLK0A1BS+eaC70+paAkhakrzYH224Yrbb+nXm3p3Mho1UCU26VMTz59Z7Rgvr6
dsLIvyOCHFiXHeKtyjbZ9mW6O64yiTHqO3SdctgkrYfm9BSAtRZZivGYd9IwflWB
6oz4fUFH7jmVyjbEg9cgEWttLNVROcSrGLYEIFDXv9SlhOWxTfA=
=NY7H
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi Greg,
Pleae pull commits for Linux 4.4 .
I've sent a review request for all commits over a week ago and all
comments were addressed.
Thanks,
Sasha
=====
The following changes since commit 577189c37a844243359afce1c3c94418259fe696:
Linux 4.4.153 (2018-08-28 07:23:44 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git tags/for-greg-4.4-10092018
for you to fetch changes up to 230b9c234e619e3c62b68c12a57c4fa35983c7bc:
btrfs: Don't remove block group that still has pinned down bytes (2018-08-31 15:34:12 -0400)
- ----------------------------------------------------------------
for-greg-4.4-10092018
- ----------------------------------------------------------------
Aleh Filipovich (1):
platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360
Andrey Ryabinin (1):
mm/fadvise.c: fix signed overflow UBSAN complaint
Arnd Bergmann (1):
reiserfs: change j_timestamp type to time64_t
Breno Leitao (1):
selftests/powerpc: Kill child processes on SIGINT
Dan Carpenter (2):
powerpc: Fix size calculation using resource_size()
scsi: aic94xx: fix an error code in aic94xx_init()
Ernesto A. Fernández (2):
hfs: prevent crash on exit from failed search
hfsplus: fix NULL dereference in hfsplus_lookup()
Guenter Roeck (1):
mfd: sm501: Set coherent_dma_mask when creating subdevices
Ian Abbott (1):
staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice
Jann Horn (1):
fork: don't copy inconsistent signal handler state to child
Jean-Philippe Brucker (1):
net/9p: fix error path of p9_virtio_probe
John Pittman (1):
dm kcopyd: avoid softlockup in run_complete_job
Jonas Gorski (1):
irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP
Mahesh Salgaonkar (1):
powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX.
Misono Tomohiro (1):
btrfs: replace: Reset on-disk dev stats value after replace
OGAWA Hirofumi (1):
fat: validate ->i_start before using
Qu Wenruo (2):
btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized
btrfs: Don't remove block group that still has pinned down bytes
Randy Dunlap (1):
scripts: modpost: check memory allocation results
Ronnie Sahlberg (1):
cifs: check if SMB2 PDU size has been padded and suppress the warning
Stefan Haberland (1):
s390/dasd: fix hanging offline processing due to canceled worker
Steve French (2):
smb3: fix reset of bytes read and written stats
SMB3: Number of requests sent should be displayed for SMB3 not just CIFS
Tan Hu (1):
ipvs: fix race between ip_vs_conn_new() and ip_vs_del_dest()
Tetsuo Handa (2):
hfsplus: don't return 0 when fill_super() failed
fs/dcache.c: fix kmemcheck splat at take_dentry_name_snapshot()
Thomas Petazzoni (1):
PCI: mvebu: Fix I/O space end address calculation
Vasily Gorbik (1):
tracing: Handle CC_FLAGS_FTRACE more accurately
Makefile | 11 +++++++----
arch/powerpc/platforms/pseries/ras.c | 2 +-
arch/powerpc/sysdev/mpic_msgr.c | 2 +-
drivers/irqchip/irq-bcm7038-l1.c | 4 ++++
drivers/md/dm-kcopyd.c | 2 ++
drivers/mfd/sm501.c | 1 +
drivers/pci/host/pci-mvebu.c | 2 +-
drivers/platform/x86/asus-nb-wmi.c | 1 +
drivers/s390/block/dasd_eckd.c | 7 +++++--
drivers/scsi/aic94xx/aic94xx_init.c | 4 +++-
drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++-
fs/btrfs/dev-replace.c | 6 ++++++
fs/btrfs/extent-tree.c | 2 +-
fs/btrfs/relocation.c | 23 ++++++++++++-----------
fs/cifs/cifs_debug.c | 8 ++++++++
fs/cifs/smb2misc.c | 7 +++++++
fs/cifs/smb2pdu.c | 2 +-
fs/dcache.c | 3 ++-
fs/fat/cache.c | 19 ++++++++++++-------
fs/fat/fat.h | 5 +++++
fs/fat/fatent.c | 6 +++---
fs/hfs/brec.c | 7 ++++---
fs/hfsplus/dir.c | 4 ++--
fs/hfsplus/super.c | 4 +++-
fs/reiserfs/reiserfs.h | 2 +-
kernel/fork.c | 2 ++
mm/fadvise.c | 8 ++++++--
net/9p/trans_virtio.c | 3 ++-
net/netfilter/ipvs/ip_vs_core.c | 15 +++++++++++----
scripts/mod/modpost.c | 8 ++++----
tools/testing/selftests/powerpc/harness.c | 18 ++++++++++++------
31 files changed, 132 insertions(+), 59 deletions(-)
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAluWf4QACgkQ3qZv95d3
LNxoaBAAkTmVEYo2cxE6cWtH48DHvSmVW/8aS6lpyxaQK9c9Dr3xPMRqVO7FYne4
CquCmbsJzmMouimtn2hn+QAXwLdaAjgZDMIoiBs1vFho6komQ52i83wWTAJEMhKL
uvWyZosKpGgNztgaU2ZZI1lax85sTscTGq/H46bV8S2RJWKGxiMaIPOSbKS3+GN1
FCTHGy05Hy3gQnmNCpV03n10zeEGSHQ2vDRz9g9OgFWlXcHmL0oyp+G+StnGiKMc
wmHXJBSq5aFsf+nOflBNl7ngZUU5KkbQfdZOh/1aPgfoR08JRVV7DNivj7C9DCpV
RoxxmDKizPvV4bOgn39MVNs/yQUW8Q9HT1QnKoCvDZeaVHKwW9KMX4ax2lvHlYjS
woYwJ5Rz0qKxcZBxQAg+QHN1Y61WLDp3QukxALtXDdCswDD2oByVtfwn5S7+pwZj
R3kACK7DZihBcIrNR6wPA0LgOzauwSRYc2wP8DwxQ5zpEgbQXZyMvFU2uQsA10Ac
z0Y03alRobEnAbQB0ogkGhXUWG2935cSxBbsd0j0vzC1KQoPkL+pSytDpC8p1tuy
6PR/u6i/DHGcKemSpMASbN1LB88mKAQPSdnkTw6w3DygVHF6KMz+nXAcNhkleENy
aAy1k4GaQcopFkAycesQ9KX9jGnP2XHhmZZxcL1f5qoiMsf6DY4=
=X/I+
-----END PGP SIGNATURE-----
Commit-ID: 02e184476eff848273826c1d6617bb37e5bcc7ad
Gitweb: https://git.kernel.org/tip/02e184476eff848273826c1d6617bb37e5bcc7ad
Author: Yabin Cui <yabinc(a)google.com>
AuthorDate: Thu, 23 Aug 2018 15:59:35 -0700
Committer: Ingo Molnar <mingo(a)kernel.org>
CommitDate: Mon, 10 Sep 2018 14:01:46 +0200
perf/core: Force USER_DS when recording user stack data
Perf can record user stack data in response to a synchronous request, such
as a tracepoint firing. If this happens under set_fs(KERNEL_DS), then we
end up reading user stack data using __copy_from_user_inatomic() under
set_fs(KERNEL_DS). I think this conflicts with the intention of using
set_fs(KERNEL_DS). And it is explicitly forbidden by hardware on ARM64
when both CONFIG_ARM64_UAO and CONFIG_ARM64_PAN are used.
So fix this by forcing USER_DS when recording user stack data.
Signed-off-by: Yabin Cui <yabinc(a)google.com>
Acked-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Cc: <stable(a)vger.kernel.org>
Cc: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme(a)kernel.org>
Cc: Jiri Olsa <jolsa(a)redhat.com>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Namhyung Kim <namhyung(a)kernel.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Fixes: 88b0193d9418 ("perf/callchain: Force USER_DS when invoking perf_callchain_user()")
Link: http://lkml.kernel.org/r/20180823225935.27035-1-yabinc@google.com
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
---
kernel/events/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index abaed4f8bb7f..c80549bf82c6 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5943,6 +5943,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
unsigned long sp;
unsigned int rem;
u64 dyn_size;
+ mm_segment_t fs;
/*
* We dump:
@@ -5960,7 +5961,10 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
/* Data. */
sp = perf_user_stack_pointer(regs);
+ fs = get_fs();
+ set_fs(USER_DS);
rem = __output_copy_user(handle, (void *) sp, dump_size);
+ set_fs(fs);
dyn_size = dump_size - rem;
perf_output_skip(handle, rem);
This is the start of the stable review cycle for the 4.4.148 release.
There are 43 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 Thu Aug 16 17:14: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/v4.x/stable-review/patch-4.4.148-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.4.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.4.148-rc1
Guenter Roeck <linux(a)roeck-us.net>
x86/speculation/l1tf: Fix up CPU feature flags
Andi Kleen <ak(a)linux.intel.com>
x86/mm/kmmio: Make the tracer robust against L1TF
Andi Kleen <ak(a)linux.intel.com>
x86/mm/pat: Make set_memory_np() L1TF safe
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Make pmd/pud_mknotpresent() invert
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Invert all not present mappings
Michal Hocko <mhocko(a)suse.cz>
x86/speculation/l1tf: Fix up pte->pfn conversion for PAE
Vlastimil Babka <vbabka(a)suse.cz>
x86/speculation/l1tf: Protect PAE swap entries against L1TF
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/cpufeatures: Add detection of L1D cache flush support.
Vlastimil Babka <vbabka(a)suse.cz>
x86/speculation/l1tf: Extend 64bit swap file size limit
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Move the l1tf function and define pr_fmt properly
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Limit swap file size to MAX_PA/2
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings
Dan Williams <dan.j.williams(a)intel.com>
mm: fix cache mode tracking in vm_insert_mixed()
Andy Lutomirski <luto(a)kernel.org>
mm: Add vm_insert_pfn_prot()
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Add sysfs reporting for l1tf
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Make sure the first page is always reserved
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Protect PROT_NONE PTEs against speculation
Linus Torvalds <torvalds(a)linux-foundation.org>
x86/speculation/l1tf: Protect swap entries against L1TF
Linus Torvalds <torvalds(a)linux-foundation.org>
x86/speculation/l1tf: Change order of offset/type in swap entry
Naoya Horiguchi <n-horiguchi(a)ah.jp.nec.com>
mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1
Dave Hansen <dave.hansen(a)linux.intel.com>
x86/mm: Fix swap entry comment and macro
Dave Hansen <dave.hansen(a)linux.intel.com>
x86/mm: Move swap offset/type up in PTE to work around erratum
Andi Kleen <ak(a)linux.intel.com>
x86/speculation/l1tf: Increase 32bit PAE __PHYSICAL_PAGE_SHIFT
Nick Desaulniers <ndesaulniers(a)google.com>
x86/irqflags: Provide a declaration for native_save_fl
Masami Hiramatsu <mhiramat(a)kernel.org>
kprobes/x86: Fix %p uses in error messages
Jiri Kosina <jkosina(a)suse.cz>
x86/speculation: Protect against userspace-userspace spectreRSB
Peter Zijlstra <peterz(a)infradead.org>
x86/paravirt: Fix spectre-v2 mitigations for paravirt guests
Oleksij Rempel <o.rempel(a)pengutronix.de>
ARM: dts: imx6sx: fix irq for pcie bridge
Michael Mera <dev(a)michaelmera.com>
IB/ocrdma: fix out of bounds access to local buffer
Jack Morgenstein <jackm(a)dev.mellanox.co.il>
IB/mlx4: Mark user MR as writable if actual virtual memory is writable
Jack Morgenstein <jackm(a)dev.mellanox.co.il>
IB/core: Make testing MR flags for writability a static inline function
Al Viro <viro(a)zeniv.linux.org.uk>
fix __legitimize_mnt()/mntput() race
Al Viro <viro(a)zeniv.linux.org.uk>
fix mntput/mntput race
Al Viro <viro(a)zeniv.linux.org.uk>
root dentries need RCU-delayed freeing
Bart Van Assche <bart.vanassche(a)wdc.com>
scsi: sr: Avoid that opening a CD-ROM hangs with runtime power management enabled
Hans de Goede <hdegoede(a)redhat.com>
ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices
Juergen Gross <jgross(a)suse.com>
xen/netfront: don't cache skb_shinfo()
John David Anglin <dave.anglin(a)bell.net>
parisc: Define mb() and add memory barriers to assembler unlock sequences
Helge Deller <deller(a)gmx.de>
parisc: Enable CONFIG_MLONGCALLS by default
Kees Cook <keescook(a)chromium.org>
fork: unconditionally clear stack on fork
Thomas Egerer <hakke_007(a)gmx.de>
ipv4+ipv6: Make INET*_ESP select CRYPTO_ECHAINIV
Tadeusz Struk <tadeusz.struk(a)intel.com>
tpm: fix race condition in tpm_common_write()
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix check to prevent initializing reserved inodes
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/imx6sx.dtsi | 2 +-
arch/parisc/Kconfig | 2 +-
arch/parisc/include/asm/barrier.h | 32 +++++++++++
arch/parisc/kernel/entry.S | 2 +
arch/parisc/kernel/pacache.S | 1 +
arch/parisc/kernel/syscall.S | 4 ++
arch/x86/include/asm/cpufeatures.h | 10 ++--
arch/x86/include/asm/irqflags.h | 2 +
arch/x86/include/asm/page_32_types.h | 9 +++-
arch/x86/include/asm/pgtable-2level.h | 17 ++++++
arch/x86/include/asm/pgtable-3level.h | 37 ++++++++++++-
arch/x86/include/asm/pgtable-invert.h | 32 +++++++++++
arch/x86/include/asm/pgtable.h | 84 +++++++++++++++++++++++------
arch/x86/include/asm/pgtable_64.h | 54 +++++++++++++++----
arch/x86/include/asm/pgtable_types.h | 10 ++--
arch/x86/include/asm/processor.h | 5 ++
arch/x86/kernel/cpu/bugs.c | 81 +++++++++++++++++-----------
arch/x86/kernel/cpu/common.c | 20 +++++++
arch/x86/kernel/kprobes/core.c | 4 +-
arch/x86/kernel/paravirt.c | 14 +++--
arch/x86/kernel/setup.c | 6 +++
arch/x86/mm/init.c | 23 ++++++++
arch/x86/mm/kmmio.c | 25 +++++----
arch/x86/mm/mmap.c | 21 ++++++++
arch/x86/mm/pageattr.c | 8 +--
drivers/acpi/acpi_lpss.c | 2 +
drivers/base/cpu.c | 8 +++
drivers/char/tpm/tpm-dev.c | 43 +++++++--------
drivers/infiniband/core/umem.c | 11 +---
drivers/infiniband/hw/mlx4/mr.c | 50 ++++++++++++++---
drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +-
drivers/net/xen-netfront.c | 8 +--
drivers/scsi/sr.c | 29 +++++++---
fs/dcache.c | 6 ++-
fs/ext4/ialloc.c | 5 +-
fs/ext4/super.c | 8 +--
fs/namespace.c | 28 +++++++++-
include/asm-generic/pgtable.h | 12 +++++
include/linux/cpu.h | 2 +
include/linux/mm.h | 2 +
include/linux/swapfile.h | 2 +
include/linux/thread_info.h | 6 +--
include/rdma/ib_verbs.h | 14 +++++
mm/memory.c | 62 +++++++++++++++++----
mm/mprotect.c | 49 +++++++++++++++++
mm/swapfile.c | 46 ++++++++++------
net/ipv4/Kconfig | 1 +
net/ipv6/Kconfig | 1 +
49 files changed, 714 insertions(+), 192 deletions(-)
When executing 'fw_run_transaction()' with 'TCODE_WRITE_BLOCK_REQUEST',
an address of 'payload' argument is used for streaming DMA mapping by
'firewire_ohci' module if 'size' argument is larger than 8 byte.
Although in this case the address should not be on kernel stack, current
implementation of ALSA bebob driver uses data in kernel stack for a cue
to boot M-Audio devices. This often brings unexpected result, especially
for a case of CONFIG_VMAP_STACK=y.
This commit fixes the bug.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=201021
Reference: https://forum.manjaro.org/t/firewire-m-audio-410-driver-wont-load-firmware/…
Fixes: a2b2a7798fb6('ALSA: bebob: Send a cue to load firmware for M-Audio Firewire series')
Cc: <stable(a)vger.kernel.org> # v3.16+
Signed-off-by: Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
---
sound/firewire/bebob/bebob_maudio.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/sound/firewire/bebob/bebob_maudio.c b/sound/firewire/bebob/bebob_maudio.c
index bd55620c6a47..0c5a4cbb99ba 100644
--- a/sound/firewire/bebob/bebob_maudio.c
+++ b/sound/firewire/bebob/bebob_maudio.c
@@ -96,17 +96,13 @@ int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
struct fw_device *device = fw_parent_device(unit);
int err, rcode;
u64 date;
- __le32 cues[3] = {
- cpu_to_le32(MAUDIO_BOOTLOADER_CUE1),
- cpu_to_le32(MAUDIO_BOOTLOADER_CUE2),
- cpu_to_le32(MAUDIO_BOOTLOADER_CUE3)
- };
+ __le32 *cues;
/* check date of software used to build */
err = snd_bebob_read_block(unit, INFO_OFFSET_SW_DATE,
&date, sizeof(u64));
if (err < 0)
- goto end;
+ return err;
/*
* firmware version 5058 or later has date later than "20070401", but
* 'date' is not null-terminated.
@@ -114,20 +110,28 @@ int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
if (date < 0x3230303730343031LL) {
dev_err(&unit->device,
"Use firmware version 5058 or later\n");
- err = -ENOSYS;
- goto end;
+ return -ENXIO;
}
+ cues = kmalloc_array(3, sizeof(*cues), GFP_KERNEL);
+ if (!cues)
+ return -ENOMEM;
+
+ cues[0] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE1);
+ cues[1] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE2);
+ cues[2] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE3);
+
rcode = fw_run_transaction(device->card, TCODE_WRITE_BLOCK_REQUEST,
device->node_id, device->generation,
device->max_speed, BEBOB_ADDR_REG_REQ,
- cues, sizeof(cues));
+ cues, 3 * sizeof(*cues));
+ kfree(cues);
if (rcode != RCODE_COMPLETE) {
dev_err(&unit->device,
"Failed to send a cue to load firmware\n");
err = -EIO;
}
-end:
+
return err;
}
--
2.17.1
I'm announcing the release of the 3.18.122 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/alpha/kernel/osf_sys.c | 64 ++++++++++------------
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1
arch/powerpc/include/asm/fadump.h | 3 -
arch/powerpc/kernel/fadump.c | 92 +++++++++++++++++++++++++++-----
arch/powerpc/platforms/pseries/ras.c | 2
arch/sparc/kernel/sys_sparc_32.c | 22 ++++---
arch/sparc/kernel/sys_sparc_64.c | 20 ++++---
drivers/iio/frequency/ad9523.c | 4 -
drivers/md/bcache/writeback.c | 4 +
drivers/md/dm-cache-metadata.c | 3 -
drivers/pwm/pwm-tiehrpwm.c | 2
drivers/spi/spi-davinci.c | 2
drivers/video/fbdev/core/fbmem.c | 38 +++++++++++--
fs/nfs/blocklayout/dev.c | 2
fs/ubifs/journal.c | 7 ++
fs/ubifs/lprops.c | 8 +-
fs/xattr.c | 2
include/video/udlfb.h | 2
kernel/kthread.c | 8 ++
kernel/sys.c | 95 ++++++++++++++++------------------
kernel/trace/blktrace.c | 4 +
kernel/trace/trace.c | 4 +
kernel/trace/trace_uprobe.c | 2
kernel/user_namespace.c | 39 ++++++-------
kernel/utsname_sysctl.c | 41 ++++++++------
mm/memory.c | 9 ---
net/9p/client.c | 2
net/9p/trans_fd.c | 7 ++
net/9p/trans_rdma.c | 3 +
net/9p/trans_virtio.c | 6 +-
31 files changed, 308 insertions(+), 192 deletions(-)
Al Viro (1):
osf_getdomainname(): use copy_to_user()
Bartosz Golaszewski (1):
spi: davinci: fix a NULL pointer dereference
Christian Brauner (1):
getxattr: use correct xattr length
Dan Carpenter (1):
pnfs/blocklayout: off by one in bl_map_stripe()
Eric W. Biederman (1):
userns; Correct the comment in map_write
Greg Kroah-Hartman (1):
Linux 3.18.122
Hari Bathini (1):
powerpc/fadump: handle crash memory ranges array index overflow
Jann Horn (2):
sys: don't hold uts_sem while accessing userspace memory
userns: move user access out of the mutex
Jon Hunter (1):
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Lars-Peter Clausen (2):
iio: ad9523: Fix displayed phase
iio: ad9523: Fix return value for ad952x_store()
Mahesh Salgaonkar (1):
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Mike Snitzer (1):
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Mikulas Patocka (2):
fb: fix lost console when the user unplugs a USB adapter
udlfb: set optimal write delay
Peter Zijlstra (1):
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Richard Weinberger (3):
ubifs: Fix memory leak in lprobs self-check
Revert "UBIFS: Fix potential integer overflow in allocation"
ubifs: Fix synced_i_size calculation for xattr inodes
Shan Hai (1):
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Snild Dolkow (1):
kthread, tracing: Don't expose half-written comm when creating kthreads
Steven Rostedt (VMware) (3):
tracing: Do not call start/stop() functions when tracing_on does not change
tracing/blktrace: Fix to allow setting same value
uprobes: Use synchronize_rcu() not synchronize_sched()
Tomas Bortoli (3):
net/9p/client.c: version pointer uninitialized
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
9p: fix multiple NULL-pointer-dereferences
Vignesh R (1):
pwm: tiehrpwm: Fix disabling of output of PWMs
jiangyiwen (1):
9p/virtio: fix off-by-one error in sg list bounds check
From: Al Viro <viro(a)zeniv.linux.org.uk>
cls_u32.c misuses refcounts for struct tc_u_hnode - it counts references via
->hlist and via ->tp_root together. u32_destroy() drops the former and, in
case when there had been links, leaves the sucker on the list. As the result,
there's nothing to protect it from getting freed once links are dropped.
That also makes the "is it busy" check incapable of catching the root hnode -
it *is* busy (there's a reference from tp), but we don't see it as something
separate. "Is it our root?" check partially covers that, but the problem
exists for others' roots as well.
AFAICS, the minimal fix preserving the existing behaviour (where it doesn't
include oopsen, that is) would be this:
* count tp->root and tp_c->hlist as separate references. I.e.
have u32_init() set refcount to 2, not 1.
* in u32_destroy() we always drop the former; in u32_destroy_hnode() -
the latter.
That way we have *all* references contributing to refcount. List
removal happens in u32_destroy_hnode() (called only when ->refcnt is 1)
an in u32_destroy() in case of tc_u_common going away, along with everything
reachable from it. IOW, that way we know that u32_destroy_key() won't
free something still on the list (or pointed to by someone's ->root).
Cc: stable(a)vger.kernel.org
Signed-off-by: Al Viro <viro(a)zeniv.linux.org.uk>
---
net/sched/cls_u32.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index f218ccf1e2d9..b2c3406a2cf2 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -398,6 +398,7 @@ static int u32_init(struct tcf_proto *tp)
rcu_assign_pointer(tp_c->hlist, root_ht);
root_ht->tp_c = tp_c;
+ root_ht->refcnt++;
rcu_assign_pointer(tp->root, root_ht);
tp->data = tp_c;
return 0;
@@ -610,7 +611,7 @@ static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht,
struct tc_u_hnode __rcu **hn;
struct tc_u_hnode *phn;
- WARN_ON(ht->refcnt);
+ WARN_ON(--ht->refcnt);
u32_clear_hnode(tp, ht, extack);
@@ -649,7 +650,7 @@ static void u32_destroy(struct tcf_proto *tp, struct netlink_ext_ack *extack)
WARN_ON(root_ht == NULL);
- if (root_ht && --root_ht->refcnt == 0)
+ if (root_ht && --root_ht->refcnt == 1)
u32_destroy_hnode(tp, root_ht, extack);
if (--tp_c->refcnt == 0) {
@@ -698,7 +699,6 @@ static int u32_delete(struct tcf_proto *tp, void *arg, bool *last,
}
if (ht->refcnt == 1) {
- ht->refcnt--;
u32_destroy_hnode(tp, ht, extack);
} else {
NL_SET_ERR_MSG_MOD(extack, "Can not delete in-use filter");
@@ -708,11 +708,11 @@ static int u32_delete(struct tcf_proto *tp, void *arg, bool *last,
out:
*last = true;
if (root_ht) {
- if (root_ht->refcnt > 1) {
+ if (root_ht->refcnt > 2) {
*last = false;
goto ret;
}
- if (root_ht->refcnt == 1) {
+ if (root_ht->refcnt == 2) {
if (!ht_empty(root_ht)) {
*last = false;
goto ret;
--
2.11.0
I'm announcing the release of the 4.18.7 kernel.
All users of the 4.18 kernel series must upgrade.
The updated 4.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/alpha/kernel/osf_sys.c | 51 ++++-----
arch/arm/boot/dts/am571x-idk.dts | 4
arch/arm/boot/dts/am572x-idk-common.dtsi | 4
arch/arm/boot/dts/am57xx-idk-common.dtsi | 7 +
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1
arch/arm64/Kconfig | 1
arch/arm64/crypto/sm4-ce-glue.c | 2
arch/powerpc/include/asm/fadump.h | 3
arch/powerpc/include/asm/nohash/pgtable.h | 9 -
arch/powerpc/include/asm/pkeys.h | 11 -
arch/powerpc/kernel/fadump.c | 91 +++++++++++++---
arch/powerpc/kernel/process.c | 1
arch/powerpc/kvm/book3s_hv.c | 1
arch/powerpc/mm/mmu_context_book3s64.c | 8 -
arch/powerpc/mm/mmu_context_iommu.c | 17 +--
arch/powerpc/mm/pgtable-book3s64.c | 17 +--
arch/powerpc/mm/pkeys.c | 134 +++++++-----------------
arch/powerpc/platforms/powernv/pci-ioda.c | 37 ++++++
arch/powerpc/platforms/pseries/ras.c | 2
arch/sparc/kernel/sys_sparc_32.c | 22 ++-
arch/sparc/kernel/sys_sparc_64.c | 20 ++-
arch/x86/crypto/aesni-intel_asm.S | 66 +++++------
arch/x86/kernel/kexec-bzimage64.c | 2
arch/x86/kvm/vmx.c | 26 ++--
arch/xtensa/include/asm/cacheasm.h | 69 +++++++-----
block/bfq-cgroup.c | 3
block/blk-core.c | 61 ++++++----
block/blk-lib.c | 10 +
block/blk-sysfs.c | 15 ++
block/blk.h | 1
certs/system_keyring.c | 3
crypto/asymmetric_keys/pkcs7_key_type.c | 2
drivers/acpi/acpica/hwsleep.c | 11 -
drivers/acpi/acpica/psloop.c | 17 +--
drivers/block/zram/zram_drv.c | 7 +
drivers/cpufreq/cpufreq_governor.c | 12 +-
drivers/cpuidle/governors/menu.c | 47 ++++++--
drivers/crypto/caam/caamalg_qi.c | 6 -
drivers/crypto/caam/caampkc.c | 20 +--
drivers/crypto/caam/jr.c | 3
drivers/crypto/vmx/aes_cbc.c | 30 ++---
drivers/crypto/vmx/aes_xts.c | 21 ++-
drivers/dma-buf/reservation.c | 6 -
drivers/extcon/extcon.c | 3
drivers/hv/channel.c | 40 ++++---
drivers/hv/channel_mgmt.c | 10 +
drivers/i2c/busses/i2c-designware-master.c | 1
drivers/i2c/busses/i2c-designware-platdrv.c | 7 +
drivers/iio/accel/sca3000.c | 1
drivers/iio/frequency/ad9523.c | 4
drivers/infiniband/hw/mlx5/main.c | 2
drivers/infiniband/hw/mlx5/qp.c | 6 -
drivers/infiniband/sw/rxe/rxe_comp.c | 1
drivers/infiniband/ulp/srpt/ib_srpt.c | 34 ++++--
drivers/infiniband/ulp/srpt/ib_srpt.h | 4
drivers/iommu/dmar.c | 6 -
drivers/iommu/intel-iommu.c | 18 +++
drivers/iommu/ipmmu-vmsa.c | 7 +
drivers/mailbox/mailbox-xgene-slimpro.c | 6 -
drivers/md/bcache/writeback.c | 4
drivers/md/dm-cache-metadata.c | 13 +-
drivers/md/dm-crypt.c | 10 -
drivers/md/dm-integrity.c | 6 -
drivers/md/dm-thin.c | 2
drivers/md/dm-writecache.c | 2
drivers/media/i2c/tvp5150.c | 2
drivers/mfd/hi655x-pmic.c | 2
drivers/misc/cxl/main.c | 2
drivers/misc/ocxl/link.c | 24 ++--
drivers/misc/vmw_balloon.c | 67 +++++++-----
drivers/mmc/core/queue.c | 12 +-
drivers/mmc/core/queue.h | 1
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 10 +
drivers/net/wireless/marvell/libertas/dev.h | 1
drivers/net/wireless/marvell/libertas/if_sdio.c | 30 ++++-
drivers/nvdimm/bus.c | 4
drivers/nvdimm/dimm_devs.c | 31 +++++
drivers/nvdimm/namespace_devs.c | 6 -
drivers/nvdimm/nd-core.h | 8 +
drivers/nvdimm/region_devs.c | 24 ++++
drivers/pwm/pwm-omap-dmtimer.c | 5
drivers/pwm/pwm-tiehrpwm.c | 14 --
drivers/rtc/rtc-omap.c | 18 +--
drivers/spi/spi-cadence.c | 2
drivers/spi/spi-davinci.c | 2
drivers/spi/spi-fsl-dspi.c | 24 ++--
drivers/spi/spi-pxa2xx.c | 4
drivers/tty/serial/serial_core.c | 17 ++-
drivers/video/fbdev/core/fbmem.c | 38 +++++-
drivers/video/fbdev/udlfb.c | 105 ++++++++++--------
fs/9p/xattr.c | 6 -
fs/lockd/clntlock.c | 2
fs/lockd/clntproc.c | 2
fs/lockd/svclock.c | 16 +-
fs/lockd/svcsubs.c | 4
fs/nfs/blocklayout/dev.c | 2
fs/nfs/callback_proc.c | 14 +-
fs/nfs/nfs4proc.c | 9 +
fs/nfs/pnfs_nfs.c | 16 +-
fs/nfsd/nfs4state.c | 2
fs/overlayfs/readdir.c | 19 +++
fs/quota/quota.c | 2
fs/ubifs/dir.c | 5
fs/ubifs/journal.c | 21 +++
fs/ubifs/lprops.c | 8 -
fs/ubifs/xattr.c | 24 ++++
fs/udf/super.c | 31 +++--
fs/xattr.c | 2
include/linux/blk-cgroup.h | 18 +++
include/linux/hyperv.h | 2
include/linux/intel-iommu.h | 8 -
include/linux/lockd/lockd.h | 4
include/linux/mm_types.h | 5
include/linux/overflow.h | 31 +++++
include/linux/sunrpc/clnt.h | 1
include/linux/verification.h | 6 +
include/uapi/linux/eventpoll.h | 8 -
include/video/udlfb.h | 5
kernel/livepatch/core.c | 6 +
kernel/memremap.c | 1
kernel/power/Kconfig | 1
kernel/printk/printk_safe.c | 4
kernel/rcu/tree_exp.h | 9 +
kernel/sched/idle.c | 2
kernel/sys.c | 95 ++++++++---------
kernel/trace/blktrace.c | 4
kernel/trace/trace.c | 4
kernel/trace/trace_uprobe.c | 2
kernel/user_namespace.c | 24 +---
kernel/utsname_sysctl.c | 41 ++++---
mm/hmm.c | 2
mm/memory.c | 9 -
mm/readahead.c | 12 +-
net/9p/client.c | 2
net/9p/trans_fd.c | 7 +
net/9p/trans_rdma.c | 3
net/9p/trans_virtio.c | 13 ++
net/9p/trans_xen.c | 3
net/ieee802154/6lowpan/tx.c | 21 +++
net/mac802154/tx.c | 15 ++
net/sunrpc/clnt.c | 28 +++--
scripts/kconfig/Makefile | 5
security/apparmor/secid.c | 1
security/commoncap.c | 2
sound/ac97/bus.c | 4
sound/ac97/snd_ac97_compat.c | 19 +++
tools/perf/util/auxtrace.c | 3
148 files changed, 1373 insertions(+), 765 deletions(-)
Adrian Hunter (2):
mmc: block: Fix unsupported parallel dispatch of requests
perf auxtrace: Fix queue resize
Alexander Aring (2):
net: 6lowpan: fix reserved space for single frames
net: mac802154: tx: expand tailroom if necessary
Amir Goldstein (2):
ovl: fix wrong use of impure dir cache in ovl_iterate()
nfsd: fix leaked file lock with nfs exported overlayfs
Ard Biesheuvel (1):
crypto: arm64/sm4-ce - check for the right CPU feature bit
Bart Van Assche (9):
blkcg: Introduce blkg_root_lookup()
block: Introduce blk_exit_queue()
block: Ensure that a request queue is dissociated from the cgroup controller
IB/srpt: Fix srpt_cm_req_recv() error path (1/2)
IB/srpt: Fix srpt_cm_req_recv() error path (2/2)
IB/srpt: Support HCAs with more than two ports
ib_srpt: Fix a use-after-free in srpt_close_ch()
ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
RDMA/rxe: Set wqe->status correctly if an unexpected response is received
Bartosz Golaszewski (1):
spi: davinci: fix a NULL pointer dereference
Benjamin Herrenschmidt (1):
powerpc/powernv/pci: Work around races in PCI bridge enabling
Bill Baker (1):
NFSv4 client live hangs after live data migration recovery
Boqun Feng (1):
rcu: Make expedited GPs handle CPU 0 being offline
Chanwoo Choi (1):
extcon: Release locking when sending the notification of connector state
Chirantan Ekbote (1):
9p/net: Fix zero-copy path in the 9p virtio transport
Christian Brauner (1):
getxattr: use correct xattr length
Christophe Leroy (1):
powerpc/nohash: fix pte_access_permitted()
Dan Carpenter (1):
pnfs/blocklayout: off by one in bl_map_stripe()
Dan Williams (1):
mm, dev_pagemap: Do not clear ->mapping on final put
Daniel Mack (1):
libertas: fix suspend and resume for SDIO connected cards
Dave Watson (1):
crypto: aesni - Use unaligned loads from gcm_context_data
David Rivshin (1):
pwm: omap-dmtimer: Return -EPROBE_DEFER if no dmtimer platform data
Dexuan Cui (2):
Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer()
Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
Dmitry Osipenko (1):
iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have IPMMU-VMSA
Eddie.Horng (1):
cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()
Erik Schmauss (1):
ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
Frederic Barrat (1):
ocxl: Fix page fault handler in case of fault on dying process
Greg Kroah-Hartman (2):
eventpoll.h: wrap casts in () properly
Linux 4.18.7
Gustavo A. R. Silva (2):
mailbox: xgene-slimpro: Fix potential NULL pointer dereference
iio: sca3000: Fix missing return in switch
Hans de Goede (1):
i2c: designware: Re-init controllers with pm_disabled set on resume
Hari Bathini (1):
powerpc/fadump: handle crash memory ranges array index overflow
Henry Willard (1):
cpufreq: governor: Avoid accessing invalid governor_data
Horia Geantă (3):
crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
crypto: caam/jr - fix descriptor DMA unmapping
crypto: caam/qi - fix error path in xts setkey
Hou Tao (1):
dm thin: stop no_space_timeout worker when switching to write-mode
Ilya Dryomov (1):
dm cache metadata: set dirty on all cache blocks after a crash
Jacob Pan (2):
iommu/vt-d: Add definitions for PFSID
iommu/vt-d: Fix dev iotlb pfsid use
James Morse (1):
arm64: mm: always enable CONFIG_HOLES_IN_ZONE
Jan Kara (1):
udf: Fix mounting of Win7 created UDF filesystems
Janek Kotas (1):
spi: cadence: Change usleep_range() to udelay(), for atomic context
Jann Horn (2):
sys: don't hold uts_sem while accessing userspace memory
userns: move user access out of the mutex
Jason Gunthorpe (2):
IB/mlx5: Fix leaking stack memory to userspace
overflow.h: Add arithmetic shift helper
Javier Martinez Canillas (1):
media: Revert "[media] tvp5150: fix pad format frame height"
Jeremy Cline (1):
fs/quota: Fix spectre gadget in do_quotactl
Johan Hovold (2):
rtc: omap: fix resource leak in registration error path
rtc: omap: fix potential crash on power off
John Johansen (1):
apparmor: fix bad debug check in apparmor_secid_to_secctx()
Jon Hunter (1):
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Kamalesh Babulal (1):
livepatch: Validate module/old func name length
Keith Busch (1):
libnvdimm: Use max contiguous area for namespace size
Krzysztof Kozlowski (1):
spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
Lars-Peter Clausen (2):
iio: ad9523: Fix displayed phase
iio: ad9523: Fix return value for ad952x_store()
Leon Romanovsky (1):
RDMA/mlx5: Fix shift overflow in mlx5_ib_create_wq
Lihua Yao (3):
ALSA: ac97: fix device initialization in the compat layer
ALSA: ac97: fix check of pm_runtime_get_sync failure
ALSA: ac97: fix unbalanced pm_runtime_enable
Luke Dashjr (1):
powerpc64/ftrace: Include ftrace.h needed for enable/disable calls
Maciej S. Szmigiero (1):
block, bfq: return nbytes and not zero from struct cftype .write() method
Mahesh Salgaonkar (1):
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Markus Stockhausen (1):
readahead: stricter check for bdi io_pages
Masahiro Yamada (1):
kconfig: fix "Can't open ..." in parallel build
Max Filippov (2):
xtensa: limit offsets in __loop_cache_{all,page}
xtensa: increase ranges in ___invalidate_{i,d}cache_all
Michel Dänzer (1):
dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace
Mika Westerberg (1):
spi: pxa2xx: Add support for Intel Ice Lake
Mike Snitzer (1):
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Mikulas Patocka (12):
block: fix infinite loop if the device loses discard capability
dm integrity: change 'suspending' variable from bool to int
dm crypt: don't decrease device limits
dm writecache: fix a crash due to reading past end of dirty_bitmap
fb: fix lost console when the user unplugs a USB adapter
udlfb: fix semaphore value leak
udlfb: fix display corruption of the last line
udlfb: don't switch if we are switching to the same videomode
udlfb: set optimal write delay
udlfb: make a local copy of fb_ops
udlfb: handle allocation failure
udlfb: set line_length in dlfb_ops_set_par
Ming Lei (1):
block: really disable runtime-pm for blk-mq
Nadav Amit (4):
vmw_balloon: fix inflation of 64-bit GFNs
vmw_balloon: do not use 2MB without batching
vmw_balloon: VMCI_DOORBELL_SET does not check status
vmw_balloon: fix VMCI use when balloon built into kernel
Nicholas Piggin (1):
powerpc/64s: Fix page table fragment refcount race vs speculative references
Ondrej Mosnacek (1):
crypto: vmx - Fix sleep-in-atomic bugs
Paolo Bonzini (1):
KVM: VMX: fixes for vmentry_l1d_flush module parameter
Parav Pandit (1):
IB/mlx5: Honor cnt_set_id_valid flag instead of set_id
Paul Mackerras (1):
KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
Peter Kalauskas (1):
drivers/block/zram/zram_drv.c: fix bug storing backing_dev
Peter Zijlstra (1):
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Rafael David Tinoco (1):
mfd: hi655x: Fix regmap area declared size for hi655x
Rafael J. Wysocki (4):
ACPICA: Clear status of all events when entering sleep states
sched: idle: Avoid retaining the tick when it has been stopped
cpuidle: menu: Handle stopped tick more aggressively
cpuidle: menu: Retain tick when shallow state is selected
Ram Pai (6):
powerpc/pkeys: Give all threads control of their key permissions
powerpc/pkeys: Deny read/write/execute by default
powerpc/pkeys: key allocation/deallocation must not change pkey registers
powerpc/pkeys: Save the pkey registers before fork
powerpc/pkeys: Fix calculation of total pkeys.
powerpc/pkeys: Preallocate execute-only key
Richard Weinberger (6):
ubifs: Fix memory leak in lprobs self-check
Revert "UBIFS: Fix potential integer overflow in allocation"
ubifs: Check data node size before truncate
ubifs: xattr: Don't operate on deleted inodes
ubifs: Fix directory size calculation for symlinks
ubifs: Fix synced_i_size calculation for xattr inodes
Roger Quadros (1):
ARM: dts: am57xx-idk: Enable dual role for USB2 port
Sergei Shtylyov (2):
mmc: renesas_sdhi_internal_dmac: mask DMAC interrupts
mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
Shan Hai (1):
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Steven Rostedt (VMware) (4):
tracing: Do not call start/stop() functions when tracing_on does not change
tracing/blktrace: Fix to allow setting same value
printk/tracing: Do not trace printk_nmi_enter()
uprobes: Use synchronize_rcu() not synchronize_sched()
Tomas Bortoli (3):
9p: fix multiple NULL-pointer-dereferences
net/9p/client.c: version pointer uninitialized
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
Trond Myklebust (2):
NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
Tycho Andersen (1):
uart: fix race between uart_put_char() and uart_shutdown()
Vaibhav Jain (1):
cxl: Fix wrong comparison in cxl_adapter_context_get()
Vignesh R (2):
pwm: tiehrpwm: Don't use emulation mode bits to control PWM output
pwm: tiehrpwm: Fix disabling of output of PWMs
Vishal Verma (1):
libnvdimm: fix ars_status output length calculation
Yannik Sembritzki (2):
Replace magic for trusting the secondary keyring with #define
Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
jiangyiwen (1):
9p/virtio: fix off-by-one error in sg list bounds check
piaojun (1):
fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
xiao jin (1):
block: blk_init_allocated_queue() set q->fq as NULL in the fail case
zhangyi (F) (1):
PM / sleep: wakeup: Fix build error caused by missing SRCU support
From: Al Viro <viro(a)zeniv.linux.org.uk>
cls_u32.c misuses refcounts for struct tc_u_hnode - it counts references via
->hlist and via ->tp_root together. u32_destroy() drops the former and, in
case when there had been links, leaves the sucker on the list. As the result,
there's nothing to protect it from getting freed once links are dropped.
That also makes the "is it busy" check incapable of catching the root hnode -
it *is* busy (there's a reference from tp), but we don't see it as something
separate. "Is it our root?" check partially covers that, but the problem
exists for others' roots as well.
AFAICS, the minimal fix preserving the existing behaviour (where it doesn't
include oopsen, that is) would be this:
* count tp->root and tp_c->hlist as separate references. I.e.
have u32_init() set refcount to 2, not 1.
* in u32_destroy() we always drop the former; in u32_destroy_hnode() -
the latter.
That way we have *all* references contributing to refcount. List
removal happens in u32_destroy_hnode() (called only when ->refcnt is 1)
an in u32_destroy() in case of tc_u_common going away, along with everything
reachable from it. IOW, that way we know that u32_destroy_key() won't
free something still on the list (or pointed to by someone's ->root).
Cc: stable(a)vger.kernel.org
Signed-off-by: Al Viro <viro(a)zeniv.linux.org.uk>
---
net/sched/cls_u32.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index f218ccf1e2d9..3f985f29ef30 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -398,6 +398,7 @@ static int u32_init(struct tcf_proto *tp)
rcu_assign_pointer(tp_c->hlist, root_ht);
root_ht->tp_c = tp_c;
+ root_ht->refcnt++;
rcu_assign_pointer(tp->root, root_ht);
tp->data = tp_c;
return 0;
@@ -610,7 +611,7 @@ static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht,
struct tc_u_hnode __rcu **hn;
struct tc_u_hnode *phn;
- WARN_ON(ht->refcnt);
+ WARN_ON(--ht->refcnt);
u32_clear_hnode(tp, ht, extack);
@@ -649,7 +650,7 @@ static void u32_destroy(struct tcf_proto *tp, struct netlink_ext_ack *extack)
WARN_ON(root_ht == NULL);
- if (root_ht && --root_ht->refcnt == 0)
+ if (root_ht && --root_ht->refcnt == 1)
u32_destroy_hnode(tp, root_ht, extack);
if (--tp_c->refcnt == 0) {
@@ -698,7 +699,6 @@ static int u32_delete(struct tcf_proto *tp, void *arg, bool *last,
}
if (ht->refcnt == 1) {
- ht->refcnt--;
u32_destroy_hnode(tp, ht, extack);
} else {
NL_SET_ERR_MSG_MOD(extack, "Can not delete in-use filter");
--
2.11.0
Hi,
I would like to check if you have received my email from last week?
We are a team of 11 image editors who can help you for cutting out, your
photos, also add retouching.
Editing is for your products photos or portrait photos, catalog photos.
Let me know if you have interests, we can send you testing work.
Thanks,
Denis Jones
Commit 822fb18a82aba ("xen-netfront: wait xenbus state change when load
module manually") added a new wait queue to wait on for a state change
when the module is loaded manually. Unfortunately there is no wakeup
anywhere to stop that waiting.
Instead of introducing a new wait queue rename the existing
module_unload_q to module_wq and use it for both purposes (loading and
unloading).
As any state change of the backend might be intended to stop waiting
do the wake_up_all() in any case when netback_changed() is called.
Fixes: 822fb18a82aba ("xen-netfront: wait xenbus state change when load module manually")
Cc: <stable(a)vger.kernel.org> #4.18
Signed-off-by: Juergen Gross <jgross(a)suse.com>
---
drivers/net/xen-netfront.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 73f596a90c69..9407acbd19a9 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -87,8 +87,7 @@ struct netfront_cb {
/* IRQ name is queue name with "-tx" or "-rx" appended */
#define IRQ_NAME_SIZE (QUEUE_NAME_SIZE + 3)
-static DECLARE_WAIT_QUEUE_HEAD(module_load_q);
-static DECLARE_WAIT_QUEUE_HEAD(module_unload_q);
+static DECLARE_WAIT_QUEUE_HEAD(module_wq);
struct netfront_stats {
u64 packets;
@@ -1332,11 +1331,11 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
netif_carrier_off(netdev);
xenbus_switch_state(dev, XenbusStateInitialising);
- wait_event(module_load_q,
- xenbus_read_driver_state(dev->otherend) !=
- XenbusStateClosed &&
- xenbus_read_driver_state(dev->otherend) !=
- XenbusStateUnknown);
+ wait_event(module_wq,
+ xenbus_read_driver_state(dev->otherend) !=
+ XenbusStateClosed &&
+ xenbus_read_driver_state(dev->otherend) !=
+ XenbusStateUnknown);
return netdev;
exit:
@@ -2010,15 +2009,14 @@ static void netback_changed(struct xenbus_device *dev,
dev_dbg(&dev->dev, "%s\n", xenbus_strstate(backend_state));
+ wake_up_all(&module_wq);
+
switch (backend_state) {
case XenbusStateInitialising:
case XenbusStateInitialised:
case XenbusStateReconfiguring:
case XenbusStateReconfigured:
- break;
-
case XenbusStateUnknown:
- wake_up_all(&module_unload_q);
break;
case XenbusStateInitWait:
@@ -2034,12 +2032,10 @@ static void netback_changed(struct xenbus_device *dev,
break;
case XenbusStateClosed:
- wake_up_all(&module_unload_q);
if (dev->state == XenbusStateClosed)
break;
/* Missed the backend's CLOSING state -- fallthrough */
case XenbusStateClosing:
- wake_up_all(&module_unload_q);
xenbus_frontend_closed(dev);
break;
}
@@ -2147,14 +2143,14 @@ static int xennet_remove(struct xenbus_device *dev)
if (xenbus_read_driver_state(dev->otherend) != XenbusStateClosed) {
xenbus_switch_state(dev, XenbusStateClosing);
- wait_event(module_unload_q,
+ wait_event(module_wq,
xenbus_read_driver_state(dev->otherend) ==
XenbusStateClosing ||
xenbus_read_driver_state(dev->otherend) ==
XenbusStateUnknown);
xenbus_switch_state(dev, XenbusStateClosed);
- wait_event(module_unload_q,
+ wait_event(module_wq,
xenbus_read_driver_state(dev->otherend) ==
XenbusStateClosed ||
xenbus_read_driver_state(dev->otherend) ==
--
2.16.4
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 50229128727f7e11840ca1b2b501f880818d56b6 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui(a)microsoft.com>
Date: Tue, 5 Jun 2018 13:37:52 -0700
Subject: [PATCH] Drivers: hv: vmbus: Fix the offer_in_progress in
vmbus_process_offer()
I didn't really hit a real bug, but just happened to spot the bug:
we have decreased the counter at the beginning of vmbus_process_offer(),
so we mustn't decrease it again.
Fixes: 6f3d791f3006 ("Drivers: hv: vmbus: Fix rescind handling issues")
Signed-off-by: Dexuan Cui <decui(a)microsoft.com>
Cc: stable(a)vger.kernel.org
Cc: Stephen Hemminger <sthemmin(a)microsoft.com>
Cc: K. Y. Srinivasan <kys(a)microsoft.com>
Cc: Stable <stable(a)vger.kernel.org> # 4.14 and above
Signed-off-by: K. Y. Srinivasan <kys(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index ecc2bd275a73..f3b551a50653 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -527,10 +527,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
struct hv_device *dev
= newchannel->primary_channel->device_obj;
- if (vmbus_add_channel_kobj(dev, newchannel)) {
- atomic_dec(&vmbus_connection.offer_in_progress);
+ if (vmbus_add_channel_kobj(dev, newchannel))
goto err_free_chan;
- }
if (channel->sc_creation_callback != NULL)
channel->sc_creation_callback(newchannel);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From d1c392c9e2a301f38998a353f467f76414e38725 Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
Date: Wed, 5 Sep 2018 16:29:49 -0400
Subject: [PATCH] printk/tracing: Do not trace printk_nmi_enter()
I hit the following splat in my tests:
------------[ cut here ]------------
IRQs not enabled as expected
WARNING: CPU: 3 PID: 0 at kernel/time/tick-sched.c:982 tick_nohz_idle_enter+0x44/0x8c
Modules linked in: ip6t_REJECT nf_reject_ipv6 ip6table_filter ip6_tables ipv6
CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.19.0-rc2-test+ #2
Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014
EIP: tick_nohz_idle_enter+0x44/0x8c
Code: ec 05 00 00 00 75 26 83 b8 c0 05 00 00 00 75 1d 80 3d d0 36 3e c1 00
75 14 68 94 63 12 c1 c6 05 d0 36 3e c1 01 e8 04 ee f8 ff <0f> 0b 58 fa bb a0
e5 66 c1 e8 25 0f 04 00 64 03 1d 28 31 52 c1 8b
EAX: 0000001c EBX: f26e7f8c ECX: 00000006 EDX: 00000007
ESI: f26dd1c0 EDI: 00000000 EBP: f26e7f40 ESP: f26e7f38
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010296
CR0: 80050033 CR2: 0813c6b0 CR3: 2f342000 CR4: 001406f0
Call Trace:
do_idle+0x33/0x202
cpu_startup_entry+0x61/0x63
start_secondary+0x18e/0x1ed
startup_32_smp+0x164/0x168
irq event stamp: 18773830
hardirqs last enabled at (18773829): [<c040150c>] trace_hardirqs_on_thunk+0xc/0x10
hardirqs last disabled at (18773830): [<c040151c>] trace_hardirqs_off_thunk+0xc/0x10
softirqs last enabled at (18773824): [<c0ddaa6f>] __do_softirq+0x25f/0x2bf
softirqs last disabled at (18773767): [<c0416bbe>] call_on_stack+0x45/0x4b
---[ end trace b7c64aa79e17954a ]---
After a bit of debugging, I found what was happening. This would trigger
when performing "perf" with a high NMI interrupt rate, while enabling and
disabling function tracer. Ftrace uses breakpoints to convert the nops at
the start of functions to calls to the function trampolines. The breakpoint
traps disable interrupts and this makes calls into lockdep via the
trace_hardirqs_off_thunk in the entry.S code. What happens is the following:
do_idle {
[interrupts enabled]
<interrupt> [interrupts disabled]
TRACE_IRQS_OFF [lockdep says irqs off]
[...]
TRACE_IRQS_IRET
test if pt_regs say return to interrupts enabled [yes]
TRACE_IRQS_ON [lockdep says irqs are on]
<nmi>
nmi_enter() {
printk_nmi_enter() [traced by ftrace]
[ hit ftrace breakpoint ]
<breakpoint exception>
TRACE_IRQS_OFF [lockdep says irqs off]
[...]
TRACE_IRQS_IRET [return from breakpoint]
test if pt_regs say interrupts enabled [no]
[iret back to interrupt]
[iret back to code]
tick_nohz_idle_enter() {
lockdep_assert_irqs_enabled() [lockdep say no!]
Although interrupts are indeed enabled, lockdep thinks it is not, and since
we now do asserts via lockdep, it gives a false warning. The issue here is
that printk_nmi_enter() is called before lockdep_off(), which disables
lockdep (for this reason) in NMIs. By simply not allowing ftrace to see
printk_nmi_enter() (via notrace annotation) we keep lockdep from getting
confused.
Cc: stable(a)vger.kernel.org
Fixes: 42a0bb3f71383 ("printk/nmi: generic solution for safe printk in NMI")
Acked-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
Acked-by: Petr Mladek <pmladek(a)suse.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c
index a0a74c533e4b..0913b4d385de 100644
--- a/kernel/printk/printk_safe.c
+++ b/kernel/printk/printk_safe.c
@@ -306,12 +306,12 @@ static __printf(1, 0) int vprintk_nmi(const char *fmt, va_list args)
return printk_safe_log_store(s, fmt, args);
}
-void printk_nmi_enter(void)
+void notrace printk_nmi_enter(void)
{
this_cpu_or(printk_context, PRINTK_NMI_CONTEXT_MASK);
}
-void printk_nmi_exit(void)
+void notrace printk_nmi_exit(void)
{
this_cpu_and(printk_context, ~PRINTK_NMI_CONTEXT_MASK);
}
The patch below does not apply to the 3.18-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 95a22d2084d72ea067d8323cc85677dba5d97cae Mon Sep 17 00:00:00 2001
From: Richard Weinberger <richard(a)nod.at>
Date: Sun, 1 Jul 2018 23:20:51 +0200
Subject: [PATCH] ubifs: Check data node size before truncate
Check whether the size is within bounds before using it.
If the size is not correct, abort and dump the bad data node.
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Silvio Cesare <silvio.cesare(a)gmail.com>
Cc: stable(a)vger.kernel.org
Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
Reported-by: Silvio Cesare <silvio.cesare(a)gmail.com>
Signed-off-by: Richard Weinberger <richard(a)nod.at>
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Signed-off-by: Richard Weinberger <richard(a)nod.at>
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index 1406765c3ef9..cef0d76d490a 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -1393,7 +1393,16 @@ int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
else if (err)
goto out_free;
else {
- if (le32_to_cpu(dn->size) <= dlen)
+ int dn_len = le32_to_cpu(dn->size);
+
+ if (dn_len <= 0 || dn_len > UBIFS_BLOCK_SIZE) {
+ ubifs_err(c, "bad data node (block %u, inode %lu)",
+ blk, inode->i_ino);
+ ubifs_dump_node(c, dn);
+ goto out_free;
+ }
+
+ if (dn_len <= dlen)
dlen = 0; /* Nothing to do */
else {
err = truncate_data_node(c, inode, blk, dn, &dlen);
From: Marc Zyngier <marc.zyngier(a)arm.com>
If trapping FPSIMD in the context of an AArch32 guest, it is critical
to set FPEXC32_EL2.EN to 1 so that the trapping is taken to EL2 and
not EL1.
Conversely, it is just as critical *not* to set FPEXC32_EL2.EN to 1
if we're not going to trap FPSIMD, as we then corrupt the existing
VFP state.
Moving the call to __activate_traps_fpsimd32 to the point where we
know for sure that we are going to trap ensures that we don't set that
bit spuriously.
Fixes: e6b673b741ea ("KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing")
Cc: stable(a)vger.kernel.org # v4.18
Cc: Dave Martin <dave.martin(a)arm.com>
Reported-by: Alexander Graf <agraf(a)suse.de>
Tested-by: Alexander Graf <agraf(a)suse.de>
Signed-off-by: Marc Zyngier <marc.zyngier(a)arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall(a)arm.com>
---
arch/arm64/kvm/hyp/switch.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
index d496ef579859..ca46153d7915 100644
--- a/arch/arm64/kvm/hyp/switch.c
+++ b/arch/arm64/kvm/hyp/switch.c
@@ -98,8 +98,10 @@ static void activate_traps_vhe(struct kvm_vcpu *vcpu)
val = read_sysreg(cpacr_el1);
val |= CPACR_EL1_TTA;
val &= ~CPACR_EL1_ZEN;
- if (!update_fp_enabled(vcpu))
+ if (!update_fp_enabled(vcpu)) {
val &= ~CPACR_EL1_FPEN;
+ __activate_traps_fpsimd32(vcpu);
+ }
write_sysreg(val, cpacr_el1);
@@ -114,8 +116,10 @@ static void __hyp_text __activate_traps_nvhe(struct kvm_vcpu *vcpu)
val = CPTR_EL2_DEFAULT;
val |= CPTR_EL2_TTA | CPTR_EL2_TZ;
- if (!update_fp_enabled(vcpu))
+ if (!update_fp_enabled(vcpu)) {
val |= CPTR_EL2_TFP;
+ __activate_traps_fpsimd32(vcpu);
+ }
write_sysreg(val, cptr_el2);
}
@@ -129,7 +133,6 @@ static void __hyp_text __activate_traps(struct kvm_vcpu *vcpu)
if (cpus_have_const_cap(ARM64_HAS_RAS_EXTN) && (hcr & HCR_VSE))
write_sysreg_s(vcpu->arch.vsesr_el2, SYS_VSESR_EL2);
- __activate_traps_fpsimd32(vcpu);
if (has_vhe())
activate_traps_vhe(vcpu);
else
--
2.18.0
From: Marc Zyngier <marc.zyngier(a)arm.com>
When triggering a CoW, we unmap the RO page via an MMU notifier
(invalidate_range_start), and then populate the new PTE using another
one (change_pte). In the meantime, we'll have copied the old page
into the new one.
The problem is that the data for the new page is sitting in the
cache, and should the guest have an uncached mapping to that page
(or its MMU off), following accesses will bypass the cache.
In a way, this is similar to what happens on a translation fault:
We need to clean the page to the PoC before mapping it. So let's just
do that.
This fixes a KVM unit test regression observed on a HiSilicon platform,
and subsequently reproduced on Seattle.
Fixes: a9c0e12ebee5 ("KVM: arm/arm64: Only clean the dcache on translation fault")
Cc: stable(a)vger.kernel.org # v4.16+
Reported-by: Mike Galbraith <efault(a)gmx.de>
Signed-off-by: Marc Zyngier <marc.zyngier(a)arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall(a)arm.com>
---
virt/kvm/arm/mmu.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
index 91aaf73b00df..111a660be3be 100644
--- a/virt/kvm/arm/mmu.c
+++ b/virt/kvm/arm/mmu.c
@@ -1860,13 +1860,20 @@ static int kvm_set_spte_handler(struct kvm *kvm, gpa_t gpa, u64 size, void *data
void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte)
{
unsigned long end = hva + PAGE_SIZE;
+ kvm_pfn_t pfn = pte_pfn(pte);
pte_t stage2_pte;
if (!kvm->arch.pgd)
return;
trace_kvm_set_spte_hva(hva);
- stage2_pte = pfn_pte(pte_pfn(pte), PAGE_S2);
+
+ /*
+ * We've moved a page around, probably through CoW, so let's treat it
+ * just like a translation fault and clean the cache to the PoC.
+ */
+ clean_dcache_guest_page(pfn, PAGE_SIZE);
+ stage2_pte = pfn_pte(pfn, PAGE_S2);
handle_hva_to_gpa(kvm, hva, end, &kvm_set_spte_handler, &stage2_pte);
}
--
2.18.0
The patch below does not apply to the 3.18-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From aa49d628f6e016bcec8c6f8e704b9b18ee697329 Mon Sep 17 00:00:00 2001
From: Vignesh R <vigneshr(a)ti.com>
Date: Mon, 11 Jun 2018 11:39:55 +0530
Subject: [PATCH] pwm: tiehrpwm: Don't use emulation mode bits to control PWM
output
As per AM335x TRM SPRUH73P "15.2.2.11 ePWM Behavior During Emulation",
TBCTL[15:14] only have effect during emulation suspend events (IOW,
to stop PWM when debugging using a debugger). These bits have no effect
on PWM output during normal running of system. Hence, remove code
accessing these bits as they have no role in enabling/disabling PWMs.
Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
Cc: stable(a)vger.kernel.org
Signed-off-by: Vignesh R <vigneshr(a)ti.com>
Signed-off-by: Thierry Reding <thierry.reding(a)gmail.com>
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 4c22cb395040..768176f54d5e 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -33,10 +33,6 @@
#define TBCTL 0x00
#define TBPRD 0x0A
-#define TBCTL_RUN_MASK (BIT(15) | BIT(14))
-#define TBCTL_STOP_NEXT 0
-#define TBCTL_STOP_ON_CYCLE BIT(14)
-#define TBCTL_FREE_RUN (BIT(15) | BIT(14))
#define TBCTL_PRDLD_MASK BIT(3)
#define TBCTL_PRDLD_SHDW 0
#define TBCTL_PRDLD_IMDT BIT(3)
@@ -360,7 +356,7 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
/* Channels polarity can be configured from action qualifier module */
configure_polarity(pc, pwm->hwpwm);
- /* Enable TBCLK before enabling PWM device */
+ /* Enable TBCLK */
ret = clk_enable(pc->tbclk);
if (ret) {
dev_err(chip->dev, "Failed to enable TBCLK for %s: %d\n",
@@ -368,9 +364,6 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
return ret;
}
- /* Enable time counter for free_run */
- ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_FREE_RUN);
-
return 0;
}
@@ -400,9 +393,6 @@ static void ehrpwm_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
/* Disabling TBCLK on PWM disable */
clk_disable(pc->tbclk);
- /* Stop Time base counter */
- ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_STOP_NEXT);
-
/* Disable clock on PWM disable */
pm_runtime_put_sync(chip->dev);
}
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From aa49d628f6e016bcec8c6f8e704b9b18ee697329 Mon Sep 17 00:00:00 2001
From: Vignesh R <vigneshr(a)ti.com>
Date: Mon, 11 Jun 2018 11:39:55 +0530
Subject: [PATCH] pwm: tiehrpwm: Don't use emulation mode bits to control PWM
output
As per AM335x TRM SPRUH73P "15.2.2.11 ePWM Behavior During Emulation",
TBCTL[15:14] only have effect during emulation suspend events (IOW,
to stop PWM when debugging using a debugger). These bits have no effect
on PWM output during normal running of system. Hence, remove code
accessing these bits as they have no role in enabling/disabling PWMs.
Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
Cc: stable(a)vger.kernel.org
Signed-off-by: Vignesh R <vigneshr(a)ti.com>
Signed-off-by: Thierry Reding <thierry.reding(a)gmail.com>
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 4c22cb395040..768176f54d5e 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -33,10 +33,6 @@
#define TBCTL 0x00
#define TBPRD 0x0A
-#define TBCTL_RUN_MASK (BIT(15) | BIT(14))
-#define TBCTL_STOP_NEXT 0
-#define TBCTL_STOP_ON_CYCLE BIT(14)
-#define TBCTL_FREE_RUN (BIT(15) | BIT(14))
#define TBCTL_PRDLD_MASK BIT(3)
#define TBCTL_PRDLD_SHDW 0
#define TBCTL_PRDLD_IMDT BIT(3)
@@ -360,7 +356,7 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
/* Channels polarity can be configured from action qualifier module */
configure_polarity(pc, pwm->hwpwm);
- /* Enable TBCLK before enabling PWM device */
+ /* Enable TBCLK */
ret = clk_enable(pc->tbclk);
if (ret) {
dev_err(chip->dev, "Failed to enable TBCLK for %s: %d\n",
@@ -368,9 +364,6 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
return ret;
}
- /* Enable time counter for free_run */
- ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_FREE_RUN);
-
return 0;
}
@@ -400,9 +393,6 @@ static void ehrpwm_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
/* Disabling TBCLK on PWM disable */
clk_disable(pc->tbclk);
- /* Stop Time base counter */
- ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_STOP_NEXT);
-
/* Disable clock on PWM disable */
pm_runtime_put_sync(chip->dev);
}
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From aa49d628f6e016bcec8c6f8e704b9b18ee697329 Mon Sep 17 00:00:00 2001
From: Vignesh R <vigneshr(a)ti.com>
Date: Mon, 11 Jun 2018 11:39:55 +0530
Subject: [PATCH] pwm: tiehrpwm: Don't use emulation mode bits to control PWM
output
As per AM335x TRM SPRUH73P "15.2.2.11 ePWM Behavior During Emulation",
TBCTL[15:14] only have effect during emulation suspend events (IOW,
to stop PWM when debugging using a debugger). These bits have no effect
on PWM output during normal running of system. Hence, remove code
accessing these bits as they have no role in enabling/disabling PWMs.
Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
Cc: stable(a)vger.kernel.org
Signed-off-by: Vignesh R <vigneshr(a)ti.com>
Signed-off-by: Thierry Reding <thierry.reding(a)gmail.com>
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 4c22cb395040..768176f54d5e 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -33,10 +33,6 @@
#define TBCTL 0x00
#define TBPRD 0x0A
-#define TBCTL_RUN_MASK (BIT(15) | BIT(14))
-#define TBCTL_STOP_NEXT 0
-#define TBCTL_STOP_ON_CYCLE BIT(14)
-#define TBCTL_FREE_RUN (BIT(15) | BIT(14))
#define TBCTL_PRDLD_MASK BIT(3)
#define TBCTL_PRDLD_SHDW 0
#define TBCTL_PRDLD_IMDT BIT(3)
@@ -360,7 +356,7 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
/* Channels polarity can be configured from action qualifier module */
configure_polarity(pc, pwm->hwpwm);
- /* Enable TBCLK before enabling PWM device */
+ /* Enable TBCLK */
ret = clk_enable(pc->tbclk);
if (ret) {
dev_err(chip->dev, "Failed to enable TBCLK for %s: %d\n",
@@ -368,9 +364,6 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
return ret;
}
- /* Enable time counter for free_run */
- ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_FREE_RUN);
-
return 0;
}
@@ -400,9 +393,6 @@ static void ehrpwm_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
/* Disabling TBCLK on PWM disable */
clk_disable(pc->tbclk);
- /* Stop Time base counter */
- ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_STOP_NEXT);
-
/* Disable clock on PWM disable */
pm_runtime_put_sync(chip->dev);
}