Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-04 Thread Zhangfei Gao
On 2020/6/2 上午1:41, Bjorn Helgaas wrote: On Thu, May 28, 2020 at 09:33:44AM +0200, Joerg Roedel wrote: On Wed, May 27, 2020 at 01:18:42PM -0500, Bjorn Helgaas wrote: Is this slowdown significant? We already iterate over every device when applying PCI_FIXUP_FINAL quirks, so if we used the ex

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-06-04 Thread Vlastimil Babka
On 6/1/20 10:44 PM, Johannes Weiner wrote: > From a8faceabc1454dfd878caee2a8422493d937a394 Mon Sep 17 00:00:00 2001 > From: Johannes Weiner > Date: Mon, 1 Jun 2020 14:04:09 -0400 > Subject: [PATCH] mm: workingset: let cache workingset challenge anon fix Looks like the whole series is now in mainl

Re: [patch V9 00/39] x86/entry: Rework leftovers (was part V)

2020-06-04 Thread Peter Zijlstra
On Thu, Jun 04, 2020 at 03:29:26PM +0200, Paolo Bonzini wrote: > On 04/06/20 15:25, Peter Zijlstra wrote: > > It being enabled through IA32_DEBUGCTL instead of through DR7 means that > > the current code doesn't disable it and this then means we can have > > nested #DB again. > > /me bangs head on

Re: [RFC PATCH 0/3] firmware: Add support for PSA FF-A interface

