Re: [PATCH 04/10] sched/fair: Return an idle cpu if one is found after a failed search for an idle core

2020-12-03 Thread Vincent Guittot
On Thu, 3 Dec 2020 at 15:11, Mel Gorman wrote: > > select_idle_core is called when SMT is active and there is likely a free > core available. It may find idle CPUs but this information is simply > discarded and the scan starts over again with select_idle_cpu. > > This patch caches information on

Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched

2020-12-03 Thread Vincent Guittot
On Thu, 3 Dec 2020 at 15:11, Mel Gorman wrote: > > The target CPU is definitely not idle in both select_idle_core and > select_idle_cpu. For select_idle_core(), the SMT is potentially > checked unnecessarily as the core is definitely not idle if the > target is busy. For select_idle_cpu(), the

Re: [PATCH] ASoC: jz4740-i2s: add missed checks for clk_get()

2020-12-03 Thread Paul Cercueil
Hi, Le jeu. 3 déc. 2020 à 22:42, Chuhong Yuan a écrit : jz4740_i2s_set_sysclk() does not check the return values of clk_get(), while the file dereferences the pointers in clk_put(). Add the missed checks to fix it. Fixes: 11bd3dd1b7c2 ("ASoC: Add JZ4740 ASoC support") Signed-off-by: Chuhong

Re: [PATCH] drm/fb-helper: Add missed unlocks in setcmap_legacy()

2020-12-03 Thread Daniel Vetter
On Thu, Dec 3, 2020 at 5:11 PM Peter Rosin wrote: > > Hi! > > On 2020-12-03 15:42, Chuhong Yuan wrote: > > setcmap_legacy() does not call drm_modeset_unlock_all() in some exits, > > add the missed unlocks with goto to fix it. > > > > Fixes: 964c60063bff ("drm/fb-helper: separate the fb_setcmap

Re: [PATCH 6/6] mm/gup: migrate pinned pages out of movable zone

2020-12-03 Thread Pavel Tatashin
> Looking at this code some more.. How is it even correct? > > 1633if (!isolate_lru_page(head)) { > 1634list_add_tail(>lru, > _page_list); > > Here we are only running under the read side of the mmap sem so multiple > GUPs can be

Re: [PATCH] spi: spi-geni-qcom: Fix NULL pointer access in geni_spi_isr

2020-12-03 Thread Doug Anderson
Hi, On Wed, Dec 2, 2020 at 11:45 PM Roja Rani Yarubandi wrote: > > Here, there is a chance of race condition occurrence which leads to > NULL pointer dereference with struct spi_geni_master member 'cur_xfer' > between setup_fifo_xfer() and handle_fifo_timeout() functions. > > Fix this race

Re: WARNING in sk_stream_kill_queues (5)

2020-12-03 Thread Eric Dumazet
On Thu, Dec 3, 2020 at 5:34 PM Marco Elver wrote: > > On Thu, 3 Dec 2020 at 17:27, Eric Dumazet wrote: > > On Thu, Dec 3, 2020 at 4:58 PM Marco Elver wrote: > > > > > > On Mon, Nov 30, 2020 at 12:40AM -0800, syzbot wrote: > > > > Hello, > > > > > > > > syzbot found the following issue on: > > >

Re: [PATCH v3 3/6] ARM: dts: sun8i: v3s: Add node for system control

2020-12-03 Thread Chen-Yu Tsai
On Fri, Dec 4, 2020 at 12:25 AM Martin Cerveny wrote: > > Hello. > > On Thu, 3 Dec 2020, Chen-Yu Tsai wrote: > > > Hi, > > > > On Mon, Nov 16, 2020 at 8:57 PM Martin Cerveny > > wrote: > >> > >> Allwinner V3s has system control and SRAM C1 region similar to H3. > >> > >> Signed-off-by: Martin

Re: [PATCH] x86/cpu/amd: Remove dead code for TSEG region remapping

2020-12-03 Thread Borislav Petkov
On Thu, Dec 03, 2020 at 11:14:06AM -0500, Arvind Sankar wrote: > Do any of them have it mapped at all, regardless of the alignment? There > seems to be nothing else in the kernel that ever looks at the TSEG MSR, > so I would guess that it has to be non-RAM in the E820 map, otherwise > nothing

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-03 Thread Tom Lendacky
On 12/3/20 6:48 AM, Borislav Petkov wrote: So it ended up like this: --- From 5014e4e902778d63ce392f864b3654baa4b72384 Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Thu, 3 Dec 2020 13:50:37 +0900 Subject: [PATCH] x86/uprobes: Do not use prefixes.nbytes when looping over

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 06:39 -0800, Tom Rix wrote: > I agree if it can be done in checkpatch it should. > It is good to have multiple passes on cleaning. true > checkpatch is best at fixing new problems, > clang-tidy-fix is best at fixing old problems. checkpatch is a set of brainless regexes

Re: [PATCH net v3] bonding: fix feature flag setting at init time

2020-12-03 Thread Jakub Kicinski
On Wed, 2 Dec 2020 19:43:57 -0500 Jarod Wilson wrote: > Don't try to adjust XFRM support flags if the bond device isn't yet > registered. Bad things can currently happen when netdev_change_features() > is called without having wanted_features fully filled in yet. This code > runs on

Re: [PATCH v6 0/2] MTE support for KVM guest

2020-12-03 Thread Steven Price
On 03/12/2020 16:09, Mark Rutland wrote: On Fri, Nov 27, 2020 at 03:21:11PM +, Steven Price wrote: It's been a week, and I think the comments on v5 made it clear that enforcing PROT_MTE requirements on the VMM was probably the wrong approach. So since I've got swap working correctly without

Re: [PATCH net v3] bonding: fix feature flag setting at init time

2020-12-03 Thread Jakub Kicinski
On Wed, 2 Dec 2020 19:43:57 -0500 Jarod Wilson wrote: > bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; > -#ifdef CONFIG_XFRM_OFFLOAD > - bond_dev->hw_features |= BOND_XFRM_FEATURES; > -#endif /* CONFIG_XFRM_OFFLOAD */ > bond_dev->features |=

[PATCH] PCI: cadence: Fix cdns_pcie_host_setup() error path

2020-12-03 Thread Mian Yousaf Kaukab
commit 19abcd790b51 ("PCI: cadence: Fix cdns_pcie_{host|ep}_setup() error path") removed pm_runtime_put_sync() call from the error path in cdns_pcie_{host|ep}_setup(). However, the hunk in cdns_pcie_host_setup() got lost. Fix error path in cdns_pcie_host_setup() by removing pm_runtime_put_sync()

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread John Hubbard
On 12/3/20 7:06 AM, Pavel Tatashin wrote: ... diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 611799c72da5..7a6d86d0bc5f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3766,20 +3766,25 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) return alloc_flags; }

