[Fair warning: This is pure conjecture right now.]
In
commit b8e2b0199cc377617dc238f5106352c06dcd3fa2
Author: Peter Rosin <peda(a)axentia.se>
Date: Tue Jul 4 12:36:57 2017 +0200
drm/fb-helper: factor out pseudo-palette
Peter extracted the pseudo palette computation, but seems to have done
an off-by-one. I spotted that +1, but then noticed that we've passed
start++ to (now gone) setcolreg function, so it seemed to all match
up. Except post vs. pre-increment ftw.
Result is that the palette is off-by-one, and the forground color
(slot 0) ends up black, rendering a fairly unreadable console.
What baffles me is that on some systems it still seems to work
somehow, which lead us all down a wild goose chase trying to add
load_lut calls back in in various places (which was also intentionally
removed, but really doesn't seem to be the real root cause).
Fixes: b8e2b0199cc3 ("drm/fb-helper: factor out pseudo-palette")
Cc: Peter Rosin <peda(a)axenita.se>
Cc: Daniel Vetter <daniel.vetter(a)ffwll.ch>
Cc: Daniel Vetter <daniel.vetter(a)intel.com>
Cc: Gustavo Padovan <gustavo(a)padovan.org>
Cc: Sean Paul <seanpaul(a)chromium.org>
Cc: David Airlie <airlied(a)linux.ie>
Cc: dri-devel(a)lists.freedesktop.org
Cc: <stable(a)vger.kernel.org> # v4.14+
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198123
Reported-by: Deposite Pirate <dpirate(a)metalpunks.info>
Reported-by: Bill Fraser <bill.fraser(a)gmail.com>
Cc: Deposite Pirate <dpirate(a)metalpunks.info>
Cc: Bill Fraser <bill.fraser(a)gmail.com>
Cc: Michel Dänzer <michel(a)daenzer.net>
Signed-off-by: Daniel Vetter <daniel.vetter(a)intel.com>
---
drivers/gpu/drm/drm_fb_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 035784ddd133..1c3a200c4a10 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1295,7 +1295,7 @@ static int setcmap_pseudo_palette(struct fb_cmap *cmap, struct fb_info *info)
mask <<= info->var.transp.offset;
value |= mask;
}
- palette[cmap->start + i] = value;
+ palette[cmap->start] = value;
}
return 0;
--
2.15.1
This is the start of the stable review cycle for the 3.18.92 release.
There are 46 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 Jan 17 12:32:57 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.18.92-rc1.gz
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.92-rc1
Benjamin Poirier <bpoirier(a)suse.com>
e1000e: Fix e1000_check_for_copper_link_ich8lan return value.
Icenowy Zheng <icenowy(a)aosc.io>
uas: ignore UAS for Norelsys NS1068(X) chips
Ben Seri <ben(a)armis.com>
Bluetooth: Prevent stack info leak from the EFS element.
Viktor Slavkovic <viktors(a)google.com>
staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl
Shuah Khan <shuahkh(a)osg.samsung.com>
usbip: remove kernel addresses from usb device and urb debug msgs
Pete Zaitcev <zaitcev(a)redhat.com>
USB: fix usbmon BUG trigger
Stefan Agner <stefan(a)agner.ch>
usb: misc: usb3503: make sure reset is low for at least 100us
Christian Holl <cyborgx1(a)gmail.com>
USB: serial: cp210x: add new device ID ELV ALC 8xxx
Diego Elio Pettenò <flameeyes(a)flameeyes.eu>
USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "can: kvaser_usb: free buf in error paths"
Nicholas Bellinger <nab(a)linux-iscsi.org>
target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK
Nicholas Bellinger <nab(a)linux-iscsi.org>
iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref
Jia Zhang <qianyue.zj(a)alibaba-inc.com>
x86/microcode/intel: Extend BDW late-loading with a revision check
Eric Biggers <ebiggers(a)google.com>
crypto: algapi - fix NULL dereference in crypto_remove_spawns()
Jerome Brunet <jbrunet(a)baylibre.com>
net: stmmac: enable EEE in MII, GMII or RGMII only
Sergei Shtylyov <sergei.shtylyov(a)cogentembedded.com>
sh_eth: fix SH7757 GEther initialization
Sergei Shtylyov <sergei.shtylyov(a)cogentembedded.com>
sh_eth: fix TSU resource handling
Mohamed Ghannam <simo.ghannam(a)gmail.com>
RDS: null pointer dereference in rds_atomic_free_op
Mohamed Ghannam <simo.ghannam(a)gmail.com>
RDS: Heap OOB write in rds_message_alloc_sgs()
Cong Wang <xiyou.wangcong(a)gmail.com>
8021q: fix a memory leak for VLAN 0 device
Vikas C Sajjan <vikas.cha.sajjan(a)hpe.com>
x86/acpi: Reduce code duplication in mp_override_legacy_irq()
Takashi Iwai <tiwai(a)suse.de>
ALSA: aloop: Fix racy hw constraints adjustment
Takashi Iwai <tiwai(a)suse.de>
ALSA: aloop: Fix inconsistent format due to incomplete rule
Takashi Iwai <tiwai(a)suse.de>
ALSA: aloop: Release cable upon open error path
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Allow aborting mutex lock at OSS read/write loops
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Abort properly at pending signal in OSS read/write loops
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Add missing error checks in OSS emulation plugin builder
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Remove incorrect snd_BUG_ON() usages
Vikas C Sajjan <vikas.cha.sajjan(a)hpe.com>
x86/acpi: Handle SCI interrupts above legacy space gracefully
Jim Mattson <jmattson(a)google.com>
kvm: vmx: Scrub hardware GPRs at VM-exit
Peter Zijlstra <peterz(a)infradead.org>
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Also verify sizeof `elf_fpreg_t' with PTRACE_SETREGSET
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Disallow outsized PTRACE_SETREGSET NT_PRFPREG regset accesses
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Fix an FCSR access API regression with NT_PRFPREG and MSA
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Consistently handle buffer counter with PTRACE_SETREGSET
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Guard against any partial write attempt with PTRACE_SETREGSET
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Factor out NT_PRFPREG regset access helpers
Bart Van Assche <bart.vanassche(a)wdc.com>
IB/srpt: Disable RDMA access by the initiator
Wolfgang Grandegger <wg(a)grandegger.com>
can: gs_usb: fix return value of the "set_bittiming" callback
Aaron Ma <aaron.ma(a)canonical.com>
Input: elantech - add new icbody type 15
Oleg Nesterov <oleg(a)redhat.com>
kernel/signal.c: remove the no longer needed SIGNAL_UNKILLABLE check in complete_signal()
Oleg Nesterov <oleg(a)redhat.com>
kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals
Oleg Nesterov <oleg(a)redhat.com>
kernel/signal.c: protect the traced SIGNAL_UNKILLABLE tasks from SIGKILL
David Howells <dhowells(a)redhat.com>
fscache: Fix the default for fscache_maybe_release_page()
Jan Engelhardt <jengelh(a)inai.de>
crypto: n2 - cure use after free
Oleg Nesterov <oleg(a)redhat.com>
kernel/acct.c: fix the acct->needcheck check in check_free_space()
-------------
Diffstat:
Makefile | 4 +-
arch/mips/kernel/ptrace.c | 147 ++++++++++++++++++----
arch/x86/kernel/acpi/boot.c | 60 +++++----
arch/x86/kernel/cpu/microcode/intel.c | 13 +-
arch/x86/kvm/svm.c | 19 +++
arch/x86/kvm/vmx.c | 14 ++-
crypto/algapi.c | 12 ++
drivers/crypto/n2_core.c | 3 +
drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-
drivers/input/mouse/elantech.c | 2 +-
drivers/net/can/usb/gs_usb.c | 2 +-
drivers/net/can/usb/kvaser_usb.c | 2 -
drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 +-
drivers/net/ethernet/renesas/sh_eth.c | 29 ++++-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +
drivers/staging/android/ashmem.c | 2 +
drivers/target/iscsi/iscsi_target.c | 21 ++--
drivers/target/target_core_tmr.c | 9 ++
drivers/target/target_core_transport.c | 2 +
drivers/usb/misc/usb3503.c | 2 +
drivers/usb/mon/mon_bin.c | 8 +-
drivers/usb/serial/cp210x.c | 2 +
drivers/usb/storage/unusual_uas.h | 7 ++
drivers/usb/usbip/usbip_common.c | 17 +--
include/linux/fscache.h | 2 +-
include/linux/phy.h | 11 ++
include/linux/sh_eth.h | 1 -
include/target/target_core_base.h | 1 +
kernel/acct.c | 2 +-
kernel/events/core.c | 61 ++++++++-
kernel/signal.c | 18 +--
net/8021q/vlan.c | 7 +-
net/bluetooth/l2cap_core.c | 20 +--
net/rds/rdma.c | 4 +
sound/core/oss/pcm_oss.c | 41 +++---
sound/core/oss/pcm_plugin.c | 14 ++-
sound/core/pcm_lib.c | 4 +-
sound/drivers/aloop.c | 98 ++++++++-------
38 files changed, 488 insertions(+), 193 deletions(-)
The patch titled
Subject: kdump: write correct address of mem_section into vmcoreinfo
has been removed from the -mm tree. Its filename was
kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: "Kirill A. Shutemov" <kirill.shutemov(a)linux.intel.com>
Subject: kdump: write correct address of mem_section into vmcoreinfo
Depending on configuration mem_section can now be an array or a pointer to
an array allocated dynamically. In most cases, we can continue to refer
to it as 'mem_section' regardless of what it is.
But there's one exception: '&mem_section' means "address of the array" if
mem_section is an array, but if mem_section is a pointer, it would mean
"address of the pointer".
We've stepped onto this in kdump code. VMCOREINFO_SYMBOL(mem_section)
writes down address of pointer into vmcoreinfo, not array as we wanted.
Let's introduce VMCOREINFO_SYMBOL_ARRAY() that would handle the situation
correctly for both cases.
Link: http://lkml.kernel.org/r/20180112162532.35896-1-kirill.shutemov@linux.intel…
Signed-off-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Fixes: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y")
Acked-by: Baoquan He <bhe(a)redhat.com>
Acked-by: Dave Young <dyoung(a)redhat.com>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Dave Young <dyoung(a)redhat.com>
Cc: Baoquan He <bhe(a)redhat.com>
Cc: Vivek Goyal <vgoyal(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/crash_core.h | 2 ++
kernel/crash_core.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff -puN include/linux/crash_core.h~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo include/linux/crash_core.h
--- a/include/linux/crash_core.h~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo
+++ a/include/linux/crash_core.h
@@ -42,6 +42,8 @@ phys_addr_t paddr_vmcoreinfo_note(void);
vmcoreinfo_append_str("PAGESIZE=%ld\n", value)
#define VMCOREINFO_SYMBOL(name) \
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name)
+#define VMCOREINFO_SYMBOL_ARRAY(name) \
+ vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)name)
#define VMCOREINFO_SIZE(name) \
vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
(unsigned long)sizeof(name))
diff -puN kernel/crash_core.c~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo kernel/crash_core.c
--- a/kernel/crash_core.c~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo
+++ a/kernel/crash_core.c
@@ -410,7 +410,7 @@ static int __init crash_save_vmcoreinfo_
VMCOREINFO_SYMBOL(contig_page_data);
#endif
#ifdef CONFIG_SPARSEMEM
- VMCOREINFO_SYMBOL(mem_section);
+ VMCOREINFO_SYMBOL_ARRAY(mem_section);
VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS);
VMCOREINFO_STRUCT_SIZE(mem_section);
VMCOREINFO_OFFSET(mem_section, section_mem_map);
_
Patches currently in -mm which might be from kirill.shutemov(a)linux.intel.com are
asm-generic-provide-generic_pmdp_establish.patch
arc-use-generic_pmdp_establish-as-pmdp_establish.patch
arm-mm-provide-pmdp_establish-helper.patch
mips-use-generic_pmdp_establish-as-pmdp_establish.patch
x86-mm-provide-pmdp_establish-helper.patch
mm-do-not-lose-dirty-and-access-bits-in-pmdp_invalidate.patch
mm-use-updated-pmdp_invalidate-interface-to-track-dirty-accessed-bits.patch
For legacy chips without CLM blob files, kernel with user helper function
returns -EAGAIN when we request_firmware(), and then driver got failed
when bringing up legacy chips. We expect the CLM blob file for legacy chip
is not existence in firmware path, but the -ENOENT error is transferred to
-EAGAIN in firmware_class.c with user helper.
Because of that, we continue with CLM data currently present in firmware
if getting error from doing request_firmware().
Cc: stable(a)vger.kernel.org # v4.15.y
Reviewed-by: Arend van Spriel <arend.vanspriel(a)broadcom.com>
Signed-off-by: Wright Feng <wright.feng(a)cypress.com>
---
v2: remove retry from patch v1
v3: remove redundant log print
v4: modify log print
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
index 6a59d06..9be0b05 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
@@ -182,12 +182,9 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp)
err = request_firmware(&clm, clm_name, dev);
if (err) {
- if (err == -ENOENT) {
- brcmf_dbg(INFO, "continue with CLM data currently present in firmware\n");
- return 0;
- }
- brcmf_err("request CLM blob file failed (%d)\n", err);
- return err;
+ brcmf_info("no clm_blob available(err=%d), device may have limited channels available\n",
+ err);
+ return 0;
}
chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL);
--
1.9.1
If an invalid CAN frame is received, from a driver or from a tun
interface, a Kernel warning is generated.
This patch replaces the WARN_ONCE by a simple pr_warn_once, so that a
kernel, bootet with panic_on_warn, does not panic. A printk seems to be
more appropriate here.
Reported-by: syzbot+4386709c0c1284dca827(a)syzkaller.appspotmail.com
Suggested-by: Dmitry Vyukov <dvyukov(a)google.com>
Cc: linux-stable <stable(a)vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl(a)pengutronix.de>
---
net/can/af_can.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 003b2d6d655f..ae835382e678 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -721,20 +721,16 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,
{
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
- if (WARN_ONCE(dev->type != ARPHRD_CAN ||
- skb->len != CAN_MTU ||
- cfd->len > CAN_MAX_DLEN,
- "PF_CAN: dropped non conform CAN skbuf: "
- "dev type %d, len %d, datalen %d\n",
- dev->type, skb->len, cfd->len))
- goto drop;
+ if (unlikely(dev->type != ARPHRD_CAN || skb->len != CAN_MTU ||
+ cfd->len > CAN_MAX_DLEN)) {
+ pr_warn_once("PF_CAN: dropped non conform CAN skbuf: dev type %d, len %d, datalen %d\n",
+ dev->type, skb->len, cfd->len);
+ kfree_skb(skb);
+ return NET_RX_DROP;
+ }
can_receive(skb, dev);
return NET_RX_SUCCESS;
-
-drop:
- kfree_skb(skb);
- return NET_RX_DROP;
}
static int canfd_rcv(struct sk_buff *skb, struct net_device *dev,
--
2.15.1
From: Marc Zyngier <marc.zyngier(a)arm.com>
KVM doesn't follow the SMCCC when it comes to unimplemented calls,
and inject an UNDEF instead of returning an error. Since firmware
calls are now used for security mitigation, they are becoming more
common, and the undef is counter productive.
Instead, let's follow the SMCCC which states that -1 must be returned
to the caller when getting an unknown function number.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Marc Zyngier <marc.zyngier(a)arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall(a)linaro.org>
---
arch/arm64/kvm/handle_exit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c
index 304203fa9e33..e60494f1eef9 100644
--- a/arch/arm64/kvm/handle_exit.c
+++ b/arch/arm64/kvm/handle_exit.c
@@ -45,7 +45,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
ret = kvm_psci_call(vcpu);
if (ret < 0) {
- kvm_inject_undefined(vcpu);
+ vcpu_set_reg(vcpu, 0, ~0UL);
return 1;
}
@@ -54,7 +54,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
{
- kvm_inject_undefined(vcpu);
+ vcpu_set_reg(vcpu, 0, ~0UL);
return 1;
}
--
2.14.2
From: Punit Agrawal <punit.agrawal(a)arm.com>
KVM only supports PMD hugepages at stage 2 but doesn't actually check
that the provided hugepage memory pagesize is PMD_SIZE before populating
stage 2 entries.
In cases where the backing hugepage size is smaller than PMD_SIZE (such
as when using contiguous hugepages), KVM can end up creating stage 2
mappings that extend beyond the supplied memory.
Fix this by checking for the pagesize of userspace vma before creating
PMD hugepage at stage 2.
Fixes: 66b3923a1a0f77a ("arm64: hugetlb: add support for PTE contiguous bit")
Signed-off-by: Punit Agrawal <punit.agrawal(a)arm.com>
Cc: Marc Zyngier <marc.zyngier(a)arm.com>
Cc: <stable(a)vger.kernel.org> # v4.5+
Reviewed-by: Christoffer Dall <christoffer.dall(a)linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall(a)linaro.org>
---
virt/kvm/arm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
index b4b69c2d1012..9dea96380339 100644
--- a/virt/kvm/arm/mmu.c
+++ b/virt/kvm/arm/mmu.c
@@ -1310,7 +1310,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
return -EFAULT;
}
- if (is_vm_hugetlb_page(vma) && !logging_active) {
+ if (vma_kernel_pagesize(vma) == PMD_SIZE && !logging_active) {
hugetlb = true;
gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT;
} else {
--
2.14.2