2020-06-04 Thread Will Deacon
Hi Sudeep, [+Fuad, Andrew and Ard] (To other interested readers: if you haven't seen it, the FF-A spec is here: https://static.docs.arm.com/den0077/a/DEN0077A_PSA_Firmware_Framework_Arm_v8-A_1.0_EAC.pdf since this discussion makes no sense without that, and a tiny bit of sense with it. It used

[PATCH] mm/memory_hotplug: fix default_zone_for_pfn() to include highmem zone range

2020-06-04 Thread Vamshi K Sthambamkadi
On x86_32, while onlining highmem sections, the func default_zone_for_pfn() defaults target zone to ZONE_NORMAL (movable_node_enabled = 0). Onlining of pages is successful, and these highmem pages are moved into zone_normal. As a consequence, these pages are treated as low mem, and page addresses

Re: [PATCH] regulator: mt6360: Add support for MT6360 regulator

2020-06-04 Thread Mark Brown
On Thu, Jun 04, 2020 at 03:06:27PM +0800, Gene Chen wrote: This looks nice and simple, a few fairly small comments below but high level it's basically fine. > --- /dev/null > +++ b/drivers/regulator/mt6360-regulator.c > @@ -0,0 +1,571 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyrigh

Re: [PATCH 1/2] sched/uclamp: Add a new sysctl to control RT default boost value

2020-06-04 Thread Mel Gorman
On Wed, Jun 03, 2020 at 01:41:13PM +0100, Qais Yousef wrote: > > > netperf-udp > > > ./5.7.0-rc7./5.7.0-rc7 > > > ./5.7.0-rc7 > > > without-clamp with-clamp > > > with-clamp-tskgrp > > > > > > H

Re: [PATCH] rcu: Stop shrinker loop

2020-06-04 Thread Uladzislau Rezki
On Thu, Jun 04, 2020 at 12:23:20PM +0200, Peter Enderborg wrote: > The count and scan can be separated in time. It is a fair chance > that all work is already done when the scan starts. It > then might retry. This is can be avoided with returning SHRINK_STOP. > > Signed-off-by: Peter Enderborg >

Re: [PATCH v4 0/7] kcov: collect coverage from usb soft interrupts

2020-06-04 Thread Andrey Konovalov
On Thu, Mar 26, 2020 at 3:44 PM Andrey Konovalov wrote: > > This patchset extends kcov to allow collecting coverage from soft > interrupts and then uses the new functionality to collect coverage from > USB code. > > Any subsystem that uses softirqs (e.g. timers) can make use of this in > the futur

Re: [PATCH v2 4.19] tcp: fix TCP socks unreleased in BBR mode

2020-06-04 Thread Jason Xing
On Thu, Jun 4, 2020 at 9:10 PM Eric Dumazet wrote: > > On Thu, Jun 4, 2020 at 2:01 AM wrote: > > > > From: Jason Xing > > > > When using BBR mode, too many tcp socks cannot be released because of > > duplicate use of the sock_hold() in the manner of tcp_internal_pacing() > > when RTO happens. Th

[PATCH v10 6/8] tpm: tpm_tis: verify TPM_STS register is valid after locality request

2020-06-04 Thread amirmizi6
From: Amir Mizinski Issue could result when the TPM does not update TPM_STS register after a locality request (TPM_STS Initial value = 0xFF) and a TPM_STS register read occurs (tpm_tis_status(chip)). Checking the next condition("if ((status & TPM_STS_COMMAND_READY) == 0)"), the status will be at

[PATCH v10 2/8] tpm: tpm_tis: Fix expected bit handling and send all bytes in one shot without last byte in exception

2020-06-04 Thread amirmizi6
From: Amir Mizinski Detected the following incorrect implementation of the send command: polling on the TPM_STS.stsValid field followed by checking the TPM_STS.expect field only once. Since TPM_STS.stsValid represents the TPM_STS.expect validity, both fields should be polled at the same time. Th

[PATCH v10 4/8] tpm: tpm_tis: Rewrite "tpm_tis_req_canceled()"

2020-06-04 Thread amirmizi6
From: Amir Mizinski Using this function while reading/writing data resulted in an aborted operation. After investigating the issue according to the TCG TPM Profile (PTP) Specifications, I found that "request to cancel" should occur only if TPM_STS.commandReady bit is lit. Note that i couldn't fin

[PATCH v10 1/8] tpm: Make read{16, 32}() and write32() in tpm_tis_phy_ops optional

2020-06-04 Thread amirmizi6
From: Amir Mizinski Only tpm_tis can use memory-mapped I/O, which is truly mapped into the kernel's memory space. Therefore, using ioread16/ioread32/iowrite32 turns into a straightforward pointer dereference. Every other driver requires more complicated operations to read more than one byte at a

[PATCH v10 5/8] tpm: Handle an exception for TPM Firmware Update mode.

2020-06-04 Thread amirmizi6
From: Amir Mizinski An extra precaution for TPM Firmware Update Mode. For example if TPM power was cut while in Firmware update, platform should ignore "selftest" failure and skip TPM initialization sequence. Suggested-by: Benoit Houyere Signed-off-by: Amir Mizinski --- drivers/char/tpm/tpm2-

[PATCH v10 7/8] tpm: Add YAML schema for TPM TIS I2C options

2020-06-04 Thread amirmizi6
From: Amir Mizinski Added a YAML schema to support tpm tis i2c related dt-bindings for the I2c PTP based physical layer. This patch adds the documentation for corresponding device tree bindings of I2C based Physical TPM. Refer to the 'I2C Interface Definition' section in 'TCG PC Client PlatformT

[PATCH v10 8/8] tpm: tpm_tis: add tpm_tis_i2c driver

2020-06-04 Thread amirmizi6
From: Amir Mizinski Implements the functionality needed to communicate with an I2C TPM according to the TCG TPM I2C Interface Specification. Signed-off-by: Amir Mizinski Tested-by: Eddie James Tested-by: Joel Stanley --- drivers/char/tpm/Kconfig | 12 ++ drivers/char/tpm/Makefile

[PATCH v10 0/8] Add tpm i2c ptp driver

2020-06-04 Thread amirmizi6
From: Amir Mizinski This patch set adds support for TPM devices that implement the I2C. Interface defined by TCG PTP specification: https://trustedcomputinggroup.org/wp-content/uploads/TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22.pdf The driver was tested on Raspberry-Pie 3, using Nuvoto

[PATCH v10 3/8] tpm: tpm_tis: Add retry in case of protocol failure or data integrity (on I2C only) failure.

2020-06-04 Thread amirmizi6
From: Amir Mizinski The FIFO protocol described in the TCG PC Client Device Driver Design Principles for TPM 2.0 advises retrying sending a command or receiving a response using the FIFO protocol in case of any error in the protocol. Add a retry mechanism on any protocol error. In addition, in c

Re: [PATCH] tpm_tis_spi: Don't send anything during flow control

2020-06-04 Thread Doug Anderson
Hi, On Thu, Jun 4, 2020 at 2:40 AM Jarkko Sakkinen wrote: > > On Mon, Jun 01, 2020 at 03:54:03PM -0700, Doug Anderson wrote: > > Does that answer your question, or were you worried about us needing > > to init iobuf[0] to 0 in some other case? > > > > -Doug > > No, but it should be treated as a b

[PATCH v4] leds-bcm6328: support second hw blinking interval

2020-06-04 Thread Álvaro Fernández Rojas
Add support for both configurable HW blinking intervals. Signed-off-by: Álvaro Fernández Rojas --- v4: improve code documentation and use blink instead of intervals, which should make the code much more clear to understand v3: add code documentation v2: remove LED from the other blinking

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-04 Thread Willem de Bruijn
On Thu, Jun 4, 2020 at 5:47 AM Victor Julien wrote: > > On 02-06-2020 22:18, Willem de Bruijn wrote: > > On Tue, Jun 2, 2020 at 4:05 PM Victor Julien wrote: > >> > >> On 02-06-2020 21:38, Willem de Bruijn wrote: > >>> On Tue, Jun 2, 2020 at 3:22 PM Victor Julien wrote: > > On 02-06-202

Re: [PATCH] leds: mt6360: Add LED driver for MT6360

2020-06-04 Thread Pavel Machek
Hi! > + > +#define MT6360_LED_DESC(_id) { > \ > + .cdev = { \ > + .name = "mt6360_isink" #_id,\ > + .max_brightness = MT6360_SINKCUR_MAX##_id

[PATCH 2/5] gcc-plugins/stackleak: Use asm instrumentation to avoid useless register saving

2020-06-04 Thread Alexander Popov
The kernel code instrumentation in stackleak gcc plugin works in two stages. At first, stack tracking is added to GIMPLE representation of every function (except some special cases). And later, when stack frame size info is available, stack tracking is removed from the RTL representation of the fun

[PATCH 4/5] gcc-plugins/stackleak: Don't instrument itself

2020-06-04 Thread Alexander Popov
There is no need to try instrumenting functions in kernel/stackleak.c. Otherwise that can cause issues if the cleanup pass of stackleak gcc plugin is disabled. Signed-off-by: Alexander Popov --- kernel/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/Makefile b/kernel/Makefile

[PATCH 3/5] gcc-plugins/stackleak: Add 'verbose' plugin parameter

2020-06-04 Thread Alexander Popov
Add 'verbose' plugin parameter for stackleak gcc plugin. It can be used for printing additional info about the kernel code instrumentation. For using it add the following to scripts/Makefile.gcc-plugins: gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STACKLEAK) \ += -fplugin-arg-stackleak_plugin-verb

[PATCH 0/5] Improvements of the stackleak gcc plugin

2020-06-04 Thread Alexander Popov
In this patch series I collected various improvements of the stackleak gcc plugin. The first patch excludes alloca() from the stackleak instrumentation logic to make it simpler. The second patch is the main improvement. It eliminates an unwanted side-effect of kernel code instrumentation. This pa

