[PATCH v2] uml: fix a boot splat wrt use of cpu_all_mask

2019-04-10 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Memory: 509108K/542612K available (3835K kernel code, 919K rwdata, 1028K rodata, 129K init, 211K bss, 33504K reserved, 0K cma-reserved) NR_IRQS: 15 clocksource: timer: mask: 0x max_cycles: 0x1cd42e205, max_idle_ns: 881590404426 ns [ cut here

Re: [PATCH v3 4/9] livepatch: Add klp-convert annotation helpers

2019-04-10 Thread Joe Lawrence
On Wed, Apr 10, 2019 at 11:50:53AM -0400, Joe Lawrence wrote: > From: Josh Poimboeuf > > Define macros KLP_MODULE_RELOC and KLP_SYMPOS in > include/linux/livepatch.h to improve user-friendliness of the > livepatch annotation process. > > Signed-off-by: Josh Poimboeuf > Signed-off-by: Joao Morei

Re: [PATCH 1/2] module: Prepare for addition of new ro_after_init sections

2019-04-10 Thread Kees Cook
On Wed, Apr 10, 2019 at 10:48 AM Joel Fernandes wrote: > Thanks, if you are Ok with it, I will add your Reviewed-by tag as well. With those fixes, absolutely. :) Thanks! -- Kees Cook

Re: [PATCH V5 08/12] perf/x86/intel: Add Icelake support

