[v7 02/10] arm64: add sysfs vulnerability show for spectre v1

2019-04-10 Thread Jeremy Linton
From: Mian Yousaf Kaukab spectre v1, has been mitigated, and the mitigation is always active. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Jeremy Linton Reviewed-by: Andre Przywara Reviewed-by: Catalin Marinas Tested-by: Stefan Wahren Acked-by: Suzuki K Poulose --- arch/arm64/kernel/c

[v7 06/10] arm64: Always enable spectrev2 vulnerability detection

2019-04-10 Thread Jeremy Linton
The sysfs patches need to display machine vulnerability status regardless of kernel config. Prepare for that by breaking out the vulnerability/mitigation detection code from the logic which implements the mitigation. Signed-off-by: Jeremy Linton Reviewed-by: Andre Przywara Reviewed-by: Catalin M

[v7 00/10] arm64: add system vulnerability sysfs entries

2019-04-10 Thread Jeremy Linton
Arm64 machines should be displaying a human readable vulnerability status to speculative execution attacks in /sys/devices/system/cpu/vulnerabilities This series enables that behavior by providing the expected functions. Those functions expose the cpu errata and feature states, as well as whether

[v7 03/10] arm64: add sysfs vulnerability show for meltdown

2019-04-10 Thread Jeremy Linton
Display the system vulnerability status. This means that while its possible to have the mitigation enabled, the sysfs entry won't indicate that status. This is because the core ABI doesn't express the concept of mitigation when the system isn't vulnerable. Signed-off-by: Jeremy Linton Reviewed-by

linux-next: build failure after merge of the orangefs tree

2019-04-10 Thread Stephen Rothwell
patible pointer type 'int (*)(struct vm_fault *)' [-Werror=incompatible-pointer-types] .page_mkwrite = orangefs_page_mkwrite, ^ Caused by commit c32607e8fc3b ("orangefs: write range tracking") I have used the orangefs tree from

Re: [PATCH v2] init: Do not select DEBUG_KERNEL by default

2019-04-10 Thread Josh Triplett
On April 10, 2019 3:58:55 PM PDT, Kees Cook wrote: >On Wed, Apr 10, 2019 at 3:42 PM Sinan Kaya wrote: >> >> We can't seem to have a kernel with CONFIG_EXPERT set but >> CONFIG_DEBUG_KERNEL unset these days. >> >> While some of the features under the CONFIG_EXPERT require >> CONFIG_DEBUG_KERNEL, i

Re: [PATCH v2] init: Do not select DEBUG_KERNEL by default

2019-04-10 Thread Kees Cook
On Wed, Apr 10, 2019 at 4:22 PM Josh Triplett wrote: > > On April 10, 2019 3:58:55 PM PDT, Kees Cook wrote: > >On Wed, Apr 10, 2019 at 3:42 PM Sinan Kaya wrote: > >> > >> We can't seem to have a kernel with CONFIG_EXPERT set but > >> CONFIG_DEBUG_KERNEL unset these days. > >> > >> While some of

Re: [PATCH] KVM: x86: optimize check for valid PAT value

2019-04-10 Thread Krish Sadhukhan
On 04/10/2019 02:55 AM, Paolo Bonzini wrote: This check will soon be done on every nested vmentry and vmexit, "parallelize" it using bitwise operations. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/mtrr.c| 10 +- arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/x86.h | 8 ++

[RFC-1 PATCH 1/1] fork: add CLONE_PIDFD via /proc/

2019-04-10 Thread Christian Brauner
This is an RFC for the implementation of pidfds as /proc/ file descriptors. They can be retrieved through the clone() with the addition of the CLONE_PIDFD flag. The tricky part here is that we need to retrieve a file descriptor for /proc/ before clone's point of no return. Otherwise, we need to fai

[RFC-2 PATCH 3/4] signal: support CLONE_PIDFD with pidfd_send_signal

2019-04-10 Thread Christian Brauner
Let pidfd_send_signal() use pidfds retrieved via CLONE_PIDFD. With this patch pidfd_send_signal() becomes independent of procfs. This fullfils the request made when we merged the pidfd_send_signal() patchset. The pidfd_send_signal() syscall is now always available allowing for it to be used by user

[RFC PATCH] fork: add CLONE_PIDFD

2019-04-10 Thread Christian Brauner
Hey Linus, This is an RFC for adding a new CLONE_PIDFD flag to clone() as previously discussed. While implementing this Jann and I ran into additional complexity that prompted us to send out an initial RFC patchset to make sure we still think going forward with the current implementation is a good

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

2019-04-10 Thread Doug Anderson
Hi, On Wed, Apr 10, 2019 at 11:38 AM Jonas Karlman wrote: > > 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

[RFC-2 PATCH 4/4] samples: show race-free pidfd metadata access

2019-04-10 Thread Christian Brauner
This is an sample program to show userspace how to get race-free access to process metadata from a pidfd. It is really not that difficult and instead of burdening the kernel with this task by using fds to /proc/ we can simply add a helper to libc that does it for the user. Signed-off-by: Christian