[PATCH 5/5] gcc-plugins/stackleak: Don't instrument vgettimeofday.c in arm64 VDSO

2020-06-04 Thread Alexander Popov
Don't try instrumenting functions in arch/arm64/kernel/vdso/vgettimeofday.c. Otherwise that can cause issues if the cleanup pass of stackleak gcc plugin is disabled. Signed-off-by: Alexander Popov --- arch/arm64/kernel/vdso/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -

Re: [PATCH V2] mm/vmstat: Add events for THP migration without split

2020-06-04 Thread Zi Yan
On 4 Jun 2020, at 7:34, Matthew Wilcox wrote: > On Thu, Jun 04, 2020 at 09:30:45AM +0530, Anshuman Khandual wrote: >> Add the following new VM events which will help in validating THP migration >> without split. Statistics reported through these new events will help in >> performance debugging. >>

[PATCH 1/5] gcc-plugins/stackleak: Exclude alloca() from the instrumentation logic

2020-06-04 Thread Alexander Popov
Some time ago Variable Length Arrays (VLA) were removed from the kernel. The kernel is built with '-Wvla'. Let's exclude alloca() from the instrumentation logic and make it simpler. The build-time assertion against alloca() is added instead. Unfortunately, for that assertion we can't simply check

Re: WARNING in kvm_inject_emulated_page_fault

2020-06-04 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 04/06/20 12:53, Vitaly Kuznetsov wrote: >> Exception we're trying to inject comes from >> >> nested_vmx_get_vmptr() >> kvm_read_guest_virt() >>kvm_read_guest_virt_helper() >> vcpu->arch.walk_mmu->gva_to_gpa() >> >> but it seems it is only set if GVA to GPA

Re: [PATCH] leds: mt6360: Add LED driver for MT6360

2020-06-04 Thread Pavel Machek
Hi! > diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig > index c664d84..c47be91 100644 > --- a/drivers/leds/Kconfig > +++ b/drivers/leds/Kconfig > @@ -229,6 +229,17 @@ config LEDS_MT6323 > This option enables support for on-chip LED drivers found on > Mediatek MT6323 PMIC.

Re: [PATCH 0/6] arm64: dts: qcom: smmu/USB nodes and HDK855/HDK865 dts

2020-06-04 Thread Manivannan Sadhasivam
Hi, On Sat, May 23, 2020 at 10:38:06PM -0400, Jonathan Marek wrote: > Add dts nodes for apps_smmu and USB for both sm8150 and sm8250. > I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB

Re: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy

2020-06-04 Thread Zhou Wang
On 2020/6/4 14:50, Herbert Xu wrote: > On Thu, Jun 04, 2020 at 02:44:16PM +0800, Zhangfei Gao wrote: >> >> I think it is fine. >> 1. Currently the name size is 64, bigger enough. >> Simply grep in driver name, 64 should be enough. >> We can make it larger when there is a request. >> 2. it does not

[PATCH 1/5] media: videodev2: add Compressed Framebuffer pixel formats

2020-06-04 Thread Neil Armstrong
From: Maxime Jourdan Add two generic Compressed Framebuffer pixel formats to be used with a modifier when imported back in another subsystem like DRM/KMS. These pixel formats represents generic 8bits and 10bits compressed buffers with a vendor specific layout. These are aligned with the DRM_FOR

[PATCH 2/5] media: meson: vdec: handle bitdepth on source change

2020-06-04 Thread Neil Armstrong
From: Maxime Jourdan In order to handle Compressed Framebuffer support, we need to handle the switch between 8bit and 10bit frame output. This handles the bitdepth in the codec amvdec_src_change() call to handle a source change/decode resume when the stream bitdepth changes. Signed-off-by: Maxi

[PATCH 4/5] media: meson: vdec: add support for compressed output for VP9 decoder

2020-06-04 Thread Neil Armstrong
From: Maxime Jourdan Add the necessary changes to decode VP9 8bit and 10bit streams into compressed buffers to be imported back into DRM/KMS using a modifier. On GXL/GXM platforms, the VP9 decoder will output a basic Framebuffer Compressed layout, with a memory saving option when decoding 8bit t

[PATCH 3/5] media: meson: vdec: update compressed buffer helpers

2020-06-04 Thread Neil Armstrong
From: Maxime Jourdan The actual compressed buffer helpers were very basic and only used to enabled downsampling when decoding a 10bit stream. Update and rename these helpers to handle the complete compressed buffer output buffer size and alignment for 8bit and 10bit streams. Signed-off-by: Maxi

[PATCH 5/5] media: meson: vdec: handle compressed output pixel format negociation with consumer

2020-06-04 Thread Neil Armstrong
From: Maxime Jourdan Add the necessary to add support for negociating the compressed buffer pixel format with the V4L2 M2M consumer, and allocating the right buffers in this case. Until a proper mechanism exists to pass a modifier along the pixel format, only the generic V4L2_PIX_FMT_YUV420_8BIT

[PATCH 0/5] media: meson: vdec: Add support for compressed framebuffer

2020-06-04 Thread Neil Armstrong
This patchset add support for compressed framebuffer while decoding VP9 8bit and 10bit streams. First, it adds two generic Compressed Framebuffer pixel formats to be used with a modifier when imported back in another subsystem like DRM/KMS. These are aligned with the DRM_FORMAT_YUV420_8BIT and DR

Re: [PATCH V3 2/8] usb: gadget: tegra-xudc: Add vbus_draw support

