Re: [PATCH 4/4] arm64/mm: Drop vm_fault_t argument from __do_page_fault()

2019-05-29 Thread Mark Rutland
On Wed, May 29, 2019 at 06:04:45PM +0530, Anshuman Khandual wrote: > __do_page_fault() is over complicated with multiple goto statements. This > cleans up code flow and while there drops the vm_fault_t argument. > Signed-off-by: Anshuman Khandual > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: M

Re: [PATCH] ipv4: tcp_input: fix stack out of bounds when parsing TCP options.

2019-05-29 Thread Yang Xiao
Indeed, condition opsize < 2 and opsize > length can deduce that length >= 2. However, before the condition (if opsize < 2), there may be one-byte out-of-bound access in line 12. I'm not sure whether I have put it very clearly. On Wed, May 29, 2019 at 10:20 PM Eric Dumazet wrote: > > On Wed, May

Re: [REVIEW][PATCHv2 03/26] signal/arm64: Use force_sig not force_sig_fault for SIGKILL

2019-05-29 Thread Will Deacon
On Fri, May 24, 2019 at 05:36:41PM -0500, Eric W. Biederman wrote: > Will Deacon writes: > > > On Thu, May 23, 2019 at 03:59:20PM -0500, Eric W. Biederman wrote: > >> Will Deacon writes: > >> > >> > On Thu, May 23, 2019 at 11:11:19AM -0500, Eric W. Biederman wrote: > >> >> diff --git a/arch/arm

Re: [PATCH 11/21] EDAC, ghes: Unify trace_mc_event() code with edac_mc driver

2019-05-29 Thread James Morse
Hi Robert, On 29/05/2019 09:44, Robert Richter wrote: > Almost duplicate code, remove it. almost? > Note: there is a difference in the calculation of the grain_bits, > using the edac_mc's version here. But is it the right thing to do? Is this an off-by-one bug being papered over as some clean

[PATCH][next] IB/rdmavt: Use struct_size() helper

2019-05-29 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(struct rvt_sge) * init_attr->cap.max_send_sge + sizeof(struct rvt_swqe) with:

Re: [PATCH -next] platform/chrome: cros_ec_lpc: Make some symbols static

2019-05-29 Thread Guenter Roeck
On Wed, May 29, 2019 at 8:08 AM YueHaibing wrote: > > Fix sparse warning: > > drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol > 'cros_ec_console_log_fops' was not declared. Should it be static? > drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol > 'cros_ec_pdinf

Re: [PATCH 12/21] EDAC, ghes: Add support for legacy API counters

2019-05-29 Thread James Morse
Hi Robert, On 29/05/2019 09:44, Robert Richter wrote: > The ghes driver is not able yet to count legacy API counters in sysfs, > e.g.: > > /sys/devices/system/edac/mc/mc0/csrow2/ce_count > /sys/devices/system/edac/mc/mc0/csrow2/ch0_ce_count > /sys/devices/system/edac/mc/mc0/csrow2/ch1_ce_count

Re: [PATCH 10/21] EDAC, ghes: Remove pvt->detail_location string

2019-05-29 Thread James Morse
Hi Robert, On 29/05/2019 09:44, Robert Richter wrote: > The detail_location[] string in struct ghes_edac_pvt is complete > useless and data is just copied around. Put everything into > e->other_detail from the beginning. We still print all that complete-useless detail_location stuff... so this c

[PATCH][next] IB/qib: Use struct_size() helper

2019-05-29 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*pkt) + sizeof(pkt->addr[0])*n with: struct_size(pkt, addr, n) Also, notice

Re: [PATCH 09/21] EDAC, ghes: Use standard kernel macros for page calculations

2019-05-29 Thread James Morse
Hi Robert, On 29/05/2019 09:44, Robert Richter wrote: > Use standard macros for page calculations. Reviewed-by: James Morse Thanks, James

[PATCH net-next v2] net: avoid indirect calls in L4 checksum calculation

2019-05-29 Thread Matteo Croce
Commit 283c16a2dfd3 ("indirect call wrappers: helpers to speed-up indirect calls of builtin") introduces some macros to avoid doing indirect calls. Use these helpers to remove two indirect calls in the L4 checksum calculation for devices which don't have hardware support for it. As a test I gener

[PATCH net v2] ethtool: Drop check for vlan etype and vlan tci when parsing flow_rule

2019-05-29 Thread Maxime Chevallier
When parsing an ethtool flow spec to build a flow_rule, the code checks if both the vlan etype and the vlan tci are specified by the user to add a FLOW_DISSECTOR_KEY_VLAN match. However, when the user only specified a vlan etype or a vlan tci, this check silently ignores these parameters. For exa

[PATCH][next] IB/hfi1: Use struct_size() helper

2019-05-29 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(struct opa_port_status_rsp) + num_vls * sizeof(struct _vls_pctrs) with: stru

[PATCH -next] usb: phy: mv-usb: Remove set but not used variable 'phy'

2019-05-29 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/phy/phy-mv-usb.c: In function mv_otg_work: drivers/usb/phy/phy-mv-usb.c:404:18: warning: variable phy set but not used [-Wunused-but-set-variable] It's no used since commit e47d92545c29 ("usb: move the OTG state from the USB PHY to the O