[RFC-2 PATCH 1/4] Make anon_inodes unconditional

2019-04-10 Thread Christian Brauner
From: David Howells Make the anon_inodes facility unconditional so that it can be used by core VFS code and the pidfd_open() syscall. Signed-off-by: David Howells Signed-off-by: Al Viro [christ...@brauner.io: adapt commit message to mention pidfd_open()] Signed-off-by: Christian Brauner ---

[RFC-2 PATCH 2/4] fork: add CLONE_PIDFD via anonymous inode

2019-04-10 Thread Christian Brauner
This patchset makes it possible to retrieve pid file descriptors at process creation time by introducing a new flag CLONE_PIDFD. As spotted by Linus, there is exactly one bit left. In this version of CLONE_PIDFD anonymous inode file descriptors are used. They serve as a simple opaque handle on pid

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

2019-04-10 Thread Doug Anderson
Hi, On Wed, Apr 10, 2019 at 11:30 AM Matthias Kaehlcke wrote: > > 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

Re: Alleged fix for writer stall on -rcu branch dev

2019-04-10 Thread Paul E. McKenney
On Wed, Apr 10, 2019 at 01:33:02PM -0700, Paul E. McKenney wrote: > On Wed, Apr 10, 2019 at 09:19:18PM +0200, Sebastian Andrzej Siewior wrote: > > On 2019-04-10 11:41:05 [-0700], Paul E. McKenney wrote: > > > On Wed, Apr 10, 2019 at 08:15:38PM +0200, Sebastian Andrzej Siewior wrote: > > > > On 2019

Re: [RFC-2 PATCH 4/4] samples: show race-free pidfd metadata access

2019-04-10 Thread Daniel Colascione
Thanks for providing this example. A new nits below. On Wed, Apr 10, 2019 at 4:43 PM Christian Brauner wrote: > > This is an sample program to show userspace how to get race-free access to > process metadata from a pidfd. > It is really not that difficult and instead of burdening the kernel with

Re: [RFC PATCH] fork: add CLONE_PIDFD

2019-04-10 Thread Daniel Colascione
Thanks for trying it both ways. On Wed, Apr 10, 2019 at 4:43 PM Christian Brauner wrote: > > Hey Linus, > > This is an RFC for adding a new CLONE_PIDFD flag to clone() as > previously discussed. > While implementing this Jann and I ran into additional complexity that > prompted us to send out an

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

2019-04-10 Thread Subhra Mazumdar
On 4/9/19 11:38 AM, Julien Desfossez wrote: We found the source of the major performance regression we discussed previously. It turns out there was a pattern where a task (a kworker in this case) could be woken up, but the core could still end up idle before that task had a chance to run. Exam

Re: [RFC patch 17/41] tracing: Make stack_trace_print() static and rename it

2019-04-10 Thread AKASHI Takahiro
On Wed, Apr 10, 2019 at 08:47:03AM -0400, Steven Rostedt wrote: > On Wed, 10 Apr 2019 12:28:11 +0200 > Thomas Gleixner wrote: > > > It's only used in the source file where it is defined and it's using the > > stack_trace_ namespace. Rename it to free it up for stack trace related > > functions. >

[PATCH v4 3/3] platform/x86: intel_pmc_core: Instantiate pmc_core device on legacy platforms

2019-04-10 Thread Rajat Jain
Add code to instantiate the pmc_core platform device and thus attach to the driver, if the ACPI device for the same ("INT33A1") is not present in a system where it should be. This was discussed here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1966991.html Change-Id: I62e0909b010c

[PATCH v4 2/3] platform/x86: intel_pmc_core: Allow to dump debug registers on S0ix failure

2019-04-10 Thread Rajat Jain
Add a module parameter which when enabled, will check on resume, if the last S0ix attempt was successful. If not, the driver would warn and provide helpful debug information (which gets latched during the failed suspend attempt) to debug the S0ix failure. This information is very useful to debug S

[PATCH v4 1/3] platform/x86: intel_pmc_core: Convert to a platform_driver

2019-04-10 Thread Rajat Jain
Convert the intel_pmc_core driver to a platform driver, and attach using the ACPI enumeration method (via the ACPI device "INT33A1"). Change-Id: I2c2c9bbff48a6548f5c96e18d766ffc4633762c0 Signed-off-by: Rajat Jain --- v4: put back the x86_match_cpu() method. v3: Don't instantiate the platform_devi

Re: [PATCH v3 1/9] livepatch: Create and include UAPI headers

2019-04-10 Thread Masahiro Yamada
On Thu, Apr 11, 2019 at 12:52 AM Joe Lawrence wrote: > > From: Josh Poimboeuf > > Define klp prefixes in include/uapi/linux/livepatch.h, and use them for > replacing hard-coded values in kernel/livepatch/core.c. > > Update MAINTAINERS. > > Note: Add defines to uapi as these are also to be used by

[PATCH v5 1/3] platform/x86: intel_pmc_core: Convert to a platform_driver

