[PATCH] of: thermal: Improve print information

2019-02-23 Thread Yangtao Li
Define pr_fmt macro to add a prefix to the message, this can make the thermal log better recognized. Before: [0.602672] nfc: nfc_init: NFC Core ver 0.1 [0.602828] NET: Registered protocol family 39 [0.603435] clocksource: Switched to clocksource mct-frc [0.746216] failed to build

WARNING: bad unlock balance detected! (3)

2019-02-23 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:40e196a906d9 Merge git://git.kernel.org/pub/scm/linux/kern.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=12a49614c0 kernel config: https://syzkaller.appspot.com/x/.config?x=7132344728e7ec3f

RE: [PATCH v2 3/3] mmc: core: Add discard support to sd

2019-02-23 Thread Avri Altman
> > > > On Wed, 6 Feb 2019 at 12:29, Avri Altman wrote: > > > > > > SD spec v5.1 adds discard support. The flows and commands are similar > to > > > mmc, so just set the discard arg in CMD38. > > > > > > Actually, there is no need to check for the spec version like we are > > > doing, as it is

Re: [RFC PATCH 1/4] X.509: Parse public key parameters from x509 for akcipher

2019-02-23 Thread Vitaly Chikunov
Herbert, On Tue, Feb 19, 2019 at 12:37:32PM +0800, Herbert Xu wrote: > On Sun, Feb 10, 2019 at 09:46:28PM +0300, Vitaly Chikunov wrote: > > > > >From the other point of view, set_params may never be called or > > implemented. So, making it called first and move memory zeroing > > into set_params

[PATCH] regulator: mcp16502: Remove module version

2019-02-23 Thread Axel Lin
The module version is unlikely to be updated, use kernel version should be enough. Signed-off-by: Axel Lin --- drivers/regulator/mcp16502.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c index 0fc4963bd5b0..3a8004abe044 100644 ---

[PATCH v6 2/2] PM / sleep: measure the time of filesystems syncing

2019-02-23 Thread Harry Pan
This patch gives the reader an intuitive metric of the time cost by the kernel issuing filesystems sync during system sleep; although developer can guess by the timestamp of next log or enable the ftrace power event for manual calculation, this manner is easier to read and benefits the automation

[PATCH v6 1/2] PM / sleep: refactor the filesystems sync to reduce duplication

2019-02-23 Thread Harry Pan
This patch creates a common helper to sync filesystems and shares to the suspend, hibernate, and snapshot. Signed-off-by: Harry Pan --- include/linux/suspend.h | 3 +++ kernel/power/hibernate.c | 5 + kernel/power/main.c | 9 + kernel/power/suspend.c | 13 +

[PATCH v5 00/10] crypto: add EC-RDSA (GOST 34.10) algorithm

2019-02-23 Thread Vitaly Chikunov
This patchset changes akcipher API to support ECDSA style signature verification, augments x509 parser to make it work with EC-RDSA certificates, and, finally, implements EC-RDSA (GOST 34.10) signature verification and its integration with IMA. Changes since RFC (v1-v4): - akcipher set_max_size,

[PATCH v5 07/10] crypto: ecc - make ecc into separate module

2019-02-23 Thread Vitaly Chikunov
ecc.c have algorithms that could be used togeter by ecdh and ecrdsa. Make it separate module. Add CRYPTO_ECC into Kconfig. EXPORT_SYMBOL and document to what seems appropriate. Move structs ecc_point and ecc_curve from ecc_curve_defs.h into ecc.h. No code changes. Signed-off-by: Vitaly Chikunov

[PATCH v5 04/10] crypto: akcipher - new verify API for public key algorithms