Re: [PATCH] [v7] wireless: Initial driver submission for pureLiFi STA devices

2020-12-03 Thread Srinivasan Raju
> What will be the directory structure in linux-firmware? It should be > unique so that it's not possible to mix with other drivers. I have created the following directory structure, Please let me know if this is OK. LICENCE.purelifi_firmware | 29 +

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-03 Thread Borislav Petkov
On Thu, Dec 03, 2020 at 10:45:48AM -0600, Tom Lendacky wrote: > Since this is based on the array size, can > > idx < NUM_LEGACY_PREFIXES > > be replaced with: > > idx < ARRAY_SIZE(insn->prefixes.bytes) Actually, this needs another change: struct insn_field { union {

Re: [Ksummit-discuss] crediting bug reports and fixes folded into original patch

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 05:58 -0800, James Bottomley wrote: > So there are two embedded questions here: firstly, should we be as > wedded to clean history as we are, because showing the evolution would > simply solve this? Secondly, if we are agreed on clean history, how > can we make engagement

[no subject]

2020-12-03 Thread Максим Киселёв
>From 772007b92eda50186c2e420b5bd895d4e4006ae8 Mon Sep 17 00:00:00 2001 From: Maxim Kiselev Date: Thu, 3 Dec 2020 18:56:12 +0300 Subject: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support This patch allows use of GPIO for the chip select. Because dSPI controller can't send transactions

Re: [PATCH v6 0/2] MTE support for KVM guest

2020-12-03 Thread Mark Rutland
On Thu, Dec 03, 2020 at 04:49:49PM +, Steven Price wrote: > On 03/12/2020 16:09, Mark Rutland wrote: > > On Fri, Nov 27, 2020 at 03:21:11PM +, Steven Price wrote: > > > It's been a week, and I think the comments on v5 made it clear that > > > enforcing PROT_MTE requirements on the VMM was

Re: [PATCH 6/6] mm/gup: migrate pinned pages out of movable zone

2020-12-03 Thread Jason Gunthorpe
On Thu, Dec 03, 2020 at 11:40:15AM -0500, Pavel Tatashin wrote: > > Looking at this code some more.. How is it even correct? > > > > 1633if (!isolate_lru_page(head)) { > > 1634list_add_tail(>lru, > > _page_list); > > > > Here we are

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-03 Thread Borislav Petkov
On Thu, Dec 03, 2020 at 05:54:20PM +0100, Borislav Petkov wrote: > On Thu, Dec 03, 2020 at 10:45:48AM -0600, Tom Lendacky wrote: > > Since this is based on the array size, can > > > > idx < NUM_LEGACY_PREFIXES > > > > be replaced with: > > > > idx < ARRAY_SIZE(insn->prefixes.bytes) > >

Re: [PATCH] s390/vfio-ap: Clean up vfio_ap resources when KVM pointer invalidated

2020-12-03 Thread Halil Pasic
On Thu, 3 Dec 2020 11:19:07 +0100 Cornelia Huck wrote: > > @@ -1095,7 +1106,7 @@ static int vfio_ap_mdev_group_notifier(struct > > notifier_block *nb, > > matrix_mdev = container_of(nb, struct ap_matrix_mdev, group_notifier); > > > > if (!data) { > > - matrix_mdev->kvm =

[PATCH] firmware_loader: Align .builtin_fw to 8

2020-12-03 Thread Fangrui Song
arm64 references the start address of .builtin_fw (__start_builtin_fw) with a pair of R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_LDST64_ABS_LO12_NC relocations. The compiler is allowed to emit the R_AARCH64_LDST64_ABS_LO12_NC relocation because struct builtin_fw in include/linux/firmware.h is 8-byte

[PATCH v3 01/19] vdpa: remove unnecessary 'default n' in Kconfig entries

2020-12-03 Thread Stefano Garzarella
'default n' is not necessary since it is already the default when nothing is specified. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vdpa/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig

[PATCH v3 03/19] vdpa_sim: remove hard-coded virtq count

2020-12-03 Thread Stefano Garzarella
From: Max Gurtovoy Add a new attribute that will define the number of virt queues to be created for the vdpasim device. Signed-off-by: Max Gurtovoy [sgarzare: replace kmalloc_array() with kcalloc()] Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- v1: - use kcalloc() instead of

[PATCH v3 04/19] vhost/iotlb: add VHOST_IOTLB_UNLIMITED macro

2020-12-03 Thread Stefano Garzarella
It's possible to allocate an unlimited IOTLB calling vhost_iotlb_alloc() with 'limit' = 0. Add a new macro (VHOST_IOTLB_UNLIMITED) for this case and document it in the vhost_iotlb_alloc() documentation block. Suggested-by: Jason Wang Signed-off-by: Stefano Garzarella ---

[PATCH v3 02/19] vdpa_sim: remove unnecessary headers inclusion

2020-12-03 Thread Stefano Garzarella
Some headers are not necessary, so let's remove them to do some cleaning. Signed-off-by: Stefano Garzarella --- v3: - avoided to remove some headers with structures and functions directly used (device.h, slab.h, virtio_byteorder.h)[Jason] --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 10 --

[PATCH v3 05/19] vdpa_sim: remove the limit of IOTLB entries

2020-12-03 Thread Stefano Garzarella
The simulated devices can support multiple queues, so this limit should be defined according to the number of queues supported by the device. Since we are in a simulator, let's simply remove that limit. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- v3: -

[PATCH v3 00/19] vdpa: generalize vdpa simulator

2020-12-03 Thread Stefano Garzarella
This series moves the network device simulator in a new module (vdpa_sim_net) and leaves the generic functions in the vdpa_sim core module, allowing the possibility to add new vDPA device simulators. For now I removed the vdpa-blk simulator patches, since I'm still working on them and debugging

[PATCH v3 07/19] vdpa_sim: add struct vdpasim_dev_attr for device attributes

2020-12-03 Thread Stefano Garzarella
vdpasim_dev_attr will contain device specific attributes. We starting moving the number of virtqueues (i.e. nvqs) to vdpasim_dev_attr. vdpasim_create() creates a new vDPA simulator following the device attributes defined in the vdpasim_dev_attr parameter. Co-developed-by: Max Gurtovoy

[PATCH v3 06/19] vdpa_sim: rename vdpasim_config_ops variables

2020-12-03 Thread Stefano Garzarella
These variables store generic callbacks used by the vDPA simulator core, so we can remove the 'net' word in their names. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 12 ++-- 1

[PATCH v3 08/19] vdpa_sim: add device id field in vdpasim_dev_attr

2020-12-03 Thread Stefano Garzarella
Remove VDPASIM_DEVICE_ID macro and add 'id' field in vdpasim_dev_attr, that will be returned by vdpasim_get_device_id(). Use VIRTIO_ID_NET for vDPA-net simulator device id. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella ---

[PATCH v3 10/19] vdpa_sim: add work_fn in vdpasim_dev_attr

2020-12-03 Thread Stefano Garzarella
Rename vdpasim_work() in vdpasim_net_work() and add it to the vdpasim_dev_attr structure. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 +-- 1 file changed, 5 insertions(+), 2

[PATCH v3 11/19] vdpa_sim: store parsed MAC address in a buffer

2020-12-03 Thread Stefano Garzarella
As preparation for the next patches, we store the MAC address, parsed during the vdpasim_create(), in a buffer that will be used to fill 'config' together with other configurations. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 10 +++--- 1

Re: [PATCH v8 00/16] Add support for Clang LTO

2020-12-03 Thread Sami Tolvanen
On Thu, Dec 3, 2020 at 3:26 AM Will Deacon wrote: > > Hi Sami, > > On Tue, Dec 01, 2020 at 01:36:51PM -0800, Sami Tolvanen wrote: > > This patch series adds support for building the kernel with Clang's > > Link Time Optimization (LTO). In addition to performance, the primary > > motivation for

Re: [PATCH v6 1/2] arm64: kvm: Save/restore MTE registers

2020-12-03 Thread Marc Zyngier
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index e2ef4c2edf06..b6668ffa04d9 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -569,7 +569,8 @@ #define SCTLR_ELx_M(BIT(0)) #define SCTLR_ELx_FLAGS(SCTLR_ELx_M

[PATCH v3 09/19] vdpa_sim: add supported_features field in vdpasim_dev_attr

2020-12-03 Thread Stefano Garzarella
Introduce a new VDPASIM_FEATURES macro with the generic features supported by the vDPA simulator, and VDPASIM_NET_FEATURES macro with vDPA-net features. Add 'supported_features' field in vdpasim_dev_attr, to allow devices to specify their features. Co-developed-by: Max Gurtovoy Signed-off-by:

[PATCH v3 15/19] vdpa_sim: set vringh notify callback

2020-12-03 Thread Stefano Garzarella
Instead of calling the vq callback directly, we can leverage the vringh_notify() function, adding vdpasim_vq_notify() and setting it in the vringh notify callback. Suggested-by: Jason Wang Signed-off-by: Stefano Garzarella --- v3: - cleared notify during reset [Jason] ---

[PATCH v3 16/19] vdpa_sim: use kvmalloc to allocate vdpasim->buffer

2020-12-03 Thread Stefano Garzarella
The next patch will make the buffer size configurable from each device. Since the buffer could be larger than a page, we use kvmalloc() instead of kmalloc(). Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v3 14/19] vdpa_sim: add set_config callback in vdpasim_dev_attr

2020-12-03 Thread Stefano Garzarella
The set_config callback can be used by the device to parse the config structure modified by the driver. The callback will be invoked, if set, in vdpasim_set_config() after copying bytes from caller buffer into vdpasim->config buffer. Signed-off-by: Stefano Garzarella ---

[PATCH v3 19/19] vdpa: split vdpasim to core and net modules

2020-12-03 Thread Stefano Garzarella
From: Max Gurtovoy Introduce new vdpa_sim_net and vdpa_sim (core) drivers. This is a preparation for adding a vdpa simulator module for block devices. Signed-off-by: Max Gurtovoy [sgarzare: various cleanups/fixes] Signed-off-by: Stefano Garzarella --- v2: - Fixed "warning: variable 'dev' is

[PATCH v3 17/19] vdpa_sim: make vdpasim->buffer size configurable

2020-12-03 Thread Stefano Garzarella
Allow each device to specify the size of the buffer allocated in vdpa_sim. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c

[PATCH v3 12/19] vdpa_sim: make 'config' generic and usable for any device type

2020-12-03 Thread Stefano Garzarella
Add new 'config_size' attribute in 'vdpasim_dev_attr' and allocates 'config' dynamically to support any device types. Signed-off-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git

[PATCH v3 13/19] vdpa_sim: add get_config callback in vdpasim_dev_attr

2020-12-03 Thread Stefano Garzarella
The get_config callback can be used by the device to fill the config structure. The callback will be invoked in vdpasim_get_config() before copying bytes into caller buffer. Move vDPA-net config updates from vdpasim_set_features() in the new vdpasim_net_get_config() callback. Signed-off-by:

Re: [PATCH 6/8] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-12-03 Thread Alexander Gordeev
On Mon, Nov 30, 2020 at 10:31:51AM -0800, Andy Lutomirski wrote: > other arch folk: there's some background here: > > https://lkml.kernel.org/r/calcetrvxube8lfnn-qs+dzroqaiw+sfug1j047ybyv31sat...@mail.gmail.com > > On Sun, Nov 29, 2020 at 12:16 PM Andy Lutomirski wrote: > > > > On Sat, Nov 28,

Re: [PATCH v5] mm: Optional full ASLR for mmap(), mremap(), vdso and stack

2020-12-03 Thread Andy Lutomirski
> On Dec 3, 2020, at 4:06 AM, Topi Miettinen wrote: > > On 3.12.2020 11.47, Florian Weimer wrote: >> * Topi Miettinen: >>> +3 Additionally enable full randomization of memory mappings created >>> +with mmap(NULL, ...). With 2, the base of the VMA used for such >>> +mappings is

Re: [PATCH AUTOSEL 5.9 27/39] sched/idle: Fix arch_cpu_idle() vs tracing

2020-12-03 Thread Peter Zijlstra
On Thu, Dec 03, 2020 at 03:54:42PM +0100, Heiko Carstens wrote: > On Thu, Dec 03, 2020 at 08:28:21AM -0500, Sasha Levin wrote: > > From: Peter Zijlstra > > > > [ Upstream commit 58c644ba512cfbc2e39b758dd979edd1d6d00e27 ] > > > > We call arch_cpu_idle() with RCU disabled, but then use > >

Re: [PATCH AUTOSEL 5.9 28/39] intel_idle: Fix intel_idle() vs tracing

2020-12-03 Thread Peter Zijlstra
On Thu, Dec 03, 2020 at 08:28:22AM -0500, Sasha Levin wrote: > From: Peter Zijlstra > > [ Upstream commit 6e1d2bc675bd57640f5658a4a657ae488db4c204 ] > > cpuidle->enter() callbacks should not call into tracing because RCU > has already been disabled. Instead of doing the broadcast thing >

[PATCH v3 18/19] vdpa_sim: split vdpasim_virtqueue's iov field in out_iov and in_iov

2020-12-03 Thread Stefano Garzarella
vringh_getdesc_iotlb() manages 2 iovs for writable and readable descriptors. This is very useful for the block device, where for each request we have both types of descriptor. Let's split the vdpasim_virtqueue's iov field in out_iov and in_iov to use them with vringh_getdesc_iotlb(). We are

Re: [PATCH v3 1/1] kasan: fix object remain in offline per-cpu quarantine

2020-12-03 Thread Qian Cai
: 21 PID: 120 Comm: cpuhp/21 Tainted: GB 5.10.0-rc6-next-20201203+ #8 [ 421.920733][ T120] Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 [ 421.930011][ T120] Call Trace: [ 421.933174][ T120] dump_stack+0x99/0xcb [ 421.937210][ T120] free

[PATCH] spi: spi-fsl-dspi: Add GPIO chip select support

2020-12-03 Thread Максим Киселёв
From: Maxim Kiselev Date: Thu, 3 Dec 2020 18:56:12 +0300 Subject: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support This patch allows use of GPIO for the chip select. Because dSPI controller can't send transactions without hardware chip selects, so first unused native CS will be set in

[PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-03 Thread Maxim Levitsky
These two new ioctls allow to more precisly capture and restore guest's TSC state. Both ioctls are meant to be used to accurately migrate guest TSC even when there is a significant downtime during the migration. Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky ---

[PATCH v2 3/3] kvm/selftests: update tsc_msrs_test to cover KVM_X86_QUIRK_TSC_HOST_ACCESS

2020-12-03 Thread Maxim Levitsky
Run the test once with quirk enabled and once disabled, and adjust the expected values accordingly. Signed-off-by: Maxim Levitsky --- .../selftests/kvm/x86_64/tsc_msrs_test.c | 79 --- 1 file changed, 69 insertions(+), 10 deletions(-) diff --git

[PATCH v2 0/3] RFC: Precise TSC migration

2020-12-03 Thread Maxim Levitsky
Hi! This is the second version of the work to make TSC migration more accurate, as was defined by Paulo at: https://www.spinics.net/lists/kvm/msg225525.html I omitted most of the semi-offtopic points I raised related to TSC in the previous RFC where we can continue the discussion. I do want to

[PATCH v2 2/3] KVM: x86: introduce KVM_X86_QUIRK_TSC_HOST_ACCESS

2020-12-03 Thread Maxim Levitsky
This quirk reflects the fact that we currently treat MSR_IA32_TSC and MSR_TSC_ADJUST access by the host (e.g qemu) in a way that is different compared to an access from the guest. For host's MSR_IA32_TSC read we currently always return L1 TSC value, and for host's write we do the tsc

Re: [PATCH 6/8] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-12-03 Thread Andy Lutomirski
> On Dec 3, 2020, at 9:09 AM, Alexander Gordeev wrote: > > On Mon, Nov 30, 2020 at 10:31:51AM -0800, Andy Lutomirski wrote: >> other arch folk: there's some background here: > >> >> power: Ridiculously complicated, seems to vary by system and kernel config. >> >> So, Nick, your

Re: [PATCH 6/6] mm/gup: migrate pinned pages out of movable zone

2020-12-03 Thread Pavel Tatashin
On Thu, Dec 3, 2020 at 11:59 AM Jason Gunthorpe wrote: > > On Thu, Dec 03, 2020 at 11:40:15AM -0500, Pavel Tatashin wrote: > > > Looking at this code some more.. How is it even correct? > > > > > > 1633if (!isolate_lru_page(head)) { > > > 1634

[RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2020-12-03 Thread Alexey Klimov
When a CPU offlined and onlined via device_offline() and device_online() the userspace gets uevent notification. If, after receiving uevent, userspace executes sched_setaffinity() on some task trying to move it to a recently onlined CPU, then it will fail with -EINVAL. Userspace needs to wait

[PATCH v4 0/2] fpga: dfl: optional VSEC for start of dfl

2020-12-03 Thread matthew . gerlach
From: Matthew Gerlach The start of a Device Feature List (DFL) is currently assumed to be at Bar0/Offset 0 on the PCIe bus by drivers/fpga/dfl-pci.c. This patchset adds support for the start one or more DFLs to be specified in a Vendor-Specific Capability (VSEC) structure in PCIe config space.

Re: [PATCH] mm/page_isolation: do not isolate the max order page

2020-12-03 Thread Vlastimil Babka
On 12/3/20 5:26 PM, David Hildenbrand wrote: > On 03.12.20 01:03, Vlastimil Babka wrote: >> On 12/2/20 1:21 PM, Muchun Song wrote: >>> The max order page has no buddy page and never merge to other order. >>> So isolating and then freeing it is pointless. >>> >>> Signed-off-by: Muchun Song >> >>

[PATCH v4 2/2] fpga: dfl-pci: locate DFLs by PCIe vendor specific capability

2020-12-03 Thread matthew . gerlach
From: Matthew Gerlach A PCIe vendor specific extended capability is introduced by Intel to specify the start of a number of DFLs. Signed-off-by: Matthew Gerlach --- v4: Clarify PCI vs. PCIe in documentation Various cleanup suggested by hao...@intel.com Document and enforce specifying a

[RFC PATCH] badblocks: Improvement badblocks_set() for handling multiple ranges

2020-12-03 Thread Coly Li
Recently I received a bug report that current badblocks code does not properly handle multiple ranges. For example, badblocks_set(bb, 32, 1, true); badblocks_set(bb, 34, 1, true); badblocks_set(bb, 36, 1, true); badblocks_set(bb, 32, 12, true); Then indeed

[PATCH v4 1/2] fpga: dfl: refactor cci_enumerate_feature_devs()

2020-12-03 Thread matthew . gerlach
From: Matthew Gerlach In preparation of looking for dfls based on a vendor specific pci capability, move the code for the default method of finding the first dfl at offset 0 of Bar 0 to its own function. Signed-off-by: Matthew Gerlach Acked-by: Wu Hao --- v4: add comment squash local

Re: [PATCH v2] lib: stackdepot: Add support to configure STACK_HASH_SIZE

2020-12-03 Thread Vincenzo Frascino
ASAN. >>> >>> .config: >>> https://cailca.coding.net/public/linux/mm/git/files/master/x86.config >>> https://cailca.coding.net/public/linux/mm/git/files/master/arm64.config >> >> Vincenzo, Catalin, looks like this is the cause of the crash you >&g

[tip: x86/urgent] x86/platform/uv: Fix UV4 hub revision adjustment

2020-12-03 Thread tip-bot2 for Mike Travis
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 8dcc0e19dfbd73ad6b3172924d6da8f7f3f8b3b0 Gitweb: https://git.kernel.org/tip/8dcc0e19dfbd73ad6b3172924d6da8f7f3f8b3b0 Author:Mike Travis AuthorDate:Thu, 03 Dec 2020 09:22:52 -06:00

Re: [PATCH v3 19/19] vdpa: split vdpasim to core and net modules

2020-12-03 Thread Randy Dunlap
Hi, On 12/3/20 9:05 AM, Stefano Garzarella wrote: > diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig > index 2c892e890b9e..b0f91ad8eb47 100644 > --- a/drivers/vdpa/Kconfig > +++ b/drivers/vdpa/Kconfig > @@ -9,15 +9,20 @@ menuconfig VDPA > if VDPA > > config VDPA_SIM > - tristate

Re: [PATCH v4 00/16] Overhaul multi-page lookups for THP

2020-12-03 Thread Marek Szyprowski
t;> Author: Matthew Wilcox (Oracle) >> Date:   Tue Nov 17 10:45:18 2020 -0500 >> >> fix mm-truncateshmem-handle-truncates-that-split-thps.patch > > This patch landed in todays linux-next (20201203) as commit > 8678b27f4b8b ("8678b27f4b8bfc130a13eb9e9f2717

Re: [PATCH] drivers: usb: storage: prefer pr_*() macros over bare printk()

2020-12-03 Thread Joe Perches
On Thu, 2020-12-03 at 15:11 +0100, Enrico Weigelt, metux IT consult wrote: > pr_*() printing helpers are preferred over using bare printk(). Please run your proposed patches through checkpatch --strict and see if any of its bleats are things that should be fixed at the same time. For this patch:

Re: [PATCH v5] mm: Optional full ASLR for mmap(), mremap(), vdso and stack

2020-12-03 Thread Florian Weimer
* Andy Lutomirski: > If you want a 4GB allocation to succeed, you can only divide the > address space into 32k fragments. Or, a little more precisely, if you > want a randomly selected 4GB region to be empty, any other allocation > has a 1/32k chance of being in the way. (Rough numbers — I’m

Re: [PATCH v2 0/6] aarch64: avoid mprotect(PROT_BTI|PROT_EXEC) [BZ #26831]

2020-12-03 Thread Catalin Marinas
Hi Szabolcs, On Fri, Nov 27, 2020 at 01:19:16PM +, Szabolcs Nagy wrote: > This is v2 of > https://sourceware.org/pipermail/libc-alpha/2020-November/119305.html > > To enable BTI support, re-mmap executable segments instead of > mprotecting them in case mprotect is seccomp filtered. > > I

[PATCH v12 0/3] Add trusted_for(2) (was O_MAYEXEC)

2020-12-03 Thread Mickaël Salaün
Hi, This patch series is a rebase on v5.10-rc6 . Can you please consider to merge this into the tree? Overview The final goal of this patch series is to enable the kernel to be a global policy manager by entrusting processes with access control at their level. To reach this goal, two

[PATCH v12 1/3] fs: Add trusted_for(2) syscall implementation and related sysctl

2020-12-03 Thread Mickaël Salaün
From: Mickaël Salaün The trusted_for() syscall enables user space tasks to check that files are trusted to be executed or interpreted by user space. This may allow script interpreters to check execution permission before reading commands from a file, or dynamic linkers to allow shared object

Re: [PATCH] rtc: adapt allowed RTC update error

2020-12-03 Thread Alexandre Belloni
On 03/12/2020 16:39:21+0100, Thomas Gleixner wrote: > Alexandre, > > On Thu, Dec 03 2020 at 03:10, Alexandre Belloni wrote: > > On 03/12/2020 02:14:12+0100, Thomas Gleixner wrote: > >> That said, can somebody answer the one million dollar question which > >> problem is solved by all of this magic

[PATCH v12 2/3] arch: Wire up trusted_for(2)

2020-12-03 Thread Mickaël Salaün
From: Mickaël Salaün Wire up trusted_for(2) for all architectures. Cc: Al Viro Cc: Andrew Morton Cc: Arnd Bergmann Cc: Kees Cook Signed-off-by: Mickaël Salaün Reviewed-by: Thibaut Sautereau Acked-by: Geert Uytterhoeven --- Changes since v11: * Add Acked-by: Geert Uytterhoeven * Rebase

[PATCH v12 3/3] selftest/interpreter: Add tests for trusted_for(2) policies

2020-12-03 Thread Mickaël Salaün
From: Mickaël Salaün Test that checks performed by trusted_for(2) on file descriptors are consistent with noexec mount points and file execute permissions, according to the policy configured with the fs.trust_policy sysctl. Cc: Al Viro Cc: Arnd Bergmann Cc: Andrew Morton Cc: Kees Cook Cc:

Re: [PATCH 1/1] mm: compaction: avoid fast_isolate_around() to set pageblock_skip on reserved pages

2020-12-03 Thread Andrea Arcangeli
On Thu, Dec 03, 2020 at 12:51:07PM +0200, Mike Rapoport wrote: > On Thu, Dec 03, 2020 at 01:23:02AM -0500, Andrea Arcangeli wrote: > > 5) pfn 0 is the classical case where pfn 0 is in a reserved zone in > >memblock.reserve that doesn't overlap any memblock.memory zone. > > And, IMHO, this is

Re: [PATCH] mm/page_alloc: speeding up the iteration of max_order

2020-12-03 Thread Vlastimil Babka
On 12/2/20 1:18 PM, Muchun Song wrote: > When we free a page whose order is very close to MAX_ORDER and greater > than pageblock_order, it wastes some CPU cycles to increase max_order > to MAX_ORDER one by one and check the pageblock migratetype of that page But we have to do that. It's not the

Re: [PATCH] gcc-plugins: simplify GCC plugin-dev capability test

2020-12-03 Thread Linus Torvalds
On Thu, Dec 3, 2020 at 5:03 AM Masahiro Yamada wrote: > > Checking the existence of plugin-version.h is still needed to ensure > the plugin-dev package is installed. The test code is now small enough > to be embedded in scripts/gcc-plugins/Kconfig. Ack. I think the "plugin" directory name should

Re: [PATCH 1/1] KVM: x86: ignore SIPIs that are received while not in wait-for-sipi state

2020-12-03 Thread Paolo Bonzini
On 03/12/20 15:33, Maxim Levitsky wrote: In the commit 1c96dcceaeb3 ("KVM: x86: fix apic_accept_events vs check_nested_events"), we accidently started latching SIPIs that are received while the cpu is not waiting for them. This causes vCPUs to never enter a halted state. Fixes: 1c96dcceaeb3

Re: [PATCH v3 02/19] vdpa_sim: remove unnecessary headers inclusion

2020-12-03 Thread Randy Dunlap
On 12/3/20 9:04 AM, Stefano Garzarella wrote: > Some headers are not necessary, so let's remove them to do > some cleaning. > > Signed-off-by: Stefano Garzarella Hi, What makes you say that some of these are unnecessary? Please use Rule #1 from Documentation/process/submit-checklist.rst: 1)

Re: crypto: sun4i-ss: error with kmap

2020-12-03 Thread Corentin Labbe
On Wed, Dec 02, 2020 at 09:59:36PM +0100, Thomas Gleixner wrote: > On Wed, Dec 02 2020 at 20:55, Corentin Labbe wrote: > > On Tue, Dec 01, 2020 at 04:15:08PM +0100, Thomas Gleixner wrote: > > > > The result could be seen at http://kernel.montjoie.ovh/129768.log > > The log is 9Mb, but the ftrace

Re: [PATCH] selftests: kvm/set_memory_region_test: Fix race in move region test

2020-12-03 Thread Paolo Bonzini
On 02/12/20 21:35, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" The current memory region move test correctly handles the situation that the second (realigning) memslot move operation would temporarily trigger MMIO until it completes, however it does not handle the case in which the

Re: WARNING in sk_stream_kill_queues (5)

2020-12-03 Thread Marco Elver
On Thu, Dec 03, 2020 at 05:42PM +0100, Eric Dumazet wrote: > On Thu, Dec 3, 2020 at 5:34 PM Marco Elver wrote: > > > > On Thu, 3 Dec 2020 at 17:27, Eric Dumazet wrote: > > > On Thu, Dec 3, 2020 at 4:58 PM Marco Elver wrote: > > > > > > > > On Mon, Nov 30, 2020 at 12:40AM -0800, syzbot wrote: >

Re: [PATCH v5] mm: Optional full ASLR for mmap(), mremap(), vdso and stack

2020-12-03 Thread Andy Lutomirski
> On Dec 3, 2020, at 9:29 AM, Florian Weimer wrote: > > * Andy Lutomirski: > >> If you want a 4GB allocation to succeed, you can only divide the >> address space into 32k fragments. Or, a little more precisely, if you >> want a randomly selected 4GB region to be empty, any other allocation

[PATCH][next] wilc1000: remove redundant assignment to pointer vif

2020-12-03 Thread Colin King
From: Colin Ian King The assignment to pointer vif is redundant as the assigned value is never read, hence it can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/net/wireless/microchip/wilc1000/wlan.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH] habanalabs: preboot hard reset support

2020-12-03 Thread Oded Gabbay
From: Ofir Bitton FW hard reset capability indication is now moved to preboot stage. Driver will check if HW is dirty only after it validated preboot is up. If HW is dirty, driver will perform a hard reset according to the FW capability. In addition, FW defines a new message which driver need to

[PATCH 1/3] habanalabs: add comment for pll frequency ioctl opcode

2020-12-03 Thread Oded Gabbay
From: Alon Mizrahi Forgot to add the comment for the opcode when it was added. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- include/uapi/misc/habanalabs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/misc/habanalabs.h

[PATCH 2/3] habanalabs: fetch PSOC PLL frequency from F/W in goya

2020-12-03 Thread Oded Gabbay
From: Alon Mizrahi When the F/W security is enabled, goya needs to fetch the PSOC pll frequency through a dedicated interface Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/goya/goya.c | 61 ++--- 1 file

[PATCH 3/3] habanalabs: remove generic gaudi get_pll_freq function

2020-12-03 Thread Oded Gabbay
From: Alon Mizrahi As we only fetch the CPU_PLL frequency in gaudi, we don't need a generic get_pll_frequency function which takes a pll index as input Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/habanalabs_ioctl.c | 2 +-

[PATCH] drivers: acpi: add opt-out of Apple-specific property parsing

2020-12-03 Thread Enrico Weigelt, metux IT consult
Most x86 machines aren't Apple machines, especially VMs. Therefore allow opt-out, making the kernel a few KBs smaller, eg. for embedded or high-density VMs. Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/acpi/Kconfig| 9 + drivers/acpi/Makefile | 2 +-

Re: [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression

2020-12-03 Thread Linus Torvalds
On Wed, Dec 2, 2020 at 10:31 PM kernel test robot wrote: > > FYI, we noticed a -4.8% regression of will-it-scale.per_process_ops due to > commit: Ok, I guess that's bigger than expected, but the profile data does show how bad the indirect branches are. There's both a "direct" cost of them: >

Re: [PATCH v2] drivers: acpi: add opt-out of apple-specific property parsing

2020-12-03 Thread Enrico Weigelt, metux IT consult
On 02.12.20 18:51, Randy Dunlap wrote: Hi, >> +config ACPI_APPLE >> +bool "Apple ACPI properties support" >> +default y if X86 >> +help >> + Extraction of apple specific ACPI properties.> > Apple-specific ok, thanks. >> + >> + Say N if you're sure

Re: [PATCH] mm/page_isolation: do not isolate the max order page

2020-12-03 Thread David Hildenbrand
On 03.12.20 18:15, Vlastimil Babka wrote: > On 12/3/20 5:26 PM, David Hildenbrand wrote: >> On 03.12.20 01:03, Vlastimil Babka wrote: >>> On 12/2/20 1:21 PM, Muchun Song wrote: The max order page has no buddy page and never merge to other order. So isolating and then freeing it is

Re: [PATCH 2/2] hv_balloon: do adjust_managed_page_count() when ballooning/un-ballooning

2020-12-03 Thread Vitaly Kuznetsov
David Hildenbrand writes: > On 02.12.20 17:12, Vitaly Kuznetsov wrote: >> Unlike virtio_balloon/virtio_mem/xen balloon drivers, Hyper-V balloon driver >> does not adjust managed pages count when ballooning/un-ballooning and this >> leads >> to incorrect stats being reported, e.g. unexpected

Re: [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression

2020-12-03 Thread Jens Axboe
On 12/3/20 10:47 AM, Linus Torvalds wrote: > On Wed, Dec 2, 2020 at 10:31 PM kernel test robot > wrote: >> >> FYI, we noticed a -4.8% regression of will-it-scale.per_process_ops due to >> commit: > > Ok, I guess that's bigger than expected, but the profile data does > show how bad the indirect

Re: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support

2020-12-03 Thread Vladimir Oltean
Hi Maxim, On Thu, Dec 03, 2020 at 08:12:19PM +0300, Максим Киселёв wrote: > From: Maxim Kiselev > Date: Thu, 3 Dec 2020 18:56:12 +0300 > Subject: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support > > This patch allows use of GPIO for the chip select. > Because dSPI controller can't send

Re: [PATCH 2/2] hv_balloon: do adjust_managed_page_count() when ballooning/un-ballooning

2020-12-03 Thread David Hildenbrand
On 03.12.20 18:49, Vitaly Kuznetsov wrote: > David Hildenbrand writes: > >> On 02.12.20 17:12, Vitaly Kuznetsov wrote: >>> Unlike virtio_balloon/virtio_mem/xen balloon drivers, Hyper-V balloon driver >>> does not adjust managed pages count when ballooning/un-ballooning and this >>> leads >>> to

Re: [PATCH 04/10] sched/fair: Return an idle cpu if one is found after a failed search for an idle core

2020-12-03 Thread Mel Gorman
On Thu, Dec 03, 2020 at 05:35:29PM +0100, Vincent Guittot wrote: > > index fc48cc99b03d..845bc0cd9158 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -6066,6 +6066,7 @@ void __update_idle_core(struct rq *rq) > > */ > > static int select_idle_core(struct task_struct *p,

<    7   8   9   10   11   12   13   14   15   16   >