2020-06-04 Thread Thierry Reding
On Thu, May 14, 2020 at 11:52:37AM +0530, Nagarjuna Kristam wrote: > Register vbus_draw to gadget ops and update corresponding vbus > draw current to usb_phy. > > Signed-off-by: Nagarjuna Kristam > --- > V3: > - Propogated usb_phy->set_power error to vbus_draw caller. > --- > V2: > - Patch re-b

Re: [PATCH V3 5/8] phy: tegra: xusb: Add soc ops API to enable UTMI PAD protection

2020-06-04 Thread Thierry Reding
On Thu, May 14, 2020 at 11:52:40AM +0530, Nagarjuna Kristam wrote: > When USB charger is enabled, UTMI PAD needs to be protected according > to the direction and current level. Add support for the same on Tegra210 > and Tegra186. > > Signed-off-by: Nagarjuna Kristam > --- > V3: > - Alligned func

Re: [PATCH V3 6/8] phy: tegra: xusb: Add support for charger detect

2020-06-04 Thread Thierry Reding
On Thu, May 14, 2020 at 11:52:41AM +0530, Nagarjuna Kristam wrote: > Perform charger-detect operation if corresponding dt property is enabled. > Update usb-phy with the detected charger state and max current values. > Register charger-detect API's of usb-phy to provide needed functionalities. > >

Re: [PATCH 5/5] gcc-plugins/stackleak: Don't instrument vgettimeofday.c in arm64 VDSO

2020-06-04 Thread Will Deacon
On Thu, Jun 04, 2020 at 04:49:57PM +0300, Alexander Popov wrote: > Don't try instrumenting functions in arch/arm64/kernel/vdso/vgettimeofday.c. > Otherwise that can cause issues if the cleanup pass of stackleak gcc plugin > is disabled. > > Signed-off-by: Alexander Popov > --- > arch/arm64/kerne

[PATCH v1] Bluetooth: hci_qca: Fix double free during SSR timeout

2020-06-04 Thread Venkata Lakshmi Narayana Gubba
Due to race conditions between qca_hw_error and qca_controller_memdump during SSR timeout,the same pointer is freed twice. Which results to double free error. Now a lock is acquired while SSR state moved to timeout. Signed-off-by: Venkata Lakshmi Narayana Gubba --- drivers/bluetooth/hci_qca.c |

[PATCH v5] leds-bcm6328: support second hw blinking interval

2020-06-04 Thread Álvaro Fernández Rojas
Right now the driver uses only 3 LED modes: 0: On 1: HW Blinking (Interval 1) 3: Off However, the controller supports a second HW blinking interval, which results in 4 possible LED modes: 0: On 1: HW Blinking (Interval 1) 2: HW Blinking (Interval 2) 3: Off Signed-off-by: Álvaro Fernández Rojas -

Re: [PATCH V3 5/8] phy: tegra: xusb: Add soc ops API to enable UTMI PAD protection

2020-06-04 Thread Thierry Reding
On Mon, May 18, 2020 at 05:54:03PM +0530, Kishon Vijay Abraham I wrote: > Thierry, > > On 5/14/2020 11:52 AM, Nagarjuna Kristam wrote: > > When USB charger is enabled, UTMI PAD needs to be protected according > > to the direction and current level. Add support for the same on Tegra210 > > and Tegr

Re: linux-next: build failure on powerpc 8xx with 16k pages

2020-06-04 Thread Christophe Leroy
On 06/04/2020 11:17 AM, Will Deacon wrote: Hi, [+Peter] On Thu, Jun 04, 2020 at 10:48:03AM +, Christophe Leroy wrote: Using mpc885_ads_defconfig with CONFIG_PPC_16K_PAGES instead of CONFIG_PPC_4K_PAGES, getting the following build failure: CC mm/gup.o In file included from ./inc

Re: [PATCH v5] leds-bcm6328: support second hw blinking interval

2020-06-04 Thread Pavel Machek
On Thu 2020-06-04 15:59:05, Álvaro Fernández Rojas wrote: > Right now the driver uses only 3 LED modes: > 0: On > 1: HW Blinking (Interval 1) > 3: Off > > However, the controller supports a second HW blinking interval, which results > in 4 possible LED modes: > 0: On > 1: HW Blinking (Interval 1)

Re: [PATCH 1/5] gcc-plugins/stackleak: Exclude alloca() from the instrumentation logic

2020-06-04 Thread Jann Horn
On Thu, Jun 4, 2020 at 3:51 PM Alexander Popov wrote: > Some time ago Variable Length Arrays (VLA) were removed from the kernel. > The kernel is built with '-Wvla'. Let's exclude alloca() from the > instrumentation logic and make it simpler. The build-time assertion > against alloca() is added ins

Re: [PATCH -tip] kcov: Make runtime functions noinstr-compatible

2020-06-04 Thread Andrey Konovalov
On Thu, Jun 4, 2020 at 1:09 PM Peter Zijlstra wrote: > > On Thu, Jun 04, 2020 at 11:50:57AM +0200, Marco Elver wrote: > > The KCOV runtime is very minimal, only updating a field in 'current', > > and none of __sanitizer_cov-functions generates reports nor calls any > > other external functions. >

Re: [PATCH 1/1] nvme-fcloop: verify wwnn and wwpn format

2020-06-04 Thread Hannes Reinecke
On 6/4/20 8:54 AM, Chaitanya Kulkarni wrote: On 6/3/20 11:46 PM, Dongli Zhang wrote: May I get feedback for this? For the first time I use fcloop, I set: # echo "wwnn=0x3,wwpn=0x1" > /sys/class/fcloop/ctl/add_target_port However, I would not be able to move forward if I use "0x3" or "0x1" for

[PATCH] x86/stackprotector: Pre-initialize canary for secondary CPUs