2019-04-10 Thread Rajat Jain
Convert the intel_pmc_core driver to a platform driver, and attach using the ACPI enumeration method (via the ACPI device "INT33A1"). Signed-off-by: Rajat Jain --- v5: Remove the gerrit ID from commit log v4: put back the x86_match_cpu() method. v3: Don't instantiate the platform_device. Use ACPI

[PATCH v5 2/3] platform/x86: intel_pmc_core: Allow to dump debug registers on S0ix failure

2019-04-10 Thread Rajat Jain
Add a module parameter which when enabled, will check on resume, if the last S0ix attempt was successful. If not, the driver would warn and provide helpful debug information (which gets latched during the failed suspend attempt) to debug the S0ix failure. This information is very useful to debug S

[PATCH v5 3/3] platform/x86: intel_pmc_core: Instantiate pmc_core device on legacy platforms

2019-04-10 Thread Rajat Jain
Add code to instantiate the pmc_core platform device and thus attach to the driver, if the ACPI device for the same ("INT33A1") is not present in a system where it should be. This was discussed here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1966991.html Signed-off-by: Rajat Jai

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

2019-04-10 Thread Steven Rostedt
On Wed, 10 Apr 2019 16:29:02 -0400 Joel Fernandes wrote: > The srcu structure pointer array is modified at module load time because the > array is fixed up by the module loader at load-time with the final locations > of the tracepoints right? Basically relocation fixups. At compile time, I > bel

Re: kernel BUG at fs/inode.c:LINE!

2019-04-10 Thread Ian Kent
On Wed, 2019-04-10 at 14:41 +0200, Dmitry Vyukov wrote: > On Wed, Apr 10, 2019 at 2:12 PM Al Viro wrote: > > > > On Wed, Apr 10, 2019 at 08:07:15PM +0800, Ian Kent wrote: > > > > > > I'm unable to find a branch matching the line numbers. > > > > > > > > Given that, on the face of it, the scenar

[PATCH v3] init: Do not select DEBUG_KERNEL by default

2019-04-10 Thread Sinan Kaya
We can't seem to have a kernel with CONFIG_EXPERT set but CONFIG_DEBUG_KERNEL unset these days. While some of the features under the CONFIG_EXPERT require CONFIG_DEBUG_KERNEL, it doesn't apply for all features. It looks like CONFIG_KALLSYMS_ALL is the only feature that requires CONFIG_DEBUG_KERNE

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

2019-04-10 Thread Li, Aubrey
On 2019/4/10 22:54, Andy Lutomirski wrote: > On Tue, Apr 9, 2019 at 8:40 PM Li, Aubrey wrote: >> >> On 2019/4/10 10:36, Li, Aubrey wrote: >>> On 2019/4/10 10:25, Andy Lutomirski wrote: On Tue, Apr 9, 2019 at 7:20 PM Li, Aubrey wrote: > > On 2019/4/10 9:58, Andy Lutomirski wrote

Re: [v2 PATCH 4/4] phy: phy-meson-gxl-usb2: get optional clock by devm_clk_get_optional()

2019-04-10 Thread Chunfeng Yun
On Wed, 2019-04-10 at 19:59 +0200, Martin Blumenstingl wrote: > On Wed, Apr 10, 2019 at 8:13 AM Chunfeng Yun > wrote: > > > > Use devm_clk_get_optional() to get optional clock > > > > Cc: Martin Blumenstingl > > Signed-off-by: Chunfeng Yun > > Acked-by: Martin Blumenstingl > now also: > Tested

Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-04-10 Thread Ricardo Neri
On Wed, Apr 10, 2019 at 09:01:52AM +0200, Peter Zijlstra wrote: > On Tue, Apr 09, 2019 at 06:19:57PM -0700, Ricardo Neri wrote: > > On Tue, Apr 09, 2019 at 01:28:17PM +0200, Peter Zijlstra wrote: > > > > @@ -147,6 +161,14 @@ static void set_periodic(struct hpet_hld_data > > > > *hdata) > > > > *

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

2019-04-10 Thread elaine.zhang
hi, 在 2019/4/11 上午7:37, Doug Anderson 写道: Hi, On Wed, Apr 10, 2019 at 11:38 AM Jonas Karlman wrote: 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

Re: [v7 2/3] arm64: dts: lx2160a: add sata node support

2019-04-10 Thread Shawn Guo
On Tue, Mar 12, 2019 at 09:50:18AM +0800, Peng Ma wrote: > Add SATA device nodes for fsl-lx2160a and enable support > for QDS and RDB boards. > > Signed-off-by: Peng Ma Applied, thanks.

Re: [PATCH 2/3] arm64: dts: ls1028a: Corrected the SATA ecc address.

2019-04-10 Thread Shawn Guo
On Mon, Mar 11, 2019 at 03:20:13PM +0800, Peng Ma wrote: > Ls1028a SATA ecc address with more than 32 bit, so we should corrrect the > address. > > Signed-off-by: Peng Ma Applied, thanks.

[RFC PATCH v3 01/15] slub: Add isolate() and migrate() methods