2019-02-23 Thread Vitaly Chikunov
Previous akcipher .verify() just `decrypts' (using RSA encrypt which is using public key) signature to uncover message hash, which was then compared in upper level public_key_verify_signature() with the expected hash value, which itself was never passed into verify(). This approach was

[PATCH v5 10/10] integrity: support EC-RDSA signatures for asymmetric_verify

2019-02-23 Thread Vitaly Chikunov
Allow to use EC-RDSA signatures for IMA by determining signature type by the hash algorithm name. This works good for EC-RDSA since Streebog and EC-RDSA should always be used together. Cc: Mimi Zohar Cc: Dmitry Kasatkin Cc: linux-integr...@vger.kernel.org Signed-off-by: Vitaly Chikunov ---

[PATCH v5 09/10] crypto: ecrdsa - add EC-RDSA test vectors to testmgr

2019-02-23 Thread Vitaly Chikunov
Add testmgr test vectors for EC-RDSA algorithm for every of five supported parameters (curves). Because there are no officially published test vectors for the curves, the vectors are generated by gost-engine. Signed-off-by: Vitaly Chikunov --- crypto/testmgr.c | 6 +++ crypto/testmgr.h | 154

[PATCH v5 08/10] crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm

2019-02-23 Thread Vitaly Chikunov
Add Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012, RFC 7091, ISO/IEC 14888-3) is one of the Russian (and since 2018 the CIS countries) cryptographic standard algorithms (called GOST algorithms). Only signature verification is supported, with intent to be used in the IMA.

[PATCH v5 05/10] X.509: parse public key parameters from x509 for akcipher

2019-02-23 Thread Vitaly Chikunov
Some public key algorithms (like EC-DSA) keep in parameters field important data such as digest and curve OIDs (possibly more for different EC-DSA variants). Thus, just setting a public key (as for RSA) is not enough. Introduce set_params() callback for akcipher which will be used to pass BER

[PATCH v5 03/10] crypto: rsa - unimplement sign/verify for raw RSA backends

2019-02-23 Thread Vitaly Chikunov
In preparation for new akcipher verify call remove sign/verify callbacks from RSA backends and make PKCS1 driver call encrypt/decrypt instead. This also complies with the well-known idea that raw RSA should never be used for sign/verify. It only should be used with proper padding scheme such as

[PATCH v5 02/10] crypto: akcipher - check the presence of callback before the call

2019-02-23 Thread Vitaly Chikunov
Because with introduction of EC-RDSA and change in workings of RSA in regard to sign/verify, akcipher could have not all callbacks defined, check the presence of callbacks before calling them to increase robustness. Signed-off-by: Vitaly Chikunov --- include/crypto/akcipher.h | 25

[PATCH v5 06/10] crypto: Kconfig - create Public-key cryptography section

2019-02-23 Thread Vitaly Chikunov
Group RSA, DH, and ECDH into Public-key cryptography config section. Signed-off-by: Vitaly Chikunov --- crypto/Kconfig | 48 +--- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v5 01/10] KEYS: report to keyctl only actually supported key ops

2019-02-23 Thread Vitaly Chikunov
Because with the introduction of EC-RDSA and change in workings of RSA in regard to sign/verify, akcipher may have not all callbacks defined, report to keyctl only actually supported ops determined by the presence of the akcipher callbacks. Cc: David Howells Cc: keyri...@vger.kernel.org

[PATCH v13 1/3] /proc/pid/status: Add support for architecture specific output

2019-02-23 Thread Aubrey Li
The architecture specific information of the running processes could be useful to the userland. Add support to examine process architecture specific information externally. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven ---

[PATCH v13 3/3] Documentation/filesystems/proc.txt: add AVX512_elapsed_ms

2019-02-23 Thread Aubrey Li
Added AVX512_elapsed_ms in /proc//status. Report it in Documentation/filesystems/proc.txt Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- Documentation/filesystems/proc.txt | 29 - 1 file changed,

[PATCH v13 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time

2019-02-23 Thread Aubrey Li
AVX-512 components use could cause core turbo frequency drop. So it's useful to expose AVX-512 usage elapsed time as a heuristic hint for the user space job scheduler to cluster the AVX-512 using tasks together. Tensorflow example: $ while [ 1 ]; do cat /proc/pid/status | grep AVX; sleep 1; done

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-23 Thread Andy Lutomirski
On Sat, Feb 23, 2019 at 4:44 PM Steven Rostedt wrote: > > On Sat, 23 Feb 2019 12:47:46 +0900 > Masami Hiramatsu wrote: > > > Since kprobes handler runs in IRQ context, we can not use access_ok() in it. > > (only on x86 + CONFIG_DEBUG_ATOMIC_SLEEP=y) > > Is it really IRQ context or exception

Re: [PATCH] arm64/io: Don't use WZR in writel

2019-02-23 Thread Bjorn Andersson
On Sat 23 Feb 10:37 PST 2019, Marc Zyngier wrote: > On Sat, 23 Feb 2019 18:12:54 +, > Bjorn Andersson wrote: > > > > On Mon 11 Feb 06:59 PST 2019, Marc Zyngier wrote: > > > > > On 11/02/2019 14:29, AngeloGioacchino Del Regno wrote: > > > > > > [...] > > > > > > > Also, just one more

Re: [PATCH RESEND V2 2/4] watchdog: imx_sc: Add i.MX system controller watchdog support

2019-02-23 Thread Guenter Roeck
On 2/17/19 10:53 PM, Anson Huang wrote: i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and watchdog etc.. This patch adds i.MX system controller watchdog driver support, watchdog operation needs to be done

[PATCH] regulator: fan53555: Check pdata->slew_rate setting

2019-02-23 Thread Axel Lin
Current code does not really avoid array access out of bounds, fix it by add checking for pdata->slew_rate. If pdata->slew_rate is too big, it's a bug in pdata that needs fix. Signed-off-by: Axel Lin --- drivers/regulator/fan53555.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)

Re: [PATCH RESEND V2 1/4] dt-bindings: fsl: scu: add watchdog binding

2019-02-23 Thread Guenter Roeck
On 2/23/19 7:04 PM, Anson Huang wrote: Hi, Guenter/Rob Best Regards! Anson Huang -Original Message- From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck Sent: 2019年2月24日 1:08 To: Rob Herring ; Anson Huang Cc: mark.rutl...@arm.com; shawn...@kernel.org;

[PATCH] f2fs: fix to dirty inode for i_mode recovery

2019-02-23 Thread Chao Yu
From: Chao Yu As Seulbae Kim reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202637 We didn't recover permission field correctly after sudden power-cut, the reason is in setattr we didn't add inode into global dirty list once i_mode is changed, so latter checkpoint triggered

RE: [PATCH RESEND V2 1/4] dt-bindings: fsl: scu: add watchdog binding

2019-02-23 Thread Anson Huang
Hi, Guenter/Rob Best Regards! Anson Huang > -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter > Roeck > Sent: 2019年2月24日 1:08 > To: Rob Herring ; Anson Huang > Cc: mark.rutl...@arm.com; shawn...@kernel.org; > s.ha...@pengutronix.de;

RE: [PATCH V8 2/4] thermal: imx_sc: add i.MX system controller thermal support

2019-02-23 Thread Anson Huang
Hi, Eduardo Best Regards! Anson Huang > -Original Message- > From: Eduardo Valentin [mailto:edubez...@gmail.com] > Sent: 2019年2月24日 5:39 > To: Anson Huang > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; > s.ha...@pengutronix.de; ker...@pengutronix.de;

[GIT] Networking

2019-02-23 Thread David Miller
/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 15 -- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 17 --- drivers/net/ipvlan/ipvlan_main.c | 4 +++ drivers/net/phy/marvell10g.c

RE: [PATCH V8 1/4] dt-bindings: fsl: scu: add thermal binding

2019-02-23 Thread Anson Huang
Hi, Eduardo Best Regards! Anson Huang > -Original Message- > From: Eduardo Valentin [mailto:edubez...@gmail.com] > Sent: 2019年2月24日 5:38 > To: Anson Huang > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; > s.ha...@pengutronix.de; ker...@pengutronix.de;

[PATCH V9 2/4] thermal: imx_sc: add i.MX system controller thermal support

2019-02-23 Thread Anson Huang
i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and thermal sensors etc.. This patch adds i.MX system controller thermal driver support, Linux kernel has to communicate with system controller via MU (message

[PATCH V9 3/4] defconfig: arm64: add i.MX system controller thermal support

2019-02-23 Thread Anson Huang
This patch enables CONFIG_IMX_SC_THERMAL as module. Signed-off-by: Anson Huang --- No changes. --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 2d9c390..52d503e 100644 ---

[PATCH V9 4/4] arm64: dts: imx: add i.MX8QXP thermal support

2019-02-23 Thread Anson Huang
Add i.MX8QXP CPU thermal zone support. Signed-off-by: Anson Huang --- Changes since V8: - remove "#cooling-cells" since it is already included in cpu-freq opp table patch: https://patchwork.kernel.org/patch/10825081/ --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 34

[PATCH V9 1/4] dt-bindings: fsl: scu: add thermal binding

2019-02-23 Thread Anson Huang
NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors,

Re: Business proposition for you.,,,,

2019-02-23 Thread Melvin M.Greg
Hello, Re: Business proposition for you. I have a client in Russia who will like to invest with your company. My client is willing to invest $10 Million to $50 million. Can I have your company website to show to my client your company so that they will check and decide if they will invest

Re: [PATCH v12 3/3] Documentation/filesystems/proc.txt: add AVX512_elapsed_ms

2019-02-23 Thread Li, Aubrey
On 2019/2/24 2:16, Thomas Gleixner wrote: > On Thu, 21 Feb 2019, Aubrey Li wrote: >> @@ -45,6 +45,7 @@ Table of Contents >>3.9 /proc//map_files - Information about memory mapped files >>3.10 /proc//timerslack_ns - Task timerslack value >>3.11 /proc//patch_state - Livepatch

Re: [PATCH] nvmet-fc: use zero-sized array and struct_size() in kzalloc()

2019-02-23 Thread Gustavo A. R. Silva
On 2/23/19 2:28 PM, Gustavo A. R. Silva wrote: > Hey Joe, > > On 2/23/19 2:05 PM, Joe Perches wrote: >> On Sat, 2019-02-23 at 12:51 -0600, Gustavo A. R. Silva wrote: >>> Update the code to use a zero-sized array instead of a pointer in >>> structure nvmet_fc_tgt_queue and use struct_size() in

[PATCH] regulator: max77620: Fix regulator info setting for max20024

2019-02-23 Thread Axel Lin
Current code always set pmic->rinfo[id] = _regs_info[id]; It should set to either max77620_regs_info or max20024_regs_info depends on the chip_id. Signed-off-by: Axel Lin --- drivers/regulator/max77620-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()

2019-02-23 Thread Jeremy Cline
On Sat, Feb 23, 2019 at 12:33:27PM +0800, Kefeng Wang wrote: > task A:task B: > hci_uart_set_proto flush_to_ldisc > - p->open(hu) -> h5_open //alloc h5 - receive_buf > - set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf > -

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-23 Thread Steven Rostedt
On Sat, 23 Feb 2019 12:47:46 +0900 Masami Hiramatsu wrote: > Since kprobes handler runs in IRQ context, we can not use access_ok() in it. > (only on x86 + CONFIG_DEBUG_ATOMIC_SLEEP=y) Is it really IRQ context or exception context? That is, one (interrupts) happen for any task, but exceptions

Re: linux-next: Signed-off-by missing for commit in the drivers-x86 tree

2019-02-23 Thread Stephen Rothwell
Hi Darren, On Sat, 23 Feb 2019 09:52:07 -0800 Darren Hart wrote: > > Apologies if I've asked you this before... I didn't find it after some > searching. > > We should be catching errors like this before they hit next. First, > there is no reason we can't catch them - unlike the integration

Re: [RFC] percpu: use nr_groups as check condition

2019-02-23 Thread Dennis Zhou
Hi Peng, On Wed, Feb 20, 2019 at 01:32:55PM +, Peng Fan wrote: > group_cnt array is defined with NR_CPUS entries, but normally > nr_groups will not reach up to NR_CPUS. So there is no issue > to the current code. > > Checking other parts of pcpu_build_alloc_info, use nr_groups as > check

Re: [PATCH 3/3] drm/panel: Add Rocktech jh057n00900 panel driver

2019-02-23 Thread Sam Ravnborg
Hi Guido. Thanks for this patch. See below for some review feedback. The driver includes the "allpixelson_set" debugfs feature. Is this a debug leftover, or is there a real need for this? If this is a debug feature that is no logner needed then no need to add it to the mainline driver.

Re: [PATCH net-next] kcm: Remove unnecessary SLAB_PANIC for kmem_cache_create() in kcm_init

2019-02-23 Thread David Miller
From: Yue Haibing Date: Fri, 22 Feb 2019 14:15:30 +0800 > From: YueHaibing > > There has check NULL on kmem_cache_create on failure in kcm_init, > no need use SLAB_PANIC to panic the system. > > Signed-off-by: YueHaibing I'll apply this, thank you.

Re: [PATCH V8 1/4] dt-bindings: fsl: scu: add thermal binding

2019-02-23 Thread Eduardo Valentin
On Sat, Feb 23, 2019 at 01:38:00PM -0800, Eduardo Valentin wrote: > On Thu, Feb 21, 2019 at 06:38:30AM +, Anson Huang wrote: > > NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as > > system controller, the system controller is in charge of system > > power, clock and thermal sensors

Re: [PATCH V8 2/4] thermal: imx_sc: add i.MX system controller thermal support

2019-02-23 Thread Eduardo Valentin
Hey Anson, On Thu, Feb 21, 2019 at 06:38:39AM +, Anson Huang wrote: > i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller > inside, the system controller is in charge of controlling power, > clock and thermal sensors etc.. > > This patch adds i.MX system controller thermal

Re: [PATCH V8 1/4] dt-bindings: fsl: scu: add thermal binding

2019-02-23 Thread Eduardo Valentin
On Thu, Feb 21, 2019 at 06:38:30AM +, Anson Huang wrote: > NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as > system controller, the system controller is in charge of system > power, clock and thermal sensors etc. management, Linux kernel > has to communicate with system controller

Re: [PATCH] bpfilter: re-add header search paths to tools include to fix build error

2019-02-23 Thread David Miller
From: Masahiro Yamada Date: Fri, 22 Feb 2019 12:23:19 +0900 > I thought header search paths to tools/include(/uapi) were unneeded, > but it looks like a build error occurs depending on the compiler. > > Commit 303a339f30a9 ("bpfilter: remove extra header search paths for > bpfilter_umh")

[PATCH AUTOSEL 4.20 02/72] xfrm: refine validation of template and selector families

2019-02-23 Thread Sasha Levin
From: Florian Westphal [ Upstream commit 35e6103861a3a970de6c84688c6e7a1f65b164ca ] The check assumes that in transport mode, the first templates family must match the address family of the policy selector. Syzkaller managed to build a template using MODE_ROUTEOPTIMIZATION, with ipv4-in-ipv6

[PATCH AUTOSEL 4.20 11/72] perf tools: Handle TOPOLOGY headers with no CPU

2019-02-23 Thread Sasha Levin
From: Stephane Eranian [ Upstream commit 1497e804d1a6e2bd9107ddf64b0310449f4673eb ] This patch fixes an issue in cpumap.c when used with the TOPOLOGY header. In some configurations, some NUMA nodes may have no CPU (empty cpulist). Yet a cpumap map must be created otherwise perf abort with an

[PATCH AUTOSEL 4.20 13/72] IB/{hfi1, qib}: Fix WC.byte_len calculation for UD_SEND_WITH_IMM

2019-02-23 Thread Sasha Levin
From: Brian Welty [ Upstream commit 904bba211acc2112fdf866e5a2bc6cd9ecd0de1b ] The work completion length for a receiving a UD send with immediate is short by 4 bytes causing application using this opcode to fail. The UD receive logic incorrectly subtracts 4 bytes for immediate value. These

[PATCH AUTOSEL 4.20 07/72] netfilter: nft_compat: destroy function must not have side effects

2019-02-23 Thread Sasha Levin
From: Florian Westphal [ Upstream commit b2e3d68d1251a051a620f9086e18f7ffa6833b5b ] The nft_compat destroy function deletes the nft_xt object from a list. This isn't allowed anymore. Destroy functions are called asynchronously, i.e. next batch can find the object that has a pending ->destroy()

[PATCH AUTOSEL 4.20 12/72] perf script: Fix crash when processing recorded stat data

2019-02-23 Thread Sasha Levin
From: Tony Jones [ Upstream commit 8bf8c6da53c2265aea365a1de6038f118f522113 ] While updating perf to work with Python3 and Python2 I noticed that the stat-cpi script was dumping core. $ perf stat -e cycles,instructions record -o /tmp/perf.data /bin/false Performance counter stats for

[PATCH AUTOSEL 4.20 09/72] perf core: Fix perf_proc_update_handler() bug

2019-02-23 Thread Sasha Levin
From: Stephane Eranian [ Upstream commit 1a51c5da5acc6c188c917ba572eebac5f8793432 ] The perf_proc_update_handler() handles /proc/sys/kernel/perf_event_max_sample_rate syctl variable. When the PMU IRQ handler timing monitoring is disabled, i.e, when /proc/sys/kernel/perf_cpu_time_max_percent

[PATCH AUTOSEL 4.20 06/72] netfilter: nft_compat: make lists per netns

2019-02-23 Thread Sasha Levin
From: Florian Westphal [ Upstream commit cf52572ebbd7189a1966c2b5fc34b97078cd1dce ] There are two problems with nft_compat since the netlink config plane uses a per-netns mutex: 1. Concurrent add/del accesses to the same list 2. accesses to a list element after it has been free'd already.

[PATCH AUTOSEL 4.20 20/72] clk: qcom: gcc: Use active only source for CPUSS clocks

2019-02-23 Thread Sasha Levin
From: Taniya Das [ Upstream commit 9ff1a3b4912528f853048ccd9757ba6a2cc75557 ] The clocks of the CPUSS such as "gcc_cpuss_ahb_clk_src" is a CRITICAL clock and needs to vote on the active only source of XO, so as to keep the vote as long as CPUSS is active. Similar rbcpr_clk_src is also has the

[PATCH AUTOSEL 4.20 16/72] riscv: fixup max_low_pfn with PFN_DOWN.

2019-02-23 Thread Sasha Levin
From: Guo Ren [ Upstream commit 28198c4639b39899a728ac89aea29d2a7a72562f ] max_low_pfn should be pfn_size not byte_size. Signed-off-by: Guo Ren Signed-off-by: Mao Han Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/kernel/setup.c | 2 +- arch/riscv/mm/init.c |

[PATCH AUTOSEL 4.20 18/72] iommu/amd: Fix IOMMU page flush when detach device from a domain

2019-02-23 Thread Sasha Levin
From: Suravee Suthikulpanit [ Upstream commit 9825bd94e3a2baae1f4874767ae3a7d4c049720e ] When a VM is terminated, the VFIO driver detaches all pass-through devices from VFIO domain by clearing domain id and page table root pointer from each device table entry (DTE), and then invalidates the

[PATCH AUTOSEL 4.20 08/72] perf script: Fix crash with printing mixed trace point and other events

2019-02-23 Thread Sasha Levin
From: Andi Kleen [ Upstream commit 96167167b6e17b25c0e05ecc31119b73baeab094 ] 'perf script' crashes currently when printing mixed trace points and other events because the trace format does not handle events without trace meta data. Add a simple check to avoid that. % cat > test.c main()

[PATCH AUTOSEL 4.20 15/72] iommu/amd: Unmap all mapped pages in error path of map_sg

2019-02-23 Thread Sasha Levin
From: Jerry Snitselaar [ Upstream commit f1724c0883bb0ce93b8dcb94b53dcca3b75ac9a7 ] In the error path of map_sg there is an incorrect if condition for breaking out of the loop that searches the scatterlist for mapped pages to unmap. Instead of breaking out of the loop once all the pages that

[PATCH AUTOSEL 4.20 14/72] iommu/amd: Call free_iova_fast with pfn in map_sg

2019-02-23 Thread Sasha Levin
From: Jerry Snitselaar [ Upstream commit 51d8838d66d3249508940d8f59b07701f2129723 ] In the error path of map_sg, free_iova_fast is being called with address instead of the pfn. This results in a bad value getting into the rcache, and can result in hitting a BUG_ON when iova_magazine_free_pfns

[PATCH AUTOSEL 4.20 17/72] ipvs: Fix signed integer overflow when setsockopt timeout

2019-02-23 Thread Sasha Levin
From: ZhangXiaoxu [ Upstream commit 53ab60baa1ac4f20b080a22c13b77b6373922fd7 ] There is a UBSAN bug report as below: UBSAN: Undefined behaviour in net/netfilter/ipvs/ip_vs_ctl.c:2227:21 signed integer overflow: -2147483647 * 1000 cannot be represented in type 'int' Reproduce program:

[PATCH AUTOSEL 4.20 19/72] clk: ti: Fix error handling in ti_clk_parse_divider_data()

2019-02-23 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 303aef8b84272d73999a3207dd05bbe10ed89dc5 ] The ti_clk_parse_divider_data() function is only called from _get_div_table_from_setup(). That function doesn't look at the return value but instead looks at the "*table" pointer. In this case, if the kcalloc()

[PATCH AUTOSEL 4.20 24/72] IB/ipoib: Fix for use-after-free in ipoib_cm_tx_start

2019-02-23 Thread Sasha Levin
From: Feras Daoud [ Upstream commit 6ab4aba00f811a5265acc4d3eb1863bb3ca60562 ] The following BUG was reported by kasan: BUG: KASAN: use-after-free in ipoib_cm_tx_start+0x430/0x1390 [ib_ipoib] Read of size 80 at addr 88034c30bcd0 by task kworker/u16:1/24020 Workqueue: ipoib_wq

[PATCH AUTOSEL 4.20 35/72] net: hns: Fix wrong read accesses via Clause 45 MDIO protocol

2019-02-23 Thread Sasha Levin
From: Yonglong Liu [ Upstream commit cec8abba13e6a26729dfed41019720068eeeff2b ] When reading phy registers via Clause 45 MDIO protocol, after write address operation, the driver use another write address operation, so can not read the right value of any phy registers. This patch fixes it.

[PATCH AUTOSEL 4.20 27/72] xtensa: smp_lx200_defconfig: fix vectors clash

2019-02-23 Thread Sasha Levin
From: Max Filippov [ Upstream commit 306b38305c0f86de7f17c5b091a95451dcc93d7d ] Secondary CPU reset vector overlaps part of the double exception handler code, resulting in weird crashes and hangups when running user code. Move exception vectors one page up so that they don't clash with the

[PATCH AUTOSEL 4.20 28/72] xtensa: SMP: mark each possible CPU as present

2019-02-23 Thread Sasha Levin
From: Max Filippov [ Upstream commit 8b1c42cdd7181200dc1fff39dcb6ac1a3fac2c25 ] Otherwise it is impossible to enable CPUs after booting with 'maxcpus' parameter. Signed-off-by: Max Filippov Signed-off-by: Sasha Levin --- arch/xtensa/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH AUTOSEL 4.20 25/72] selftests: cpu-hotplug: fix case where CPUs offline > CPUs present

2019-02-23 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 2b531b6137834a55857a337ac17510d6436b6fbb ] The cpu-hotplug test assumes that we can offline the maximum CPU as described by /sys/devices/system/cpu/offline. However, in the case where the number of CPUs exceeds like kernel configuration then the offline

[PATCH AUTOSEL 4.20 29/72] iomap: get/put the page in iomap_page_create/release()

2019-02-23 Thread Sasha Levin
From: Piotr Jaroszynski [ Upstream commit 8e47a457321ca1a74ad194ab5dcbca764bc70731 ] migrate_page_move_mapping() expects pages with private data set to have a page_count elevated by 1. This is what used to happen for xfs through the buffer_heads code before the switch to iomap in commit

[PATCH AUTOSEL 4.20 32/72] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-02-23 Thread Sasha Levin
From: Tomonori Sakita [ Upstream commit 6571ebce112a21ec9be68ef2f53b96fcd41fd81b ] If fill_level was not zero and status was not BUSY, result of "tx_prod - tx_cons - inuse" might be zero. Subtracting 1 unconditionally results invalid negative return value on this case. Make sure not to return

[PATCH AUTOSEL 4.20 26/72] xtensa: SMP: fix secondary CPU initialization

2019-02-23 Thread Sasha Levin
From: Max Filippov [ Upstream commit 32a7726c4f4aadfabdb82440d84f88a5a2c8fe13 ] - add missing memory barriers to the secondary CPU synchronization spin loops; add comment to the matching memory barrier in the boot_secondary and __cpu_die functions; - use READ_ONCE/WRITE_ONCE to access

[PATCH AUTOSEL 4.20 41/72] selftests: timers: use LDLIBS instead of LDFLAGS

2019-02-23 Thread Sasha Levin
From: Fathi Boudra [ Upstream commit 7d4e591bc051d3382c45caaa2530969fb42ed23d ] posix_timers fails to build due to undefined reference errors: aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall

[PATCH AUTOSEL 4.20 38/72] netfilter: nfnetlink_osf: add missing fmatch check

2019-02-23 Thread Sasha Levin
From: Fernando Fernandez Mancera [ Upstream commit 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b ] When we check the tcp options of a packet and it doesn't match the current fingerprint, the tcp packet option pointer must be restored to its initial value in order to do the proper tcp options check

[PATCH AUTOSEL 4.20 36/72] net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()

2019-02-23 Thread Sasha Levin
From: Alexey Khoroshilov [ Upstream commit c69c29a1a0a8f68cd87e98ba4a5a79fb8ef2a58c ] If phy_power_on() fails in rk_gmac_powerup(), clocks are left enabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller

[PATCH AUTOSEL 4.20 45/72] qed: Fix VF probe failure while FLR

2019-02-23 Thread Sasha Levin
From: Manish Chopra [ Upstream commit 327852ec64205bb651be391a069784872098a3b2 ] VFs may hit VF-PF channel timeout while probing, as in some cases it was observed that VF FLR and VF "acquire" message transaction (i.e first message from VF to PF in VF's probe flow) could occur simultaneously

[PATCH AUTOSEL 4.20 40/72] selftests: net: use LDLIBS instead of LDFLAGS

2019-02-23 Thread Sasha Levin
From: Fathi Boudra [ Upstream commit 870f193d48c25a97d61a8e6c04e3c29a2c606850 ] reuseport_bpf_numa fails to build due to undefined reference errors: aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall -Wl,--no-as-needed -O2 -g -I../../../../usr/include/ -Wl,-O1

[PATCH AUTOSEL 4.20 37/72] netfilter: ebtables: compat: un-break 32bit setsockopt when no rules are present

2019-02-23 Thread Sasha Levin
From: Florian Westphal [ Upstream commit 2035f3ff8eaa29cfb5c8e2160b0f6e85eeb21a95 ] Unlike ip(6)tables ebtables only counts user-defined chains. The effect is that a 32bit ebtables binary on a 64bit kernel can do 'ebtables -N FOO' only after adding at least one rule, else the request fails

[PATCH AUTOSEL 4.20 42/72] nfs: Fix NULL pointer dereference of dev_name

2019-02-23 Thread Sasha Levin
From: Yao Liu [ Upstream commit 80ff00172407e0aad4b10b94ef0816fc3e7813cb ] There is a NULL pointer dereference of dev_name in nfs_parse_devname() The oops looks something like: BUG: unable to handle kernel NULL pointer dereference at ... RIP:

[PATCH AUTOSEL 4.20 39/72] gpio: vf610: Mask all GPIO interrupts

2019-02-23 Thread Sasha Levin
From: Andrew Lunn [ Upstream commit 7ae710f9f8b2cf95297e7bbfe1c09789a7dc43d4 ] On SoC reset all GPIO interrupts are disable. However, if kexec is used to boot into a new kernel, the SoC does not experience a reset. Hence GPIO interrupts can be left enabled from the previous kernel. It is then

[PATCH AUTOSEL 4.20 51/72] scsi: 53c700: pass correct "dev" to dma_alloc_attrs()

2019-02-23 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 8437fcf14deed67e5ad90b5e8abf62fb20f30881 ] The "hostdata->dev" pointer is NULL here. We set "hostdata->dev = dev;" later in the function and we also use "hostdata->dev" when we call dma_free_attrs() in NCR_700_release(). This bug predates git version

[PATCH AUTOSEL 4.20 46/72] qed: Fix system crash in ll2 xmit

2019-02-23 Thread Sasha Levin
From: Manish Chopra [ Upstream commit 7c81626a3c37e4ac320b8ad785694ba498f24794 ] Cache number of fragments in the skb locally as in case of linear skb (with zero fragments), tx completion (or freeing of skb) may happen before driver tries to get number of frgaments from the skb which could lead

[PATCH AUTOSEL 4.20 44/72] qed: Fix LACP pdu drops for VFs

2019-02-23 Thread Sasha Levin
From: Manish Chopra [ Upstream commit ff9296966e5e00b0d0d00477b2365a178f0f06a3 ] VF is always configured to drop control frames (with reserved mac addresses) but to work LACP on the VFs, it would require LACP control frames to be forwarded or transmitted successfully. This patch fixes this in

[PATCH AUTOSEL 4.20 48/72] scsi: libfc: free skb when receiving invalid flogi resp

2019-02-23 Thread Sasha Levin
From: Ming Lu [ Upstream commit 5d8fc4a9f0eec20b6c07895022a6bea3fb6dfb38 ] The issue to be fixed in this commit is when libfc found it received a invalid FLOGI response from FC switch, it would return without freeing the fc frame, which is just the skb data. This would cause memory leak if FC

[PATCH AUTOSEL 4.20 47/72] qed: Fix stack out of bounds bug

2019-02-23 Thread Sasha Levin
From: Manish Chopra [ Upstream commit ffb057f98928aa099b08e419bbe5afc26ec9f448 ] KASAN reported following bug in qed_init_qm_get_idx_from_flags due to inappropriate casting of "pq_flags". Fix the type of "pq_flags". [ 196.624707] BUG: KASAN: stack-out-of-bounds in

[PATCH AUTOSEL 4.20 54/72] x86/cpu: Add Atom Tremont (Jacobsville)

2019-02-23 Thread Sasha Levin
From: Kan Liang [ Upstream commit 00ae831dfe4474ef6029558f5eb3ef0332d80043 ] Add the Atom Tremont model number to the Intel family list. [ Tony: Also update comment at head of file to say "_X" suffix is also used for microserver parts. ] Signed-off-by: Kan Liang Signed-off-by: Qiuxu Zhuo

[PATCH AUTOSEL 4.20 52/72] platform/x86: Fix unmet dependency warning for ACPI_CMPC

2019-02-23 Thread Sasha Levin
From: Sinan Kaya [ Upstream commit d58bf90a32a33becec78c3034e781735049fcd25 ] Add BACKLIGHT_LCD_SUPPORT for ACPI_CMPC to fix the warning: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE. ACPI_CMPC selects BACKLIGHT_CLASS_DEVICE but BACKLIGHT_CLASS_DEVICE depends on

[PATCH AUTOSEL 4.20 50/72] scsi: bnx2fc: Fix error handling in probe()

2019-02-23 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit b2d3492fc591b1fb46b81d79ca1fc44cac6ae0ae ] There are two issues here. First if cmgr->hba is not set early enough then it leads to a NULL dereference. Second if we don't completely initialize cmgr->io_bdt_pool[] then we end up dereferencing uninitialized

[PATCH AUTOSEL 4.20 65/72] x86_64: increase stack size for KASAN_EXTRA

2019-02-23 Thread Sasha Levin
From: Qian Cai [ Upstream commit a8e911d13540487942d53137c156bd7707f66e5d ] If the kernel is configured with KASAN_EXTRA, the stack size is increasted significantly because this option sets "-fstack-reuse" to "none" in GCC [1]. As a result, it triggers stack overrun quite often with 32k stack

[PATCH AUTOSEL 4.20 59/72] x86/microcode/amd: Don't falsely trick the late loading mechanism

2019-02-23 Thread Sasha Levin
From: Thomas Lendacky [ Upstream commit 912139cfbfa6a2bc1da052314d2c29338dae1f6a ] The load_microcode_amd() function searches for microcode patches and attempts to apply a microcode patch if it is of different level than the currently installed level. While the processor won't actually load a

[PATCH AUTOSEL 4.20 58/72] blk-mq: fix a hung issue when fsync

2019-02-23 Thread Sasha Levin
From: Jianchao Wang [ Upstream commit 85bd6e61f34dffa8ec2dc75ff3c02ee7b2f1cbce ] Florian reported a io hung issue when fsync(). It should be triggered by following race condition. data + post flush a flush blk_flush_complete_seq case REQ_FSEQ_DATA blk_flush_queue_rq issued

[PATCH AUTOSEL 4.20 57/72] cifs: fix computation for MAX_SMB2_HDR_SIZE

2019-02-23 Thread Sasha Levin
From: Ronnie Sahlberg [ Upstream commit 58d15ed1203f4d858c339ea4d7dafa94bd2a56d3 ] The size of the fixed part of the create response is 88 bytes not 56. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky Signed-off-by: Sasha Levin --- fs/cifs/smb2pdu.h

[PATCH AUTOSEL 4.20 53/72] platform/x86: Fix unmet dependency warning for SAMSUNG_Q10

2019-02-23 Thread Sasha Levin
From: Sinan Kaya [ Upstream commit 0ee4b5f801b73b83a9fb3921d725f2162fd4a2e5 ] Add BACKLIGHT_LCD_SUPPORT for SAMSUNG_Q10 to fix the warning: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE. SAMSUNG_Q10 selects BACKLIGHT_CLASS_DEVICE but BACKLIGHT_CLASS_DEVICE depends on

[PATCH AUTOSEL 4.20 56/72] x86/boot/compressed/64: Set EFER.LME=1 in 32-bit trampoline before returning to long mode

2019-02-23 Thread Sasha Levin
From: Wei Huang [ Upstream commit b677dfae5aa197afc5191755a76a8727ffca538a ] In some old AMD KVM implementation, guest's EFER.LME bit is cleared by KVM when the hypervsior detects that the guest sets CR0.PG to 0. This causes the guest OS to reboot when it tries to return from 32-bit trampoline

[PATCH AUTOSEL 4.19 03/65] xfrm: Make set-mark default behavior backward compatible

2019-02-23 Thread Sasha Levin
From: Benedict Wong [ Upstream commit e2612cd496e7b465711d219ea6118893d7253f52 ] Fixes 9b42c1f179a6, which changed the default route lookup behavior for tunnel mode SAs in the outbound direction to use the skb mark, whereas previously mark=0 was used if the output mark was unspecified. In

[PATCH AUTOSEL 4.19 06/65] perf script: Fix crash with printing mixed trace point and other events

2019-02-23 Thread Sasha Levin
From: Andi Kleen [ Upstream commit 96167167b6e17b25c0e05ecc31119b73baeab094 ] 'perf script' crashes currently when printing mixed trace points and other events because the trace format does not handle events without trace meta data. Add a simple check to avoid that. % cat > test.c main()

[PATCH AUTOSEL 4.19 02/65] xfrm: refine validation of template and selector families

2019-02-23 Thread Sasha Levin
From: Florian Westphal [ Upstream commit 35e6103861a3a970de6c84688c6e7a1f65b164ca ] The check assumes that in transport mode, the first templates family must match the address family of the policy selector. Syzkaller managed to build a template using MODE_ROUTEOPTIMIZATION, with ipv4-in-ipv6

[PATCH AUTOSEL 4.19 04/65] netfilter: nft_compat: use refcnt_t type for nft_xt reference count

2019-02-23 Thread Sasha Levin
From: Florian Westphal [ Upstream commit 12c44aba6618b7f6c437076e5722237190f6cd5f ] Using standard integer type was fine while all operations on it were guarded by the nftnl subsys mutex. This isn't true anymore: 1. transactions are guarded only by a pernet mutex, so concurrent rule

Re: [PATCH net] net: phy: marvell10g: Fix Multi-G advertisement to only advertise 10G

2019-02-23 Thread David Miller
From: Maxime Chevallier Date: Thu, 21 Feb 2019 17:54:11 +0100 > Some Marvell Alaska PHYs support 2.5G, 5G and 10G BaseT links. Their > default behaviour is to advertise all of these modes, but at the moment, > only 10GBaseT is supported. To prevent link partners from establishing > link at that

[PATCH AUTOSEL 4.20 67/72] mm, memory_hotplug: test_pages_in_a_zone do not pass the end of zone

2019-02-23 Thread Sasha Levin
From: Mikhail Zaslonko [ Upstream commit 24feb47c5fa5b825efb0151f28906dfdad027e61 ] If memory end is not aligned with the sparse memory section boundary, the mapping of such a section is only partly initialized. This may lead to VM_BUG_ON due to uninitialized struct pages access from

  1   2   3   4   5   >