Changes since v1: [1]
* Kill support for mapping System RAM as a nop. No one uses this
functionality and it is broken relative to percpu_ref management.
* Fix percpu_ref teardown. Given that devm_memremap_pages() has strict
assumptions about when the percpu_ref is killed, give it
responsibility to make the live-dead transition explicitly. (Logan)
* Split the patch that adds HMM support to devm_memremap_pages() from
the patch that converts HMM to use devm_memremap_pages(). This caught
an incomplete conversion in v1. (Logan)
* Collect Christoph's reviewed-by.
[1]: https://lkml.org/lkml/2018/5/21/1109
---
Hi Andrew, here's v2 to replace the 5 currently in mm. The first and
last patch did not change.
For maintainability, as ZONE_DEVICE continues to attract new users,
it is useful to keep all users consolidated on devm_memremap_pages() as
the interface for create "device pages".
The devm_memremap_pages() implementation was recently reworked to make
it more generic for arbitrary users, like the proposed peer-to-peer
PCI-E enabling. HMM pre-dated this rework and opted to duplicate
devm_memremap_pages() as hmm_devmem_pages_create().
Rework HMM to be a consumer of devm_memremap_pages() directly and fix up
the licensing on the exports given the deep dependencies on the mm.
Patches based on v4.17-rc6 where there are no upstream consumers of the
HMM functionality.
---
Dan Williams (7):
mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL
mm, devm_memremap_pages: Kill mapping "System RAM" support
mm, devm_memremap_pages: Fix shutdown handling
mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support
mm, hmm: Use devm semantics for hmm_devmem_{add,remove}
mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages()
mm, hmm: Mark hmm_devmem_{add,add_resource} EXPORT_SYMBOL_GPL
Documentation/vm/hmm.txt | 1
drivers/dax/pmem.c | 10 -
drivers/nvdimm/pmem.c | 18 +-
include/linux/hmm.h | 4
include/linux/memremap.h | 7 +
kernel/memremap.c | 85 +++++++---
mm/hmm.c | 307 +++++--------------------------------
tools/testing/nvdimm/test/iomap.c | 21 ++-
8 files changed, 130 insertions(+), 323 deletions(-)
Depending on whether the kernel is compiled with frame-pointer or not,
the temporary memory location used for the bp parameter in these macros
is referenced relative to the stack pointer or the frame pointer.
Hence we can never reference that parameter when we've modified either
the stack pointer or the frame pointer, because then the compiler would
generate an incorrect stack reference.
Fix this by pushing the temporary memory parameter on a known location on
the stack before modifying the stack- and frame pointers.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom(a)vmware.com>
Reviewed-by: Brian Paul <brianp(a)vmware.com>
Reviewed-by: Sinclair Yeh <syeh(a)vmware.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_msg.h | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.h b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.h
index 557a033fb610..8545488aa0cf 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.h
@@ -135,17 +135,24 @@
#else
-/* In the 32-bit version of this macro, we use "m" because there is no
- * more register left for bp
+/*
+ * In the 32-bit version of this macro, we store bp in a memory location
+ * because we've ran out of registers.
+ * Now we can't reference that memory location while we've modified
+ * %esp or %ebp, so we first push it on the stack, just before we push
+ * %ebp, and then when we need it we read it from the stack where we
+ * just pushed it.
*/
#define VMW_PORT_HB_OUT(cmd, in_ecx, in_si, in_di, \
port_num, magic, bp, \
eax, ebx, ecx, edx, si, di) \
({ \
- asm volatile ("push %%ebp;" \
- "mov %12, %%ebp;" \
+ asm volatile ("push %12;" \
+ "push %%ebp;" \
+ "mov 0x04(%%esp), %%ebp;" \
"rep outsb;" \
- "pop %%ebp;" : \
+ "pop %%ebp;" \
+ "add $0x04, %%esp;" : \
"=a"(eax), \
"=b"(ebx), \
"=c"(ecx), \
@@ -167,10 +174,12 @@
port_num, magic, bp, \
eax, ebx, ecx, edx, si, di) \
({ \
- asm volatile ("push %%ebp;" \
- "mov %12, %%ebp;" \
+ asm volatile ("push %12;" \
+ "push %%ebp;" \
+ "mov 0x04(%%esp), %%ebp;" \
"rep insb;" \
- "pop %%ebp" : \
+ "pop %%ebp;" \
+ "add $0x04, %%esp;" : \
"=a"(eax), \
"=b"(ebx), \
"=c"(ecx), \
--
2.17.0
The __clear_user function is defined to return the number of bytes that
could not be cleared. From the underlying memset / bzero implementation
this means setting register a2 to that number on return. Currently if a
page fault is triggered within the MIPSr6 version of setting of initial
unaligned bytes, the value loaded into a2 on return is meaningless.
During the MIPSr6 version of the initial unaligned bytes block, register
a2 contains the number of bytes to be set beyond the initial unaligned
bytes. The t0 register is initally set to the number of unaligned bytes
- STORSIZE, effectively a negative version of the number of unaligned
bytes. This is then incremented before each byte is saved.
The label .Lbyte_fixup\@ is jumped to on page fault. Currently the value
in a2 is incorrectly replaced by 0 - t0 + 1, effectively the number of
unaligned bytes remaining. This leads to the failures being reported by
the following test code:
static int __init test_clear_user(void)
{
int j, k;
pr_info("\n\n\nTesting clear_user\n");
for (j = 0; j < 512; j++) {
if ((k = clear_user(NULL+3, j)) != j) {
pr_err("clear_user (NULL %d) returned %d\n", j, k);
}
}
return 0;
}
late_initcall(test_clear_user);
Which reports:
[ 3.965439] Testing clear_user
[ 3.973169] clear_user (NULL 8) returned 6
[ 3.976782] clear_user (NULL 9) returned 6
[ 3.980390] clear_user (NULL 10) returned 6
[ 3.984052] clear_user (NULL 11) returned 6
[ 3.987524] clear_user (NULL 12) returned 6
Fix this by subtracting t0 from a2 (rather than $0), effectivey giving:
unset_bytes = (#bytes - (#unaligned bytes)) - (-#unaligned bytes remaining + 1) + 1
a2 = a2 - t0 + 1
This fixes the value returned from __clear user when the number of bytes
to set is > LONGSIZE and the address is invalid and unaligned.
Unfortunately, this breaks the fixup handling for unaligned bytes after
the final long, where register a2 still contains the number of bytes
remaining to be set and the t0 register is to 0 - the number of
unaligned bytes remaining.
Because t0 is now is now subtracted from a2 rather than 0, the number of
bytes unset is reported incorrectly:
static int __init test_clear_user(void)
{
char *test;
int j, k;
pr_info("\n\n\nTesting clear_user\n");
test = vmalloc(PAGE_SIZE);
for (j = 256; j < 512; j++) {
if ((k = clear_user(test + PAGE_SIZE - 254, j)) != j - 254) {
pr_err("clear_user (%px %d) returned %d\n",
test + PAGE_SIZE - 254, j, k);
}
}
return 0;
}
late_initcall(test_clear_user);
[ 3.976775] clear_user (c00000000000df02 256) returned 4
[ 3.981957] clear_user (c00000000000df02 257) returned 6
[ 3.986425] clear_user (c00000000000df02 258) returned 8
[ 3.990850] clear_user (c00000000000df02 259) returned 10
[ 3.995332] clear_user (c00000000000df02 260) returned 12
[ 3.999815] clear_user (c00000000000df02 261) returned 14
Fix this by ensuring that a2 is set to 0 during the set of final
unaligned bytes.
Fixes: 8c56208aff77 ("MIPS: lib: memset: Add MIPS R6 support")
Cc: stable(a)vger.kernel.org
Signed-off-by: Matt Redfearn <matt.redfearn(a)mips.com>
---
Changes in v3:
New patch to fix fault handling during MIPSr6 version of setting
unaligned bytes.
Changes in v2: None
arch/mips/lib/memset.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S
index 1cc306520a5..fac26ce64b2 100644
--- a/arch/mips/lib/memset.S
+++ b/arch/mips/lib/memset.S
@@ -195,6 +195,7 @@
#endif
#else
PTR_SUBU t0, $0, a2
+ move a2, zero /* No remaining longs */
PTR_ADDIU t0, 1
STORE_BYTE(0)
STORE_BYTE(1)
@@ -231,7 +232,7 @@
#ifdef CONFIG_CPU_MIPSR6
.Lbyte_fixup\@:
- PTR_SUBU a2, $0, t0
+ PTR_SUBU a2, t0
jr ra
PTR_ADDIU a2, 1
#endif /* CONFIG_CPU_MIPSR6 */
--
2.7.4
Please find attached details of our T/T payment of EUR 47,631.35
to you
for outstanding payment.
Our sister company instructed we arrange payment to the attached
bank
details.
Best regards
Mit freundlichen Grüßen / Best regards
Fackelmann GmbH + Co. KG
Lena Hauenstein
Sebastian-Fackelmann-Str. 6
91217 Hersbruck
Telefon: +49 9151 811 101
Fax: +49 9151 811 421 0
E-mailbhirvi(a)ecrobot.com.com
www.ecrobot.com
The current implementation will leak a byte to the log via memmove. The
specified 27 bytes are off-by-one, as the payload is 25 bytes, and the
termination character is only one byte large. To avoid this, factor out
the error message, and furthermore make the second parameter of the
append_entry function const.
The full trace is as follows:
In function ‘memmove’,
from ‘append_entry’ at
drivers/gpu/drm/amd/display/dc/basics/logger.c:257:2,
from ‘dm_logger_append_va’ at
drivers/gpu/drm/amd/display/dc/basics/logger.c:348:4
detected read beyond size of object passed as 2nd parameter
Signed-off-by: Norbert Manthey <nmanthey(a)amazon.de>
---
drivers/gpu/drm/amd/display/dc/basics/logger.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/basics/logger.c b/drivers/gpu/drm/amd/display/dc/basics/logger.c
index 31bee05..6ba8d0c 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/logger.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/logger.c
@@ -244,7 +244,7 @@ static void log_heading(struct log_entry *entry)
static void append_entry(
struct log_entry *entry,
- char *buffer,
+ const char *buffer,
uint32_t buf_size)
{
if (!entry->buf ||
@@ -346,7 +346,9 @@ void dm_logger_append_va(
if (size < LOG_MAX_LINE_SIZE - 1) {
append_entry(entry, buffer, size);
} else {
- append_entry(entry, "LOG_ERROR, line too long\n", 27);
+ static const char msg[] = "LOG_ERROR, line too long\n";
+
+ append_entry(entry, msg, sizeof(msg));
}
}
}
--
2.7.4
Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
'Commit cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during
shutdown")' has been added to kernel to shutdown pending PCIe port
service interrupts during reboot so that a newly started kexec kernel
wouldn't observe pending interrupts.
pcie_port_device_remove() is disabling the root port and switches by
calling pci_disable_device() after all PCIe service drivers are shutdown.
pci_disable_device() has a much wider impact then port service itself and
it prevents all inbound transactions to reach to the system and impacts
the entire PCI traffic behind the bridge.
Issue is that pcie_port_device_remove() doesn't maintain any coordination
with the rest of the PCI device drivers in the system before clearing the
bus master bit.
This has been found to cause crashes on HP DL360 Gen9 machines during
reboot. Besides, kexec is already clearing the bus master bit in
pci_device_shutdown() after all PCI drivers are removed.
Just remove the extra clear here.
Signed-off-by: Sinan Kaya <okaya(a)codeaurora.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=199779
Fixes: cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown")
Cc: stable(a)vger.kernel.org
Reported-by: Ryan Finnie <ryan(a)finnie.org>
---
drivers/pci/pcie/portdrv_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index c9c0663..d22a95d 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -409,7 +409,6 @@ void pcie_port_device_remove(struct pci_dev *dev)
{
device_for_each_child(&dev->dev, NULL, remove_iter);
pci_free_irq_vectors(dev);
- pci_disable_device(dev);
}
/**
--
2.7.4
v3.18.109-42-g6009175, s390:allnoconfig:
arch/s390/mm/vmem.c:30:20: warning: 'vmem_alloc_pages' defined but not used [-Wunused-function]
arch/s390/kernel/irq.c: Assembler messages:
arch/s390/kernel/irq.c:180: Error: Unrecognized opcode: `brasl'
v4.1.51-555-g5b61994, {i386,x86_64}:{allyesconfig,allmodconfig}:
arch/x86/kvm/vmx.c: In function 'vmx_handle_external_intr': arch/x86/kvm/vmx.c:8016:4: error: expected ':' or ')' before 'CALL_NOSPEC'
Guenter
Hi Doug and Jason,
Here are some patches to go to for-next. One is a code cleanup. The rest are
bug fixes that are probably not serious enough for an -rc6. The one that may be
on the fence is the isert patch. Since it only affects debug kernels it can
probably even wait till for-next. It has been marked stable though.
---
Alex Estrin (1):
IB/isert: Fix for lib/dma_debug check_sync warning
Kamenee Arumugam (1):
IB/Hfi1: Mask Unsupported Request error bit in PCIe AER
Michael J. Ruhl (1):
IB/hfi1: Set port number for errorinfo MAD response
Mike Marciniszyn (2):
IB/hfi1: Cleanup of exp_rcv
IB/{rdmavt,hfi1}; Change hrtimer add to use the pinned variation
drivers/infiniband/hw/hfi1/exp_rcv.c | 39 +++++++++++++++++++------------
drivers/infiniband/hw/hfi1/exp_rcv.h | 24 ++++++++++++++++++-
drivers/infiniband/hw/hfi1/hfi.h | 14 ++++++-----
drivers/infiniband/hw/hfi1/init.c | 4 +--
drivers/infiniband/hw/hfi1/mad.c | 1 +
drivers/infiniband/hw/hfi1/pcie.c | 15 ++++++++++++
drivers/infiniband/hw/hfi1/rc.c | 2 +-
drivers/infiniband/sw/rdmavt/qp.c | 2 +-
drivers/infiniband/ulp/isert/ib_isert.c | 26 ++++++++++++++-------
9 files changed, 91 insertions(+), 36 deletions(-)
--
-Denny
The patch titled
Subject: kasan: fix memory hotplug during boot
has been added to the -mm tree. Its filename is
kasan-fix-memory-hotplug-during-boot.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/kasan-fix-memory-hotplug-during-bo…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/kasan-fix-memory-hotplug-during-bo…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: David Hildenbrand <david(a)redhat.com>
Subject: kasan: fix memory hotplug during boot
Using module_init() is wrong. E.g. ACPI adds and onlines memory before
our memory notifier gets registered.
This makes sure that ACPI memory detected during boot up will not result
in a kernel crash.
Easily reproducible with QEMU, just specify a DIMM when starting up.
Link: http://lkml.kernel.org/r/20180522100756.18478-3-david@redhat.com
Fixes: 786a8959912e ("kasan: disable memory hotplug")
Signed-off-by: David Hildenbrand <david(a)redhat.com>
Acked-by: Andrey Ryabinin <aryabinin(a)virtuozzo.com>
Cc: Alexander Potapenko <glider(a)google.com>
Cc: Dmitry Vyukov <dvyukov(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/kasan/kasan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN mm/kasan/kasan.c~kasan-fix-memory-hotplug-during-boot mm/kasan/kasan.c
--- a/mm/kasan/kasan.c~kasan-fix-memory-hotplug-during-boot
+++ a/mm/kasan/kasan.c
@@ -892,5 +892,5 @@ static int __init kasan_memhotplug_init(
return 0;
}
-module_init(kasan_memhotplug_init);
+core_initcall(kasan_memhotplug_init);
#endif
_
Patches currently in -mm which might be from david(a)redhat.com are
kasan-free-allocated-shadow-memory-on-mem_cancel_online.patch
kasan-fix-memory-hotplug-during-boot.patch
The patch titled
Subject: kasan: free allocated shadow memory on MEM_CANCEL_ONLINE
has been added to the -mm tree. Its filename is
kasan-free-allocated-shadow-memory-on-mem_cancel_online.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/kasan-free-allocated-shadow-memory…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/kasan-free-allocated-shadow-memory…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: David Hildenbrand <david(a)redhat.com>
Subject: kasan: free allocated shadow memory on MEM_CANCEL_ONLINE
We have to free memory again when we cancel onlining, otherwise a later
onlining attempt will fail.
Link: http://lkml.kernel.org/r/20180522100756.18478-2-david@redhat.com
Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug")
Signed-off-by: David Hildenbrand <david(a)redhat.com>
Acked-by: Andrey Ryabinin <aryabinin(a)virtuozzo.com>
Cc: Alexander Potapenko <glider(a)google.com>
Cc: Dmitry Vyukov <dvyukov(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/kasan/kasan.c | 1 +
1 file changed, 1 insertion(+)
diff -puN mm/kasan/kasan.c~kasan-free-allocated-shadow-memory-on-mem_cancel_online mm/kasan/kasan.c
--- a/mm/kasan/kasan.c~kasan-free-allocated-shadow-memory-on-mem_cancel_online
+++ a/mm/kasan/kasan.c
@@ -867,6 +867,7 @@ static int __meminit kasan_mem_notifier(
kmemleak_ignore(ret);
return NOTIFY_OK;
}
+ case MEM_CANCEL_ONLINE:
case MEM_OFFLINE: {
struct vm_struct *vm;
_
Patches currently in -mm which might be from david(a)redhat.com are
kasan-free-allocated-shadow-memory-on-mem_cancel_online.patch
kasan-fix-memory-hotplug-during-boot.patch
This is the start of the stable review cycle for the 4.14.43 release.
There are 95 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 Tue May 22 21:04:09 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.43-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.43-rc1
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Rename SSBD_NO to SSB_NO
Tom Lendacky <thomas.lendacky(a)amd.com>
KVM: SVM: Implement VIRT_SPEC_CTRL support for SSBD
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs: Rework spec_ctrl base and mask logic
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs: Remove x86_spec_ctrl_set()
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs: Expose x86_spec_ctrl_base directly
Borislav Petkov <bp(a)suse.de>
x86/bugs: Unify x86_spec_ctrl_{set_guest,restore_host}
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Rework speculative_store_bypass_update()
Tom Lendacky <thomas.lendacky(a)amd.com>
x86/speculation: Add virtualized speculative store bypass disable support
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs, KVM: Extend speculation control for VIRT_SPEC_CTRL
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Handle HT correctly on AMD
Thomas Gleixner <tglx(a)linutronix.de>
x86/cpufeatures: Add FEATURE_ZEN
Thomas Gleixner <tglx(a)linutronix.de>
x86/cpufeatures: Disentangle SSBD enumeration
Thomas Gleixner <tglx(a)linutronix.de>
x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS
Borislav Petkov <bp(a)suse.de>
x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP
Thomas Gleixner <tglx(a)linutronix.de>
KVM: SVM: Move spec control call after restore of GS
Jim Mattson <jmattson(a)google.com>
x86/cpu: Make alternative_msr_write work for 32-bit code
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Fix the parameters alignment and missing void
Jiri Kosina <jkosina(a)suse.cz>
x86/bugs: Make cpu_show_common() static
Jiri Kosina <jkosina(a)suse.cz>
x86/bugs: Fix __ssb_select_mitigation() return type
Borislav Petkov <bp(a)suse.de>
Documentation/spec_ctrl: Do some minor cleanups
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
proc: Use underscores for SSBD in 'status'
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Rename _RDS to _SSBD
Kees Cook <keescook(a)chromium.org>
x86/speculation: Make "seccomp" the default mode for Speculative Store Bypass
Thomas Gleixner <tglx(a)linutronix.de>
seccomp: Move speculation migitation control to arch code
Kees Cook <keescook(a)chromium.org>
seccomp: Add filter flag to opt-out of SSB mitigation
Thomas Gleixner <tglx(a)linutronix.de>
seccomp: Use PR_SPEC_FORCE_DISABLE
Thomas Gleixner <tglx(a)linutronix.de>
prctl: Add force disable speculation
Kees Cook <keescook(a)chromium.org>
x86/bugs: Make boot modes __ro_after_init
Kees Cook <keescook(a)chromium.org>
seccomp: Enable speculation flaw mitigations
Kees Cook <keescook(a)chromium.org>
proc: Provide details on speculation flaw mitigations
Kees Cook <keescook(a)chromium.org>
nospec: Allow getting/setting on non-current task
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Add prctl for Speculative Store Bypass mitigation
Thomas Gleixner <tglx(a)linutronix.de>
x86/process: Allow runtime control of Speculative Store Bypass
Thomas Gleixner <tglx(a)linutronix.de>
prctl: Add speculation control prctls
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Create spec-ctrl.h to avoid include hell
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/KVM/VMX: Expose SPEC_CTRL Bit(2) to the guest
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs/AMD: Add support to disable RDS on Fam[15,16,17]h if requested
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Whitelist allowed SPEC_CTRL MSR values
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs/intel: Set proper CPU features and setup RDS
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/cpufeatures: Add X86_FEATURE_RDS
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Expose /sys/../spec_store_bypass
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs, KVM: Support the combination of guest and host IBRS
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Concentrate bug reporting into a separate function
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Concentrate bug detection into a separate function
Linus Torvalds <torvalds(a)linux-foundation.org>
x86/nospec: Simplify alternative_msr_write()
Liu Bo <bo.liu(a)linux.alibaba.com>
btrfs: fix reading stale metadata blocks after degraded raid1 mounts
Nikolay Borisov <nborisov(a)suse.com>
btrfs: Fix delalloc inodes invalidation during transaction abort
Nikolay Borisov <nborisov(a)suse.com>
btrfs: Split btrfs_del_delalloc_inode into 2 functions
Anand Jain <anand.jain(a)oracle.com>
btrfs: fix crash when trying to resume balance without the resume flag
Misono Tomohiro <misono.tomohiro(a)jp.fujitsu.com>
btrfs: property: Set incompat flag if lzo/zstd compression is set
Robbie Ko <robbieko(a)synology.com>
Btrfs: send, fix invalid access to commit roots due to concurrent snapshotting
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix xattr loss after power failure
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8770/1: kprobes: Prohibit probing on optimized_callback
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8769/1: kprobes: Fix to use get_kprobe_ctlblk after irq-disabed
Dexuan Cui <decui(a)microsoft.com>
tick/broadcast: Use for_each_cpu() specially on UP kernels
Dmitry Safonov <dima(a)arista.com>
x86/mm: Drop TS_COMPAT on 64-bit exec() syscall
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode
Dave Hansen <dave.hansen(a)linux.intel.com>
x86/pkeys: Do not special case protection key 0
Dave Hansen <dave.hansen(a)linux.intel.com>
x86/pkeys: Override pkey when moving away from PROT_EXEC
Martin Schwidefsky <schwidefsky(a)de.ibm.com>
s390: remove indirect branch from do_softirq_own_stack
Julian Wiedmann <jwi(a)linux.ibm.com>
s390/qdio: don't release memory in qdio_setup_irq()
Hendrik Brueckner <brueckner(a)linux.ibm.com>
s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero
Julian Wiedmann <jwi(a)linux.ibm.com>
s390/qdio: fix access to uninitialized qdio_q fields
Michel Thierry <michel.thierry(a)intel.com>
drm/i915/gen9: Add WaClearHIZ_WM_CHICKEN3 for bxt and glk
Pavel Tatashin <pasha.tatashin(a)oracle.com>
mm: don't allow deferred pages with NEED_PER_CPU_KM
Ross Zwisler <ross.zwisler(a)linux.intel.com>
radix tree: fix multi-order iteration race
Matthew Wilcox <mawilcox(a)microsoft.com>
lib/test_bitmap.c: fix bitmap optimisation tests to report errors correctly
Haneen Mohammed <hamohammed.sa(a)gmail.com>
drm: Match sysfs name in link removal to link creation
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/powernv: Fix NVRAM sleep in invalid context when crashing
Alexander Monakov <amonakov(a)ispras.ru>
i2c: designware: fix poll-after-enable regression
Subash Abhinov Kasiviswanathan <subashab(a)codeaurora.org>
netfilter: nf_socket: Fix out of bounds access in nf_sk_lookup_slow_v{4,6}
Florian Westphal <fw(a)strlen.de>
netfilter: nf_tables: can't fail after linking rule into active rule list
Florian Westphal <fw(a)strlen.de>
netfilter: nf_tables: free set name in error path
Jann Horn <jannh(a)google.com>
tee: shm: fix use-after-free via temporarily dropped reference
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all}
Halil Pasic <pasic(a)linux.vnet.ibm.com>
vfio: ccw: fix cleanup if cp_prefetch fails
Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
powerpc: Don't preempt_disable() in show_cpuinfo()
Andre Przywara <andre.przywara(a)arm.com>
KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock
Andre Przywara <andre.przywara(a)arm.com>
KVM: arm/arm64: VGIC/ITS save/restore: protect kvm_read_guest() calls
Kamal Dasu <kdasu.kdev(a)gmail.com>
spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL
Kamal Dasu <kdasu.kdev(a)gmail.com>
spi: bcm-qspi: Avoid setting MSPI_CDRAM_PCS for spi-nor master
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
spi: pxa2xx: Allow 64-bit DMA
Wenwen Wang <wang6495(a)umn.edu>
ALSA: control: fix a redundant-copy issue
Hans de Goede <hdegoede(a)redhat.com>
ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist
Federico Cuello <fedux(a)fedux.com.ar>
ALSA: usb: mixer: volume quirk for CM102-A+/102S+
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: fix bad unlock balance during stub_probe()
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: fix NULL-ptr deref and use-after-free errors
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: run rebind from exit when module is removed
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: delete device from busid_table after rebind
Shuah Khan <shuah(a)kernel.org>
usbip: usbip_host: refine probe and disconnect debug msgs to be useful
-------------
Diffstat:
Documentation/ABI/testing/sysfs-devices-system-cpu | 1 +
Documentation/admin-guide/kernel-parameters.txt | 45 +++
Documentation/userspace-api/index.rst | 1 +
Documentation/userspace-api/spec_ctrl.rst | 94 +++++
Makefile | 4 +-
arch/arm/include/asm/assembler.h | 10 +
arch/arm/include/asm/kvm_mmu.h | 16 +
arch/arm/kernel/traps.c | 5 +-
arch/arm/lib/getuser.S | 10 +
arch/arm/probes/kprobes/opt-arm.c | 4 +-
arch/arm64/include/asm/kvm_mmu.h | 16 +
arch/powerpc/kernel/setup-common.c | 11 -
arch/powerpc/platforms/powernv/opal-nvram.c | 14 +-
arch/s390/kernel/irq.c | 5 +-
arch/s390/kernel/perf_cpum_sf.c | 4 +
arch/x86/boot/compressed/eboot.c | 6 +-
arch/x86/include/asm/cpufeatures.h | 18 +-
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/include/asm/mmu_context.h | 2 +-
arch/x86/include/asm/msr-index.h | 9 +
arch/x86/include/asm/nospec-branch.h | 43 ++-
arch/x86/include/asm/pkeys.h | 18 +-
arch/x86/include/asm/spec-ctrl.h | 80 +++++
arch/x86/include/asm/thread_info.h | 4 +-
arch/x86/kernel/cpu/amd.c | 22 ++
arch/x86/kernel/cpu/bugs.c | 397 ++++++++++++++++++++-
arch/x86/kernel/cpu/common.c | 77 +++-
arch/x86/kernel/cpu/cpu.h | 2 +
arch/x86/kernel/cpu/intel.c | 3 +
arch/x86/kernel/process.c | 146 ++++++++
arch/x86/kernel/process_64.c | 1 +
arch/x86/kernel/smpboot.c | 5 +
arch/x86/kvm/cpuid.c | 21 +-
arch/x86/kvm/svm.c | 66 ++--
arch/x86/kvm/vmx.c | 32 +-
arch/x86/kvm/x86.c | 13 +-
arch/x86/mm/pkeys.c | 21 +-
arch/x86/xen/mmu.c | 4 +-
arch/x86/xen/mmu_pv.c | 4 +-
drivers/base/cpu.c | 8 +
drivers/gpu/drm/drm_drv.c | 2 +-
drivers/gpu/drm/i915/i915_reg.h | 3 +
drivers/gpu/drm/i915/intel_engine_cs.c | 4 +
drivers/i2c/busses/i2c-designware-master.c | 5 +-
drivers/s390/cio/qdio_setup.c | 12 +-
drivers/s390/cio/vfio_ccw_cp.c | 13 +-
drivers/spi/spi-bcm-qspi.c | 28 +-
drivers/spi/spi-pxa2xx.h | 2 +-
drivers/tee/tee_shm.c | 5 +-
drivers/usb/usbip/stub.h | 2 +
drivers/usb/usbip/stub_dev.c | 43 ++-
drivers/usb/usbip/stub_main.c | 105 +++++-
fs/btrfs/ctree.c | 22 +-
fs/btrfs/ctree.h | 2 +
fs/btrfs/disk-io.c | 26 +-
fs/btrfs/inode.c | 13 +-
fs/btrfs/props.c | 12 +-
fs/btrfs/tree-log.c | 7 +
fs/btrfs/volumes.c | 9 +
fs/proc/array.c | 25 ++
include/linux/cpu.h | 2 +
include/linux/efi.h | 8 +-
include/linux/nospec.h | 10 +
include/linux/sched.h | 10 +-
include/linux/seccomp.h | 5 +-
include/trace/events/xen.h | 16 -
include/uapi/linux/prctl.h | 12 +
include/uapi/linux/seccomp.h | 5 +-
kernel/seccomp.c | 21 +-
kernel/sys.c | 23 ++
kernel/time/tick-broadcast.c | 8 +
lib/radix-tree.c | 6 +-
lib/test_bitmap.c | 21 +-
mm/Kconfig | 1 +
net/ipv4/netfilter/nf_socket_ipv4.c | 6 +-
net/ipv6/netfilter/nf_socket_ipv6.c | 6 +-
net/netfilter/nf_tables_api.c | 67 ++--
sound/core/control_compat.c | 3 +-
sound/pci/hda/hda_intel.c | 2 +
sound/usb/mixer.c | 8 +
tools/testing/selftests/seccomp/seccomp_bpf.c | 22 +-
virt/kvm/arm/vgic/vgic-its.c | 19 +-
virt/kvm/arm/vgic/vgic-v3.c | 4 +-
83 files changed, 1557 insertions(+), 312 deletions(-)
This is the start of the stable review cycle for the 4.9.102 release.
There are 87 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 Tue May 22 21:03:57 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.102-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.102-rc1
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Rename SSBD_NO to SSB_NO
Tom Lendacky <thomas.lendacky(a)amd.com>
KVM: SVM: Implement VIRT_SPEC_CTRL support for SSBD
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs: Rework spec_ctrl base and mask logic
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs: Remove x86_spec_ctrl_set()
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs: Expose x86_spec_ctrl_base directly
Borislav Petkov <bp(a)suse.de>
x86/bugs: Unify x86_spec_ctrl_{set_guest,restore_host}
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Rework speculative_store_bypass_update()
Tom Lendacky <thomas.lendacky(a)amd.com>
x86/speculation: Add virtualized speculative store bypass disable support
Thomas Gleixner <tglx(a)linutronix.de>
x86/bugs, KVM: Extend speculation control for VIRT_SPEC_CTRL
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Handle HT correctly on AMD
Thomas Gleixner <tglx(a)linutronix.de>
x86/cpufeatures: Add FEATURE_ZEN
Borislav Petkov <bp(a)suse.de>
x86/cpu/AMD: Fix erratum 1076 (CPB bit)
Thomas Gleixner <tglx(a)linutronix.de>
x86/cpufeatures: Disentangle SSBD enumeration
Thomas Gleixner <tglx(a)linutronix.de>
x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS
Borislav Petkov <bp(a)suse.de>
x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP
Thomas Gleixner <tglx(a)linutronix.de>
KVM: SVM: Move spec control call after restore of GS
Jim Mattson <jmattson(a)google.com>
x86/cpu: Make alternative_msr_write work for 32-bit code
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Fix the parameters alignment and missing void
Jiri Kosina <jkosina(a)suse.cz>
x86/bugs: Make cpu_show_common() static
Jiri Kosina <jkosina(a)suse.cz>
x86/bugs: Fix __ssb_select_mitigation() return type
Borislav Petkov <bp(a)suse.de>
Documentation/spec_ctrl: Do some minor cleanups
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
proc: Use underscores for SSBD in 'status'
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Rename _RDS to _SSBD
Kees Cook <keescook(a)chromium.org>
x86/speculation: Make "seccomp" the default mode for Speculative Store Bypass
Thomas Gleixner <tglx(a)linutronix.de>
seccomp: Move speculation migitation control to arch code
Kees Cook <keescook(a)chromium.org>
seccomp: Add filter flag to opt-out of SSB mitigation
Thomas Gleixner <tglx(a)linutronix.de>
seccomp: Use PR_SPEC_FORCE_DISABLE
Thomas Gleixner <tglx(a)linutronix.de>
prctl: Add force disable speculation
Kees Cook <keescook(a)chromium.org>
x86/bugs: Make boot modes __ro_after_init
Kees Cook <keescook(a)chromium.org>
seccomp: Enable speculation flaw mitigations
Kees Cook <keescook(a)chromium.org>
proc: Provide details on speculation flaw mitigations
Kees Cook <keescook(a)chromium.org>
nospec: Allow getting/setting on non-current task
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Add prctl for Speculative Store Bypass mitigation
Thomas Gleixner <tglx(a)linutronix.de>
x86/process: Allow runtime control of Speculative Store Bypass
Thomas Gleixner <tglx(a)linutronix.de>
x86/process: Optimize TIF_NOTSC switch
Kyle Huey <me(a)kylehuey.com>
x86/process: Correct and optimize TIF_BLOCKSTEP switch
Kyle Huey <me(a)kylehuey.com>
x86/process: Optimize TIF checks in __switch_to_xtra()
Thomas Gleixner <tglx(a)linutronix.de>
prctl: Add speculation control prctls
Thomas Gleixner <tglx(a)linutronix.de>
x86/speculation: Create spec-ctrl.h to avoid include hell
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/KVM/VMX: Expose SPEC_CTRL Bit(2) to the guest
David Woodhouse <dwmw(a)amazon.co.uk>
x86/bugs/AMD: Add support to disable RDS on Fam[15,16,17]h if requested
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Whitelist allowed SPEC_CTRL MSR values
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs/intel: Set proper CPU features and setup RDS
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/cpufeatures: Add X86_FEATURE_RDS
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Expose /sys/../spec_store_bypass
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs, KVM: Support the combination of guest and host IBRS
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Concentrate bug reporting into a separate function
Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
x86/bugs: Concentrate bug detection into a separate function
Linus Torvalds <torvalds(a)linux-foundation.org>
x86/nospec: Simplify alternative_msr_write()
Liu Bo <bo.liu(a)linux.alibaba.com>
btrfs: fix reading stale metadata blocks after degraded raid1 mounts
David Woodhouse <dwmw(a)amazon.co.uk>
x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen
Anand Jain <anand.jain(a)oracle.com>
btrfs: fix crash when trying to resume balance without the resume flag
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix xattr loss after power failure
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8770/1: kprobes: Prohibit probing on optimized_callback
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8769/1: kprobes: Fix to use get_kprobe_ctlblk after irq-disabed
Dexuan Cui <decui(a)microsoft.com>
tick/broadcast: Use for_each_cpu() specially on UP kernels
Masami Hiramatsu <mhiramat(a)kernel.org>
ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode
Dave Hansen <dave.hansen(a)linux.intel.com>
x86/pkeys: Do not special case protection key 0
Dave Hansen <dave.hansen(a)linux.intel.com>
x86/pkeys: Override pkey when moving away from PROT_EXEC
Martin Schwidefsky <schwidefsky(a)de.ibm.com>
s390: remove indirect branch from do_softirq_own_stack
Julian Wiedmann <jwi(a)linux.ibm.com>
s390/qdio: don't release memory in qdio_setup_irq()
Hendrik Brueckner <brueckner(a)linux.ibm.com>
s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero
Julian Wiedmann <jwi(a)linux.ibm.com>
s390/qdio: fix access to uninitialized qdio_q fields
Pavel Tatashin <pasha.tatashin(a)oracle.com>
mm: don't allow deferred pages with NEED_PER_CPU_KM
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/powernv: Fix NVRAM sleep in invalid context when crashing
Alexander Monakov <amonakov(a)ispras.ru>
i2c: designware: fix poll-after-enable regression
Florian Westphal <fw(a)strlen.de>
netfilter: nf_tables: can't fail after linking rule into active rule list
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all}
Waiman Long <Waiman.Long(a)hpe.com>
signals: avoid unnecessary taking of sighand->siglock
Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
powerpc: Don't preempt_disable() in show_cpuinfo()
Andre Przywara <andre.przywara(a)arm.com>
KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock
Kamal Dasu <kdasu.kdev(a)gmail.com>
spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL
Kamal Dasu <kdasu.kdev(a)gmail.com>
spi: bcm-qspi: Avoid setting MSPI_CDRAM_PCS for spi-nor master
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
spi: pxa2xx: Allow 64-bit DMA
Wenwen Wang <wang6495(a)umn.edu>
ALSA: control: fix a redundant-copy issue
Hans de Goede <hdegoede(a)redhat.com>
ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist
Federico Cuello <fedux(a)fedux.com.ar>
ALSA: usb: mixer: volume quirk for CM102-A+/102S+
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: fix bad unlock balance during stub_probe()
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: fix NULL-ptr deref and use-after-free errors
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: run rebind from exit when module is removed
Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
usbip: usbip_host: delete device from busid_table after rebind
Shuah Khan <shuah(a)kernel.org>
usbip: usbip_host: refine probe and disconnect debug msgs to be useful
-------------
Diffstat:
Documentation/ABI/testing/sysfs-devices-system-cpu | 1 +
Documentation/kernel-parameters.txt | 45 +++
Documentation/spec_ctrl.txt | 94 +++++
Makefile | 4 +-
arch/arm/include/asm/assembler.h | 10 +
arch/arm/include/asm/kvm_mmu.h | 16 +
arch/arm/kernel/traps.c | 5 +-
arch/arm/lib/getuser.S | 10 +
arch/arm/probes/kprobes/opt-arm.c | 4 +-
arch/arm64/include/asm/kvm_mmu.h | 16 +
arch/powerpc/kernel/setup-common.c | 11 -
arch/powerpc/platforms/powernv/opal-nvram.c | 14 +-
arch/s390/kernel/irq.c | 5 +-
arch/s390/kernel/perf_cpum_sf.c | 4 +
arch/x86/boot/compressed/eboot.c | 6 +-
arch/x86/include/asm/cpufeatures.h | 20 +-
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/include/asm/mmu_context.h | 2 +-
arch/x86/include/asm/msr-index.h | 10 +
arch/x86/include/asm/nospec-branch.h | 43 ++-
arch/x86/include/asm/pkeys.h | 18 +-
arch/x86/include/asm/spec-ctrl.h | 80 +++++
arch/x86/include/asm/thread_info.h | 6 +-
arch/x86/include/asm/tlbflush.h | 10 +
arch/x86/kernel/cpu/amd.c | 38 +-
arch/x86/kernel/cpu/bugs.c | 397 ++++++++++++++++++++-
arch/x86/kernel/cpu/common.c | 77 +++-
arch/x86/kernel/cpu/cpu.h | 3 +
arch/x86/kernel/cpu/intel.c | 3 +
arch/x86/kernel/process.c | 224 +++++++++---
arch/x86/kernel/smpboot.c | 5 +
arch/x86/kvm/cpuid.c | 21 +-
arch/x86/kvm/cpuid.h | 17 +-
arch/x86/kvm/svm.c | 64 ++--
arch/x86/kvm/vmx.c | 33 +-
arch/x86/kvm/x86.c | 13 +-
arch/x86/mm/pkeys.c | 21 +-
arch/x86/xen/enlighten.c | 4 +-
arch/x86/xen/mmu.c | 4 -
drivers/base/cpu.c | 8 +
drivers/i2c/busses/i2c-designware-core.c | 5 +-
drivers/s390/cio/qdio_setup.c | 12 +-
drivers/spi/spi-bcm-qspi.c | 28 +-
drivers/spi/spi-pxa2xx.h | 2 +-
drivers/usb/usbip/stub.h | 2 +
drivers/usb/usbip/stub_dev.c | 43 ++-
drivers/usb/usbip/stub_main.c | 105 +++++-
fs/btrfs/ctree.c | 6 +-
fs/btrfs/tree-log.c | 7 +
fs/btrfs/volumes.c | 9 +
fs/proc/array.c | 27 +-
include/linux/cpu.h | 2 +
include/linux/efi.h | 8 +-
include/linux/nospec.h | 10 +
include/linux/sched.h | 9 +
include/linux/seccomp.h | 3 +-
include/linux/signal.h | 17 +
include/trace/events/xen.h | 16 -
include/uapi/linux/prctl.h | 12 +
include/uapi/linux/seccomp.h | 4 +-
kernel/seccomp.c | 21 +-
kernel/signal.c | 7 +
kernel/sys.c | 23 ++
kernel/time/tick-broadcast.c | 8 +
mm/Kconfig | 1 +
net/netfilter/nf_tables_api.c | 59 +--
sound/core/control_compat.c | 3 +-
sound/pci/hda/hda_intel.c | 2 +
sound/usb/mixer.c | 8 +
tools/testing/selftests/seccomp/seccomp_bpf.c | 78 +++-
virt/kvm/arm/vgic/vgic-its.c | 15 +-
71 files changed, 1611 insertions(+), 309 deletions(-)
> From: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
> Date: 2018-05-21 23:10 GMT+02:00
> Subject: [PATCH 4.14 00/95] 4.14.43-stable review
> To: linux-kernel(a)vger.kernel.org
> 抄送: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>,
> torvalds(a)linux-foundation.org, akpm(a)linux-foundation.org,
> linux(a)roeck-us.net, shuah(a)kernel.org, patches(a)kernelci.org,
> ben.hutchings(a)codethink.co.uk, lkft-triage(a)lists.linaro.org,
> stable(a)vger.kernel.org
>
>
> This is the start of the stable review cycle for the 4.14.43 release.
> There are 95 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 Tue May 22 21:04:09 UTC 2018.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.43-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
>
Merged, tested on my local test machine, no regression found.
Thanks,
--
Jack Wang
Linux Kernel Developer
ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin
Tel: +49 30 577 008 042
Fax: +49 30 577 008 299
Email: jinpu.wang(a)profitbricks.com
URL: https://www.profitbricks.de
Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg, Christoph Steffens
Hello,
thanks for for your effort and the patch.
Is this eligible for stable?
Best regards
Am 22.05.2018 um 13:02 schrieb Rafael J. Wysocki:
> From: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
>
> Commit 08810a4119aa (PM / core: Add NEVER_SKIP and SMART_PREPARE
> driver flags) inadvertently prevented the power.direct_complete flag
> from being set for devices without PM callbacks and with disabled
> runtime PM which also prevents power.direct_complete from being set
> for their parents. That led to problems including a resume crash on
> HP ZBook 14u.
>
> Restore the previous behavior by causing power.direct_complete to be
> set for those devices again, but do that in a more direct way to
> avoid overlooking that case in the future.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=199693
> Fixes: 08810a4119aa (PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags)
> Reported-by: Thomas Martitz <kugel(a)rockbox.org>
> Tested-by: Thomas Martitz <kugel(a)rockbox.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
> ---
> drivers/base/power/main.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> Index: linux-pm/drivers/base/power/main.c
> ===================================================================
> --- linux-pm.orig/drivers/base/power/main.c
> +++ linux-pm/drivers/base/power/main.c
> @@ -1920,10 +1920,8 @@ static int device_prepare(struct device
>
> dev->power.wakeup_path = false;
>
> - if (dev->power.no_pm_callbacks) {
> - ret = 1; /* Let device go direct_complete */
> + if (dev->power.no_pm_callbacks)
> goto unlock;
> - }
>
> if (dev->pm_domain)
> callback = dev->pm_domain->ops.prepare;
> @@ -1957,7 +1955,8 @@ unlock:
> */
> spin_lock_irq(&dev->power.lock);
> dev->power.direct_complete = state.event == PM_EVENT_SUSPEND &&
> - pm_runtime_suspended(dev) && ret > 0 &&
> + ((pm_runtime_suspended(dev) && ret > 0) ||
> + dev->power.no_pm_callbacks) &&
> !dev_pm_test_driver_flags(dev, DPM_FLAG_NEVER_SKIP);
> spin_unlock_irq(&dev->power.lock);
> return 0;
>
From: John Stultz <john.stultz(a)linaro.org>
commit 3d88d56c5873f6eebe23e05c3da701960146b801 upstream.
Due to how the MONOTONIC_RAW accumulation logic was handled,
there is the potential for a 1ns discontinuity when we do
accumulations. This small discontinuity has for the most part
gone un-noticed, but since ARM64 enabled CLOCK_MONOTONIC_RAW
in their vDSO clock_gettime implementation, we've seen failures
with the inconsistency-check test in kselftest.
This patch addresses the issue by using the same sub-ns
accumulation handling that CLOCK_MONOTONIC uses, which avoids
the issue for in-kernel users.
Since the ARM64 vDSO implementation has its own clock_gettime
calculation logic, this patch reduces the frequency of errors,
but failures are still seen. The ARM64 vDSO will need to be
updated to include the sub-nanosecond xtime_nsec values in its
calculation for this issue to be completely fixed.
Signed-off-by: John Stultz <john.stultz(a)linaro.org>
Tested-by: Daniel Mentz <danielmentz(a)google.com>
Cc: Prarit Bhargava <prarit(a)redhat.com>
Cc: Kevin Brodsky <kevin.brodsky(a)arm.com>
Cc: Richard Cochran <richardcochran(a)gmail.com>
Cc: Stephen Boyd <stephen.boyd(a)linaro.org>
Cc: Will Deacon <will.deacon(a)arm.com>
Cc: "stable #4 . 8+" <stable(a)vger.kernel.org>
Cc: Miroslav Lichvar <mlichvar(a)redhat.com>
Link: http://lkml.kernel.org/r/1496965462-20003-3-git-send-email-john.stultz@lina…
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
[fabrizio: cherry-pick to 4.4. Kept cycle_t type for function
logarithmic_accumulation local variable "interval". Dropped
casting of "interval" variable]
Signed-off-by: Fabrizio Castro <fabrizio.castro(a)bp.renesas.com>
Signed-off-by: Biju Das <biju.das(a)bp.renesas.com>
---
Hello Greg,
I am reposting this patch to include the relevant people in the email.
Could you please consider this patch for 4.4.y?
Testing 4.4.y without this patch makes tool
tools/testing/selftests/timers/clocksource-switch.c fail on Koelsch board
while running "Consistent CLOCK_MONOTONIC_RAW" with message "Delta: 1 ns".
This patch fixes the problem.
Thanks,
Fab
include/linux/timekeeper_internal.h | 4 ++--
kernel/time/timekeeping.c | 20 ++++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
index f0f1793..115216e 100644
--- a/include/linux/timekeeper_internal.h
+++ b/include/linux/timekeeper_internal.h
@@ -56,7 +56,7 @@ struct tk_read_base {
* interval.
* @xtime_remainder: Shifted nano seconds left over when rounding
* @cycle_interval
- * @raw_interval: Raw nano seconds accumulated per NTP interval.
+ * @raw_interval: Shifted raw nano seconds accumulated per NTP interval.
* @ntp_error: Difference between accumulated time and NTP time in ntp
* shifted nano seconds.
* @ntp_error_shift: Shift conversion between clock shifted nano seconds and
@@ -97,7 +97,7 @@ struct timekeeper {
cycle_t cycle_interval;
u64 xtime_interval;
s64 xtime_remainder;
- u32 raw_interval;
+ u64 raw_interval;
/* The ntp_tick_length() value currently being used.
* This cached copy ensures we consistently apply the tick
* length for an entire tick, as ntp_tick_length may change
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 6e48668..fed86b2 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -277,8 +277,7 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
/* Go back from cycles -> shifted ns */
tk->xtime_interval = (u64) interval * clock->mult;
tk->xtime_remainder = ntpinterval - tk->xtime_interval;
- tk->raw_interval =
- ((u64) interval * clock->mult) >> clock->shift;
+ tk->raw_interval = interval * clock->mult;
/* if changing clocks, convert xtime_nsec shift units */
if (old_clock) {
@@ -1767,7 +1766,7 @@ static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset,
unsigned int *clock_set)
{
cycle_t interval = tk->cycle_interval << shift;
- u64 raw_nsecs;
+ u64 snsec_per_sec;
/* If the offset is smaller than a shifted interval, do nothing */
if (offset < interval)
@@ -1782,14 +1781,15 @@ static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset,
*clock_set |= accumulate_nsecs_to_secs(tk);
/* Accumulate raw time */
- raw_nsecs = (u64)tk->raw_interval << shift;
- raw_nsecs += tk->raw_time.tv_nsec;
- if (raw_nsecs >= NSEC_PER_SEC) {
- u64 raw_secs = raw_nsecs;
- raw_nsecs = do_div(raw_secs, NSEC_PER_SEC);
- tk->raw_time.tv_sec += raw_secs;
+ tk->tkr_raw.xtime_nsec += (u64)tk->raw_time.tv_nsec << tk->tkr_raw.shift;
+ tk->tkr_raw.xtime_nsec += tk->raw_interval << shift;
+ snsec_per_sec = (u64)NSEC_PER_SEC << tk->tkr_raw.shift;
+ while (tk->tkr_raw.xtime_nsec >= snsec_per_sec) {
+ tk->tkr_raw.xtime_nsec -= snsec_per_sec;
+ tk->raw_time.tv_sec++;
}
- tk->raw_time.tv_nsec = raw_nsecs;
+ tk->raw_time.tv_nsec = tk->tkr_raw.xtime_nsec >> tk->tkr_raw.shift;
+ tk->tkr_raw.xtime_nsec -= (u64)tk->raw_time.tv_nsec << tk->tkr_raw.shift;
/* Accumulate error between NTP and clock interval */
tk->ntp_error += tk->ntp_tick << shift;
--
2.7.4
From: John Stultz <john.stultz(a)linaro.org>
commit 3d88d56c5873f6eebe23e05c3da701960146b801 upstream.
Due to how the MONOTONIC_RAW accumulation logic was handled,
there is the potential for a 1ns discontinuity when we do
accumulations. This small discontinuity has for the most part
gone un-noticed, but since ARM64 enabled CLOCK_MONOTONIC_RAW
in their vDSO clock_gettime implementation, we've seen failures
with the inconsistency-check test in kselftest.
This patch addresses the issue by using the same sub-ns
accumulation handling that CLOCK_MONOTONIC uses, which avoids
the issue for in-kernel users.
Since the ARM64 vDSO implementation has its own clock_gettime
calculation logic, this patch reduces the frequency of errors,
but failures are still seen. The ARM64 vDSO will need to be
updated to include the sub-nanosecond xtime_nsec values in its
calculation for this issue to be completely fixed.
Signed-off-by: John Stultz <john.stultz(a)linaro.org>
Tested-by: Daniel Mentz <danielmentz(a)google.com>
Cc: Prarit Bhargava <prarit(a)redhat.com>
Cc: Kevin Brodsky <kevin.brodsky(a)arm.com>
Cc: Richard Cochran <richardcochran(a)gmail.com>
Cc: Stephen Boyd <stephen.boyd(a)linaro.org>
Cc: Will Deacon <will.deacon(a)arm.com>
Cc: "stable #4 . 8+" <stable(a)vger.kernel.org>
Cc: Miroslav Lichvar <mlichvar(a)redhat.com>
Link: http://lkml.kernel.org/r/1496965462-20003-3-git-send-email-john.stultz@lina…
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
[fabrizio: cherry-pick to 4.4. Kept cycle_t type for function
logarithmic_accumulation local variable "interval". Dropped
casting of "interval" variable]
Signed-off-by: Fabrizio Castro <fabrizio.castro(a)bp.renesas.com>
Signed-off-by: Biju Das <biju.das(a)bp.renesas.com>
---
Hello Greg,
we noticed tools/testing/selftests/timers/clocksource-switch.c
was failing for us, this patch fixes the cause of the failure.
Are you happy to take this patch?
Thanks,
Fab
include/linux/timekeeper_internal.h | 4 ++--
kernel/time/timekeeping.c | 20 ++++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
index f0f1793..115216e 100644
--- a/include/linux/timekeeper_internal.h
+++ b/include/linux/timekeeper_internal.h
@@ -56,7 +56,7 @@ struct tk_read_base {
* interval.
* @xtime_remainder: Shifted nano seconds left over when rounding
* @cycle_interval
- * @raw_interval: Raw nano seconds accumulated per NTP interval.
+ * @raw_interval: Shifted raw nano seconds accumulated per NTP interval.
* @ntp_error: Difference between accumulated time and NTP time in ntp
* shifted nano seconds.
* @ntp_error_shift: Shift conversion between clock shifted nano seconds and
@@ -97,7 +97,7 @@ struct timekeeper {
cycle_t cycle_interval;
u64 xtime_interval;
s64 xtime_remainder;
- u32 raw_interval;
+ u64 raw_interval;
/* The ntp_tick_length() value currently being used.
* This cached copy ensures we consistently apply the tick
* length for an entire tick, as ntp_tick_length may change
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 6e48668..fed86b2 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -277,8 +277,7 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
/* Go back from cycles -> shifted ns */
tk->xtime_interval = (u64) interval * clock->mult;
tk->xtime_remainder = ntpinterval - tk->xtime_interval;
- tk->raw_interval =
- ((u64) interval * clock->mult) >> clock->shift;
+ tk->raw_interval = interval * clock->mult;
/* if changing clocks, convert xtime_nsec shift units */
if (old_clock) {
@@ -1767,7 +1766,7 @@ static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset,
unsigned int *clock_set)
{
cycle_t interval = tk->cycle_interval << shift;
- u64 raw_nsecs;
+ u64 snsec_per_sec;
/* If the offset is smaller than a shifted interval, do nothing */
if (offset < interval)
@@ -1782,14 +1781,15 @@ static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset,
*clock_set |= accumulate_nsecs_to_secs(tk);
/* Accumulate raw time */
- raw_nsecs = (u64)tk->raw_interval << shift;
- raw_nsecs += tk->raw_time.tv_nsec;
- if (raw_nsecs >= NSEC_PER_SEC) {
- u64 raw_secs = raw_nsecs;
- raw_nsecs = do_div(raw_secs, NSEC_PER_SEC);
- tk->raw_time.tv_sec += raw_secs;
+ tk->tkr_raw.xtime_nsec += (u64)tk->raw_time.tv_nsec << tk->tkr_raw.shift;
+ tk->tkr_raw.xtime_nsec += tk->raw_interval << shift;
+ snsec_per_sec = (u64)NSEC_PER_SEC << tk->tkr_raw.shift;
+ while (tk->tkr_raw.xtime_nsec >= snsec_per_sec) {
+ tk->tkr_raw.xtime_nsec -= snsec_per_sec;
+ tk->raw_time.tv_sec++;
}
- tk->raw_time.tv_nsec = raw_nsecs;
+ tk->raw_time.tv_nsec = tk->tkr_raw.xtime_nsec >> tk->tkr_raw.shift;
+ tk->tkr_raw.xtime_nsec -= (u64)tk->raw_time.tv_nsec << tk->tkr_raw.shift;
/* Accumulate error between NTP and clock interval */
tk->ntp_error += tk->ntp_tick << shift;
--
2.7.4