Re: [PATCH] amd64-agp: fix arbitrary kernel memory writes

2019-05-29 Thread Yang Xiao
I am not so sure about taking off the cast, just to be in line with patch in 194b3da873fd. The comment can be deleted. On Wed, May 29, 2019 at 4:35 PM Greg KH wrote: > > On Wed, May 29, 2019 at 12:52:01PM +0800, Young Xiao wrote: > > pg_start is copied from userspace on AGPIOC_BIND and AGPIOC_UNB

Re: [PATCH v2 1/3] lib/test_kasan: Add bitops tests

2019-05-29 Thread Mark Rutland
On Wed, May 29, 2019 at 04:14:59PM +0200, Marco Elver wrote: > This adds bitops tests to the test_kasan module. In a follow-up patch, > support for bitops instrumentation will be added. > > Signed-off-by: Marco Elver > --- > Changes in v2: > * Use BITS_PER_LONG. > * Use heap allocated memory for

PROBLEM: oops spew with Linux 5.1.5 (NFS regression?)

2019-05-29 Thread Nick Bowler
Hi, I upgraded to Linux 5.1.5 on one machine yesterday, and this morning I happened noticed a large amount of backtraces in the log. It appears that the system oopsed 62 times over a period of about 5 minutes, producing about half a megabyte of log messages, after which the messages stopped. No

Re: [REVIEW][PATCH 01/26] signal: Correct namespace fixups of si_pid and si_uid

2019-05-29 Thread Eric W. Biederman
Sasha Levin writes: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: 6588c1e3ff014 signals: SI_USER: Masquerade si_pid when > crossing pid ns boundary. > > The bot has tested the following trees: v5.1.4, v5.0.18, v4.19

Re: [PATCHv4 3/4] firmware: rsu: document sysfs interface

2019-05-29 Thread Richard Gong
Hi Greg, On 5/28/19 6:19 PM, Greg KH wrote: On Tue, May 28, 2019 at 03:20:32PM -0500, richard.g...@linux.intel.com wrote: +What: /sys/devices/.../stratix10-rsu.0/driver/fail_image +Date: May 2019 +KernelVersion: 5.3 +Contact: Richard Gong +Description: +

[PATCH v1 2/2] arch: wire-up clone3() syscall on x86

2019-05-29 Thread Christian Brauner
Wire up the clone3() call on x86. This patch only wires up clone3() on x86. Some of the arches look like they need special assembly massaging and it is probably smarter if the appropriate arch maintainers would do the actual wiring. Signed-off-by: Christian Brauner Cc: Arnd Bergmann Cc: David H

[PATCH v1 1/2] fork: add clone3

2019-05-29 Thread Christian Brauner
This adds the clone3 system call. As mentioned several times already (cf. [7], [8]) here's the promised patchset for clone3(). We recently merged the CLONE_PIDFD patchset (cf. [1]). It took the last free flag from clone(). Independent of the CLONE_PIDFD patchset a time namespace has been discuss

Re: [PATCH net-next] net: dsa: sja1105: Make static_config_check_memory_size static

2019-05-29 Thread Vladimir Oltean
On Wed, 29 May 2019 at 17:35, YueHaibing wrote: > > Fix sparse warning: > > drivers/net/dsa/sja1105/sja1105_static_config.c:446:1: warning: > symbol 'static_config_check_memory_size' was not declared. Should it be > static? > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing > --- > drive

Re: [PATCH V2 02/12] pinctrl: tegra: add suspend and resume support

2019-05-29 Thread Dmitry Osipenko
29.05.2019 2:08, Sowjanya Komatineni пишет: > This patch adds suspend and resume support for Tegra pinctrl driver > and registers them to syscore so the pinmux settings are restored > before the devices resume. > > Signed-off-by: Sowjanya Komatineni > --- > drivers/pinctrl/tegra/pinctrl-tegra.c

[PATCH] arm64: dts: allwinner: Add GPU operating points for H6

2019-05-29 Thread Tomeu Vizoso
The GPU driver needs them to change the clock frequency and regulator voltage depending on the load. Signed-off-by: Tomeu Vizoso Cc: Clément Péron --- Feel free to pick up this patch if you are going to keep pushing this series forward. Thanks, Tomeu --- arch/arm64/boot/dts/allwinner/sun50i

Re: [REVIEW][PATCHv2 03/26] signal/arm64: Use force_sig not force_sig_fault for SIGKILL

2019-05-29 Thread Eric W. Biederman
Will Deacon writes: > On Fri, May 24, 2019 at 05:36:41PM -0500, Eric W. Biederman wrote: >> Will Deacon writes: >> >> > On Thu, May 23, 2019 at 03:59:20PM -0500, Eric W. Biederman wrote: >> >> Will Deacon writes: >> >> >> >> > On Thu, May 23, 2019 at 11:11:19AM -0500, Eric W. Biederman wrote:

Re: [PATCH ghak90 V6 02/10] audit: add container id

2019-05-29 Thread Tycho Andersen
On Wed, May 29, 2019 at 11:29:05AM -0400, Paul Moore wrote: > On Wed, May 29, 2019 at 10:57 AM Tycho Andersen wrote: > > > > On Mon, Apr 08, 2019 at 11:39:09PM -0400, Richard Guy Briggs wrote: > > > It is not permitted to unset the audit container identifier. > > > A child inherits its parent's au