2020-06-04 Thread Brian Gerst
The idle tasks created for each secondary CPU already have a random stack canary generated by fork(). Copy the canary to the percpu variable before starting the secondary CPU which removes the need to call boot_init_stack_canary(). Signed-off-by: Brian Gerst --- arch/x86/include/asm/stackprotec

Re: [PATCH] ASoC: fsl-asoc-card: Defer probe when fail to find codec device

2020-06-04 Thread Mark Brown
On Thu, 4 Jun 2020 14:25:30 +0800, Shengjiu Wang wrote: > Defer probe when fail to find codec device, because the codec > device maybe probed later than machine driver. Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl-asoc-card: De

Re: [PATCH 2/3] ARM: dts: bcm2711: Update SPI nodes compatible strings

2020-06-04 Thread Mark Brown
On Thu, Jun 04, 2020 at 01:21:12PM +0200, Lukas Wunner wrote: > On Thu, Jun 04, 2020 at 12:13:25PM +0100, Mark Brown wrote: > > Regardless of what's going on with the interrupts the compatible string > > should reflect the IP version so unless for some reason someone taped > > out two different ve

Re: [PATCH 0/6] arm64: dts: qcom: smmu/USB nodes and HDK855/HDK865 dts

2020-06-04 Thread Jonathan Marek
On 6/4/20 9:52 AM, Manivannan Sadhasivam wrote: Hi, On Sat, May 23, 2020 at 10:38:06PM -0400, Jonathan Marek wrote: Add dts nodes for apps_smmu and USB for both sm8150 and sm8250. I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of

Re: [v2 PATCH] ASoC: max98390: Fix potential crash during param fw loading

2020-06-04 Thread Mark Brown
On Thu, 4 Jun 2020 14:47:31 +0900, Steve Lee wrote: > malformed firmware file can cause out-of-bound access and crash > during dsm_param bin loading. > - add MIN/MAX param size to avoid out-of-bound access. > - read start addr and size of param and check bound. > - add condition that fw->si

[PATCH] coccinelle: api: add kzfree script

2020-06-04 Thread Denis Efremov
Check for memset() with 0 followed by kfree(). Signed-off-by: Denis Efremov --- Patches: 1. kzfree in drivers/w1 https://lkml.org/lkml/2020/6/4/438 2. kzfree in drivers/iommu/ https://lkml.org/lkml/2020/6/4/421 3. kzfree in drivers/scsi/ https://lkml.org/lkml/2020/6/4/442 scripts/coccinelle/api

Re: [PATCH v3 31/75] x86/head/64: Install boot GDT

2020-06-04 Thread Borislav Petkov
On Thu, Jun 04, 2020 at 01:48:21PM +0200, Joerg Roedel wrote: > Yeah, seems to work. Updated patch attached. Looks nice, thanks! -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH 5/5] gcc-plugins/stackleak: Don't instrument vgettimeofday.c in arm64 VDSO

2020-06-04 Thread Jann Horn
On Thu, Jun 4, 2020 at 3:58 PM Will Deacon wrote: > On Thu, Jun 04, 2020 at 04:49:57PM +0300, Alexander Popov wrote: > > Don't try instrumenting functions in arch/arm64/kernel/vdso/vgettimeofday.c. > > Otherwise that can cause issues if the cleanup pass of stackleak gcc plugin > > is disabled. > >

Re: [PATCH 2/9] rcu: Fixup noinstr warnings

2020-06-04 Thread Paul E. McKenney
On Thu, Jun 04, 2020 at 08:02:31AM +0200, Marco Elver wrote: > On Thu, 4 Jun 2020 at 05:34, Paul E. McKenney wrote: > > > > On Wed, Jun 03, 2020 at 07:13:20PM +0200, Peter Zijlstra wrote: > > > On Wed, Jun 03, 2020 at 09:46:00AM -0700, Paul E. McKenney wrote: > > > > > > > > --- a/kernel/rcu/tree.

Re: [PATCH] coccinelle: api: add kzfree script

2020-06-04 Thread Julia Lawall
On Thu, 4 Jun 2020, Denis Efremov wrote: > Check for memset() with 0 followed by kfree(). > > Signed-off-by: Denis Efremov > --- > Patches: > 1. kzfree in drivers/w1 https://lkml.org/lkml/2020/6/4/438 > 2. kzfree in drivers/iommu/ https://lkml.org/lkml/2020/6/4/421 > 3. kzfree in drivers/scsi/

[PATCH] vgacon: fix a UAF in do_update_region()

2020-06-04 Thread Yang Yingliang
I got a UAF report in do_update_region() when I doing fuzz test. [ 51.161905] BUG: KASAN: use-after-free in do_update_region+0x579/0x600 [ 51.161918] Read of size 2 at addr 88800010 by task test/295 [ 51.161957] CPU: 2 PID: 295 Comm: test Not tainted 5.7.0+ #975 [ 51.161969] Hardw

Re: [PATCH 2/9] rcu: Fixup noinstr warnings

2020-06-04 Thread Paul E. McKenney
On Thu, Jun 04, 2020 at 10:05:12AM +0200, Peter Zijlstra wrote: > On Wed, Jun 03, 2020 at 08:34:09PM -0700, Paul E. McKenney wrote: > > On Wed, Jun 03, 2020 at 07:13:20PM +0200, Peter Zijlstra wrote: > > > On Wed, Jun 03, 2020 at 09:46:00AM -0700, Paul E. McKenney wrote: > > > > > > @@ -313,7 +313

Re: [PATCH v4 9/9] remoteproc: Properly handle firmware name when attaching

