[PATCH 2/2] zram: idle memory tracking

2018-03-25 Thread Minchan Kim
zRam as swap is useful for small memory device. However, swap means those pages on zram are mostly cold pages due to VM's LRU algorithm. Especially, once init data for application are touched for launching, they tend to be not accessed any more and finally swapped out. zRAM can store such cold page

[PATCH 1/2] zram: correct flag name of ZRAM_ACCESS

2018-03-25 Thread Minchan Kim
ZRAM_ACCESS is meant to lock a slot of zram so correct the name. Signed-off-by: Minchan Kim --- drivers/block/zram/zram_drv.c | 4 ++-- drivers/block/zram/zram_drv.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-25 Thread Darrick J. Wong
On Mon, Mar 26, 2018 at 04:54:59AM +, Sasha Levin wrote: > On Sat, Mar 24, 2018 at 10:21:59AM -0700, Darrick J. Wong wrote: > >On Sat, Mar 24, 2018 at 10:06:38AM +0100, Greg Kroah-Hartman wrote: > >> On Fri, Mar 23, 2018 at 06:23:02PM +, Luis R. Rodriguez wrote: > >> > On Fri, Mar 23, 2018

Re: [RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers

2018-03-25 Thread John Paul Adrian Glaubitz
Hi Linus! On 03/26/2018 03:15 PM, Linus Torvalds wrote: > Secretly, I was hoping to kill x32, because it's not being used afaik. FWIW, we are maintaining an x32 port in Debian and there are some people actually using it [1]. There is one build instance running on VMWare that I am hosting [2] and a

[PATCH -next] afs: Make symbol 'afs_cell_gc_delay' static

2018-03-25 Thread Wei Yongjun
Fixes the following sparse warnings: fs/afs/cell.c:21:24: warning: symbol 'afs_cell_gc_delay' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- fs/afs/cell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/afs/cell.c b/fs/afs/cell.c index 3d2c5e0..c17

[PATCH v2] of_net: Implement of_get_nvmem_mac_address helper

2018-03-25 Thread Mike Looijmans
It's common practice to store MAC addresses for network interfaces into nvmem devices. However the code to actually do this in the kernel lacks, so this patch adds of_get_nvmem_mac_address() for drivers to obtain the address from an nvmem cell provider. This is particulary useful on devices where

Re: [PATCH v3 1/2] x86, msr: allow rdmsr_safe_on_cpu() to schedule

2018-03-25 Thread Ingo Molnar
* Borislav Petkov wrote: > On Sat, Mar 24, 2018 at 07:29:48AM -0700, Eric Dumazet wrote: > > It is named gsysd, "Google System Tool", a daemon+cli that is run > > on all machines in production to provide a generic interface > > for interacting with the system hardware. > > So I'm wondering if

[PATCH 3/4] x86/CPU: Rename intel_cacheinfo.c to cacheinfo.c

2018-03-25 Thread Suravee Suthikulpanit
From: Borislav Petkov Since this file contains general cache-related information for x86, rename the file to a more appropriate name. Signed-off-by: Borislav Petkov Signed-off-by: Suravee Suthikulpanit --- arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/{int

[PATCH 1/4] x86/CPU/AMD: Remove unnecessary check for CONFIG_SMP

2018-03-25 Thread Suravee Suthikulpanit
From: Borislav Petkov Move smp_num_siblings and cpu_llc_id to cpu/common.c so that they're always present as symbols and not only in the CONFIG_SMP case. Then, other code using them doesn't need ugly ifdeffery anymore. Signed-off-by: Borislav Petkov Signed-off-by: Suravee Suthikulpanit --- ar

[PATCH 2/4] perf/x86/amd/uncore: Fix amd_uncore_llc ID to use pre-defined cpu_llc_id

2018-03-25 Thread Suravee Suthikulpanit
Current logic iterates over CPUID Fn801d leafs (Cache Properties) to detect the last level cache, and derive the last-level cache ID. However, this information is already available in the cpu_llc_id. Therefore, make use of it instead. Reviewed-by: Borislav Petkov Cc: Janakarajan Natarajan Si

[PATCH 4/4] x86/CPU/AMD: Calculate LLC ID from number of sharing threads

2018-03-25 Thread Suravee Suthikulpanit
Last-Level-Cache ID can be calculated from the number of threads sharing the cache, which is available from CPUID Fn0x801D (Cache Properties). This is used to left-shift the APIC ID to derive LLC ID. Therefore, default to this method unless the APIC ID enumeration does not follow the scheme.

[PATCH 0/4] x86/CPU: Update AMD Last-Level-Cache Information

2018-03-25 Thread Suravee Suthikulpanit
First, clean up last-level-cache parameters so that it could not require ifdef CONFIG_SMP. Then, consolidate cache-info-related code for x86 into arch/x86/kernel/cpu/cacheinfo.c. Finally, for AMD, introduce new logic to derive LLC ID from APIC ID. Thanks, Suravee Borislav Petkov (2): x86/CPU/A

[PATCH] mmc: pwrseq: Use kmalloc_array instead of stack VLA

2018-03-25 Thread Tobin C. Harding
The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug (kernel Oops) or a security flaw (overwriting memory beyond the stack). Also, in general, as code evolves it is easy to lose track of how big a VLA can get. Thu

Re: [PATCH 2/2] md: dm-verity: allow parallel processing of bio blocks

2018-03-25 Thread Gilad Ben-Yossef
On Sun, Mar 25, 2018 at 9:41 PM, Yael Chemla wrote: > Allow parallel processing of bio blocks by moving to async. completion > handling. This allows for better resource utilization of both HW and > software based hash tfm and therefore better performance in many cases, > depending on the speci

Re: [PATCH 1/2] md: dm-verity: aggregate crypto API calls

2018-03-25 Thread Gilad Ben-Yossef
On Sun, Mar 25, 2018 at 9:41 PM, Yael Chemla wrote: > Current implementation makes multiple crypto API calls per block > implementation makes multiple crypto API calls per single block, > forcing underlying crypto tfm implementation to "stop & go", > leading to under utilization of HW engines.

Re: [PATCH v8 11/14] iommu/rockchip: Use OF_IOMMU to attach devices automatically

2018-03-25 Thread Daniel Kurtz
On Fri, Mar 23, 2018 at 1:40 AM Jeffy Chen wrote: > Converts the rockchip-iommu driver to use the OF_IOMMU infrastructure, > which allows attaching master devices to their IOMMUs automatically > according to DT properties. > Signed-off-by: Jeffy Chen > Reviewed-by: Robin Murphy > --- > Change

Re: [RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers

2018-03-25 Thread Dominik Brodowski
On Mon, Mar 26, 2018 at 04:47:50AM +0100, Al Viro wrote: > * mips n32 and x86 x32 can become an extra source of headache. > That actually applies to any plans of passing struct pt_regs *. As it > is, e.g. syscall 515 on amd64 is compat_sys_readv(). Dispatched via > this: > /* >

Re: [RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers

2018-03-25 Thread Linus Torvalds
On Sun, Mar 25, 2018 at 8:15 PM, Linus Torvalds wrote: > > HOWEVER. > > I didn't actually test any of the compat or x32 ones, and the way I > did it there also was no type-checking or other automated catching of > getting it wrong. So it's almost certainly completely buggy, but the > _intent_ is t

Re: [RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers

2018-03-25 Thread Linus Torvalds
On Sun, Mar 25, 2018 at 5:47 PM, Al Viro wrote: > > Linus, Dominik - how do you plan dealing with that fun? Secretly, I was hoping to kill x32, because it's not being used afaik. More realistically, I was thinking we'd just use a separate table or system calls, and generate different versions.

[PATCH] media: cx231xx: Add support for AverMedia DVD EZMaker 7

2018-03-25 Thread Kai-Heng Feng
User reports AverMedia DVD EZMaker 7 can be driven by VIDEO_GRABBER. Add the device to the id_table to make it work. BugLink: https://bugs.launchpad.net/bugs/1620762 Signed-off-by: Kai-Heng Feng --- drivers/media/usb/cx231xx/cx231xx-cards.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/

RE: [PATCH v3] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-25 Thread Doug Smythies
On 2018.03.25 04:54 Rafael J. Wysocki wrote: > On Sun, Mar 25, 2018 at 1:28 AM, Doug Smythies wrote: >> On 2018.03.14 07:04 Rafael J. Wysocki wrote: >> >>> If poll_idle() is allowed to spin until need_resched() returns 'true', >>> it may actually spin for a much longer time than expected by the id

RE: [PATCH v3] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-25 Thread Doug Smythies
On 2018.03.25 14:25 Rik van Riel wrote: > On Sun, 2018-03-25 at 23:34 +0200, Rafael J. Wysocki wrote: >> On Sunday, March 25, 2018 10:15:52 PM CEST Rik van Riel wrote: >>> >>> --=-e8yLbs0aoH4SrxOskwwl >>> Content-Type: text/plain; charset="UTF-8" >>> Content-Transfer-Encoding: quoted-printable >>>

Re: [QUESTION] Mainline support for B43_PHY_AC wifi cards

2018-03-25 Thread Juri Lelli
On 24/03/18 00:01, Rafał Miłecki wrote: > On 23 March 2018 at 15:09, Juri Lelli wrote: > > On 23/03/18 14:43, Rafał Miłecki wrote: > >> Hi, > >> > >> On 23 March 2018 at 10:47, Juri Lelli wrote: > >> > I've got a Dell XPS 13 9343/0TM99H (BIOS A15 01/23/2018) mounting a > >> > BCM4352 802.11ac (re

Re: [PATCH v2] PCI / PM: Always check PME wakeup capability for runtime wakeup support

2018-03-25 Thread Kai Heng Feng
Hi Bjorn, Rafael, On Mar 19, 2018, at 10:09 PM, Kai-Heng Feng wrote: USB controller ASM1042 stops working after commit de3ef1eb1cd0 ("PM / core: Drop run_wake flag from struct dev_pm_info"). The device in question is not power managed by platform firmware, furthermore, it only supports PME#

Re: [PATCH v3] x86: i8237: Register based on FADT legacy boot flag

2018-03-25 Thread Rajneesh Bhardwaj
On Sun, Mar 25, 2018 at 01:50:40PM +0200, Thomas Gleixner wrote: > On Thu, 22 Mar 2018, Anshuman Gupta wrote: > > > From: Rajneesh Bhardwaj > > > > >From Skylake onwards, the platform controller hub (Sunrisepoint PCH) does > > not support legacy DMA operations to IO ports 81h-83h, 87h, 89h-8Bh,

Re: [PATCH] ext4 : fix comments in ext4_swap_extents

2018-03-25 Thread Theodore Y. Ts'o
On Sat, Mar 24, 2018 at 03:28:24PM +0800, zhenwei.pi wrote: > "mark_unwritten" in comment and "unwritten" in variable > argument lists is mismatch. > > Signed-off-by: zhenwei.pi Applied, thanks. - Ted

linux-next: manual merge of the kvm tree with the kvm-fixes tree

2018-03-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm tree got a conflict in: arch/x86/kvm/vmx.c between commit: 9d1887ef3252 ("KVM: nVMX: sync vmcs02 segment regs prior to vmx_set_cr0") from the kvm-fixes tree and commit: 2bb8cafea80b ("KVM: vVMX: signal failure for nested VMEntry if emulation_

[PATCH] ALSA: aloop: Mark paused device as inactive

2018-03-25 Thread Robert Rosengren
Show paused ALSA aloop device as inactive, i.e. the control "PCM Slave Active" set as false. Notification sent upon state change. This makes it possible for client capturing from aloop device to know if data is expected. Without it the client expects data even if playback is paused. Signed-off-by

Re: [PATCH v2 1/4] clk: qcom: Clear hardware clock control bit of RCG

2018-03-25 Thread Nischal, Amit
On 3/20/2018 4:25 AM, Stephen Boyd wrote: Quoting Amit Nischal (2018-03-07 23:18:12) For upcoming targets like sdm845, POR value of the hardware clock control bit is set for most of root clocks which needs to be cleared for software to be able to control. For older targets like MSM8996, this b

Re: [Bug 199003] console stalled, cause Hard LOCKUP.

2018-03-25 Thread Sergey Senozhatsky
Cc-ing the kernel list and printk people. Wen Yang, any chance we can switch to email? Bugzilla is not very handful. On (03/26/18 02:40), bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=199003 > > --- Comment #11 from Wen Yang (wen.yan...@zte.com.cn) ---

Re: [Bug 199003] console stalled, cause Hard LOCKUP.

2018-03-25 Thread Sergey Senozhatsky
On (03/23/18 14:16), Petr Mladek wrote: [..] > If I get it correctly, the reporter of this bug has not tried > Steven's patches yet. It's not immediately clear. It's not even completely clear if we are looking at "X cpus printk 1 cpu prints it all scenario" and it's not clear if hand off will be

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-25 Thread Sasha Levin
On Sat, Mar 24, 2018 at 10:21:59AM -0700, Darrick J. Wong wrote: >On Sat, Mar 24, 2018 at 10:06:38AM +0100, Greg Kroah-Hartman wrote: >> On Fri, Mar 23, 2018 at 06:23:02PM +, Luis R. Rodriguez wrote: >> > On Fri, Mar 23, 2018 at 10:26:20AM -0700, Darrick J. Wong wrote: >> > > On Fri, Mar 23, 20

Re: [PATCH v2 00/13] Major code reorganization to make all i2c transfers working

2018-03-25 Thread Abhishek Sahu
On 2018-03-24 17:52, Wolfram Sang wrote: On Mon, Mar 12, 2018 at 06:44:49PM +0530, Abhishek Sahu wrote: * v2: 1. Address review comments in v1 2. Changed the license to SPDX 3. Changed commit messages for some of the patch having more detail 4. Removed event-based completion and changed transfe

Re: [PATCH v6 05/21] tracing: probeevent: Cleanup print argument functions

2018-03-25 Thread Masami Hiramatsu
On Fri, 23 Mar 2018 12:36:47 -0400 Steven Rostedt wrote: > On Sat, 17 Mar 2018 21:41:12 +0900 > Masami Hiramatsu wrote: > > > Current print argument functions prints the argument > > name too. It is not good for printing out multiple > > values for one argument. This change it to just print > >

Re: [PATCH v1 09/16] rtc: mediatek: convert to use device managed functions

2018-03-25 Thread Sean Wang
On Fri, 2018-03-23 at 11:50 +0100, Alexandre Belloni wrote: > On 23/03/2018 at 17:15:06 +0800, sean.w...@mediatek.com wrote: > > From: Sean Wang > > > > Use device managed operation to simplify error handling, reduce source > > code size, and reduce the likelyhood of bugs, and remove our removal

Re: [PATCH v6 21/21] perf-probe: Add array argument support

2018-03-25 Thread Masami Hiramatsu
On Thu, 22 Mar 2018 16:19:46 +0530 Ravi Bangoria wrote: > Hi Masami :) > > On 03/22/2018 03:53 PM, Masami Hiramatsu wrote: > > On Mon, 19 Mar 2018 13:29:59 +0530 > > Ravi Bangoria wrote: > > > >> > >> Is it okay to allow user to specify array size with type field? > > Fro this patch, yes. > >

Re: [RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers

2018-03-25 Thread Al Viro
On Mon, Mar 26, 2018 at 01:40:17AM +0100, Al Viro wrote: > Kinda-sorta part: > * asmlinkage_protect is taken out for now, so m68k has problems. > * syscalls that run out of 6 slots barf violently. For mips it's > wrong (there we have 8 slots); for stuff like arm and ppc it's right, bu

Re: possible deadlock in handle_rx

2018-03-25 Thread Jason Wang
On 2018年03月26日 08:01, syzbot wrote: Hello, syzbot hit the following crash on upstream commit cb6416592bc2a8b731dabcec0d63cda270764fc6 (Sun Mar 25 17:45:10 2018 +) Merge tag 'dmaengine-fix-4.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma syzbot dashboard link: ht

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

2018-03-25 Thread Stephen Rothwell
Hi all, On Thu, 22 Mar 2018 17:37:22 +1100 Stephen Rothwell wrote: > > Today's linux-next merge of the drm tree got conflicts in several amdgpu > files because there are a set of (mostly identical) patches that appear > Linus' tree and the drm tree. In each case I just used the version fo > the

Re: [RFC PATCH V2 0/8] Packed ring for vhost

2018-03-25 Thread Jason Wang
cc Jens, Tiwei and Wei Thanks On 2018年03月26日 11:38, Jason Wang wrote: Hi all: This RFC implement packed ring layout. The code were tested with pmd implement by Jens at http://dpdk.org/ml/archives/dev/2018-January/089417.html. Minor change was needed for pmd codes to kick virtqueue since it as

Re: KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-03-25 Thread syzbot
syzbot has found reproducer for the following crash on upstream commit 3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (Sun Mar 25 22:44:30 2018 +) Linux 4.16-rc7 syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=29ee8f76017ce6cf03da So far this crash happened 4 times on upstream. C

[RFC PATCH V2 8/8] vhost: event suppression for packed ring

2018-03-25 Thread Jason Wang
This patch introduces basic support for event suppression aka driver and device area. Compile tested only. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c| 169 --- drivers/vhost/vhost.h| 10 ++- include/uapi/linux/virtio_ring.h |

[RFC PATCH V2 7/8] vhost: packed ring support

2018-03-25 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/net.c | 5 +- drivers/vhost/vhost.c | 530 ++ drivers/vhost/vhost.h | 7 +- 3 files changed, 505 insertions(+), 37 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7be8b55..

[RFC PATCH V2 6/8] virtio: introduce packed ring defines

2018-03-25 Thread Jason Wang
Signed-off-by: Jason Wang --- include/uapi/linux/virtio_config.h | 9 + include/uapi/linux/virtio_ring.h | 13 + 2 files changed, 22 insertions(+) diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 308e209..5903d51 100644 --- a/incl

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

2018-03-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm tree got conflicts in: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h drivers/gpu/drm/vmwgfx/vmwgfx_kms.c between commit: 140bcaa23a1c ("drm/vmwgfx: Fix black screen and device errors when running without fbdev") from Linus' tree and commit: c3b9b1657

[RFC PATCH V2 5/8] vhost: vhost_put_user() can accept metadata type

2018-03-25 Thread Jason Wang
We assumes used ring update is the only user for vhost_put_user() in the past. This may not be the case for the incoming packed ring which may update the descriptor ring for used. So introduce a new type parameter. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 14 +++--- 1 file c

[RFC PATCH V2 3/8] vhost: do not use vring_used_elem

2018-03-25 Thread Jason Wang
Instead of depending on the exported vring_used_elem, this patch switches to use a new internal structure vhost_used_elem which embed vring_used_elem in itself. This could be used to let vhost to record extra metadata for the incoming packed ring layout. Signed-off-by: Jason Wang --- drivers/vho

[RFC PATCH V2 2/8] vhost: hide used ring layout from device

2018-03-25 Thread Jason Wang
We used to return descriptor head by vhost_get_vq_desc() to device and pass it back to vhost_add_used() and its friends. This exposes the internal used ring layout to device which makes it hard to be extended for e.g packed ring layout. So this patch tries to hide the used ring layout by - lettin

[RFC PATCH V2 1/8] vhost: move get_rx_bufs to vhost.c

2018-03-25 Thread Jason Wang
Move get_rx_bufs() to vhost.c and rename it to vhost_get_rx_bufs(). This helps to hide vring internal layout from specific device implementation. Packed ring implementation will benefit from this. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 83 ++

[RFC PATCH V2 4/8] vhost_net: do not explicitly manipulate vhost_used_elem

2018-03-25 Thread Jason Wang
Two helpers of setting/getting used len were introduced to avoid explicitly manipulating vhost_used_elem in zerocopy code. This will be used to hide used_elem internals and simplify packed ring implementation. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 11 +-- drivers/vhost/vh

[RFC PATCH V2 0/8] Packed ring for vhost

2018-03-25 Thread Jason Wang
Hi all: This RFC implement packed ring layout. The code were tested with pmd implement by Jens at http://dpdk.org/ml/archives/dev/2018-January/089417.html. Minor change was needed for pmd codes to kick virtqueue since it assumes a busy polling backend. Test were done between localhost and guest.

RE: [PATCH v29 3/4] mm/page_poison: expose page_poisoning_enabled to kernel modules

2018-03-25 Thread Wang, Wei W
On Monday, March 26, 2018 10:40 AM, Wang, Wei W wrote: > Subject: [PATCH v29 3/4] mm/page_poison: expose page_poisoning_enabled > to kernel modules > > In some usages, e.g. virtio-balloon, a kernel module needs to know if page > poisoning is in use. This patch exposes the page_poisoning_enabled fu

Re: [PATCH v7 6/6] typec: tcpm: Add support for sink PPS related messages

2018-03-25 Thread Guenter Roeck
On 03/23/2018 03:12 AM, Adam Thomson wrote: This commit adds sink side support for Get_Status, Status, Get_PPS_Status and PPS_Status handling. As there's the potential for a partner to respond with Not_Supported, handling of this message is also added. Sending of Not_Supported is added to handle

Re: [PATCH v7 5/6] typec: tcpm: Represent source supply through power_supply

2018-03-25 Thread Guenter Roeck
On 03/23/2018 03:12 AM, Adam Thomson wrote: This commit adds a power_supply class instance to represent a PD source's voltage and current properties. This provides an interface for reading these properties from user-space or other drivers. For PPS enabled Sources, this also provides write access

Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS

2018-03-25 Thread Guenter Roeck
On 03/23/2018 03:12 AM, Adam Thomson wrote: This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson Acked-by: He

Re: [PATCH v4 2/3] mm/free_pcppages_bulk: do not hold lock when picking pages to free

2018-03-25 Thread Aaron Lu
On Thu, Mar 22, 2018 at 08:17:19AM -0700, Matthew Wilcox wrote: > On Tue, Mar 13, 2018 at 11:34:53AM +0800, Aaron Lu wrote: > > I wish there is a data structure that has the flexibility of list while > > at the same time we can locate the Nth element in the list without the > > need to iterate. Tha

[PATCH v3 4/5] arm64: introduce pfn_valid_region()

2018-03-25 Thread Jia He
This is the preparation for further optimizing in early_pfn_valid on arm64. Signed-off-by: Jia He --- arch/arm64/include/asm/page.h | 3 ++- arch/arm64/mm/init.c | 25 - 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/page.

[PATCH v3 5/5] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()

2018-03-25 Thread Jia He
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But there is still some room for improvement. E.g. in early_pfn_valid(), if pfn and pfn+1 are in the same memblock region, we can record the last returned memblock regi

[PATCH v3 3/5] mm/memblock: introduce memblock_search_pfn_regions()

2018-03-25 Thread Jia He
This api is the preparation for further optimizing early_pfn_valid Signed-off-by: Jia He --- include/linux/memblock.h | 2 ++ mm/memblock.c| 9 + 2 files changed, 11 insertions(+) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index a8fb2ab..104bca6 100644

[PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-25 Thread Jia He
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But there is still some room for improvement. E.g. if pfn and pfn+1 are in the same memblock region, we can simply pfn++ instead of doing the binary search in memblock_

[PATCH v3 1/5] mm: page_alloc: remain memblock_next_valid_pfn() when CONFIG_HAVE_ARCH_PFN_VALID is enable

2018-03-25 Thread Jia He
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But it causes possible panic bug. So Daniel Vacek reverted it later. But memblock_next_valid_pfn is valid when CONFIG_HAVE_ARCH_PFN_VALID is enable. And as verified by

[PATCH v3 0/5] optimize memblock_next_valid_pfn and early_pfn_valid

2018-03-25 Thread Jia He
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") tried to optimize the loop in memmap_init_zone(). But there is still some room for improvement. Patch 1 remain the memblock_next_valid_pfn when CONFIG_HAVE_ARCH_PFN_VALID is enabled Patch 2 optimizes t

[PATCH v29 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON

2018-03-25 Thread Wei Wang
The VIRTIO_BALLOON_F_PAGE_POISON feature bit is used to indicate if the guest is using page poisoning. Guest writes to the poison_val config field to tell host about the page poisoning value in use. Signed-off-by: Wei Wang Suggested-by: Michael S. Tsirkin Cc: Michael S. Tsirkin Cc: Michal Hocko

[PATCH v29 1/4] mm: support reporting free page blocks

2018-03-25 Thread Wei Wang
This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone->lock is released, so it is the caller's responsibility to either detect or prevent the use of such pages. One use example of this

[PATCH v29 3/4] mm/page_poison: expose page_poisoning_enabled to kernel modules

2018-03-25 Thread Wei Wang
In some usages, e.g. virtio-balloon, a kernel module needs to know if page poisoning is in use. This patch exposes the page_poisoning_enabled function to kernel modules. Signed-off-by: Wei Wang Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin --- mm/page_poison.c | 6 ++ 1 file c

[PATCH v29 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-25 Thread Wei Wang
Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_HINT feature indicates the support of reporting hints of guest free pages to host via virtio-balloon. Host requests the guest to report free page hints by sending a new cmd id to the guest via the free_page_report_cmd_id configuration register. When t

[PATCH v29 0/4] Virtio-balloon: support free page reporting

2018-03-25 Thread Wei Wang
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs.

Re: [PATCH RFC] xfs, memcg: Call xfs_fs_nr_cached_objects() only in case of global reclaim

2018-03-25 Thread Dave Chinner
On Fri, Mar 23, 2018 at 03:39:53PM +0300, Kirill Tkhai wrote: > On 23.03.2018 02:46, Dave Chinner wrote: > > On Thu, Mar 22, 2018 at 07:52:37PM +0300, Kirill Tkhai wrote: > >> Here is the problem I'm solving: https://lkml.org/lkml/2018/3/21/365. > > > > Oh, finally you tell me what the problem is

Re: [PATCH v1 08/16] rtc: mediatek: remove unnecessary irq_dispose_mapping

2018-03-25 Thread Sean Wang
On Fri, 2018-03-23 at 11:38 +0100, Alexandre Belloni wrote: > On 23/03/2018 at 17:15:05 +0800, sean.w...@mediatek.com wrote: > > From: Sean Wang > > > > It's unnecessary doing irq_dispose_mapping as a reverse operation for > > platform_get_irq. > > > > Ususally, irq_dispose_mapping should be cal

[no subject]

2018-03-25 Thread Dennis Aberilla
hi Linux https://goo.gl/BDc7JvDennis Aberilla

linux-next: manual merge of the i2c tree with the asm-generic tree

2018-03-25 Thread Stephen Rothwell
Hi Wolfram, Today's linux-next merge of the i2c tree got a conflict in: arch/blackfin/mach-bf561/boards/acvilon.c between commit: 120090af2745 ("arch: remove blackfin port") from the asm-generic tree and commit: eb49778c8c6c ("i2c: pca-platform: drop gpio from platform data") from the

Re: [PATCH v2] scripts/kconfig: cleanup symbol handling code

2018-03-25 Thread Joey Pabalinas
On Mon, Mar 26, 2018 at 01:52:26AM +0900, Masahiro Yamada wrote: > I want to see Kconfig improvements in a bigger picture. > > The changes below are noise. That's understandable; I do agree that nothing here is _fundamentally_ broken at all, so no worries. -- Cheers, Joey Pabalinas signature.

Re: [PATCH 2/2] send-email: supply a --send-delay=1 by default

2018-03-25 Thread Junio C Hamano
Eric Sunshine writes: > A minor point: Are you sure that it's git-format-patch that's being > careful about arranging Date: to display in the desired order, and not > git-send-email? Looking at old patches I still have hanging around > which were created with git-format-patch, I see the Date: hea

Re: [PATCH 2/2] send-email: supply a --send-delay=1 by default

2018-03-25 Thread Junio C Hamano
"brian m. carlson" writes: > I'm not sure that this is going to have the effect you want it to have. > Let me give an example to demonstrate why. > ... > In short, I don't think this is going to be especially helpful because > it won't change the status quo for a lot of senders. You'd have to >

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

2018-03-25 Thread Stephen Rothwell
Hi Bjorn, After merging the pci tree, today's linux-next build (x86_64 allmodconfig) failed like this: In file included from /home/sfr/next/next/drivers/pci/host/pcie-iproc.c:16:0: /home/sfr/next/next/include/linux/irqchip/arm-gic-v3.h:560:10: fatal error: asm/arch_gicv3.h: No such file or dir

Re: pull-request: wireless-drivers-next 2018-03-24

2018-03-25 Thread David Miller
From: Kalle Valo Date: Sat, 24 Mar 2018 14:30:01 +0200 > here's the first pull request to net-next for 4.17. What's special here > is the addition of a new bluetooth driver, but that's been acked by > Marcel. Also we add a new include file to include/net because of that. > > Please let me know i

Re: pull-request: wireless-drivers 2018-03-24

2018-03-25 Thread David Miller
From: Kalle Valo Date: Sat, 24 Mar 2018 13:03:13 +0200 > This is a pull request to the net tree for 4.16. I'm not planning to > send anything more in this cycle for 4.16, unless something really major > comes up. > > Please let me know if you have any problems. Pulled.

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

2018-03-25 Thread Stephen Rothwell
Hi Bjorn, Today's linux-next merge of the pci tree got a conflict in: include/linux/of_pci.h between commit: a6f1086e29e9 ("PCI: Move of_irq_parse_and_map_pci() declaration under OF_IRQ") from Linus' tree and commit: effab67ffe90 ("PCI: Move private DT related functions into private hea

Re: [RFC PATCH net-next] tipc: tipc_disc_addr_trial_msg() can be static

2018-03-25 Thread David Miller
From: kbuild test robot Date: Sat, 24 Mar 2018 03:47:42 +0800 > Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash > values") > Signed-off-by: Fengguang Wu Applied.

Re: [PATCH v3 1/2] x86, msr: allow rdmsr_safe_on_cpu() to schedule

2018-03-25 Thread H. Peter Anvin
On 03/25/18 07:12, Borislav Petkov wrote: > > So I'm wondering if poking at the hardware like that is a really optimal > design. Maybe it would be cleaner if the OS would provide properly > abstracted sysfs interfaces instead of raw MSRs. For a couple of > reasons: > It's most definitely not.

Re: [PATCH] netlink: make sure nladdr has correct size in netlink_connect()

2018-03-25 Thread David Miller
From: Alexander Potapenko Date: Fri, 23 Mar 2018 13:49:02 +0100 > KMSAN reports use of uninitialized memory in the case when |alen| is > smaller than sizeof(struct sockaddr_nl), and therefore |nladdr| isn't > fully copied from the userspace. > > Signed-off-by: Alexander Potapenko > Fixes: 1da17

Re: [PATCH v2] arm: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL

2018-03-25 Thread Joel Stanley
On 14 March 2018 at 12:02, Jinbum Park wrote: > To enable UBSAN on arm, ARCH_HAS_UBSAN_SANITIZE_ALL is needed to be selected. > > Basic test has passed on Raspberry Pi2, Raspbian jessi lite with > CONFIG_UBSAN_SANITIZE_ALL, CONFIG_UBSAN_NULL. > > Used compiler is gcc 5.5.0 in [2] (2017.10). > > It

Re: [PATCH v2 02/16] riscv: Use INITRAMFS_GENERIC_UNLOAD.

2018-03-25 Thread Shea Levy
Hi Palmer, Palmer Dabbelt writes: > On Sun, 25 Mar 2018 15:18:39 PDT (-0700), s...@shealevy.com wrote: >> Signed-off-by: Shea Levy >> --- >> arch/riscv/Kconfig | 1 + >> arch/riscv/mm/init.c | 6 -- >> 2 files changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/arch/riscv/Kconfig

Re: [PATCH v2 02/16] riscv: Use INITRAMFS_GENERIC_UNLOAD.

2018-03-25 Thread Palmer Dabbelt
On Sun, 25 Mar 2018 15:18:39 PDT (-0700), s...@shealevy.com wrote: Signed-off-by: Shea Levy --- arch/riscv/Kconfig | 1 + arch/riscv/mm/init.c | 6 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index c22ebe08e902..ab1b4cee84fc 100

[RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers

2018-03-25 Thread Al Viro
On Thu, Mar 22, 2018 at 12:15:32AM +, Al Viro wrote: > FWIW, I have something that is almost reasonable on preprocessor side; > however, that has uncovered the following fun: [snip] According to gcc folks, the right way to do it is type-punning via union. Anyway, below is something that kind

Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-25 Thread Davidlohr Bueso
On Sat, 24 Mar 2018, Wanpeng Li wrote: Note: Peterz pointed out in the IRC we have to audit all the architectures that implement smp_prepare_boot_cpu() to see what they depend on if we want to move jump_label_init() before smp_prepare_boot_cpu(). So what this patch does is similar to the issue w

Re: [PATCH 0/3] iommu/vt-d: Global PASID name space

2018-03-25 Thread Lu Baolu
Hi Joerg, A gentle ping. :-) Any comments on this patch set? Best regards, Lu Baolu On 03/15/2018 10:38 AM, Lu Baolu wrote: > Hi, > > This patch series is trying to change the scope of PASID management > used in Intel IOMMU driver from per IOMMU to driver global. This is > required for some cas

Re: [PATCHv4] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-25 Thread Tony Lindgren
* Tony Lindgren [180326 00:24]: > Looks like on /dev/ttyUSB4 doing AT+COPS? or AT+CREG? won't work > while on /dev/gsmtty1 they work. So /dev/ttyUSB4 seems to a subset of > what's available over n_gsm on ch1. Anyways, good to hear that > /dev/ttyUSB4 can be used to debug voice calls :) Hmm and no

Re: [PATCHv4] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-25 Thread Tony Lindgren
* Pavel Machek [180325 22:57]: > Hi! > > > > > > Hmm. Interesting. Anyway, for me ttyUSB4 is interesting, as it seems > > > > > to react to AT commands, and in particular reacts to ADT123; (; is > > > > > important). > > > > > > > > Is that to dial a voice call? > > > > > > Yes. And it is ATD12

Re: [PATCH 2/2] send-email: supply a --send-delay=1 by default

2018-03-25 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 2:28 PM, Ævar Arnfjörð Bjarmason wrote: > The earlier change to add this option described the problem this > option is trying to solve. > > This turns it on by default with a value of 1 second, which'll > hopefully solve it, and if not user reports as well as the > X-Mailer

HOPE TO HEAR FROM YOU

2018-03-25 Thread Miss Nadege
Hello dear how are you? Nice to meet you,my name is Miss Nadege Yann, can we become friends? hope to hear from you so that we can know each other very well, love matters mostly in life,i will also send you my pictures and tell you more about myself, my email address is( missnade...@gmail.com )

possible deadlock in handle_rx

2018-03-25 Thread syzbot
Hello, syzbot hit the following crash on upstream commit cb6416592bc2a8b731dabcec0d63cda270764fc6 (Sun Mar 25 17:45:10 2018 +) Merge tag 'dmaengine-fix-4.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma syzbot dashboard link: https://syzkaller.appspot.com/bug?extid

BUG: unable to handle kernel paging request in smc_ib_remember_port_attr

2018-03-25 Thread syzbot
Hello, syzbot hit the following crash on upstream commit bcfc1f4554662d8f2429ac8bd96064a59c149754 (Sat Mar 24 16:50:12 2018 +) Merge tag 'pinctrl-v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=5

general protection fault in tipc_sk_fill_sock_diag

2018-03-25 Thread syzbot
Hello, syzbot hit the following crash on net-next commit 94cb5492409219ee3f9468616dd58af314029f76 (Fri Mar 23 18:31:30 2018 +) net/sched: act_vlan: declare push_vid with host byte order syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=326e587eff1074657718 So far this crash h

KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-03-25 Thread syzbot
Hello, syzbot hit the following crash on upstream commit bcfc1f4554662d8f2429ac8bd96064a59c149754 (Sat Mar 24 16:50:12 2018 +) Merge tag 'pinctrl-v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=2

KASAN: use-after-free Read in __list_add_valid (5)

2018-03-25 Thread syzbot
Hello, syzbot hit the following crash on upstream commit bcfc1f4554662d8f2429ac8bd96064a59c149754 (Sat Mar 24 16:50:12 2018 +) Merge tag 'pinctrl-v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=d

WARNING in __debug_object_init

2018-03-25 Thread syzbot
Hello, syzbot hit the following crash on upstream commit bcfc1f4554662d8f2429ac8bd96064a59c149754 (Sat Mar 24 16:50:12 2018 +) Merge tag 'pinctrl-v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=a

Re: [PATCH v2 0/7] KASan for arm

2018-03-25 Thread Joel Stanley
On 18 March 2018 at 23:23, Abbott Liu wrote: >These patches add arch specific code for kernel address sanitizer > (see Documentation/kasan.txt). Thanks for implementing this. I gave the series a spin on an ASPEED ast2500 (ARMv5) system with aspeed_g5_defconfig. It found a bug in the NCSI co

Re: [PATCH 3/4] mm: Add free()

2018-03-25 Thread Matthew Wilcox
On Fri, Mar 23, 2018 at 08:14:21AM -0700, Matthew Wilcox wrote: > On Fri, Mar 23, 2018 at 04:33:24PM +0300, Kirill Tkhai wrote: > > > + page = virt_to_head_page(ptr); > > > + if (likely(PageSlab(page))) > > > + return kmem_cache_free(page->slab_cache, (void *)ptr); > > > > It seems slab_ca

Re: [PATCH v8 09/14] dt-bindings: iommu/rockchip: Add clock property

2018-03-25 Thread Rob Herring
On Fri, Mar 23, 2018 at 03:38:09PM +0800, Jeffy Chen wrote: > Add clock property, since we are going to control clocks in rockchip > iommu driver. > > Signed-off-by: Jeffy Chen > Reviewed-by: Robin Murphy > --- Reviewed-by: Rob Herring

  1   2   3   4   >