2019-04-10 Thread Tobin C. Harding
Add the two methods needed for moving objects and enable the display of the callbacks via the /sys/kernel/slab interface. Add documentation explaining the use of these methods and the prototypes for slab.h. Add functions to setup the callbacks method for a slab cache. Add empty functions for SLAB

[RFC PATCH v3 04/15] slub: Slab defrag core

2019-04-10 Thread Tobin C. Harding
Internal fragmentation can occur within pages used by the slub allocator. Under some workloads large numbers of pages can be used by partial slab pages. This under-utilisation is bad simply because it wastes memory but also because if the system is under memory pressure higher order allocations m

[RFC PATCH v3 00/15] Slab Movable Objects (SMO)

2019-04-10 Thread Tobin C. Harding
Hi, Another iteration of the SMO patch set implementing suggestions from Al and Willy on the last version as well as some feedback from comments on the recent LWN article. Applies on top of Linus' tree (tag: v5.1-rc4). This is a patch set implementing movable objects within the SLUB allocator.

[RFC PATCH v3 02/15] tools/vm/slabinfo: Add support for -C and -M options

2019-04-10 Thread Tobin C. Harding
-C lists caches that use a ctor. -M lists caches that support object migration. Add command line options to show caches with a constructor and caches that are movable (i.e. have migrate function). Co-developed-by: Christoph Lameter Signed-off-by: Tobin C. Harding --- tools/vm/slabinfo.c | 40

[RFC PATCH v3 03/15] slub: Sort slab cache list

2019-04-10 Thread Tobin C. Harding
It is advantageous to have all defragmentable slabs together at the beginning of the list of slabs so that there is no need to scan the complete list. Put defragmentable caches first when adding a slab cache and others last. Co-developed-by: Christoph Lameter Signed-off-by: Tobin C. Harding ---

[RFC PATCH v3 06/15] tools/vm/slabinfo: Add defrag_used_ratio output

2019-04-10 Thread Tobin C. Harding
Add output for the newly added defrag_used_ratio sysfs knob. Signed-off-by: Tobin C. Harding --- tools/vm/slabinfo.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c index d2c22f9ee2d8..ef4ff93df4cc 100644 --- a/tools/vm/slabinfo.c +++ b/tools/vm/

[RFC PATCH v3 11/15] slub: Enable moving objects to/from specific nodes

2019-04-10 Thread Tobin C. Harding
We have just implemented Slab Movable Objects (object migration). Currently object migration is used to defrag a cache. On NUMA systems it would be nice to be able to control the source and destination nodes when moving objects. Add CONFIG_SMO_NODE to guard this feature. CONFIG_SMO_NODE depends

[RFC PATCH v3 09/15] xarray: Implement migration function for objects