2020-06-04 Thread Arnaud POULIQUEN
Hi Mathieu, On 6/1/20 7:51 PM, Mathieu Poirier wrote: > This patch prevents the firmware image name from being displayed when > the remoteproc core is attaching to a remote processor. This is needed > needed since there is no guarantee about the nature of the firmware > image that is loaded by the

Re: [PATCH v2] gpiolib: split character device into gpiolib-cdev

2020-06-04 Thread Kent Gibson
On Thu, Jun 04, 2020 at 02:04:08PM +0200, Bartosz Golaszewski wrote: > wt., 2 cze 2020 o 16:11 Kent Gibson napisał(a): > > > > Split the cdev specific functionality out of gpiolib.c and into > > gpiolib-cdev.c. This improves the readability and maintainability of both > > the cdev and core gpiolib

Re: [PATCHES] uaccess hpsa

2020-06-04 Thread Martin K. Petersen
Al, >> I don't have anything queued for 5.8 for hpsa so there shouldn't be any >> conflicts if it goes through vfs.git. But I'm perfectly happy to take >> the changes through SCSI if that's your preference. > > Up to you; if you need a pull request, just say so. OK, I queued these up for 5.8.

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-04 Thread Guenter Roeck
On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote: > The recent commit: 90b5363acd47 ("sched: Clean up scheduler_ipi()") > got smp_call_function_single_async() subtly wrong. Even though it will > return -EBUSY when trying to re-use a csd, that condition is not > atomic and still requir

Re: [PATCH 5/5] gcc-plugins/stackleak: Don't instrument vgettimeofday.c in arm64 VDSO

2020-06-04 Thread Alexander Popov
On 04.06.2020 17:14, Jann Horn wrote: > On Thu, Jun 4, 2020 at 3:58 PM Will Deacon wrote: >> On Thu, Jun 04, 2020 at 04:49:57PM +0300, Alexander Popov wrote: >>> Don't try instrumenting functions in arch/arm64/kernel/vdso/vgettimeofday.c. >>> Otherwise that can cause issues if the cleanup pass of

general protection fault in ima_free_template_entry

2020-06-04 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:e7b08814 Add linux-next specific files for 20200529 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=12d7b39110 kernel config: https://syzkaller.appspot.com/x/.config?x=1e62421a5de6da96 dashboard

Re: [PATCH v4 0/9] remoteproc: Add support for attaching with rproc

2020-06-04 Thread Arnaud POULIQUEN
Hi Mathieu, On 6/1/20 7:51 PM, Mathieu Poirier wrote: > This fourth iteration implements a solution that is fairly different from > what was proposed in V3 and earlier versions. Three aspects have been > revisited: > > 1) Only the scenario where the remoteproc core is attaching to the remote >

Re: [PATCH -tip] kcov: Make runtime functions noinstr-compatible

2020-06-04 Thread Marco Elver
On Thu, 4 Jun 2020 at 16:03, Andrey Konovalov wrote: > > On Thu, Jun 4, 2020 at 1:09 PM Peter Zijlstra wrote: > > > > On Thu, Jun 04, 2020 at 11:50:57AM +0200, Marco Elver wrote: > > > The KCOV runtime is very minimal, only updating a field in 'current', > > > and none of __sanitizer_cov-function

Re: [RFC PATCH] gpio: uapi: v2 proposal