Re: [PATCH bpf] libbpf: Return btf_fd in libbpf__probe_raw_btf

2019-05-29 Thread Andrii Nakryiko
On Wed, May 29, 2019 at 1:30 AM Michal Rostecki wrote: > > Function load_sk_storage_btf expects that libbpf__probe_raw_btf is > returning a btf descriptor, but before this change it was returning > an information about whether the probe was successful (0 or 1). > load_sk_storage_btf was using that

Re: [PATCH] arm64: dts: allwinner: Add GPU operating points for H6

2019-05-29 Thread Clément Péron
Hi Tomeu, On Wed, 29 May 2019 at 17:33, Tomeu Vizoso wrote: > > The GPU driver needs them to change the clock frequency and regulator > voltage depending on the load. As requested by Maxime, I have dropped these OPP table as It's taken from vendor and untested with Panfrost. https://lore.kernel

Re: [REVIEW][PATCH 00/26] signal: Remove task argument from force_sig_info

2019-05-29 Thread Eric W. Biederman
"Eric W. Biederman" writes: > Folks, > > If folks can look this over and see if I have missed something I would > appreciate it. > > The force_sig_info interface is designed to handle synchronous exceptions > like page faults. The locking in force_sig_info does not handle being > called on a rem

Re: [PATCH] mm: Fix recent_rotated history

2019-05-29 Thread Michal Hocko
On Tue 28-05-19 19:09:02, Kirill Tkhai wrote: > Johannes pointed that after commit 886cf1901db9 > we lost all zone_reclaim_stat::recent_rotated > history. This commit fixes that. > > Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to > shrink_inactive_list()" > Reported-by: Johanne

[PATCH net-next] sctp: deduplicate identical skb_checksum_ops

2019-05-29 Thread Matteo Croce
The same skb_checksum_ops struct is defined twice in two different places, leading to code duplication. Declare it as a global variable into a common header instead of allocating it on the stack on each function call. bloat-o-meter reports a slight code shrink. add/remove: 1/1 grow/shrink: 0/10 up

Re: [PATCH 1/1] Drivers: hv: vmbus: Break out ISA independent parts of mshyperv.h

2019-05-29 Thread Vitaly Kuznetsov
Michael Kelley writes: > Break out parts of mshyperv.h that are ISA independent into a > separate file in include/asm-generic. This move facilitates > ARM64 code reusing these definitions and avoids code > duplication. No functionality or behavior is changed. > > Signed-off-by: Michael Kelley >

Re: [PATCH] arm64: dts: allwinner: Add GPU operating points for H6

2019-05-29 Thread Tomeu Vizoso
On Wed, 29 May 2019 at 17:37, Clément Péron wrote: > > Hi Tomeu, > > On Wed, 29 May 2019 at 17:33, Tomeu Vizoso wrote: > > > > The GPU driver needs them to change the clock frequency and regulator > > voltage depending on the load. > > As requested by Maxime, I have dropped these OPP table as It'

Re: [PATCH v1 1/2] fork: add clone3

