[PATCH v2 2/2] KVM: X86: Don't use PV TLB flush with dedicated vCPUs and steal time disabled

2018-02-09 Thread Wanpeng Li
From: Wanpeng Li vCPUs are very unlikely to get preempted when they are the only task running on a CPU. PV TLB flush is slower that the native flush in that case. In addition, avoid traversing all the cpus for pv tlb flush when steal time is disabled since pv tlb flush depends on the field in s

[PATCH v2 1/2] KVM: x86: Add dedicated vCPU hint KVM_HINTS_DEDICATED

2018-02-09 Thread Wanpeng Li
From: Wanpeng Li Waiman Long mentioned that: Generally speaking, unfair lock performs well for VMs with a small number of vCPUs. Native qspinlock may perform better than pvqspinlock if there is vCPU pinning and there is no vCPU over-commitment. This patch adds a performance hint to allow hyp

Re: [Resend] Possible bug in __fragmentation_index()

2018-02-09 Thread Robert Harris
On 2 Feb 2018, at 17:47, Mel Gorman wrote: > On Fri, Feb 02, 2018 at 02:16:39PM +, Robert Harris wrote: >> I was planning to annotate the opaque calculation in >> __fragmentation_index() but on closer inspection I think there may be a >> bug. I could use some feedback. A belated thank you f

[PATCH v2] ASoC: use DEFINE_SHOW_ATTRIBUTE() to decrease code duplication

2018-02-09 Thread Donglin Peng
There is some duplicate code in soc-core.c, and the kernel provides DEFINE_SHOW_ATTRIBUTE() helper macro to decrease it in seq_file.h. Signed-off-by: Peng Donglin --- v2: [addressed comments from Andy] * modify code change description * do not rename m -> s --- sound/soc/soc-core.c | 45 ++

Re: [PATCH] x86/spectre_v2: Remove 0xc2 from spectre_bad_microcodes

2018-02-09 Thread Darren Kenny
On Fri, Feb 09, 2018 at 02:29:27PM +, David Woodhouse wrote: On Fri, 2018-02-09 at 14:10 +, Darren Kenny wrote: According to the latest microcode update from Intel (on Feb 8, 2018) on Skylake we should be using the microcode revisions 0xC2***, so we need to remove that from the blacklist

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-09 Thread Leon Romanovsky
On Fri, Feb 09, 2018 at 07:36:49AM -0600, Gustavo A. R. Silva wrote: > Hi Leon, > > Quoting Leon Romanovsky : > > > On Fri, Feb 09, 2018 at 12:37:02AM -0600, Gustavo A. R. Silva wrote: > > > In case the message header and payload cannot be stored, function > > > nlmsg_put returns null. > > > > > >

Re: [PATCH v2] target-i386: add KVM_HINTS_DEDICATED performance hint

2018-02-09 Thread Eduardo Habkost
On Fri, Feb 09, 2018 at 06:15:25AM -0800, Wanpeng Li wrote: > From: Wanpeng Li > > Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit > to determine if they run on dedicated vCPUs, allowing optimizations such > as usage of qspinlocks. > > Cc: Paolo Bonzini > Cc: Radim Kr

Re: [PATCH 2/6] genalloc: selftest

2018-02-09 Thread Igor Stoppa
On 05/02/18 02:14, Randy Dunlap wrote: > On 02/04/2018 03:03 PM, Matthew Wilcox wrote: >> On Sun, Feb 04, 2018 at 02:19:22PM -0800, Randy Dunlap wrote: +#ifndef __GENALLOC_SELFTEST_H__ +#define __GENALLOC_SELFTEST_H__ >>> >>> Please use _LINUX_GENALLOC_SELFTEST_H_ >> >> willy@bobo:~/ker

Re: [PATCH] x86/spectre_v2: Remove 0xc2 from spectre_bad_microcodes

2018-02-09 Thread David Woodhouse
On Fri, 2018-02-09 at 14:10 +, Darren Kenny wrote: > According to the latest microcode update from Intel (on Feb 8, 2018) on > Skylake we should be using the microcode revisions 0xC2***, so we need > to remove that from the blacklist now. The doc also suggests that Gemini Lake 0x22 is also now

Re: [PATCH 1/2] Documentation/memory-barriers.txt: cross-reference "tools/memory-model/"