2020-06-04 Thread Kent Gibson
On Thu, Jun 04, 2020 at 02:06:31PM +0200, Bartosz Golaszewski wrote: > śr., 27 maj 2020 o 07:58 Linus Walleij napisał(a): > > > > On Mon, May 25, 2020 at 4:19 PM Kent Gibson wrote: > > > > > > > +struct gpioline_config { > > > > > + __u8 default_values[GPIOLINES_MAX]; > > > > > > > > So 32

NVIDIA GP107 (137000a1) - acr: failed to load firmware

2020-06-04 Thread Zeno Davatz
Hi With Kernel 5.7 I am still getting this, while booting: ~> uname -a Linux zenogentoo 5.7.0 #80 SMP Thu Jun 4 16:10:03 CEST 2020 x86_64 Intel(R) Core(TM) i7 CPU 960 @ 3.20GHz GenuineIntel GNU/Linux ~> dmesg |grep nouveau [0.762872] nouveau :05:00.0: NVIDIA GP107 (137000a1) [0.875311

Re: [PATCH 5/5] gcc-plugins/stackleak: Don't instrument vgettimeofday.c in arm64 VDSO

2020-06-04 Thread Jann Horn
On Thu, Jun 4, 2020 at 4:21 PM Alexander Popov wrote: > On 04.06.2020 17:14, Jann Horn wrote: > > Maybe at some point we should replace exclusions based on > > GCC_PLUGINS_CFLAGS and KASAN_SANITIZE and UBSAN_SANITIZE and > > OBJECT_FILES_NON_STANDARD and so on with something more generic... > > so

Re: [PATCH 00/10] Remove uninitialized_var() macro

2020-06-04 Thread Kees Cook
On Thu, Jun 04, 2020 at 09:26:58AM +0200, Sedat Dilek wrote: > On Thu, Jun 4, 2020 at 5:33 AM Nathan Chancellor > wrote: > > > > On Wed, Jun 03, 2020 at 04:31:53PM -0700, Kees Cook wrote: > > > Using uninitialized_var() is dangerous as it papers over real bugs[1] > > > (or can in the future), and

[PATCH] KVM: nVMX: Inject #GP when nested_vmx_get_vmptr() fails to read guest memory

2020-06-04 Thread Vitaly Kuznetsov
Syzbot reports the following issue: WARNING: CPU: 0 PID: 6819 at arch/x86/kvm/x86.c:618 kvm_inject_emulated_page_fault+0x210/0x290 arch/x86/kvm/x86.c:618 ... Call Trace: ... RIP: 0010:kvm_inject_emulated_page_fault+0x210/0x290 arch/x86/kvm/x86.c:618 ... nested_vmx_get_vmptr+0x1f9/0x2a0 arch/x86/

Re: [PATCH 01/10] x86/mm/numa: Remove uninitialized_var() usage

2020-06-04 Thread Kees Cook
On Thu, Jun 04, 2020 at 09:58:07AM +0200, Thomas Gleixner wrote: > Kees Cook writes: > > -#ifdef NODE_NOT_IN_PAGE_FLAGS > > - pfn_align = node_map_pfn_alignment(); > > - if (pfn_align && pfn_align < PAGES_PER_SECTION) { > > - printk(KERN_WARNING "Node alignment %LuMB < min %LuMB, >

Re: [Nouveau] NVIDIA GP107 (137000a1) - acr: failed to load firmware

2020-06-04 Thread Ilia Mirkin
Starting with kernel 5.6, loading nouveau without firmware (for GPUs where it is required, such as yours) got broken. You are loading nouveau without firmware, so it fails. The firmware needs to be available to the kernel at the time of nouveau loading. Cheers, -ilia On Thu, Jun 4, 2020 at 1

Re: [PATCH -tip] kcov: Make runtime functions noinstr-compatible

2020-06-04 Thread Peter Zijlstra
On Thu, Jun 04, 2020 at 04:02:54PM +0200, Andrey Konovalov wrote: > > Now, luckily Joerg went and ripped out the vmalloc faults, let me check > > where those patches are... w00t, they're upstream in this merge window. > > Could you point me to those patches? git log 7f0a002b5a21302d9f4b29ba83c9

Re: [PATCH] mm/vmalloc: fix a typo in comment

2020-06-04 Thread David Hildenbrand
On 04.06.20 20:52, Jeongtae Park wrote: > There is a typo in comment, fix it. > "nother" -> "another" > > Signed-off-by: Jeongtae Park > Cc: Andrey Ryabinin > Cc: Christoph Hellwig > --- > mm/vmalloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/vmalloc.c b/mm/

[PATCH][next] RDMA/mlx5: remove duplicated assignment to resp.response_length

2020-06-04 Thread Colin King
From: Colin Ian King The assignment to resp.response_length is never read since it is being updated again on the next statement. The assignment is redundant so removed it. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/infiniband/hw/mlx5/qp.c | 2 -- 1 file chan

Re: linux-next: build failure on powerpc 8xx with 16k pages

2020-06-04 Thread Christophe Leroy
On 06/04/2020 12:00 PM, Peter Zijlstra wrote: On Thu, Jun 04, 2020 at 12:17:23PM +0100, Will Deacon wrote: Hi, [+Peter] On Thu, Jun 04, 2020 at 10:48:03AM +, Christophe Leroy wrote: Using mpc885_ads_defconfig with CONFIG_PPC_16K_PAGES instead of CONFIG_PPC_4K_PAGES, getting the followin

Re: [PATCH] KVM: nVMX: Inject #GP when nested_vmx_get_vmptr() fails to read guest memory

2020-06-04 Thread Paolo Bonzini
On 04/06/20 16:31, Vitaly Kuznetsov wrote: > Syzbot reports the following issue: > > WARNING: CPU: 0 PID: 6819 at arch/x86/kvm/x86.c:618 > kvm_inject_emulated_page_fault+0x210/0x290 arch/x86/kvm/x86.c:618 > ... > Call Trace: > ... > RIP: 0010:kvm_inject_emulated_page_fault+0x210/0x290 arch/x86/kv

BUG: using smp_processor_id() in preemptible code in debug_smp_processor_id

2020-06-04 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:065fcfd4 selftests: net: ip_defrag: ignore EPERM git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=15c3e51610 kernel config: https://syzkaller.appspot.com/x/.config?x=d89141553e61b775 dashboard link:

Re: [PATCH] pwm: Add missing "CONFIG_" prefix

2020-06-04 Thread Uwe Kleine-König
On Wed, Jun 03, 2020 at 03:40:56PM -0700, Kees Cook wrote: > The IS_ENABLED() use was missing the CONFIG_ prefix which would have > lead to skipping this code. > > Fixes: 3ad1f3a33286 ("pwm: Implement some checks for lowlevel drivers") > Signed-off-by: Kees Cook > --- > drivers/pwm/core.c | 2 +-

Re: [PATCH 5/5] gcc-plugins/stackleak: Don't instrument vgettimeofday.c in arm64 VDSO

2020-06-04 Thread Alexander Popov
On 04.06.2020 17:25, Jann Horn wrote: > On Thu, Jun 4, 2020 at 4:21 PM Alexander Popov wrote: >> On 04.06.2020 17:14, Jann Horn wrote: >>> Maybe at some point we should replace exclusions based on >>> GCC_PLUGINS_CFLAGS and KASAN_SANITIZE and UBSAN_SANITIZE and >>> OBJECT_FILES_NON_STANDARD and so

Re: [PATCH] checkpatch: Avoid missing typo suggestions

2020-06-04 Thread Maxim Uvarov
On Thu, 4 Jun 2020 at 10:29, Joe Perches wrote: > > On Thu, 2020-06-04 at 09:55 +0300, Maxim Uvarov wrote: > > On Thu, 4 Jun 2020 at 03:39, Joe Perches wrote: > > Hi Maxim. > > > > btw: My codespell dictionary file moved to > > > /usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt >

Re: [PATCH 30/30] KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE

2020-06-04 Thread Paolo Bonzini
Sorry I missed this. On 02/06/20 02:11, Krish Sadhukhan wrote: >> >> + >> +    /* SMM temporarily disables SVM, so we cannot be in guest mode.  */ >> +    if (is_smm(vcpu) && (kvm_state->flags & >> KVM_STATE_NESTED_GUEST_MODE)) >> +    return -EINVAL; >> + >> +    if (!(kvm_state->flags & KVM_

Re: [PATCH] mm/memory_hotplug: fix default_zone_for_pfn() to include highmem zone range

2020-06-04 Thread David Hildenbrand
On 04.06.20 15:39, Vamshi K Sthambamkadi wrote: > On x86_32, while onlining highmem sections, the func default_zone_for_pfn() > defaults target zone to ZONE_NORMAL (movable_node_enabled = 0). Onlining of > pages is successful, and these highmem pages are moved into zone_normal. > > As a consequenc

Re: 回复: Re: [RFC PATCH 0/8] dax: Add a dax-rmap tree to support reflink

2020-06-04 Thread Darrick J. Wong
On Thu, Jun 04, 2020 at 03:37:42PM +0800, Ruan Shiyang wrote: > > > On 2020/4/28 下午2:43, Dave Chinner wrote: > > On Tue, Apr 28, 2020 at 06:09:47AM +, Ruan, Shiyang wrote: > > > > > > 在 2020/4/27 20:28:36, "Matthew Wilcox" 写道: > > > > > > > On Mon, Apr 27, 2020 at 04:47:42PM +0800, Shiyang

Re: [PATCH] KVM: nVMX: Inject #GP when nested_vmx_get_vmptr() fails to read guest memory

2020-06-04 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 04/06/20 16:31, Vitaly Kuznetsov wrote: >> Syzbot reports the following issue: >> >> WARNING: CPU: 0 PID: 6819 at arch/x86/kvm/x86.c:618 >> kvm_inject_emulated_page_fault+0x210/0x290 arch/x86/kvm/x86.c:618 >> ... >> Call Trace: >> ... >> RIP: 0010:kvm_inject_emulated_

Re: [PATCH] KVM: nVMX: Inject #GP when nested_vmx_get_vmptr() fails to read guest memory

2020-06-04 Thread Sean Christopherson
On Thu, Jun 04, 2020 at 04:40:52PM +0200, Paolo Bonzini wrote: > On 04/06/20 16:31, Vitaly Kuznetsov wrote: ... > > KVM could've handled the request correctly by going to userspace and > > performing I/O but there doesn't seem to be a good need for such requests > > in the first place. Sane guest

[PATCH v2 1/2] kcov, objtool: Make runtime functions noinstr-compatible

2020-06-04 Thread Marco Elver
While we lack a compiler attribute to add to noinstr that would disable KCOV, make the KCOV runtime functions return if the caller is in a noinstr section. We then whitelist __sanitizer_cov_*() functions in objtool. __sanitizer_cov_*() cannot safely become safe noinstr functions as-is, as they may

Re: [PATCH 01/10] x86/mm/numa: Remove uninitialized_var() usage

2020-06-04 Thread Kees Cook
On Thu, Jun 04, 2020 at 01:41:07PM +0200, Miguel Ojeda wrote: > On Thu, Jun 4, 2020 at 9:58 AM Thomas Gleixner wrote: > > > > but if we ever lose the 1 then the above will silently compile the code > > within the IS_ENABLED() section out. > > Yeah, I believe `IS_ENABLED()` is only meant for Kconf

[PATCH v2 2/2] kcov: Pass -fno-stack-protector with Clang

2020-06-04 Thread Marco Elver
For Clang, correctly pass -fno-stack-protector via a separate cc-option, as -fno-conserve-stack does not exist with Clang. Signed-off-by: Marco Elver --- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index ce8716a04d0e..8215

Re: [RFC v2 7/9] mm/damon: Implement callbacks for physical memory monitoring

2020-06-04 Thread David Hildenbrand
On 04.06.20 09:26, SeongJae Park wrote: > On Wed, 3 Jun 2020 18:09:21 +0200 David Hildenbrand wrote: > >> On 03.06.20 16:11, SeongJae Park wrote: >>> From: SeongJae Park >>> >>> This commit implements the four callbacks (->init_target_regions, >>> ->update_target_regions, ->prepare_access_check,

Re: [PATCH v3 25/75] x86/sev-es: Add support for handling IOIO exceptions

2020-06-04 Thread Sean Christopherson
On Thu, Jun 04, 2020 at 12:15:02PM +0200, Joerg Roedel wrote: > On Wed, Jun 03, 2020 at 04:07:16PM -0700, Sean Christopherson wrote: > > On Wed, Jun 03, 2020 at 04:23:25PM +0200, Joerg Roedel wrote: > > > User-space can also cause IOIO #VC exceptions, and user-space can be > > > 32-bit legacy code

Re: [PATCH 09/10] treewide: Remove uninitialized_var() usage

2020-06-04 Thread Kees Cook
On Thu, Jun 04, 2020 at 10:23:06AM -0300, Jason Gunthorpe wrote: > On Wed, Jun 03, 2020 at 04:32:02PM -0700, Kees Cook wrote: > > Using uninitialized_var() is dangerous as it papers over real bugs[1] > > (or can in the future), and suppresses unrelated compiler warnings > > (e.g. "unused variable")

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-04 Thread Al Viro
On Thu, Jun 04, 2020 at 02:10:27PM +0800, Jason Wang wrote: > > > get_user(flags, desc->flags) > > > smp_rmb() > > > if (flags & VALID) > > > copy_from_user(&adesc, desc, sizeof adesc); > > > > > > this would be a good candidate I think. > > Perhaps, once we get stac/clac out of raw_copy_from_use

<    1   2   3   4   5   6   7   8   9   10   >