2019-05-29 Thread Yann Droneaud
Le mercredi 29 mai 2019 à 17:22 +0200, Christian Brauner a écrit : > This adds the clone3 system call. > > > diff --git a/kernel/fork.c b/kernel/fork.c > index b4cba953040a..6bc3e3d17150 100644 > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -2472,7 +2475,96 @@ SYSCALL_DEFINE5(clone, unsigned lo

Re: [PATCH] ipv4: tcp_input: fix stack out of bounds when parsing TCP options.

2019-05-29 Thread Eric Dumazet
On Wed, May 29, 2019 at 8:11 AM Yang Xiao <92siuy...@gmail.com> wrote: > > Indeed, condition opsize < 2 and opsize > length can deduce that length >= 2. > However, before the condition (if opsize < 2), there may be one-byte > out-of-bound access in line 12. > I'm not sure whether I have put it very

Re: [PATCH] mm: Fix recent_rotated history

2019-05-29 Thread Johannes Weiner
On Tue, May 28, 2019 at 07:09:02PM +0300, Kirill Tkhai wrote: > Johannes pointed that after commit 886cf1901db9 > we lost all zone_reclaim_stat::recent_rotated > history. This commit fixes that. > > Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to > shrink_inactive_list()" > Repo

Re: [PATCH 1/5] glibc: Perform rseq(2) registration at C startup and thread creation (v10)

2019-05-29 Thread Mathieu Desnoyers
- On May 27, 2019, at 3:27 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On May 27, 2019, at 7:19 AM, Florian Weimer fwei...@redhat.com wrote: > [...] >> >> Furthermore, the reference to ELF constructors is misleading. I believe >> the code you added to __libc_start

Applied "wcd9335: fix a incorrect use of kstrndup()" to the asoc tree

2019-05-29 Thread Mark Brown
The patch wcd9335: fix a incorrect use of kstrndup() has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sen

Applied "ASoC: cs42xx8: Fix build error with CONFIG_GPIOLIB is not set" to the asoc tree

2019-05-29 Thread Mark Brown
The patch ASoC: cs42xx8: Fix build error with CONFIG_GPIOLIB is not set has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the nex

Re: [PATCH bpf] libbpf: Return btf_fd in libbpf__probe_raw_btf

2019-05-29 Thread Michal Rostecki
On Wed, May 29, 2019 at 08:35:25AM -0700, Andrii Nakryiko wrote: > On Wed, May 29, 2019 at 1:30 AM Michal Rostecki > wrote: > > > > Function load_sk_storage_btf expects that libbpf__probe_raw_btf is > > returning a btf descriptor, but before this change it was returning > > an information about w

Re: [PATCH] rtlwifi: Fix null-pointer dereferences in error handling code of rtl_pci_probe()

2019-05-29 Thread Larry Finger
On 5/29/19 5:30 AM, Jia-Ju Bai wrote: On 2019/5/28 21:00, Larry Finger wrote: On 5/28/19 6:55 AM, Kalle Valo wrote: Jia-Ju Bai wrote: *BUG 1: In rtl_pci_probe(), when rtlpriv->cfg->ops->init_sw_vars() fails, rtl_deinit_core() in the error handling code is executed. rtl_deinit_core() calls

Re: [PATCH v7 01/12] x86/crypto: Adapt assembly for PIE support

2019-05-29 Thread Thomas Garnier
On Wed, May 22, 2019 at 1:55 PM Eric Biggers wrote: > > On Wed, May 22, 2019 at 01:47:07PM -0700, Thomas Garnier wrote: > > On Mon, May 20, 2019 at 9:06 PM Eric Biggers wrote: > > > > > > On Mon, May 20, 2019 at 04:19:26PM -0700, Thomas Garnier wrote: > > > > diff --git a/arch/x86/crypto/sha256-a

Re: [PATCH v7 11/12] x86/paravirt: Adapt assembly for PIE support

2019-05-29 Thread Thomas Garnier
On Sun, May 26, 2019 at 10:47 PM Juergen Gross wrote: > > On 21/05/2019 01:19, Thomas Garnier wrote: > > From: Thomas Garnier > > > > if PIE is enabled, switch the paravirt assembly constraints to be > > compatible. The %c/i constrains generate smaller code so is kept by > > default. > > > > Posi

Re: [net-next,v4 1/2] i2c: acpi: export i2c_acpi_find_adapter_by_handle

2019-05-29 Thread Andrew Lunn
On Tue, May 28, 2019 at 04:02:32PM -0700, Ruslan Babayev wrote: > This allows drivers to lookup i2c adapters on ACPI based systems similar to > of_get_i2c_adapter_by_node() with DT based systems. > > Signed-off-by: Ruslan Babayev Reviewed-by: Andrew Lunn Andrew

Re: [net-next,v4 2/2] net: phy: sfp: enable i2c-bus detection on ACPI based systems

2019-05-29 Thread Andrew Lunn
On Tue, May 28, 2019 at 04:02:33PM -0700, Ruslan Babayev wrote: > Lookup I2C adapter using the "i2c-bus" device property on ACPI based > systems similar to how it's done with DT. > > An example DSD describing an SFP on an ACPI based system: > > Device (SFP0) > { > Name (_HID, "PRP0001") >

Re: [net-next,v4 0/2] Enable SFP on ACPI based systems

2019-05-29 Thread Andrew Lunn
On Wed, May 29, 2019 at 12:48:18PM +0300, Mika Westerberg wrote: > On Tue, May 28, 2019 at 04:02:31PM -0700, Ruslan Babayev wrote: > > Changes: > > v2: > > - more descriptive commit body > > v3: > > - made 'i2c_acpi_find_adapter_by_handle' static inline > > v4: > > - don't initialize i2

Re: [PATCH] Fix xoring of arch_get_random_long into crng->state array

2019-05-29 Thread Neil Horman
On Wed, May 29, 2019 at 01:51:24PM +, David Laight wrote: > From: Neil Horman > > Sent: 29 May 2019 14:42 > > On Tue, Apr 02, 2019 at 06:00:25PM -0400, Neil Horman wrote: > > > When _crng_extract is called, any arch that has a registered > > > arch_get_random_long method, attempts to mix an uns

Re: [PATCH v8 3/3] i2c-ocores: sifive: add polling mode workaround for FU540-C000 SoC.

2019-05-29 Thread Andrew Lunn
On Wed, May 29, 2019 at 09:57:27AM +0530, Sagar Shrikant Kadam wrote: > The i2c-ocore driver already has a polling mode interface.But it needs > a workaround for FU540 Chipset on HiFive unleashed board (RevA00). > There is an erratum in FU540 chip that prevents interrupt driven i2c > transfers from

Re: [PATCH 3/4] staging: kpc2000: add missing spaces in core.c

2019-05-29 Thread Simon Sandström
On Mon, May 27, 2019 at 10:31:59AM +0300, Dan Carpenter wrote: > On Fri, May 24, 2019 at 01:08:01PM +0200, Simon Sandström wrote: > > [..] > > - ret = copy_to_user((void*)ioctl_param, (void*)&temp, > > sizeof(temp)); > > + ret = copy_to_user((void *)ioctl_param, (void *)&temp,

RE: [PATCH] Fix xoring of arch_get_random_long into crng->state array

2019-05-29 Thread David Laight
From: Neil Horman [mailto:nhor...@tuxdriver.com] > Sent: 29 May 2019 16:52 > On Wed, May 29, 2019 at 01:51:24PM +, David Laight wrote: > > From: Neil Horman > > > Sent: 29 May 2019 14:42 > > > On Tue, Apr 02, 2019 at 06:00:25PM -0400, Neil Horman wrote: > > > > When _crng_extract is called, any

Re: [PATCH] ptrace: restore smp_rmb() in __ptrace_may_access()

2019-05-29 Thread Eric W. Biederman
Jann Horn writes: > Restore the read memory barrier in __ptrace_may_access() that was deleted > a couple years ago. Also add comments on this barrier and the one it pairs > with to explain why they're there (as far as I understand). My bad. When I made that change I could not figure out what th

Re: Driver has suspect GRO implementation, TCP performance may be compromised.

2019-05-29 Thread Eric Dumazet
On Wed, May 29, 2019 at 7:49 AM Paul Menzel wrote: > > Dear Eric, > > > Thank you for the quick reply. > > On 05/28/19 19:18, Eric Dumazet wrote: > > On 5/28/19 8:42 AM, Paul Menzel wrote: > > >> Occasionally, Linux outputs the message below on the workstation Dell > >> OptiPlex 5040 MT. > >> > >>

Re: [PATCH] ptrace: restore smp_rmb() in __ptrace_may_access()

2019-05-29 Thread Jann Horn
On Wed, May 29, 2019 at 5:59 PM Eric W. Biederman wrote: > Jann Horn writes: > > > Restore the read memory barrier in __ptrace_may_access() that was deleted > > a couple years ago. Also add comments on this barrier and the one it pairs > > with to explain why they're there (as far as I understand

[PATCH V6] ARM: mach-shmobile: Don't init CNTVOFF/counter if PSCI is available

2019-05-29 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko If PSCI is available then most likely we are running on PSCI-enabled U-Boot which, we assume, has already taken care of resetting CNTVOFF and updating counter module before switching to non-secure mode and we don't need to. As the psci_smp_available() helper always ret

Re: [PATCH] mlx5: avoid 64-bit division

2019-05-29 Thread Jason Gunthorpe
On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > breaks i386 build by introducing three 64-bit divisions. As the divisor > is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace > the divisi

Re: [PATCH net v2] ethtool: Drop check for vlan etype and vlan tci when parsing flow_rule

2019-05-29 Thread Pablo Neira Ayuso
On Wed, May 29, 2019 at 05:13:44PM +0200, Maxime Chevallier wrote: > When parsing an ethtool flow spec to build a flow_rule, the code checks > if both the vlan etype and the vlan tci are specified by the user to add > a FLOW_DISSECTOR_KEY_VLAN match. > > However, when the user only specified a vla

Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume

2019-05-29 Thread Josh Poimboeuf
On Wed, May 29, 2019 at 12:32:02PM +0200, Jiri Kosina wrote: > From: Jiri Kosina > > As explained in > > 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once") > > we always, no matter what, have to bring up x86 HT siblings during boot at > least once in order to avoid first MCE br

pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Oleg Nesterov
Al, Linus, Eric, please help. The previous discussion was very confusing, we simply can not understand each other. To me everything looks very simple and clear, but perhaps I missed something obvious? Please correct me. I think that the following code is correct int interrupted = 0;

Re: [RFC PATCH v5 16/16] dcache: Add CONFIG_DCACHE_SMO

2019-05-29 Thread Roman Gushchin
On Wed, May 29, 2019 at 01:54:06PM +1000, Tobin C. Harding wrote: > On Tue, May 21, 2019 at 02:05:38AM +, Roman Gushchin wrote: > > On Tue, May 21, 2019 at 11:31:18AM +1000, Tobin C. Harding wrote: > > > On Tue, May 21, 2019 at 12:57:47AM +, Roman Gushchin wrote: > > > > On Mon, May 20, 201

[PATCH] i2c: mux: Use struct_size() in devm_kzalloc()

2019-05-29 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = devm_kzalloc(dev, si

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-29 Thread Peter Zijlstra
On Wed, May 29, 2019 at 03:35:10PM +0100, Will Deacon wrote: > On Wed, May 29, 2019 at 03:25:15PM +0200, Peter Zijlstra wrote: > > On Wed, May 29, 2019 at 02:05:21PM +0100, Will Deacon wrote: > > > On Wed, May 29, 2019 at 02:55:57PM +0200, Peter Zijlstra wrote: > > > > > > if (user_mode(re

Re: [PATCH] ptrace: restore smp_rmb() in __ptrace_may_access()

2019-05-29 Thread Oleg Nesterov
On 05/29, Jann Horn wrote: > > (I have no clue whatsoever what the relevant tree for this is, but I > guess Oleg is the relevant maintainer?) we usually route ptrace changes via -mm tree, plus I lost my account on korg. > --- a/kernel/ptrace.c > +++ b/kernel/ptrace.c > @@ -324,6 +324,16 @@ static

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-29 Thread Mark Rutland
On Wed, May 29, 2019 at 06:19:55PM +0200, Peter Zijlstra wrote: > On Wed, May 29, 2019 at 03:35:10PM +0100, Will Deacon wrote: > > On Wed, May 29, 2019 at 03:25:15PM +0200, Peter Zijlstra wrote: > > > On Wed, May 29, 2019 at 02:05:21PM +0100, Will Deacon wrote: > > > > On Wed, May 29, 2019 at 02:55

Re: [PATCH] mm/slab_common.c: fix possible spectre-v1 in kmalloc_slab()

2019-05-29 Thread Michal Hocko
On Wed 29-05-19 20:37:28, Dianzhang Chen wrote: [...] > @@ -1056,6 +1057,7 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t > flags) > if (!size) > return ZERO_SIZE_PTR; > > + size = array_index_nospec(size, 193); > index = size_

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-29 Thread Will Deacon
On Wed, May 29, 2019 at 06:19:55PM +0200, Peter Zijlstra wrote: > On Wed, May 29, 2019 at 03:35:10PM +0100, Will Deacon wrote: > > On Wed, May 29, 2019 at 03:25:15PM +0200, Peter Zijlstra wrote: > > > On Wed, May 29, 2019 at 02:05:21PM +0100, Will Deacon wrote: > > > > On Wed, May 29, 2019 at 02:55

Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume

2019-05-29 Thread Jiri Kosina
On Wed, 29 May 2019, Josh Poimboeuf wrote: > hibernation_restore() is called by user space at runtime, via ioctl or > sysfs. So I think this still doesn't fix the case where you've disabled > CPUs at runtime via sysfs, and then resumed from hibernation. Or are we > declaring that this is not

[PATCH] clocksource/drivers/tcb_clksrc: register delay timer

2019-05-29 Thread Alexandre Belloni
Implement and register delay timer to allow get_cycles() to work properly. Signed-off-by: Alexandre Belloni --- drivers/clocksource/timer-atmel-tcb.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-t

memory leak in kobject_set_name_vargs

2019-05-29 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:9fb67d64 Merge tag 'pinctrl-v5.2-2' of git://git.kernel.or.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=11929a5ca0 kernel config: https://syzkaller.appspot.com/x/.config?x=64479170dcaf0e11 da

Re: [PATCH] Fix xoring of arch_get_random_long into crng->state array

2019-05-29 Thread Neil Horman
On Wed, May 29, 2019 at 03:57:07PM +, David Laight wrote: > From: Neil Horman [mailto:nhor...@tuxdriver.com] > > Sent: 29 May 2019 16:52 > > On Wed, May 29, 2019 at 01:51:24PM +, David Laight wrote: > > > From: Neil Horman > > > > Sent: 29 May 2019 14:42 > > > > On Tue, Apr 02, 2019 at 06:0

Re: [PATCH v3 4/4] mm/vmap: move BUG_ON() check to the unlink_va()

2019-05-29 Thread Roman Gushchin
On Wed, May 29, 2019 at 03:58:17PM +0200, Uladzislau Rezki wrote: > Hello, Roman! > > > > Move the BUG_ON()/RB_EMPTY_NODE() check under unlink_va() > > > function, it means if an empty node gets freed it is a BUG > > > thus is considered as faulty behaviour. > > > > It's not exactly clear from th

[PATCH] eeprom: at24: use struct_size() in devm_kzalloc()

2019-05-29 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + cou

Re: [PATCH v5 0/3] Qualcomm QCS404 PCIe support

2019-05-29 Thread Lorenzo Pieralisi
On Tue, May 28, 2019 at 05:57:07PM -0700, Bjorn Andersson wrote: > This series adds support for the PCIe controller in the Qualcomm QCS404 > platform. > > Bjorn Andersson (3): > PCI: qcom: Use clk_bulk API for 2.4.0 controllers > dt-bindings: PCI: qcom: Add QCS404 to the binding > PCI: qcom:

[PATCH bpf v3] libbpf: Return btf_fd for load_sk_storage_btf

2019-05-29 Thread Michal Rostecki
Before this change, function load_sk_storage_btf expected that libbpf__probe_raw_btf was returning a BTF descriptor, but in fact it was returning an information about whether the probe was successful (0 or 1). load_sk_storage_btf was using that value as an argument of the close function, which was

Re: [PATCH v3 2/4] mm/vmap: preload a CPU with one object for split purpose

2019-05-29 Thread Roman Gushchin
On Wed, May 29, 2019 at 04:27:15PM +0200, Uladzislau Rezki wrote: > Hello, Roman! > > > On Mon, May 27, 2019 at 11:38:40AM +0200, Uladzislau Rezki (Sony) wrote: > > > Refactor the NE_FIT_TYPE split case when it comes to an > > > allocation of one extra object. We need it in order to > > > build a

Re: Driver has suspect GRO implementation, TCP performance may be compromised.

2019-05-29 Thread Stephen Hemminger
On Wed, 29 May 2019 09:00:54 -0700 Eric Dumazet wrote: > On Wed, May 29, 2019 at 7:49 AM Paul Menzel wrote: > > > > Dear Eric, > > > > > > Thank you for the quick reply. > > > > On 05/28/19 19:18, Eric Dumazet wrote: > > > On 5/28/19 8:42 AM, Paul Menzel wrote: > > > > >> Occasionally, Lin

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-29 Thread Mark Rutland
On Wed, May 29, 2019 at 05:24:36PM +0100, Mark Rutland wrote: > On Wed, May 29, 2019 at 06:19:55PM +0200, Peter Zijlstra wrote: > > On Wed, May 29, 2019 at 03:35:10PM +0100, Will Deacon wrote: > > > On Wed, May 29, 2019 at 03:25:15PM +0200, Peter Zijlstra wrote: > > > > On Wed, May 29, 2019 at 02:0

Re: [PATCH] mm/slab_common.c: fix possible spectre-v1 in kmalloc_slab()

2019-05-29 Thread Dianzhang Chen
It's come from `192+1`. The more code fragment is: if (size <= 192) { if (!size) return ZERO_SIZE_PTR; size = array_index_nospec(size, 193); index = size_index[size_index_elem(size)]; } Sine array_index_nospec(index, size) can clamp the index within the range of [0, s

Re: [PATCH] riscv: fix locking violation in page fault handler

2019-05-29 Thread Palmer Dabbelt
On Thu, 16 May 2019 00:42:01 PDT (-0700), sch...@suse.de wrote: On Mai 07 2019, Palmer Dabbelt wrote: LMK if you, or anyone else, has a preference. I'm assuming this will go in through my tree, so I've picked up my version for now :) You did? It ended up landing in Linus' tree as 8fef9900

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-29 Thread Peter Zijlstra
On Wed, May 29, 2019 at 05:25:28PM +0100, Will Deacon wrote: > > > > On Wed, May 29, 2019 at 02:05:21PM +0100, Will Deacon wrote: > > > > > On Wed, May 29, 2019 at 02:55:57PM +0200, Peter Zijlstra wrote: > > > > > > > > > > if (user_mode(regs)) { > > > > > > > > > > Hmm, so it just occurred

Re: [PATCH 2/9] perf/x86/intel: Basic support for metrics counters

2019-05-29 Thread Peter Zijlstra
On Wed, May 29, 2019 at 10:40:52AM -0400, Liang, Kan wrote: > On 5/29/2019 3:28 AM, Peter Zijlstra wrote: > > One way would be to make these 48-51 and put BTS as 52, and then you do > > Can we put BTS 47? Sure, it doesn't matter where you put it. It just needs to be a free bit position, the rest

Re: [PATCH] hfsplus: Replace strncpy with memcpy

2019-05-29 Thread Viacheslav Dubeyko
On Wed, 2019-05-29 at 13:33 +0200, Mathieu Malaterre wrote: > Function strncpy was used to copy a fixed size buffer. Since > NUL-terminating string is not required here, prefer a memcpy > function. > The generated code (ppc32) remains the same. > > Silence the following warning triggered using W=1

[PATCH] ima: use struct_size() in kzalloc()

2019-05-29 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kzalloc(sizeof(struct

RE: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread David Laight
From: Oleg Nesterov > Sent: 29 May 2019 17:12 > Al, Linus, Eric, please help. > > The previous discussion was very confusing, we simply can not understand each > other. > > To me everything looks very simple and clear, but perhaps I missed something > obvious? Please correct me. > > I think that

Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Deepa Dinamani
Resending due to inadvertent conversion of prior message to html. On Wed, May 29, 2019 at 9:12 AM Oleg Nesterov wrote: > Al, Linus, Eric, please help. > > The previous discussion was very confusing, we simply can not understand each > other. > > To me everything looks very simple and clear, but p

[PATCH v2] drivers/media/dvb-frontends: Implement probe/remove for stv6110x

2019-05-29 Thread Tobias Klausmann
Refactor out the common parts of stv6110x_probe() and stv6110x_attach() into separate functions. This provides the needed functionality to use dvb_module_probe() instead of dvb_attach()! v2: - Impovments based on comments by Sean Young - Fix checkpatch.pl --strict errors Signed-off-by: Tobias Kl

Re: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask()

2019-05-29 Thread Oleg Nesterov
On 05/28, Deepa Dinamani wrote: > > I agree that signal handller being called and return value not being > altered is an issue with other syscalls also. I was just wondering if > some userspace code assumption would be assuming this. This is not a > kernel bug. > > But, I do not think we have an un

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-29 Thread Peter Zijlstra
On Wed, May 29, 2019 at 10:42:10AM -0400, Liang, Kan wrote: > On 5/29/2019 3:54 AM, Peter Zijlstra wrote: > > cd09c0c40a97 ("perf events: Enable raw event support for Intel > > unhalted_reference_cycles event") > > > > We used the fake event=0x00, umask=0x03 for CPU_CLK_UNHALTED.REF_TSC, > > bec

Re: [PATCH v2 0/2] tools: PCI: Fix broken pcitest compilation

2019-05-29 Thread Lorenzo Pieralisi
On Thu, May 23, 2019 at 02:17:59PM -0700, Alan Mikhak wrote: > This patchset fixes a compiler error and two warnings that resulted in a > broken compilation of pcitest. > > tools/pci/pcitest.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Applied to pci/misc for v5.3, thanks.

Re: [PATCH net-next] sctp: deduplicate identical skb_checksum_ops

2019-05-29 Thread Neil Horman
On Wed, May 29, 2019 at 05:39:41PM +0200, Matteo Croce wrote: > The same skb_checksum_ops struct is defined twice in two different places, > leading to code duplication. Declare it as a global variable into a common > header instead of allocating it on the stack on each function call. > bloat-o-met

Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume

2019-05-29 Thread Peter Zijlstra
On Wed, May 29, 2019 at 06:26:59PM +0200, Jiri Kosina wrote: > On Wed, 29 May 2019, Josh Poimboeuf wrote: > > Is there are reason why maxcpus= doesn't do the CR4.MCE booted_once > > dance? > > I am not sure whether it's really needed. My understanding is that the MCE > issue happens only after p

Re: [PATCH 0/2] cpufreq: brcmstb-avs-cpufreq: Couple fixes

2019-05-29 Thread Florian Fainelli
On 5/27/19 3:51 AM, Rafael J. Wysocki wrote: > On Wednesday, May 22, 2019 8:45:45 PM CEST Florian Fainelli wrote: >> Hi Rafael, Viresh, >> >> These patch series contains two minor fixes for the brcmstb-avs-cpufreq >> driver. >> >> Florian Fainelli (2): >> cpufreq: brcmstb-avs-cpufreq: Fix initial

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-29 Thread Peter Zijlstra
On Wed, May 29, 2019 at 05:38:54PM +0100, Mark Rutland wrote: > Sorry for the noise. n/p, confusion happens :-) > Generally speaking though, if we ever task task_pt_regs() of an idle > task we'll get junk, and user_mode() could be true. Agreed, but we're not doing that.

Re: Testing the recent RISC-V DT patchsets

2019-05-29 Thread Atish Patra
On 5/29/19 3:04 AM, Loys Ollivier wrote: On Wed 29 May 2019 at 00:50, Atish Patra wrote: On 5/28/19 8:36 AM, Karsten Merker wrote: On Tue, May 28, 2019 at 05:10:42PM +0200, Loys Ollivier wrote: On Tue 28 May 2019 at 01:32, Paul Walmsley wrote: An update for those testing RISC-V patches: h

Re: [PATCH net-next] sctp: deduplicate identical skb_checksum_ops

2019-05-29 Thread Marcelo Ricardo Leitner
On Wed, May 29, 2019 at 05:39:41PM +0200, Matteo Croce wrote: > The same skb_checksum_ops struct is defined twice in two different places, > leading to code duplication. Declare it as a global variable into a common > header instead of allocating it on the stack on each function call. > bloat-o-met

Re: [PATCH] net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT

2019-05-29 Thread Vivien Didelot
Hi Rasmus, Andrew, On Wed, 29 May 2019 06:42:53 +, Rasmus Villemoes wrote: > On 28/05/2019 15.44, Andrew Lunn wrote: > > On Tue, May 28, 2019 at 01:17:10PM +, Rasmus Villemoes wrote: > >> Currently, the upper half of a 4-byte STATS_TYPE_PORT statistic ends > >> up in bits 47:32 of the re

Re: [PATCH v1] KVM: x86: PMU Whitelist

2019-05-29 Thread Eric Hankland
On Wed, May 29, 2019 at 12:49 AM Wei Wang wrote: > > On 05/29/2019 02:14 AM, Eric Hankland wrote: > > On Mon, May 27, 2019 at 6:56 PM Wei Wang wrote: > >> On 05/23/2019 06:23 AM, Eric Hankland wrote: > >>> - Add a VCPU ioctl that can control which events the guest can monitor. > >>> > >>> Signed-

Re: PROBLEM: oops spew with Linux 5.1.5 (NFS regression?)

2019-05-29 Thread Trond Myklebust
On Wed, 2019-05-29 at 11:10 -0400, Nick Bowler wrote: > Hi, > > I upgraded to Linux 5.1.5 on one machine yesterday, and this morning > I > happened noticed a large amount of backtraces in the log. It appears > that the system oopsed 62 times over a period of about 5 minutes, > producing about hal

Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume

2019-05-29 Thread Thomas Gleixner
On Wed, 29 May 2019, Peter Zijlstra wrote: > On Wed, May 29, 2019 at 06:26:59PM +0200, Jiri Kosina wrote: > > On Wed, 29 May 2019, Josh Poimboeuf wrote: > > > > Is there are reason why maxcpus= doesn't do the CR4.MCE booted_once > > > dance? > > > > I am not sure whether it's really needed. My un

Re: [PATCH net v2] net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT

2019-05-29 Thread Vivien Didelot
Hi Rasmus, On Wed, 29 May 2019 07:02:11 +, Rasmus Villemoes wrote: > Currently, the upper half of a 4-byte STATS_TYPE_PORT statistic ends > up in bits 47:32 of the return value, instead of bits 31:16 as they > should. > > Fixes: 6e46e2d821bb ("net: dsa: mv88e6xxx: Fix u64 statistics") > Sig

Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume

2019-05-29 Thread Josh Poimboeuf
On Wed, May 29, 2019 at 06:26:59PM +0200, Jiri Kosina wrote: > On Wed, 29 May 2019, Josh Poimboeuf wrote: > > > hibernation_restore() is called by user space at runtime, via ioctl or > > sysfs. So I think this still doesn't fix the case where you've disabled > > CPUs at runtime via sysfs, and t

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