2019-04-10 Thread Liang, Kan
On 4/8/2019 11:45 AM, Liang, Kan wrote: On 4/8/2019 11:06 AM, Peter Zijlstra wrote: On Tue, Apr 02, 2019 at 12:45:05PM -0700, kan.li...@linux.intel.com wrote: +static struct event_constraint * +icl_get_event_constraints(struct cpu_hw_events *cpuc, int idx, +  struct perf_event

Re: [PATCH v3 3/9] livepatch: Add klp-convert tool

2019-04-10 Thread Joe Lawrence
On Wed, Apr 10, 2019 at 11:50:52AM -0400, Joe Lawrence wrote: > > [ ... snip ... ] > > diff --git a/scripts/livepatch/klp-convert.c b/scripts/livepatch/klp-convert.c > new file mode 100644 > index ..62bd26941081 > --- /dev/null > +++ b/scripts/livepatch/klp-convert.c > > [ ... snip ...

[PATCH][next] iio: temperature: max31856: fix uninitialized error return

2019-04-10 Thread Colin King
From: Colin Ian King Currently if mask is neither CHAN_INFO_RAW or CHAN_INFO_SCALE then then an uninitialized error return 'ret' is returned. Fix this by adding a default case that ensures -EINVAL is returned for this specific case. Addresses-Coverity: ("Uninitialized scalar variable") Signed-of

Re: [PATCH 1/2] module: Prepare for addition of new ro_after_init sections

2019-04-10 Thread Steven Rostedt
On Wed, 10 Apr 2019 11:21:23 -0700 Kees Cook wrote: > On Wed, Apr 10, 2019 at 10:48 AM Joel Fernandes > wrote: > > Thanks, if you are Ok with it, I will add your Reviewed-by tag as well. > > With those fixes, absolutely. :) Thanks! > I'll wait for v2 before adding my reviewed-by. ;-) -- S

Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper

2019-04-10 Thread Gustavo A. R. Silva
Hi Johan, On 4/4/19 1:57 AM, Johan Hovold wrote: > > This patch looks good, but I noticed a bug here in the current code, > which should be fixed before applying this clean up. > > sizeof(req) should have been sizeof(*req) above. > Good catch. >> - sizeof(struct gb

[PATCH] ARM: dts: rockchip: Remove unnecessary setting of UART0 SCLK rate on veyron

2019-04-10 Thread Matthias Kaehlcke
Some veyron devices have a Bluetooth controller connected on UART0. The UART needs to operate at a high speed, however setting the clock rate at initialization has no practical effect. During initialization user space adjusts the UART baudrate multiple times, which ends up changing the SCLK rate. A

Re: [PATCH v2 2/5] arm64, mm: Move generic mmap layout functions to mm

2019-04-10 Thread Kees Cook
On Wed, Apr 10, 2019 at 12:33 AM Alexandre Ghiti wrote: > > On 04/10/2019 08:59 AM, Christoph Hellwig wrote: > > On Thu, Apr 04, 2019 at 01:51:25AM -0400, Alexandre Ghiti wrote: > >> - fix the case where stack randomization should not be taken into > >>account. > > Hmm. This sounds a bit vagu

Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper

2019-04-10 Thread Gustavo A. R. Silva
Johan, On 4/4/19 2:24 AM, Johan Hovold wrote: > On Thu, Apr 04, 2019 at 08:09:51AM +0100, Rui Miguel Silva wrote: >> Hi Gustavo, >> Thanks a lot for the patch. >> >> On Wed 03 Apr 2019 at 21:58, Gustavo A. R. Silva wrote: >>> Make use of the struct_size() helper instead of an open-coded >>> versi

Re: [PATCH-tip v2 03/12] locking/rwsem: Remove rwsem_wake() wakeup optimization

2019-04-10 Thread Davidlohr Bueso
On Fri, 05 Apr 2019, Waiman Long wrote: With the commit 59aabfc7e959 ("locking/rwsem: Reduce spinlock contention in wakeup after up_read()/up_write()"), the rwsem_wake() forgoes doing a wakeup if the wait_lock cannot be directly acquired and an optimistic spinning locker is present. This can he

Re: [PATCH] clk: rockchip: Fix video codec clocks on rk3288

2019-04-10 Thread Jonas Karlman
On 2019-04-10 17:45, Doug Anderson wrote: > Hi, > > On Fri, Mar 29, 2019 at 2:55 PM Douglas Anderson > wrote: >> It appears that there is a typo in the rk3288 TRM. For >> GRF_SOC_CON0[7] it says that 0 means "vepu" and 1 means "vdpu". It's >> the other way around. >> >> How do I know? Here's m

Re: [PATCH v2 2/2] PCI/DPC: Add Error Disconnect Recover (EDR) support

2019-04-10 Thread Bjorn Helgaas
On Tue, Mar 19, 2019 at 01:47:29PM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > As per PCI firmware specification v3.2 ECN > (https://members.pcisig.com/wg/PCI-SIG/document/12614), when firmware > owns Downstream Port Containment (DPC), its expe

[PATCH-tip v3 01/14] locking/rwsem: Prevent unneeded warning during locking selftest

2019-04-10 Thread Waiman Long
Disable the DEBUG_RWSEMS check when locking selftest is running with debug_locks_silent flag set. Signed-off-by: Waiman Long --- kernel/locking/rwsem.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/locking/rwsem.h b/kernel/locking/rwsem.h index 37db17890e36..64877f

[PATCH-tip v3 03/14] locking/rwsem: Implement a new locking scheme

2019-04-10 Thread Waiman Long
The current way of using various reader, writer and waiting biases in the rwsem code are confusing and hard to understand. I have to reread the rwsem count guide in the rwsem-xadd.c file from time to time to remind myself how this whole thing works. It also makes the rwsem code harder to be optimiz

[PATCH-tip v3 10/14] locking/rwsem: Enable time-based spinning on reader-owned rwsem

2019-04-10 Thread Waiman Long
When the rwsem is owned by reader, writers stop optimistic spinning simply because there is no easy way to figure out if all the readers are actively running or not. However, there are scenarios where the readers are unlikely to sleep and optimistic spinning can help performance. This patch provid

[PATCH-tip v3 00/14] locking/rwsem: Rwsem rearchitecture part 2

2019-04-10 Thread Waiman Long
v3: - Add 2 more patches in front to fix build and testing issues found. Patch 1 can actually be merged on top of the patch "locking/rwsem: Enhance DEBUG_RWSEMS_WARN_ON() macro" in part 1. - Change the handoff patch (now patch 4) to set handoff bit immediately after wakeup for RT w

[PATCH-tip v3 05/14] locking/rwsem: Remove rwsem_wake() wakeup optimization

2019-04-10 Thread Waiman Long
With the commit 59aabfc7e959 ("locking/rwsem: Reduce spinlock contention in wakeup after up_read()/up_write()"), the rwsem_wake() forgoes doing a wakeup if the wait_lock cannot be directly acquired and an optimistic spinning locker is present. This can help performance by avoiding spinning on the

[PATCH-tip v3 14/14] locking/rwsem: Remove redundant computation of writer lock word

2019-04-10 Thread Waiman Long
On 64-bit architectures, each rwsem writer will have its unique lock word for acquiring the lock. Right now, the writer code recomputes the lock word every time it tries to acquire the lock. This is a waste of time. The lock word is now cached and reused when it is needed. On 32-bit architectures,

[PATCH-tip v3 08/14] locking/rwsem: Wake up almost all readers in wait queue

2019-04-10 Thread Waiman Long
When the front of the wait queue is a reader, other readers immediately following the first reader will also be woken up at the same time. However, if there is a writer in between. Those readers behind the writer will not be woken up. Because of optimistic spinning, the lock acquisition order is n

[PATCH-tip v3 11/14] locking/rwsem: Add more rwsem owner access helpers

2019-04-10 Thread Waiman Long
Before combining owner and count, we are adding two new helpers for accessing the owner value in the rwsem. 1) struct task_struct *rwsem_get_owner(struct rw_semaphore *sem) 2) bool is_rwsem_reader_owned(struct rw_semaphore *sem) Signed-off-by: Waiman Long --- kernel/locking/rwsem-xadd.c | 15

[PATCH-tip v3 07/14] locking/rwsem: Ensure an RT task will not spin on reader

2019-04-10 Thread Waiman Long
An RT task can do optimistic spinning only if the lock holder is actually running. If the state of the lock holder isn't known, there is a possibility that high priority of the RT task may block forward progress of the lock holder if it happens to reside on the same CPU. This will lead to deadlock.

[PATCH-tip v3 12/14] locking/rwsem: Guard against making count negative

2019-04-10 Thread Waiman Long
The upper bits of the count field is used as reader count. When sufficient number of active readers are present, the most significant bit will be set and the count becomes negative. If the number of active readers keep on piling up, we may eventually overflow the reader counts. This is not likely t

[PATCH-tip v3 13/14] locking/rwsem: Merge owner into count on x86-64

2019-04-10 Thread Waiman Long
With separate count and owner, there are timing windows where the two values are inconsistent. That can cause problem when trying to figure out the exact state of the rwsem. For instance, a RT task will stop optimistic spinning if the lock is acquired by a writer but the owner field isn't set yet.

[PATCH-tip v3 09/14] locking/rwsem: Enable readers spinning on writer

2019-04-10 Thread Waiman Long
This patch enables readers to optimistically spin on a rwsem when it is owned by a writer instead of going to sleep directly. The rwsem_can_spin_on_owner() function is extracted out of rwsem_optimistic_spin() and is called directly by __rwsem_down_read_failed_common() and __rwsem_down_write_failed

[PATCH-tip v3 04/14] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-04-10 Thread Waiman Long
Because of writer lock stealing, it is possible that a constant stream of incoming writers will cause a waiting writer or reader to wait indefinitely leading to lock starvation. The mutex code has a lock handoff mechanism to prevent lock starvation. This patch implements a similar lock handoff mec

[PATCH-tip v3 06/14] locking/rwsem: Make rwsem_spin_on_owner() return owner state

2019-04-10 Thread Waiman Long
This patch modifies rwsem_spin_on_owner() to return four possible values to better reflect the state of lock holder which enables us to make a better decision of what to do next. In the special case that there is no active lock and the handoff bit is set, optimistic spinning has to be stopped. Si

[PATCH-tip v3 02/14] locking/rwsem: Make owner available even if !CONFIG_RWSEM_SPIN_ON_OWNER

2019-04-10 Thread Waiman Long
The owner field in the rw_semaphore structure is used primarily for optimistic spinning. However, identifying the rwsem owner can also be helpful in debugging as well as tracing locking related issues when analyzing crash dump. The owner field may also store state information that can be important

Re: [PATCH-tip v2 02/12] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-04-10 Thread Peter Zijlstra
On Fri, Apr 05, 2019 at 03:21:05PM -0400, Waiman Long wrote: > Because of writer lock stealing, it is possible that a constant > stream of incoming writers will cause a waiting writer or reader to > wait indefinitely leading to lock starvation. > > The mutex code has a lock handoff mechanism to pr

[GIT PULL] Please pull RDMA subsystem changes

2019-04-10 Thread Jason Gunthorpe
Hi Linus, Second rc pull request The following changes since commit 8c2ffd9174779014c3fe1f96d9dc3641d9175f00: Linux 5.1-rc2 (2019-03-24 14:02:26 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git tags/for-linus for you to fetch chang

Re: [PATCH 2/2] kernel: use sysctl shared variables for range check

2019-04-10 Thread Kees Cook
On Mon, Apr 8, 2019 at 3:09 PM Matteo Croce wrote: > > Use the shared variables for range check, instead of declaring a local one > in every source file. I was expecting this to be a tree-wide change for all the cases found by patch 1's "git grep". Slight change to the grep for higher accuracy:

Re: [PATCH 18/22] watchdog: mt7621_wdt: Use 'dev' instead of dereferencing it repeatedly

2019-04-10 Thread Joe Perches
On Wed, 2019-04-10 at 09:27 -0700, Guenter Roeck wrote: > Introduce local variable 'struct device *dev' and use it instead of > dereferencing it repeatedly. > > The conversion was done automatically with coccinelle using the > following semantic patches. The semantic patches and the scripts > used

Re: [PATCH v3 1/9] ARM: dts: imx6qdl: Specify IMX6QDL_CLK_IPG as "ipg" clock to SDMA

2019-04-10 Thread Adam Ford
On Fri, Mar 29, 2019 at 1:49 AM Andrey Smirnov wrote: > > Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" > clock to determine if it needs to configure the IP block as operating > at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both > clocks as IMX6QDL_CLK_SDMA

[PATCH] watchdog: machzwd: Mark expected switch fall-through

2019-04-10 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/watchdog/machzwd.c: In function ‘zf_set_timer’: ./arch/x86/include/asm/io.h:355:14: warning: this statement may fall through [-Wimplicit-f

Re: [PATCH] of: del redundant type conversion

2019-04-10 Thread Frank Rowand
On 4/10/19 1:29 AM, xiaojiangfeng wrote: > The type of variable l in early_init_dt_scan_chosen is > int, there is no need to convert to int. > > Signed-off-by: xiaojiangfeng > --- > drivers/of/fdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/of/fdt.c b/driv

Re: [PATCH 12/12] [PROBABLY WRONG] s390: void '0' constraint in inline assembly

2019-04-10 Thread Arnd Bergmann
On Wed, Apr 10, 2019 at 3:55 PM Martin Schwidefsky wrote: > > On Mon, 8 Apr 2019 23:26:25 +0200 > Arnd Bergmann wrote: > > > diff --git a/arch/s390/include/asm/processor.h > > b/arch/s390/include/asm/processor.h > > index 700c650ffd4f..84c59c99668a 100644 > > --- a/arch/s390/include/asm/process

Re: [PATCH 05/12] s390: zcrypt: initialize variables before_use

2019-04-10 Thread Arnd Bergmann
On Wed, Apr 10, 2019 at 5:59 PM Martin Schwidefsky wrote: > On Tue, 9 Apr 2019 11:54:30 +0200 Harald Freudenberger > wrote: > > On 08.04.19 23:26, Arnd Bergmann wrote: > > > } > > Thanks Arnd, but as Nathan already wrote, I'd prefer to have the > > variable initialized with 0 instead

[PATCH V2 0/2] perf: Add Tremont support

2019-04-10 Thread kan . liang
From: Kan Liang The patch series intends to add Tremont support for Linux perf. The patch series is on top of Icelake V5 patch series (with Peter's cleanup patch). https://lkml.org/lkml/2019/4/8/630 PATCH 1: A fix for Icelake V5 patch series (with Peter's cleanup patch). It can be mer

[PATCH V2 2/2] perf/x86/intel: Add Tremont core PMU support

2019-04-10 Thread kan . liang
From: Kan Liang Add perf core PMU support for Intel Tremont CPU. The init code is based on Goldmont plus. The generic purpose counter 0 and fixed counter 0 have less skid. Force :ppp events on generic purpose counter 0. Force instruction:ppp on generic purpose counter 0 and fixed counter 0. Up

[PATCH V2 1/2] perf/x86/intel: Fix the checking for instruction event

2019-04-10 Thread kan . liang
From: Kan Liang Some bits must be masked before checking X86_CONFIG(.event=0xc0), e.g. ARCH_PERFMON_EVENTSEL_INT, ARCH_PERFMON_EVENTSEL_USR and ARCH_PERFMON_EVENTSEL_OS. Those bits will be set in hw_config(). Otherwise the condition will never be met. Other fields, e.g the INV, ANY, E, or CMASK

Re: [PATCH 02/12] s390: don't build vdso32 with clang

2019-04-10 Thread Arnd Bergmann
On Wed, Apr 10, 2019 at 6:26 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Mon, Apr 8, 2019 at 2:27 PM Arnd Bergmann wrote: > > > > clang does not support 31 bit object files on s390, so skip > > the 32-bit vdso here, and only build it when using gcc to compile > > the kernel. > > Wha

Re: [RESEND PATCHv3 0/3] Update Stratix10 EDAC Bindings

2019-04-10 Thread Borislav Petkov
On Tue, Apr 09, 2019 at 05:32:07PM -0500, Thor Thayer wrote: > I have ACKs on patches 1 & 3. Patch 2 has a Reviewed-by from Rob Herring > which was sufficient in the past. Sorry about that - I missed those because I looked only at the diffstat and decided this series is not for me :) Anyway, all

Re: [PATCH 10/12] s390: avoid __builtin_return_address(n) on clang

2019-04-10 Thread Arnd Bergmann
On Wed, Apr 10, 2019 at 6:14 PM Steven Rostedt wrote: > On Wed, 10 Apr 2019 18:03:57 +0200 Martin Schwidefsky > wrote: > > > > --- a/arch/s390/include/asm/ftrace.h > > > +++ b/arch/s390/include/asm/ftrace.h > > > @@ -13,7 +13,12 @@ > > > > > > #ifndef __ASSEMBLY__ > > > > > > +#ifdef CONFIG_CC_

[PATCH v2 2/3] module: Make srcu_struct ptr array as read-only post init

2019-04-10 Thread Joel Fernandes (Google)
Since commit title ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules"), modules that call DEFINE_{STATIC,}SRCU will have a new array of srcu_struct pointers which is used by srcu code to initialize and clean up these structures. There is no reason for this array of pointers to be writable

[PATCH v2 1/3] module: Prepare for addition of new ro_after_init sections

2019-04-10 Thread Joel Fernandes (Google)
For the purposes of hardening modules by adding sections to ro_after_init sections, prepare for addition of new ro_after_init entries which we do in future patches. Create a table to which new entries could be added later. This makes it less error prone and reduce code duplication. Cc: paul...@lin

[PATCH v2 3/3] module: Make __tracepoints_ptrs as read-only

2019-04-10 Thread Joel Fernandes (Google)
This series hardens the tracepoints in modules by making the array of pointers referring to the tracepoints as read-only. This array is needed during module unloading to verify that the tracepoint is quiescent. There is no reason for the array to be to be writable after init, and can cause security

Re: [PATCH v2 1/3] module: Prepare for addition of new ro_after_init sections

2019-04-10 Thread Joel Fernandes
On Wed, Apr 10, 2019 at 03:08:21PM -0400, Joel Fernandes (Google) wrote: > For the purposes of hardening modules by adding sections to > ro_after_init sections, prepare for addition of new ro_after_init > entries which we do in future patches. Create a table to which new > entries could be added la

Trade Inquiry 10/04/2019

2019-04-10 Thread Daniel Murray
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.,LTD in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Thanks and Best Regards, Daniel Murray Purc

Re: [PATCH 2/2] kernel: use sysctl shared variables for range check

2019-04-10 Thread Matteo Croce
On Wed, Apr 10, 2019 at 8:46 PM Kees Cook wrote: > > On Mon, Apr 8, 2019 at 3:09 PM Matteo Croce wrote: > > > > Use the shared variables for range check, instead of declaring a local one > > in every source file. > > I was expecting this to be a tree-wide change for all the cases found > by patch

[PATCH v2 12/21] docs: hwmon: asc7621: convert to ReST format

2019-04-10 Thread Mauro Carvalho Chehab
Convert asc7621 to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/asc7621 | 146 ++-- 1 file changed, 88 insertions(+), 58 deletions(-) diff --git a/Documentation/hwmon/asc7621 b/Documentatio

[PATCH v2 03/21] docs: hwmon: menf21bmc: convert to ReST format

2019-04-10 Thread Mauro Carvalho Chehab
Convert menf21bmc to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/menf21bmc | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/hwmon/menf21bmc b/Documentation/hwmon/menf21bmc index 2a273a065c5e..1f0c6b2

[PATCH v2 14/21] docs: hwmon: dme1737, vt1211: convert to ReST format

2019-04-10 Thread Mauro Carvalho Chehab
Convert dme1737 and vt1211 to ReST format, in order to allow them to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/dme1737 | 88 ++--- Documentation/hwmon/vt1211 | 84 +-- 2 files changed, 114 in

[PATCH v2 11/21] docs: hwmon: ibmpowernv: convert to ReST format

2019-04-10 Thread Mauro Carvalho Chehab
Convert ibmpowernv to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/ibmpowernv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/hwmon/ibmpowernv b/Documentation/hwmon/ibmpowernv index 56468258711f..3f1fe

[PATCH v2 08/21] docs: hwmon: w83791d: convert to ReST format

2019-04-10 Thread Mauro Carvalho Chehab
Convert w83791d to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab --- Documentation/hwmon/w83791d | 123 +--- 1 file changed, 71 insertions(+), 52 deletions(-) diff --git a/Documentation/hwmon/w83791d b/Documentatio

[PATCH] cifs: fix page reference leak with readv/writev

2019-04-10 Thread jglisse
From: Jérôme Glisse CIFS can leak pages reference gotten through GUP (get_user_pages*() through iov_iter_get_pages()). This happen if cifs_send_async_read() or cifs_write_from_iter() calls fail from within __cifs_readv() and __cifs_writev() respectively. This patch move page unreference to cifs_a

Re: [PATCH v3 3/7] clk: Add of_clk_hw_register() API for early clk drivers

2019-04-10 Thread Jeffrey Hugo
On 4/10/2019 10:53 AM, Stephen Boyd wrote: Quoting Jeffrey Hugo (2019-04-08 14:46:11) On 4/4/2019 3:53 PM, Stephen Boyd wrote: In some circumstances drivers register clks early and don't have access to a struct device because the device model isn't initialized yet. Add an API to let drivers reg

Re: [PATCH-tip v3 04/14] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-04-10 Thread Peter Zijlstra
Hurph, I was still looking at v2.. I suppose I'll go stare at this verison, I don't think you said there were many changes, right? This version seems to still suffer that HANDOFF issue I found on v2. On Wed, Apr 10, 2019 at 02:42:21PM -0400, Waiman Long wrote: > Because of writer lock stealing,

RE: [PATCH RESEND 2/5] x86/MCE: Handle MCA controls in a per_cpu way

2019-04-10 Thread Ghannam, Yazen
> -Original Message- > From: linux-edac-ow...@vger.kernel.org On > Behalf Of Borislav Petkov > Sent: Wednesday, April 10, 2019 12:26 PM > To: Ghannam, Yazen > Cc: linux-e...@vger.kernel.org; linux-kernel@vger.kernel.org; > tony.l...@intel.com; x...@kernel.org > Subject: Re: [PATCH RESEN

Re: [PATCH] zram: pass down the bvec we need to read into in the work struct

2019-04-10 Thread Jerome Glisse
Adding more Cc and stable (i thought this was 5.1 addition). Note that without this patch on arch/kernel where PAGE_SIZE != 4096 userspace could read random memory through a zram block device (thought userspace probably would have no control on the address being read). On Mon, Apr 08, 2019 at 02:3

Re: [PATCH 0/7] introduce cpu.headroom knob to cpu controller

2019-04-10 Thread Song Liu
Hi Morten, > On Apr 10, 2019, at 4:59 AM, Morten Rasmussen > wrote: > > Hi, > > On Mon, Apr 08, 2019 at 02:45:32PM -0700, Song Liu wrote: >> Servers running latency sensitive workload usually aren't fully loaded for >> various reasons including disaster readiness. The machines running our >>

Re: KASAN: use-after-free Read in path_lookupat

2019-04-10 Thread Linus Torvalds
On Wed, Apr 10, 2019 at 8:11 AM Al Viro wrote: > > Both are in vfs.git#fixes. Which way should that go - directly or > via linux-security.git? Just do it directly. I doubt you can trigger them for securityfs and apparmourfs, since normal users have no way to remove any files from them, so the ra

Re: [PATCH V5 08/12] perf/x86/intel: Add Icelake support

2019-04-10 Thread Peter Zijlstra
On Wed, Apr 10, 2019 at 02:22:21PM -0400, Liang, Kan wrote: > > > That is, are there really bits we want to mask in there? > > > > For instruction event, right, we don't need mask it. > > I will change it. > > > > Actually, we have to mask some bits here, e.g. ARCH_PERFMON_EVENTSEL_INT, > ARCH_P

Re: [PATCH] Staging: rtl8723bs: Remove typedef in struct sdio_data

2019-04-10 Thread Madhumthia Prabakaran
On Wed, Apr 10, 2019 at 09:49:54AM +0300, Dan Carpenter wrote: > On Tue, Apr 09, 2019 at 11:16:17AM -0500, Madhumitha Prabakaran wrote: > > diff --git a/drivers/staging/rtl8723bs/include/drv_types.h > > b/drivers/staging/rtl8723bs/include/drv_types.h > > index bafb2c30e7fb..b0623c936940 100644 > >

Re: [PULL -- 5.1 REGRESSION] Bluetooth: btusb: request wake pin with NOAUTOEN

2019-04-10 Thread Linus Torvalds
On Wed, Apr 10, 2019 at 7:44 AM Brian Norris wrote: > > I think our key difference here is in how much we trust the device: > knowing the quality of the firmware running on some of these devices, > I wouldn't totally trust that they get it right. No. You claim that IRQ_NOAUTOEN makes any differe

Re: [PATCH] sparc: use struct_size() in kzalloc()

2019-04-10 Thread Gustavo A. R. Silva
Hi Dave, I wonder if you can take this. Thanks -- Gustavo On 1/8/19 10:13 AM, Gustavo A. R. Silva wrote: > 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

Re: [PATCH 18/22] watchdog: mt7621_wdt: Use 'dev' instead of dereferencing it repeatedly

2019-04-10 Thread Guenter Roeck
On Wed, Apr 10, 2019 at 11:46:24AM -0700, Joe Perches wrote: > On Wed, 2019-04-10 at 09:27 -0700, Guenter Roeck wrote: > > Introduce local variable 'struct device *dev' and use it instead of > > dereferencing it repeatedly. > > > > The conversion was done automatically with coccinelle using the >

Re: [GIT PULL] Please pull RDMA subsystem changes

2019-04-10 Thread pr-tracker-bot
The pull request you sent on Wed, 10 Apr 2019 18:46:23 +: > git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git tags/for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/582549e3fbe137eb6ce9be591aca25ca36b4 Thank you! -- Deet-doot-dot, I am a bot

Re: [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB

2019-04-10 Thread Justin Chen
On Wed, Apr 10, 2019 at 1:47 AM Yue Haibing wrote: > > From: YueHaibing > > When building with CONFIG_GPIOLIB is not set > gcc warns this: > > drivers/iio/adc/ti-ads7950.c:75:19: error: field chip has incomplete type > struct gpio_chip chip; >^~~~ > drivers/iio/adc/ti-ads795

[PATCH v3 3/3] module: Make __tracepoints_ptrs as read-only

2019-04-10 Thread Joel Fernandes (Google)
This series hardens the tracepoints in modules by making the array of pointers referring to the tracepoints as read-only. This array is needed during module unloading to verify that the tracepoint is quiescent. There is no reason for the array to be to be writable after init, and can cause security

[PATCH v3 1/3] module: Prepare for addition of new ro_after_init sections

2019-04-10 Thread Joel Fernandes (Google)
For the purposes of hardening modules by adding sections to ro_after_init sections, prepare for addition of new ro_after_init entries which we do in future patches. Create a table to which new entries could be added later. This makes it less error prone and reduce code duplication. Cc: paul...@lin

[PATCH v3 2/3] module: Make srcu_struct ptr array as read-only post init

2019-04-10 Thread Joel Fernandes (Google)
Since commit title ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules"), modules that call DEFINE_{STATIC,}SRCU will have a new array of srcu_struct pointers which is used by srcu code to initialize and clean up these structures. There is no reason for this array of pointers to be writable

Re: [RFC][PATCH 13/16] sched: Add core wide task selection and scheduling.

2019-04-10 Thread Vineeth Remanan Pillai
From: Vineeth Pillai > Well, I was promised someome else was going to carry all this, also We are interested in this feature and have been actively testing, benchmarking and working on fixes. If there is no v2 effort currently in progress, we are willing to help consolidate all the changes discu

[PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select

2019-04-10 Thread Anders Roxell
Config fragments should not have the prefix 'CONFIG_'. Rework to remove the prefix 'CONFIG_' from 'CONFIG_MTD_NAND_ECC_SW_BCH'. Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm") Signed-off-by: Anders Roxell --- drivers/mtd/devices/Kconfig | 2 +- 1 file ch

[PATCH 2/2] mtd: nand: raw: fix build dependency

2019-04-10 Thread Anders Roxell
When enable CONFIG_MTD_NAND_ECC_SW_BCH as a module, the MTD_NAND_ECC_SW_BCH depends on MTD_NAND, but the module controlled by MTD_NAND links against the module controlled by MTD_NAND_ECC_SW_BCH. This leads to the following link failure. aarch64-linux-gnu-ld: drivers/mtd/nand/raw/nand_base.o: in fu

Re: [PATCH RESEND 2/5] x86/MCE: Handle MCA controls in a per_cpu way

2019-04-10 Thread Borislav Petkov
On Wed, Apr 10, 2019 at 07:41:47PM +, Ghannam, Yazen wrote: > So I'm thinking to add another patch to the set. This will set > mce_bank.init=0 if we read MCA_CTL=0 from the hardware. Ok. > Then we check if mce_bank.init=0 in the set/show functions and give a > message if the bank is not used.

Re: [PATCH] clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start

2019-04-10 Thread Tony Lindgren
Hi, * Daniel Lezcano [190410 17:02]: > can you ask for an acked-by before pulling a patch in your tree? I certainly do ask and wait for acks where possible :) Note that I have not applied this patch. I just added Keerthy to Cc on this thread so maybe you misread the message earlier. My comment

Re: [PATCH v3 3/3] module: Make __tracepoints_ptrs as read-only

2019-04-10 Thread Steven Rostedt
On Wed, 10 Apr 2019 15:57:08 -0400 "Joel Fernandes (Google)" wrote: > This series hardens the tracepoints in modules by making the array of > pointers referring to the tracepoints as read-only. This array is needed > during module unloading to verify that the tracepoint is quiescent. > There is n

[PATCH 00/11] asus-wmi: Support of ASUS TUF Gaming series laptops

2019-04-10 Thread Yurii Pavlovskyi
Hi, I'm new to kernel development, so first I would like to apologize in advance for any mistakes. The support for this laptop series is currently non-existent, as the asus-nb-wmi driver (which is essentially configuration for asus-wmi) fails to load and multiple ACPI errors are logged in dmesg.

[PATCH 1/2] s390: only build for new CPUs with clang

2019-04-10 Thread Arnd Bergmann
llvm does does not understand -march=z9-109 and older target specifiers, so disable the respective Kconfig settings and the logic to make the boot code work on old systems when building with clang. Signed-off-by: Arnd Bergmann --- arch/s390/Kconfig | 6 ++ arch/s390/boot/Makefile | 2 +

[PATCH 2/2] s390: boot, purgatory: pass $(CLANG_FLAGS) where needed

2019-04-10 Thread Arnd Bergmann
The purgatory and boot Makefiles do not inherit the original cflags, so clang falls back to the default target architecture when building it, typically this would be x86 when cross-compiling. Add $(CLANG_FLAGS) everywhere so we pass the correct --target=s390x-linux option when cross-compiling. Si

[PATCH 01/11] platform/x86: asus-wmi: Fix hwmon device cleanup

2019-04-10 Thread Yurii Pavlovskyi
The asus-wmi driver does not clean up the hwmon device on exit or error. To reproduce the bug, repeat rmmod, insmod to verify that device number /sys/devices/platform/asus-nb-wmi/hwmon/hwmon?? grows every time. Add pointer to the device in module state and call cleanup on error. Signed-off-by: Yur

[PATCH] cros_ec: Add trace event to trace EC commands

2019-04-10 Thread Raul E Rangel
This is useful to see which EC commands are being executed and when. To enable: echo 'cros_ec:*' >> /sys/kernel/debug/tracing/set_event Example: /* cros_ec_cmd: version: 0, command: GET_VERSION */ /* cros_ec_cmd: version: 0, command: GET_PROTOCOL_INFO */ /* cros_ec_cmd: version:

[PATCH 02/11] platform/x86: asus-wmi: Fix preserving keyboard, backlight intensity on load

2019-04-10 Thread Yurii Pavlovskyi
The error code and return value are mixed up. The intensity is always set to 0 on load as kbd_led_read returns either 0 or negative value. To reproduce set backlight to maximum, reload driver and try to increase it using keyboard hotkey, the intensity will drop as a result. Correct the implementati

[PATCH 03/11] platform/x86: asus-wmi: Increase input buffer size of WMI methods

2019-04-10 Thread Yurii Pavlovskyi
The asus-nb-wmi driver is matched by WMI alias but fails to load on TUF Gaming series laptops producing multiple ACPI errors in kernel log. Patch was tested on TUF Gaming FX505GM and older K54C model. The input buffer for WMI method invocation size is 2 dwords, whereas 3 are expected by this model

Re: [PATCH-tip v3 04/14] locking/rwsem: Implement lock handoff to prevent lock starvation

2019-04-10 Thread Waiman Long
On 04/10/2019 03:38 PM, Peter Zijlstra wrote: > Hurph, I was still looking at v2.. I suppose I'll go stare at this > verison, I don't think you said there were many changes, right? > > This version seems to still suffer that HANDOFF issue I found on v2. It is mainly minor adjustments. I was trying

[PATCH 04/11] platform/x86: asus-wmi: Add quirk to force DSTS WMI method detection

2019-04-10 Thread Yurii Pavlovskyi
The DSTS method detection fails, as nothing is returned if method is not defined in WMNB. As a result the control of keyboard backlight is not functional for TUF Gaming series laptops (at the time the only functionality of the driver on this model implemented with WMI methods). Patch was tested on

Re: [PATCH v3 3/3] module: Make __tracepoints_ptrs as read-only

2019-04-10 Thread Joel Fernandes
On Wed, Apr 10, 2019 at 04:11:12PM -0400, Steven Rostedt wrote: > On Wed, 10 Apr 2019 15:57:08 -0400 > "Joel Fernandes (Google)" wrote: > > > This series hardens the tracepoints in modules by making the array of > > pointers referring to the tracepoints as read-only. This array is needed > > duri

Re: rseq/arm32: choosing rseq code signature

2019-04-10 Thread Mathieu Desnoyers
- On Apr 9, 2019, at 3:32 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > Hi Will, > > We are about to include the code signature required prior to restartable > sequences abort handlers into glibc, which will make this ABI choice final. > We need architecture maintainer input

[PATCH 05/11] platform/x86: asus-wmi: Support queued WMI event codes

2019-04-10 Thread Yurii Pavlovskyi
Event codes are expected to be polled from a queue on at least some models. The WMI event codes are pushed into queue based on circular buffer. After INIT method is called ACPI code is allowed to push events into this buffer the INIT method can not be reverted. If the module is unloaded and an eve

[PATCH 06/11] platform/x86: asus-nb-wmi: Add microphone mute key code

2019-04-10 Thread Yurii Pavlovskyi
The microphone mute key that is present on FX505GM laptop and possibly others is missing from sparse keymap. Add the missing code. Also comment on the fan mode switch key that has the same code as the already used key. Signed-off-by: Yurii Pavlovskyi --- drivers/platform/x86/asus-nb-wmi.c | 3 +

[PATCH 07/11] platform/x86: asus-wmi: Organize code into sections

2019-04-10 Thread Yurii Pavlovskyi
The driver has grown (and will more) pretty big which makes it hard to navigate and understand. Add uniform comments to the code and ensure that it is sorted into logical sections. Signed-off-by: Yurii Pavlovskyi --- drivers/platform/x86/asus-wmi.c | 94 - 1 file

[PATCH 08/11] platform/x86: asus-wmi: Enhance detection of thermal data

2019-04-10 Thread Yurii Pavlovskyi
The obviously wrong value 1 for temperature device ID in this driver is returned by at least some devices, including TUF Gaming series laptops, instead of 0 as expected previously. Observable effect is that a temp1_input in hwmon reads temperature near absolute zero. * Consider 0.1 K as erroneous

[PATCH 09/11] platform/x86: asus-wmi: Control RGB keyboard backlight

2019-04-10 Thread Yurii Pavlovskyi
The WMI exposes two methods for controlling RGB keyboard backlight which allow to control: * RGB components in range 00 - ff, * Switch between 4 effects, * Switch between 3 effect speed modes, * Separately enable the backlight on boot, in awake state (after driver load), in sleep mode, and probab

[PATCH 10/11] platform/x86: asus-wmi: Switch fan boost mode

2019-04-10 Thread Yurii Pavlovskyi
The WMI exposes a write-only device ID where three modes can be switched on some laptops (TUF Gaming FX505GM). There is a hotkey combination Fn-F5 that does have a fan icon which is designed to toggle between these 3 modes. Add a SysFS entry that reads the last written value and updates value in W

Re: [PATCH] watchdog: machzwd: Mark expected switch fall-through

2019-04-10 Thread Guenter Roeck
On Wed, Apr 10, 2019 at 01:49:05PM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > This patch fixes the following warnings: > > drivers/watchdog/machzwd.c: In function ‘zf_set_timer’: > ./arch/x

[PATCH 11/11] platform/x86: asus-wmi: Do not disable keyboard backlight on unload

2019-04-10 Thread Yurii Pavlovskyi
The keyboard backlight is disabled when module is unloaded as it is exposed as LED device. Change this behavior to ignore setting 0 brightness when the ledclass device is unloading. Signed-off-by: Yurii Pavlovskyi --- drivers/platform/x86/asus-wmi.c | 4 1 file changed, 4 insertions(+) dif

[tip:core/core] overflow.h: Add comment documenting __ab_c_size()

2019-04-10 Thread tip-bot for Rasmus Villemoes
Commit-ID: 899cbdfa8d147c873fe4e66c38d2cca3c1ac6286 Gitweb: https://git.kernel.org/tip/899cbdfa8d147c873fe4e66c38d2cca3c1ac6286 Author: Rasmus Villemoes AuthorDate: Wed, 10 Apr 2019 22:27:25 +0200 Committer: Borislav Petkov CommitDate: Wed, 10 Apr 2019 22:35:47 +0200 overflow.h: Add co

Re: [PATCH] cros_ec: Add trace event to trace EC commands

2019-04-10 Thread Ross Zwisler
On Wed, Apr 10, 2019 at 02:24:08PM -0600, Raul E Rangel wrote: > This is useful to see which EC commands are being executed and when. > > To enable: > > echo 'cros_ec:*' >> /sys/kernel/debug/tracing/set_event > > Example: > > /* cros_ec_cmd: version: 0, command: GET_VERSION */ > /*

[tip:x86/microcode] x86/microcode/intel: Refactor Intel microcode blob loading

2019-04-10 Thread tip-bot for Jann Horn
Commit-ID: 7e94a7b659eefedda82cde97229a26f319fb1182 Gitweb: https://git.kernel.org/tip/7e94a7b659eefedda82cde97229a26f319fb1182 Author: Jann Horn AuthorDate: Thu, 4 Apr 2019 13:11:28 +0200 Committer: Borislav Petkov CommitDate: Wed, 10 Apr 2019 22:40:25 +0200 x86/microcode/intel: Refac

<    1   2   3   4   5   6   7   8   9   >