2018-02-09 Thread Paul E. McKenney
On Fri, Feb 09, 2018 at 01:50:51PM +0100, Andrea Parri wrote: > On Fri, Feb 09, 2018 at 04:31:00AM -0800, Paul E. McKenney wrote: > > On Sun, Feb 04, 2018 at 07:37:08PM +0100, Andrea Parri wrote: > > > Hi Akira, > > > > > > On Mon, Feb 05, 2018 at 01:14:10AM +0900, Akira Yokosawa wrote: > > > > Hi

Re: [PATCH 1/6] genalloc: track beginning of allocations

2018-02-09 Thread Igor Stoppa
On 05/02/18 05:45, Matthew Wilcox wrote: > On Sun, Feb 04, 2018 at 02:34:08PM -0800, Randy Dunlap wrote: >>> +/** >>> + * cleart_bits_ll - according to the mask, clears the bits specified by >> >> clear_bits_ll > > 'make W=1' should catch this ... yes? > > (hint: building with 'make C=1 W

[GIT PULL] xen: fixes for 4.16 rc1

2018-02-09 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.16-rc1-tag xen: fixes for 4.16 rc1 This time only 5 small fixes for issues when running under Xen. Thanks. Juergen arch/x86/xen/p2m.c | 6 ++ arch/x86/xen/xen-head

[PATCH RFC tip/lkmm 09/10] EXP Remove underscore from smp_mb__after_atomic() workings

2018-02-09 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- tools/memory-model/linux-kernel.bell | 2 +- tools/memory-model/linux-kernel.cat | 2 +- tools/memory-model/linux-kernel.def | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/memory-model/linux-kernel.bell b/tools/memory-model/linu

[PATCH RFC tip/lkmm 02/10] MAINTAINERS: Add the Memory Consistency Model subsystem

2018-02-09 Thread Paul E. McKenney
From: Andrea Parri Move the contents of tools/memory-model/MAINTAINERS into the main MAINTAINERS file, removing tools/memory-model/MAINTAINERS. This allows get_maintainer.pl to correctly identify the maintainers of tools/memory-model/. Suggested-by: Ingo Molnar Signed-off-by: Andrea Parri Acke

[PATCH RFC tip/lkmm 08/10] EXP Remove understore from smp_mb__before_atomic() workings

2018-02-09 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- tools/memory-model/linux-kernel.bell | 2 +- tools/memory-model/linux-kernel.cat | 2 +- tools/memory-model/linux-kernel.def | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/memory-model/linux-kernel.bell b/tools/memory-model/linu

[PATCH RFC tip/lkmm 10/10] EXP Remove underscores from smp_mb__after_spinlock() workings

2018-02-09 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- tools/memory-model/linux-kernel.bell | 2 +- tools/memory-model/linux-kernel.cat | 2 +- tools/memory-model/linux-kernel.def | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/memory-model/linux-kernel.bell b/tools/memory-model/linu

Re: [Xen-devel] [PATCH] [v2] xen: hypercall: fix out-of-bounds memcpy

2018-02-09 Thread Arnd Bergmann
On Fri, Feb 9, 2018 at 3:13 PM, David Laight wrote: > From: Arnd Bergmann >> Sent: 09 February 2018 12:58 > ... >> However, aside from this driver, I wonder if we should be worried about >> Spectre type 1 attacks on similar code, when gcc-8 turns a switch/case >> statement into an array lookup beh

[PATCH RFC tip/lkmm 01/10] tools/memory-model: Clarify the origin/scope of the tool name

2018-02-09 Thread Paul E. McKenney
From: Andrea Parri Ingo pointed out that: "The "memory model" name is overly generic, ambiguous and somewhat misleading, as we usually mean the virtual memory layout/model when we say "memory model". GCC too uses it in that sense [...]" Make it clear that tools/memory-model/ uses the te

[PATCH RFC tip/lkmm 04/10] EXP litmus_tests: Add comments explaining tests' purposes

2018-02-09 Thread Paul E. McKenney
This commit adds comments to the litmus tests summarizing what these tests are intended to demonstrate. Suggested-by: Ingo Molnar Signed-off-by: Paul E. McKenney [ paulmck: Apply Andrea's and Alan's feedback. ] --- .../memory-model/litmus-tests/CoRR+poonceonce+Once.litmus | 7 +++ .../mem

[PATCH RFC tip/lkmm 05/10] README: Fix a couple of punctuation errors

2018-02-09 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- tools/memory-model/litmus-tests/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/memory-model/litmus-tests/README b/tools/memory-model/litmus-tests/README index 9a3bb5949191..dca7d823ad57 100644 --- a/tools/memory-model/litm

[PATCH RFC tools/lkmm] Miscellaneous fixes

2018-02-09 Thread Paul E. McKenney
Hello! This RFC series adds some miscellaneous updates to the Linux kernel memory model: 1. Clarify the origin and scope of the tool name to avoid confusion between "memory model" and "memory management", courtesy of Andrea Parri. 2. Move the maintainer list for LKMM to

[PATCHv9 2/4] x86/boot/compressed/64: Introduce paging_prepare()

2018-02-09 Thread Kirill A. Shutemov
This patch renames l5_paging_required() into paging_prepare() and changes the interface of the function. This is a preparation for the next patch, which would make the function also allocate memory for the 32-bit trampoline. The function now returns a 128-bit structure. RAX would return trampolin

[PATCHv9 3/4] x86/boot/compressed/64: Prepare trampoline memory

2018-02-09 Thread Kirill A. Shutemov
If a bootloader enables 64-bit mode with 4-level paging, we might need to switch over to 5-level paging. The switching requires the disabling paging. It works fine if kernel itself is loaded below 4G. But if the bootloader put the kernel above 4G (not sure if anybody does this), we would lose cont

[PATCH v2] ASoC: rt5645: Introduce mapping for ACPI-defined GPIO

2018-02-09 Thread Carlo Caione
From: Carlo Caione On at least one notebook (ECS EF20EA) the 'hp-detect' GPIO is defined in the DSDT table by the ACPI GpioIo resources in _CRS. Add this mapping to the rt5645 driver to enable the jack detection also on non-DT platforms. Method (_CRS, 0, NotSerialized) { Name (SBUF, ResourceTe

[PATCHv9 1/4] x86/boot/compressed/64: Rename pagetable.c to kaslr_64.c

2018-02-09 Thread Kirill A. Shutemov
The name of the file -- pagetable.c -- is misleading: it only contains helpers used for KASLR in 64-bit mode. Let's rename the file to reflect its content. Signed-off-by: Kirill A. Shutemov --- arch/x86/boot/compressed/Makefile| 2 +- arch/x86/boot/compressed/{pagetable.c =>

[PATCHv9 4/4] x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G

2018-02-09 Thread Kirill A. Shutemov
This patch addresses a shortcoming in current boot process on machines that supports 5-level paging. If a bootloader enables 64-bit mode with 4-level paging, we might need to switch over to 5-level paging. The switching requires the disabling paging. It works fine if kernel itself is loaded below

[PATCHv9 0/4] x86: 5-level related changes into decompression code

2018-02-09 Thread Kirill A. Shutemov
These patcheset is a preparation for boot-time switching between paging modes. Please apply. The first patch is pure cosmetic change: it gives file with KASLR helpers a proper name. The last three patches bring support of booting into 5-level paging mode if a bootloader put the kernel above 4G.

[PATCH RFC tip/lkmm 06/10] EXP MAINTAINERS: Add the "LKMM" acronym

2018-02-09 Thread Paul E. McKenney
This commit adds "(LKMM)" to the end of the MAINTAINERS file's entry for the Linux-kernel memory-consistency model. If people are OK with this, it should be squashed into 12a62a1d0703 ("MAINTAINERS: Add the Memory Consistency Model subsystem"). Signed-off-by: Paul E. McKenney --- MAINTAINERS |

[PATCH RFC tip/lkmm 07/10] MAINTAINERS: Add Akira Yokosawa as an LKMM reviewer

2018-02-09 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 674b35c3f28e..cc4c1ac94593 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8097,6 +8097,7 @@ M:David Howells M: Jade Alglave M: Luc Maranget M:

[PATCH RFC tip/lkmm 03/10] MAINTAINERS: List file memory-barriers.txt within the LKMM entry

2018-02-09 Thread Paul E. McKenney
From: Andrea Parri We now have a shiny new Linux-kernel memory model (LKMM) and the old tried-and-true Documentation/memory-barrier.txt. It would be good to keep these automatically synchronized, but in the meantime we need at least let people know that they are related. Will suggested adding t

Re: [PATCH] ASoC: use DEFINE_SHOW_ATTRIBUTE() to decrease code duplication

2018-02-09 Thread Donglin Peng
On Fri, Feb 9, 2018 at 9:21 PM, Andy Shevchenko wrote: > On Fri, Feb 9, 2018 at 8:58 AM, Donglin Peng wrote: >> There is some duplicate code in soc-core.c,and the kernel provides > > 'core.c,and' -> 'core.c, and' > >> +static int codec_list_show(struct seq_file *s, void *v) > > No need to rename

Re: [PATCH 1/2] arm64: capabilities: Allow flexibility in scope

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 12:16:01PM +, Suzuki K Poulose wrote: > >>> I'm not sure we need extra comments or documentation; I just want > >>> to check that I've understood the patch correctly. > >> > >> So, would you prefer this split to the original patch ? > > > > I think splitting out this pa

[PATCH 4.9 02/92] powerpc/64: Add macros for annotating the destination of rfid/hrfid

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Nicholas Piggin commit 50e51c13b3822d14ff6df4279423e4b7b2269bc3 upstream. The rfid/hrfid ((Hypervisor) Return From Interrupt) instruction is used for switching from the kernel to userspace, and

[PATCH 4.9 03/92] powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Nicholas Piggin commit a08f828cf47e6c605af21d2cdec68f84e799c318 upstream. Similar to the syscall return path, in fast_exception_return we may be returning to user or kernel context. We already

Re: [patch v1 0/4] mlx-platform: Add support for new Mellanox systems, code improvement, fixes for msn21xx system

2018-02-09 Thread Andy Shevchenko
On Fri, Feb 9, 2018 at 4:22 AM, Darren Hart wrote: > On Fri, Feb 02, 2018 at 08:45:44AM +, Vadim Pasternak wrote: >> platform/x86: mlx-platform: Use defines for bus assignment >> platform/x86: mlx-platform: Add define for the negative bus >> platform/x86: mlx-platform: Fix power cable s

[PATCH 4.9 04/92] powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Nicholas Piggin commit b8e90cb7bc04a509e821e82ab6ed7a8ef11ba333 upstream. In the syscall exit path we may be returning to user or kernel context. We already have a test for that, because we con

[PATCH 4.9 07/92] powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Michael Ellerman commit bc9c9304a45480797e13a8e1df96ffcf44fb62fe upstream. Because there may be some performance overhead of the RFI flush, add kernel command line options to disable it. We ad

[PATCH v2] target-i386: add KVM_HINTS_DEDICATED performance hint

2018-02-09 Thread Wanpeng Li
From: Wanpeng Li Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit to determine if they run on dedicated vCPUs, allowing optimizations such as usage of qspinlocks. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Eduardo Habkost Signed-off-by: Wanpeng Li --- v1 -> v2: * add a

[PATCH 4.9 20/92] net: igmp: add a missing rcu locking section

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Eric Dumazet [ Upstream commit e7aadb27a5415e8125834b84a74477bfbee4eff5 ] Newly added igmpv3_get_srcaddr() needs to be called under rcu lock. Timer callbacks do not ensure this locking.

[PATCH 4.9 00/92] 4.9.81-stable review

2018-02-09 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.81 release. There are 92 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 Feb 11 13:39:04 UTC 2018. Anything receive

[PATCH 4.9 19/92] ip6mr: fix stale iterator

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Nikolay Aleksandrov [ Upstream commit 4adfa79fc254efb7b0eb3cd58f62c2c3f805f1ba ] When we dump the ip6mr mfc entries via proc, we initialize an iterator with the table to dump but we don't clea

[PATCH 4.9 21/92] qlcnic: fix deadlock bug

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Junxiao Bi [ Upstream commit 233ac3891607f501f08879134d623b303838f478 ] The following soft lockup was caught. This is a deadlock caused by recusive locking. Process kworker/u40:1:28016 was ho

[PATCH 4.9 25/92] vhost_net: stop device during reset owner

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Jason Wang [ Upstream commit 4cd879515d686849eec5f718aeac62a70b067d82 ] We don't stop device before reset owner, this means we could try to serve any virtqueue kick before reset dev->worker. T

[PATCH 4.9 27/92] cls_u32: add missing RCU annotation.

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Paolo Abeni [ Upstream commit 058a6c033488494a6b1477b05fe8e1a16e344462 ] In a couple of points of the control path, n->ht_down is currently accessed without the required RCU annotation. The ac

[PATCH 4.9 33/92] b43: Add missing MODULE_FIRMWARE()

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Takashi Iwai commit 3c89a72ad80c64bdbd5ff851ee9c328a191f7e01 upstream. Some firmware entries were forgotten to be added via MODULE_FIRMWARE(), which may result in the non-functional state when

[PATCH 4.9 26/92] tcp_bbr: fix pacing_gain to always be unity when using lt_bw

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Neal Cardwell [ Upstream commit 3aff3b4b986e51bcf4ab249e5d48d39596e0df6a ] This commit fixes the pacing_gain to remain at BBR_UNIT (1.0) when using lt_bw and returning from the PROBE_RTT state

[PATCH 4.9 32/92] media: soc_camera: soc_scale_crop: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Jesse Chan commit 5331aec1bf9c9da557668174e0a4bfcee39f1121 upstream. This change resolves a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE()

RE: [Xen-devel] [PATCH] [v2] xen: hypercall: fix out-of-bounds memcpy

2018-02-09 Thread David Laight
From: Arnd Bergmann > Sent: 09 February 2018 12:58 ... > However, aside from this driver, I wonder if we should be worried about > Spectre type 1 attacks on similar code, when gcc-8 turns a switch/case > statement into an array lookup behind our back, e.g. in an ioctl handler. > Has anybody got thi

[PATCH 4.9 35/92] x86/retpoline: Remove the esp/rsp thunk

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Waiman Long (cherry picked from commit 1df37383a8aeabb9b418698f0bcdffea01f4b1b2) It doesn't make sense to have an indirect call thunk with esp/rsp as retpoline code won't work correctly with th

[PATCH 4.9 36/92] KVM: x86: Make indirect calls in emulator speculation safe

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Peter Zijlstra (cherry picked from commit 1a29b5b7f347a1a9230c1e0af5b37e3e571588ab) Replace the indirect calls with CALL_NOSPEC. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gl

[PATCH 4.9 12/92] auxdisplay: img-ascii-lcd: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Jesse Chan commit 09c479f7f1fbfaf848e5813996793966cd50be81 upstream. This change resolves a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE()

[PATCH] x86/spectre_v2: Remove 0xc2 from spectre_bad_microcodes

2018-02-09 Thread Darren Kenny
According to the latest microcode update from Intel (on Feb 8, 2018) on Skylake we should be using the microcode revisions 0xC2***, so we need to remove that from the blacklist now. Signed-off-by: Darren Kenny Reviewed-by: Konrad Rzeszutek Wilk Tested-by: Konrad Rzeszutek Wilk --- arch/x86/ker

[PATCH 4.9 40/92] x86/cpufeatures: Add Intel feature bits for Speculation Control

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Woodhouse (cherry picked from commit fc67dd70adb711a45d2ef34e12d1a8be75edde61) Add three feature bits exposed by new microcode on Intel CPUs for speculation control. Signed-off-by: David

[PATCH 4.9 41/92] x86/cpufeatures: Add AMD feature bits for Speculation Control

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Woodhouse (cherry picked from commit 5d10cbc91d9eb5537998b65608441b592eec65e7) AMD exposes the PRED_CMD/SPEC_CTRL MSRs slightly differently to Intel. See http://lkml.kernel.org/r/2b3e25cc

Re: scripts/coccinelle/misc/shift.cocci: Refactoring?

2018-02-09 Thread SF Markus Elfring
> +| > +WARN_ON(x op@p y) > +| > +WARN_ON_ONCE(x op@p y) > +| Can it be nice to work with nested SmPL disjunctions so that a bit of duplicate SmPL code will be reduced? > +coccilib.org.print_todo(j0[0], msg) Will it be nicer to pass a string literal instead of a variable for the message as a me

[PATCH 4.9 45/92] x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) support

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Woodhouse (cherry picked from commit 20ffa1caecca4db8f79fe665acdeaa5af815a24d) Expose indirect_branch_prediction_barrier() for use in subsequent patches. [ tglx: Add IBPB status to spect

[PATCH 4.9 42/92] x86/msr: Add definitions for new speculation control MSRs

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Woodhouse (cherry picked from commit 1e340c60d0dd3ae07b5bedc16a0469c14b9f3410) Add MSR and bit definitions for SPEC_CTRL, PRED_CMD and ARCH_CAPABILITIES. See Intel's 336996-Speculative-E

[PATCHv3 5/5] x86/pconfig: Provide defines and helper to run MKTME_KEY_PROG leaf

2018-02-09 Thread Kirill A. Shutemov
MKTME_KEY_PROG allows to manipulate MKTME keys in the CPU. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/intel_pconfig.h | 50 1 file changed, 50 insertions(+) diff --git a/arch/x86/include/asm/intel_pconfig.h b/arch/x86/include/asm/intel_pconf

Re: [PATCH V3 1/5] perf/x86/intel: fix event update for auto-reload

2018-02-09 Thread Peter Zijlstra
On Tue, Feb 06, 2018 at 12:58:23PM -0500, Liang, Kan wrote: > > > > With the exception of handling 'empty' buffers, I ended up with the > > below. Please try again. > > > > There are two small errors. After fixing them, the patch works well. Well, it still doesn't do A, two read()s without PEB

[PATCHv3 3/5] x86/cpufeatures: Add Intel PCONFIG cpufeature

2018-02-09 Thread Kirill A. Shutemov
CPUID.0x7.0x0:EDX[18] indicates whether Intel CPU support PCONFIG instruction. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index d3702d9ac012.

[PATCHv3 1/5] x86/cpufeatures: Add Intel Total Memory Encryption cpufeature

2018-02-09 Thread Kirill A. Shutemov
CPUID.0x7.0x0:ECX[13] indicates whether CPU supports Intel Total Memory Encryption. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 14c3aa2b

[PATCHv3 2/5] x86/tme: Detect if TME and MKTME is activated by BIOS

2018-02-09 Thread Kirill A. Shutemov
IA32_TME_ACTIVATE MSR (0x982) can be used to check if BIOS has enabled TME and MKTME. It includes which encryption policy/algorithm is selected for TME or available for MKTME. For MKTME, the MSR also enumerates how many KeyIDs are available. We would need to exclude KeyID bits from physical addres

[PATCHv3 4/5] x86/pconfig: Detect PCONFIG targets

2018-02-09 Thread Kirill A. Shutemov
Intel PCONFIG targets are enumerated via new CPUID leaf 0x1b. This patch detects all supported targets of PCONFIG and implements helper to check if the target is supported. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/intel_pconfig.h | 15 +++ arch/x86/kernel/cpu/Makefile

[PATCHv3 0/5] x86: Enumerate TME and PCONFIG, add MKTME_KEY_PROG helper

2018-02-09 Thread Kirill A. Shutemov
Multikey Total Memory Encryption (MKTME)[1] is a technology that allows transparent memory encryption in upcoming Intel platforms. MKTME is built on top of TME. TME allows encryption of the entirety of system memory using a single key. MKTME allows to have multiple encryption domains, each having

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-09 Thread Matthew Wilcox
On Fri, Feb 09, 2018 at 05:12:56PM +0800, Kai Heng Feng wrote: > Hi Matthew, > > > On Feb 9, 2018, at 12:08 PM, Matthew Wilcox wrote: > > Alternatively, try this. It passes in GFP_DMA32 from vmalloc_32, > > regardless of whether ZONE_DMA32 exists or not. If ZONE_DMA32 doesn't > > exist, then we

[PATCH 4.9 14/92] ASoC: pcm512x: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Jesse Chan commit 0cab20cec0b663b7be8e2be5998d5a4113647f86 upstream. This change resolves a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE()

[PATCH 4.9 16/92] x86/pti: Make unpoison of pgd for trusted boot work for real

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dave Hansen commit 445b69e3b75e42362a5bdc13c8b8f61599e2228a upstream The inital fix for trusted boot and PTI potentially misses the pgd clearing if pud_alloc() sets a PGD. It probably works in

[PATCH 4.9 17/92] kaiser: allocate pgd with order 0 when pti=off

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Hugh Dickins The 4.9.77 version of "x86/pti/efi: broken conversion from efi to kernel page table" looked nicer than the 4.4.112 version, but was suboptimal on machines booted with "pti=off" (or

[PATCH 4.9 09/92] powerpc/powernv: Check device-tree for RFI flush settings

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Oliver O'Halloran commit 6e032b350cd1fdb830f18f8320ef0e13b4e24094 upstream. New device-tree properties are available which tell the hypervisor settings related to the RFI flush. Use them to det

[PATCH 4.9 47/92] x86/nospec: Fix header guards names

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Borislav Petkov (cherry picked from commit 7a32fc51ca938e67974cbb9db31e1a43f98345a9) ... to adhere to the _ASM_X86_ naming scheme. No functional change. Signed-off-by: Borislav Petkov Signed

[PATCH 4.9 58/92] x86: Implement array_index_mask_nospec

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dan Williams (cherry picked from commit babdde2698d482b6c0de1eab4f697cf5856c5859) array_index_nospec() uses a mask to sanitize user controllable array indexes, i.e. generate a 0 mask if 'index

[PATCH 4.9 57/92] array_index_nospec: Sanitize speculative array de-references

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dan Williams (cherry picked from commit f3804203306e098dae9ca51540fcd5eb700d7f40) array_index_nospec() is proposed as a generic mechanism to mitigate against Spectre-variant-1 attacks, i.e. an

[PATCH 4.9 56/92] Documentation: Document array_index_nospec

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Mark Rutland (cherry picked from commit f84a56f73dddaeac1dba8045b007f742f61cd2da) Document the rationale and usage of the new array_index_nospec() helper. Signed-off-by: Mark Rutland Signed-

[PATCH 4.9 59/92] x86: Introduce barrier_nospec

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dan Williams (cherry picked from commit b3d7ad85b80bbc404635dca80f5b129f6242bc7a) Rename the open coded form of this instruction sequence from rdtsc_ordered() into a generic barrier primitive,

[PATCH 4.9 61/92] x86/usercopy: Replace open coded stac/clac with __uaccess_{begin, end}

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dan Williams (cherry picked from commit b5c4ae4f35325d520b230bab6eb3310613b72ac1) In preparation for converting some __uaccess_begin() instances to __uacess_begin_nospec(), make sure all 'from

[PATCH 4.9 48/92] x86/bugs: Drop one "mitigation" from dmesg

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Borislav Petkov (cherry picked from commit 55fa19d3e51f33d9cd4056d25836d93abf9438db) Make [0.031118] Spectre V2 mitigation: Mitigation: Full generic retpoline into [0.031118] Spectre

[PATCH 4.9 68/92] x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable"

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Colin Ian King (cherry picked from commit e698dcdfcda41efd0984de539767b4cddd235f1e) Trivial fix to spelling mistake in pr_err error message text. Signed-off-by: Colin Ian King Signed-off-by:

[PATCH 4.9 65/92] vfs, fdtable: Prevent bounds-check bypass via speculative execution

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dan Williams (cherry picked from commit 56c30ba7b348b90484969054d561f711ba196507) 'fd' is a user controlled value that is used as a data dependency to read from the 'fdt->fd' array. In order

[PATCH 4.9 69/92] x86/cpuid: Fix up "virtual" IBRS/IBPB/STIBP feature bits on Intel

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Woodhouse (cherry picked from commit 7fcae1118f5fd44a862aa5c3525248e35ee67c3b) Despite the fact that all the other code there seems to be doing it, just using set_cpu_cap() in early_inte

[PATCH 4.9 71/92] x86/kvm: Update spectre-v1 mitigation

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dan Williams (cherry picked from commit 085331dfc6bbe3501fb936e657331ca943827600) Commit 75f139aaf896 "KVM: x86: Add memory barrier on vmcs field lookup" added a raw 'asm("lfence");' to preven

[PATCH 4.9 70/92] x86/paravirt: Remove noreplace-paravirt cmdline option

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Josh Poimboeuf (cherry picked from commit 12c69f1e94c89d40696e83804dd2f0965b5250cd) The 'noreplace-paravirt' option disables paravirt patching, leaving the original pv indirect calls in place.

[PATCH 4.9 72/92] x86/retpoline: Avoid retpolines for built-in __init functions

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Woodhouse (cherry picked from commit 66f793099a636862a71c59d4a6ba91387b155e0c) There's no point in building init code with retpolines, since it runs before any potentially hostile usersp

[PATCH 4.9 73/92] x86/spectre: Simplify spectre_v2 command line parsing

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: KarimAllah Ahmed (cherry picked from commit 9005c6834c0ffdfe46afa76656bd9276cca864f6) [dwmw2: Use ARRAY_SIZE] Signed-off-by: KarimAllah Ahmed Signed-off-by: David Woodhouse Signed-off-by: T

[PATCH 4.9 74/92] x86/pti: Mark constant arrays as __initconst

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann (cherry picked from commit 4bf5d56d429cbc96c23d809a08f63cd29e1a702e) I'm seeing build failures from the two newly introduced arrays that are marked 'const' and '__initdata', whic

Re: [Resend] Question: kselftests: bpf/test_maps failed

2018-02-09 Thread Daniel Borkmann
On 02/09/2018 06:14 AM, Li Zhijian wrote: > Hi > > INTEL 0-Day noticed that bpf/test_maps has different results at different > platforms. > when it fails, the details are like Sorry for the late reply and thanks for reporting! More below: > -- >   880 Failed to create hashmap ke

[PATCH 4.9 76/92] KVM: nVMX: kmap() cant fail

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Hildenbrand commit 42cf014d38d8822cce63703a467e00f65d000952 upstream. kmap() can't fail, therefore it will always return a valid pointer. Let's just get rid of the unnecessary checks. Si

[PATCH 4.9 81/92] KVM: VMX: make MSR bitmaps per-VCPU

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Paolo Bonzini (cherry picked from commit 904e14fb7cb96401a7dc803ca2863fd5ba32ffe6) Place the MSR bitmap in struct loaded_vmcs, and update it in place every time the x2apic or APICv state can c

[GIT PULL] fbdev fix for v4.16

2018-02-09 Thread Bartlomiej Zolnierkiewicz
Hi Linus, Please pull fbdev fix for v4.16 (just a single fix to make omapfb driver build again). Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics The following changes since commit f1517df8701c9f12dae9ce7f43a5d300a6917619: Merge tag 'nfsd-4.16' of

Re: [PATCH 2/2] mmc: Add mmc_force_detect_change_begin / _end functions

2018-02-09 Thread Ulf Hansson
[...] >> > I'd like to know if any progress has been made on that problem (I may >> > have missed patches). >> > Had you had the time to look at the issue? >> >> I have looked at the issue, but not manage to cook some patches for it. >> >> However, it's on my top of my TODO list for mmc. No promis

[PATCH 4.9 83/92] KVM/VMX: Emulate MSR_IA32_ARCH_CAPABILITIES

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: KarimAllah Ahmed (cherry picked from commit 28c1c9fabf48d6ad596273a11c46e0d0da3e14cd) Intel processors use MSR_IA32_ARCH_CAPABILITIES MSR to indicate RDCL_NO (bit 0) and IBRS_ALL (bit 1). This

[PATCH 4.9 50/92] x86/cpufeatures: Clean up Spectre v2 related CPUID flags

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: David Woodhouse (cherry picked from commit 2961298efe1ea1b6fc0d7ee8b76018fa6c0bcef2) We want to expose the hardware features simply in /proc/cpuinfo as "ibrs", "ibpb" and "stibp". Since AMD has

[PATCH 4.9 52/92] x86/spectre: Check CONFIG_RETPOLINE in command line parser

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Dou Liyang (cherry picked from commit 9471eee9186a46893726e22ebb54cade3f9bc043) The spectre_v2 option 'auto' does not check whether CONFIG_RETPOLINE is enabled. As a consequence it fails to emi

[PATCH 4.9 46/92] x86/alternative: Print unadorned pointers

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Borislav Petkov (cherry picked from commit 0e6c16c652cadaffd25a6bb326ec10da5bcec6b4) After commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers are being hashed when printed.

[PATCH 4.9 54/92] x86/entry/64: Push extra regs right away

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Andy Lutomirski (cherry picked from commit d1f7732009e0549eedf8ea1db948dc37be77fd46) With the fast path removed there is no point in splitting the push of the normal and the extra register set.

Re: [f2fs-dev] [PATCH] f2fs: add fi->commit_lock to protect commit GCed pages

2018-02-09 Thread Yunlong Song
The problem is that you can not find a proper value of the threshold time, when f2fs_gc select the GCed data page of the atomic file (which has atomic started but not atomic committed yet), then f2fs_gc will run into loop, and all the f2fs ops will be blocked in f2fs_balane_fs. If the threshold ti

Re: [PATCH] base: power: domain: Replace mdelay with msleep

2018-02-09 Thread Ulf Hansson
On 26 January 2018 at 09:38, Jia-Ju Bai wrote: > After checking all possible call chains to genpd_dev_pm_detach() and > genpd_dev_pm_attach() here, > my tool finds that these functions are never called in atomic context, > namely never in an interrupt handler or holding a spinlock. > Thus mdelay c

[PATCH 4.9 88/92] ASoC: rsnd: dont call free_irq() on Parent SSI

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Kuninori Morimoto commit 1f8754d4daea5f257370a52a30fcb22798c54516 upstream. If SSI uses shared pin, some SSI will be used as parent SSI. Then, normal SSI's remove and Parent SSI's remove (these

[PATCH 4.9 91/92] drm: rcar-du: Fix race condition when disabling planes at CRTC stop

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Laurent Pinchart commit 641307df71fe77d7b38a477067495ede05d47295 upstream. When stopping the CRTC the driver must disable all planes and wait for the change to take effect at the next vblank. M

[PATCH 4.9 85/92] KVM/SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-09 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: KarimAllah Ahmed (cherry picked from commit b2ac58f90540e39324e7a29a7ad471407ae0bf48) [ Based on a patch from Paolo Bonzini ] ... basically doing exactly what we do for VMX: - Passthrough S

[PATCH 4.14 10/22] vhost_net: stop device during reset owner

2018-02-09 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Jason Wang [ Upstream commit 4cd879515d686849eec5f718aeac62a70b067d82 ] We don't stop device before reset owner, this means we could try to serve any virtqueue kick before reset dev->worker.

<    1   2   3   4   5   6   7   8   9   >