2019-04-10 Thread Tobin C. Harding
Implement functions to migrate objects. This is based on initial code by Matthew Wilcox and was modified to work with slab object migration. This patch can not be merged until all radix tree & IDR users are converted to the XArray because xa_nodes and radix tree nodes share the same slab cache (th

[RFC PATCH v3 12/15] slub: Enable balancing slabs across nodes

2019-04-10 Thread Tobin C. Harding
We have just implemented Slab Movable Objects (SMO). On NUMA systems slabs can become unbalanced i.e. many slabs on one node while other nodes have few slabs. Using SMO we can balance the slabs across all the nodes. The algorithm used is as follows: 1. Move all objects to node 0 (this has the

[RFC PATCH v3 05/15] tools/vm/slabinfo: Add remote node defrag ratio output

2019-04-10 Thread Tobin C. Harding
Add output line for NUMA remote node defrag ratio. Signed-off-by: Tobin C. Harding --- tools/vm/slabinfo.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c index cbfc56c44c2f..d2c22f9ee2d8 100644 --- a/tools/vm/slabinfo.c +++ b/tools/vm/slabinf

[RFC PATCH v3 10/15] tools/testing/slab: Add XArray movable objects tests

2019-04-10 Thread Tobin C. Harding
We just implemented movable objects for the XArray. Let's test it intree. Add test module for the XArray's movable objects implementation. Functionality of the XArray Slab Movable Object implementation can usually be seen by simply by using `slabinfo` on a running machine since the radix tree is

[RFC PATCH v3 07/15] tools/testing/slab: Add object migration test module

2019-04-10 Thread Tobin C. Harding
We just implemented slab movable objects for the SLUB allocator. We should test that code. In order to do so we need to be able to do a number of things - Create a cache - Enable Slab Movable Objects for the cache - Allocate objects to the cache - Free objects from within specific slabs of t

[RFC PATCH v3 08/15] tools/testing/slab: Add object migration test suite

2019-04-10 Thread Tobin C. Harding
We just added a module that enables testing the SLUB allocators ability to defrag/shrink caches via movable objects. Tests are better when they are automated. Add automated testing via a python script for SLUB movable objects. Example output: $ cd path/to/linux/tools/testing/slab $ /slub_de

RE: [PATCH V7 1/4] dt-bindings: fsl: scu: add general interrupt support

2019-04-10 Thread Anson Huang
Hi, Shawn Can you pick up this patch series if no additional comments? We need this feature to support many modules IRQ function including suspend/resume, thanks. Best Regards! Anson Huang > -Original Message- > From: Anson Huang > Sent: 2019年4月9日 13:00 > To: robh...@kernel.org

Re: [PATCH 1/3] dt-bindings: ahci-fsl-qoriq: add ls1028a chip name to the list

2019-04-10 Thread Shawn Guo
On Mon, Mar 11, 2019 at 03:20:12PM +0800, Peng Ma wrote: > Add ls1028a compatible to bindings documentation. > > Signed-off-by: Peng Ma I assume that the bindings will be picked up by Axboe. Otherwise, please let me know. Shawn

[RFC PATCH v3 15/15] dcache: Add CONFIG_DCACHE_SMO

2019-04-10 Thread Tobin C. Harding
In an attempt to make the SMO patchset as non-invasive as possible add a config option CONFIG_DCACHE_SMO (under "Memory Management options") for enabling SMO for the DCACHE. Whithout this option dcache constructor is used but no other code is built in, with this option enabled slab mobility is ena

Re: [v7 1/3] dt-bindings: ahci-fsl-qoriq: add lx2160a chip name to the list

2019-04-10 Thread Shawn Guo
On Tue, Mar 12, 2019 at 09:50:17AM +0800, Peng Ma wrote: > Add lx2160a compatible to bindings documentation. > > Signed-off-by: Peng Ma > Reviewed-by: Rob Herring I assume that the bindings will go via AHCI tree. Otherwise, please let me know. Shawn

[RFC PATCH v3 14/15] dcache: Implement partial shrink via Slab Movable Objects

2019-04-10 Thread Tobin C. Harding
The dentry slab cache is susceptible to internal fragmentation. Now that we have Slab Movable Objects we can attempt to defragment the dcache. Dentry objects are inherently _not_ relocatable however under some conditions they can be free'd. This is the same as shrinking the dcache but instead of

Re: crypto: Kernel memory overwrite attempt detected to spans multiple pages

2019-04-10 Thread Rik van Riel
On Wed, 2019-04-10 at 16:11 -0700, Eric Biggers wrote: > You've explained *what* it does again, but not *why*. *Why* do you > want > hardened usercopy to detect copies across page boundaries, when there > is no > actual buffer overflow? When some subsystem in the kernel allocates multiple pages

[RFC PATCH v3 13/15] dcache: Provide a dentry constructor

2019-04-10 Thread Tobin C. Harding
In order to support object migration on the dentry cache we need to have a determined object state at all times. Without a constructor the object would have a random state after allocation. Provide a dentry constructor. Signed-off-by: Tobin C. Harding --- fs/dcache.c | 31 ++

[RFC 2/2] signal: extend pidfd_send_signal() to allow expedited process killing

2019-04-10 Thread Suren Baghdasaryan
Add new SS_EXPEDITE flag to be used when sending SIGKILL via pidfd_send_signal() syscall to allow expedited memory reclaim of the victim process. The usage of this flag is currently limited to SIGKILL signal and only to privileged users. Signed-off-by: Suren Baghdasaryan --- include/linux/sched/

[RFC 1/2] mm: oom: expose expedite_reclaim to use oom_reaper outside of oom_kill.c

2019-04-10 Thread Suren Baghdasaryan
Create an API to allow users outside of oom_kill.c to mark a victim and wake up oom_reaper thread for expedited memory reclaim of the process being killed. Signed-off-by: Suren Baghdasaryan --- include/linux/oom.h | 1 + mm/oom_kill.c | 15 +++ 2 files changed, 16 insertions(+

[PATCH] of: fix expression using sizeof(void)

2019-04-10 Thread xiaojiangfeng
problem detected by sparse: drivers/of/fdt.c:1094:34: warning: expression using sizeof(void) Signed-off-by: xiaojiangfeng --- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 4734223..75c6c55 100644 --- a/drivers/of/fd

[RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-10 Thread Suren Baghdasaryan
The time to kill a process and free its memory can be critical when the killing was done to prevent memory shortages affecting system responsiveness. In the case of Android, where processes can be restarted easily, killing a less important background process is preferred to delaying or throttling

Re: \\ 答复: [PATCH] of: del redundant type conversion

2019-04-10 Thread xiaojiangfeng
My pleasure. I am very new to sparse. I guess the warning is caused by the macro min. Then I submitted my changes. Thanks for code review. -邮件原件- 发件人: Frank Rowand [mailto:frowand.l...@gmail.com] 发送时间: 2019年4月11日 2:50 收件人: xiaojiangfeng ; robh...@kernel.org; r...@kernel.org 抄送: devi

[PATCH 1/2] regulator: mcp16502: Remove unneeded fields from struct mcp16502

2019-04-10 Thread Axel Lin
At the context with rdev, we can use rdev->regmap instead of mcp->rmap. The *rdev[NUM_REGULATORS] is not required because current code uses devm_regulator_register() so we don't need to store *rdev for clean up paths. Signed-off-by: Axel Lin --- drivers/regulator/mcp16502.c | 40 +++-

[hubcap:for-next 20/22] fs/orangefs/file.c:574:5: sparse: symbol 'orangefs_file_open' was not declared. Should it be static?

2019-04-10 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux for-next head: 6055a739910e69f8f76120d48e7ae74a13b1fdda commit: 9a959aaffd7090810eade53e4d960614405f57c6 [20/22] orangefs: remember count when reading. reproduce: # apt-get install sparse git checkout 9a959aaffd

[RFC PATCH hubcap] orangefs: orangefs_file_open() can be static

2019-04-10 Thread kbuild test robot
Fixes: 9a959aaffd70 ("orangefs: remember count when reading.") Signed-off-by: kbuild test robot --- file.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index d198af9..01d0db6 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file

[PATCH 2/2] regulator: mcp16502: Remove setup_regulators function

2019-04-10 Thread Axel Lin
It seems a little bit odd current code pass struct regulator_config rather than a pointer to setup_regulators. The setup_regulators is so simple and only has one caller, so remove it. Signed-off-by: Axel Lin --- drivers/regulator/mcp16502.c | 37 +++- 1 file chang

[PATCH] rtc: mxc: use dev_pm_set_wake_irq() to simplify code

2019-04-10 Thread Anson Huang
With calling dev_pm_set_wake_irq() to set MXC RTC as wakeup source for suspend, generic wake irq mechanism will automatically enable it as wakeup source when suspend, then the suspend/resume callback which are ONLY for enabling/disabling irq wake can be removed, it simplifies the code. Signed-off-

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

2019-04-10 Thread Aaron Lu
On Wed, Apr 10, 2019 at 10:18:10PM +0800, Aubrey Li wrote: > On Wed, Apr 10, 2019 at 12:36 PM Aaron Lu wrote: > > > > On Tue, Apr 09, 2019 at 11:09:45AM -0700, Tim Chen wrote: > > > Now that we have accumulated quite a number of different fixes to your > > > orginal > > > posted patches. Would y

Re: [RFC PATCH hubcap] orangefs: orangefs_file_open() can be static

2019-04-10 Thread Joe Perches
On Thu, 2019-04-11 at 09:58 +0800, kbuild test robot wrote: > Fixes: 9a959aaffd70 ("orangefs: remember count when reading.") Making something static likely does not warrant a "Fixes:" tag > Signed-off-by: kbuild test robot > --- > file.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH] rtc: mxc_v2: use dev_pm_set_wake_irq() to simplify code

2019-04-10 Thread Anson Huang
With calling dev_pm_set_wake_irq() to set MXC_V2 RTC as wakeup source for suspend, generic wake irq mechanism will automatically enable it as wakeup source when suspend, then the suspend/resume callback which are ONLY for enabling/disabling irq wake can be removed, it simplifies the code. Signed-o

Re: kernel BUG at fs/inode.c:LINE!

2019-04-10 Thread Al Viro
On Thu, Apr 11, 2019 at 08:50:17AM +0800, Ian Kent wrote: > On Wed, 2019-04-10 at 14:41 +0200, Dmitry Vyukov wrote: > > On Wed, Apr 10, 2019 at 2:12 PM Al Viro wrote: > > > > > > On Wed, Apr 10, 2019 at 08:07:15PM +0800, Ian Kent wrote: > > > > > > > > I'm unable to find a branch matching the li

linux-next: manual merge of the apparmor tree with Linus' tree

2019-04-10 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the apparmor tree got a conflict in: security/apparmor/lsm.c between commit: e33c1b992377 ("apparmor: Restore Y/N in /sys for apparmor's "enabled"") from Linus' tree and commit: 876dd866c084 ("apparmor: Initial implementation of raw policy blob compr

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

2019-04-10 Thread Waiman Long
On 04/10/2019 02:44 PM, Peter Zijlstra wrote: > 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. >>

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

2019-04-10 Thread Shawn Guo
On Thu, Mar 28, 2019 at 11:49:16PM -0700, 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_C

Re: [RFC patch 16/41] tracing: Remove the ULONG_MAX stack trace hackery

2019-04-10 Thread Josh Poimboeuf
On Wed, Apr 10, 2019 at 12:28:10PM +0200, Thomas Gleixner wrote: > No architecture terminates the stack trace with ULONG_MAX anymore. As the > code checks the number of entries stored anyway there is no point in > keeping all that ULONG_MAX magic around. > > The histogram code zeroes the storage b

Re: [RFC PATCH v3 14/15] dcache: Implement partial shrink via Slab Movable Objects

2019-04-10 Thread Al Viro
On Thu, Apr 11, 2019 at 11:34:40AM +1000, Tobin C. Harding wrote: > +/* > + * d_isolate() - Dentry isolation callback function. > + * @s: The dentry cache. > + * @v: Vector of pointers to the objects to isolate. > + * @nr: Number of objects in @v. > + * > + * The slab allocator is holding off frees

[PATCH -next] bus: ti-sysc: Use PTR_ERR_OR_ZERO in sysc_init_resets()

2019-04-10 Thread YueHaibing
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing --- drivers/bus/ti-sysc.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index b696f26a3894..2b93be2882f3 100644 --- a/drivers/bus/ti-sysc.c

Re: [PATCH 1/4] ARM: dts: imx6: RDU2: Use new CODEC reset pin name

2019-04-10 Thread Shawn Guo
On Fri, Mar 29, 2019 at 01:13:10PM -0500, Andrew F. Davis wrote: > The correct DT property for specifying a GPIO used for reset > is "reset-gpios", the driver now accepts this name, use it here. > > Note the GPIO polarity in the driver was ignored before and always > assumed to be active low, when

Re: [PATCH v3] init: Do not select DEBUG_KERNEL by default

2019-04-10 Thread Kees Cook
On Wed, Apr 10, 2019 at 5:56 PM Sinan Kaya wrote: > > We can't seem to have a kernel with CONFIG_EXPERT set but > CONFIG_DEBUG_KERNEL unset these days. > > While some of the features under the CONFIG_EXPERT require > CONFIG_DEBUG_KERNEL, it doesn't apply for all features. > > It looks like CONFIG_

Re: [RFC patch 20/41] backtrace-test: Simplify stack trace handling

2019-04-10 Thread Josh Poimboeuf
On Wed, Apr 10, 2019 at 12:28:14PM +0200, Thomas Gleixner wrote: > Replace the indirection through struct stack_trace by using the storage > array based interfaces. > > Signed-off-by: Thomas Gleixner > --- > kernel/backtracetest.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletion

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

2019-04-10 Thread Steve French
How was this discovered? Does it address a reported user problem? On Wed, Apr 10, 2019 at 2:38 PM wrote: > > 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_ite

[PATCH -next] memstick: remove set but not used variable 'data'

2019-04-10 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/memstick/host/jmb38x_ms.c: In function 'jmb38x_ms_issue_cmd': drivers/memstick/host/jmb38x_ms.c:371:17: warning: variable 'data' set but not used [-Wunused-but-set-variable] It's never used since introduction and can be removed. Signed-off-b

Re: [RFC PATCH v3 14/15] dcache: Implement partial shrink via Slab Movable Objects

2019-04-10 Thread Tobin C. Harding
On Thu, Apr 11, 2019 at 03:33:22AM +0100, Al Viro wrote: > On Thu, Apr 11, 2019 at 11:34:40AM +1000, Tobin C. Harding wrote: > > +/* > > + * d_isolate() - Dentry isolation callback function. > > + * @s: The dentry cache. > > + * @v: Vector of pointers to the objects to isolate. > > + * @nr: Number

Re: [PATCH 1/5] media: platform: Aspeed: Remove use of reset line

2019-04-10 Thread Joel Stanley
On Tue, 2 Apr 2019 at 18:24, Eddie James wrote: > > The reset line is toggled by enabling the clocks, so it's not necessary > to manually toggle the reset as well. > > Signed-off-by: Eddie James Reviewed-by: Joel Stanley

Re: [RFC patch 25/41] mm/kasan: Simplify stacktrace handling

2019-04-10 Thread Josh Poimboeuf
On Wed, Apr 10, 2019 at 12:28:19PM +0200, Thomas Gleixner wrote: > Replace the indirection through struct stack_trace by using the storage > array based interfaces. > > Signed-off-by: Thomas Gleixner > Cc: Andrey Ryabinin > Cc: Alexander Potapenko > Cc: Dmitry Vyukov > Cc: kasan-...@googlegrou

Re: [PATCH RFC] clk: ux500: add range to usleep_range

2019-04-10 Thread Nicholas Mc Guire
On Wed, Apr 10, 2019 at 03:53:51PM -0700, Stephen Boyd wrote: > Quoting Nicholas Mc Guire (2019-04-06 20:13:24) > > Providing a range for usleep_range() allows the hrtimer subsystem to > > coalesce timers - the delay is runtime configurable so a factor 2 > > is taken to provide the range. > > > >

Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()

2019-04-10 Thread Liang Yang
Hi Martin, On 2019/4/11 1:54, Martin Blumenstingl wrote: Hi Liang, On Wed, Apr 10, 2019 at 1:08 PM Liang Yang wrote: Hi Martin, On 2019/4/5 12:30, Martin Blumenstingl wrote: Hi Liang, On Fri, Mar 29, 2019 at 8:44 AM Liang Yang wrote: Hi Martin, On 2019/3/29 2:03, Martin Blumenstingl wr

Re: [PATCH] arm64: dts: imx8qxp: Add lpuart1/lpuart2/lpuart3 nodes

2019-04-10 Thread Shawn Guo
On Sat, Mar 30, 2019 at 05:07:44PM +, Daniel Baluta wrote: > lpuart nodes are part of the ADMA subsystem. See Audio DMA > memory map in iMX8 QXP RM [1] > > This patch is based on the dtsi file initially submitted by > Teo Hall in i.MX NXP internal tree. > > [1] https://www.nxp.com/docs/en/ref

Re: [PATCH v2] init: Do not select DEBUG_KERNEL by default

2019-04-10 Thread Josh Triplett
On April 10, 2019 4:24:18 PM PDT, Kees Cook wrote: >On Wed, Apr 10, 2019 at 4:22 PM Josh Triplett >wrote: >> >> On April 10, 2019 3:58:55 PM PDT, Kees Cook >wrote: >> >On Wed, Apr 10, 2019 at 3:42 PM Sinan Kaya wrote: >> >> >> >> We can't seem to have a kernel with CONFIG_EXPERT set but >> >> C

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

2019-04-10 Thread Aaron Lu
On Wed, Apr 10, 2019 at 04:44:18PM +0200, Peter Zijlstra wrote: > On Wed, Apr 10, 2019 at 12:36:33PM +0800, Aaron Lu wrote: > > On Tue, Apr 09, 2019 at 11:09:45AM -0700, Tim Chen wrote: > > > Now that we have accumulated quite a number of different fixes to your > > > orginal > > > posted patches.

Re: [RFC patch 16/41] tracing: Remove the ULONG_MAX stack trace hackery

2019-04-10 Thread Steven Rostedt
On Wed, 10 Apr 2019 21:34:25 -0500 Josh Poimboeuf wrote: > > --- a/kernel/trace/trace_stack.c > > +++ b/kernel/trace/trace_stack.c > > @@ -18,8 +18,7 @@ > > > > #include "trace.h" > > > > -static unsigned long stack_dump_trace[STACK_TRACE_ENTRIES+1] = > > -{ [0 ... (STACK_TRACE_ENTRIES)]

Re: [PATCH v5 0/5] PCIE support for i.MX8MQ (DT changes)

2019-04-10 Thread Shawn Guo
On Fri, Apr 05, 2019 at 10:29:59AM -0700, Andrey Smirnov wrote: > Andrey Smirnov (5): > arm64: dts: imx8mq: Mark iomuxc_gpr as i.MX6Q compatible > arm64: dts: imx8mq: Add a node for SRC IP block > arm64: dts: imx8mq: Combine PCIE power domains > arm64: dts: imx8mq: Add nodes for PCIe IP blo

Re: [PATCH v2] init: Do not select DEBUG_KERNEL by default

2019-04-10 Thread Sinan Kaya
On 4/10/2019 11:02 PM, Josh Triplett wrote: Then let's fix*that*, and get checkpatch to help enforce it in the future. EXPERT doesn't affect code generation, and neither should this. I think we have to do both. We need to go after the users as well as solve the immediate problem per this patch

[PATCH v3 1/5] soundwire: intel: fix inversion in devm_kcalloc parameters

2019-04-10 Thread Pierre-Louis Bossart
the number of elements and size are inverted, fix. This probably only worked because the number of properties is hard-coded to 1. Fixes: 71bb8a1b059e ('soundwire: intel: Add Intel Master driver') Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 4 ++-- 1 file changed, 2 inser

[PATCH v3 2/5] soundwire: fix style issues

2019-04-10 Thread Pierre-Louis Bossart
Visual inspections confirmed by checkpatch.pl --strict expose a number of style issues, specifically parameter alignment is inconsistent as if different contributors used different styles. Before we restart support for SoundWire with Sound Open Firmware on Intel platforms, let's clean all this. Fi

[PATCH v3 0/5] soundwire: code cleanup

2019-04-10 Thread Pierre-Louis Bossart
SoundWire support will be provided in Linux with the Sound Open Firmware (SOF) on Intel platforms. Before we start adding the missing pieces, there are a number of warnings and style issues reported by checkpatch, cppcheck and Coccinelle that need to be cleaned-up. Changes since v2: fixed inversio

[PATCH v3 4/5] soundwire: stream: remove useless initialization of local variable

2019-04-10 Thread Pierre-Louis Bossart
no need to reset return value. Detected with cppcheck: [drivers/soundwire/stream.c:332]: (style) Variable 'ret' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

[PATCH v3 3/5] soundwire: bus: remove useless initializations

2019-04-10 Thread Pierre-Louis Bossart
No need for explicit initialization of page and ssp fields, they are already zeroed with a memset. Detected with cppcheck: [drivers/soundwire/bus.c:309]: (style) Variable 'msg->page' is reassigned a value before the old one has been used. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwi

[PATCH v3 5/5] soundwire: add missing newlines in dynamic debug logs

2019-04-10 Thread Pierre-Louis Bossart
For some reason the newlines are not used everywhere. Fix as needed. Reported-by: Joe Perches Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c| 74 +-- drivers/soundwire/cadence_master.c | 12 ++-- drivers/soundwire/intel.c | 12 ++-- drive

[PATCH] slab: fix an infinite loop in leaks_show()

2019-04-10 Thread Qian Cai
"cat /proc/slab_allocators" could hang forever on SMP machines with kmemleak or object debugging enabled due to other CPUs running do_drain() will keep making kmemleak_object or debug_objects_cache dirty and unable to escape the first loop in leaks_show(), do { set_store_user_clean(cachep)

<    3   4   5   6   7   8   9   >