[PATCH 2/3] kernel: Move groups_sort to the caller of set_groups.

2017-12-05 Thread Thiago Rafael Becker
The responsibility for calling groups_sort is now on the caller of set_groups. Signed-off-by: Thiago Rafael Becker --- arch/s390/kernel/compat_linux.c | 1 + fs/nfsd/auth.c| 3 +++ kernel/groups.c | 1 + kernel/uid16.c

Re: [PATCH v2] exec: avoid gcc-8 warning for get_task_comm

2017-12-05 Thread Kees Cook
On Tue, Dec 5, 2017 at 7:17 AM, Arnd Bergmann wrote: > gcc-8 warns about using strncpy() with the source size as the limit: > > fs/exec.c:1223:32: error: argument to 'sizeof' in 'strncpy' call is the same > expression as the source; did you mean to use the size of the destination?

Re: [PATCH] crypto: exynos - Icrease the priority of the driver

2017-12-05 Thread Stephan Mueller
Am Dienstag, 5. Dezember 2017, 17:20:46 CET schrieb Łukasz Stelmach: Hi Łukasz, > exynos-rng is one of many implementations of stdrng. With priority as > low as 100 it isn't selected, if software implementations (DRBG) are > available. The value 300 was selected to give the PRNG priority before

Re: [Bug fix] octeon-i2c driver updates

2017-12-05 Thread David Daney
On 12/04/2017 10:44 PM, Zhang, Sean C. (NSB - CN/Hangzhou) wrote: Hi Jan, Thanks for your comments, I get your point for the second point (retry of START after recovery). Hi David, For the issue as the first one, would you give your further comments? Thanks in advance. I have an environment

Re: [PATCH 2/3] crypto: exynos - Improve performance of PRNG

2017-12-05 Thread Łukasz Stelmach
It was <2017-12-05 wto 14:54>, when Stephan Mueller wrote: > Am Dienstag, 5. Dezember 2017, 13:35:57 CET schrieb Łukasz Stelmach: > > Hi Łukasz, > >> Use memcpy_fromio() instead of custom exynos_rng_copy_random() function >> to retrieve generated numbers from the registers of PRNG. >> >> Remove

Re: [Kgdb-bugreport] [PATCH] MAINTAINERS: kgdb: Replace Jason with Daniel

2017-12-05 Thread Randy Dunlap
On 12/05/2017 06:55 AM, Daniel Thompson wrote: > On 05/12/17 14:37, Jason Wessel wrote: >> On 12/05/2017 08:09 AM, Lee Jones wrote: >>> On Tue, 05 Dec 2017, Daniel Thompson wrote: >>> ... with many, many thanks for Jason for all his hard work. Cc: Jason Wessel

Re: [PATCH] irqchip/gic-v3: Fix the driver probe() fail due to disabled GICC entry

2017-12-05 Thread Marc Zyngier
On 05/12/17 13:21, Shanker Donthineni wrote: > Hi Marc, > > On 12/05/2017 02:59 AM, Marc Zyngier wrote: >> On 04/12/17 14:04, Shanker Donthineni wrote: >>> Hi Thanks, >>> >>> On 12/04/2017 04:28 AM, Marc Zyngier wrote: On 03/12/17 23:21, Shanker Donthineni wrote: > As per MADT

[GIT PULL] SCSI fixes for 4.15-rc2

2017-12-05 Thread James Bottomley
We have a bunch of fixes for aacraid, a set of coherency fixes that only affect non-coherent platforms and one coccinelle detected null check after use. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Christoph Hellwig

[PATCH V6 6/7] dmaengine: qcom_hidma: Add support for the new revision

2017-12-05 Thread Sinan Kaya
Add support for probing the newer HW and also organize MSI capable hardware into an array for maintenance reasons. Signed-off-by: Sinan Kaya --- drivers/dma/qcom/hidma.c | 34 +- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git

[PATCH V6 7/7] dmaengine: qcom_hidma: Add identity register support

2017-12-05 Thread Sinan Kaya
The location for destination event channel register has been relocated from offset 0x28 to 0x40. Update the code accordingly. Signed-off-by: Sinan Kaya --- drivers/dma/qcom/hidma.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH V6 2/7] ACPI / bus: Introduce acpi_get_match_data() function

2017-12-05 Thread Sinan Kaya
OF has of_device_get_match_data() function to extract driver specific data structure. Add a similar function for ACPI. Signed-off-by: Sinan Kaya Acked-by: Rafael J. Wysocki --- drivers/acpi/bus.c | 12 include/linux/acpi.h | 6

[PATCH] ALSA: pcm: prevent UAF in snd_pcm_info

2017-12-05 Thread Nick Desaulniers
From: Robb Glasser When the device descriptor is closed, the `substream->runtime` pointer is freed. But another thread may be in the ioctl handler, case SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which calls snd_pcm_info() which accesses the now freed

Re: [PATCH] ARM: multi_v7_defconfig: Add configs for peripherals on Keystone2 SoCs

2017-12-05 Thread santosh.shilim...@oracle.com
On 12/5/17 9:10 AM, Vignesh R wrote: On 05-Dec-17 10:19 PM, Santosh Shilimkar wrote: On 12/5/2017 1:19 AM, Vignesh R wrote: Enable Cadence QSPI present on 66AK2G SoC and Keystone USB PHY driver for K2E. Signed-off-by: Vignesh R --- arch/arm/configs/multi_v7_defconfig |

Re: [v2] mfd: stm32: Adopt SPDX identifier

2017-12-05 Thread Guenter Roeck
On Tue, Dec 05, 2017 at 04:24:18PM +0100, benjamin.gaign...@linaro.org wrote: > Add SPDX identifier > > Signed-off-by: Benjamin Gaignard > --- > drivers/mfd/stm32-lptimer.c | 6 +- > drivers/mfd/stm32-timers.c| 4 +--- >

Re: [PATCH v2 01/15] NTB: Rename NTB messaging API methods

2017-12-05 Thread Serge Semin
On Tue, Dec 05, 2017 at 11:49:10AM -0500, Jon Mason wrote: > On Sun, Dec 3, 2017 at 2:17 PM, Serge Semin wrote: > > There is a common methods signature form used over all the NTB API > > like functions naming scheme, arguments names and order, etc. > >

Re: [PATCH] crypto: exynos - Icrease the priority of the driver

2017-12-05 Thread Krzysztof Kozlowski
On Tue, Dec 05, 2017 at 05:20:46PM +0100, Łukasz Stelmach wrote: > exynos-rng is one of many implementations of stdrng. With priority as > low as 100 it isn't selected, if software implementations (DRBG) are > available. The value 300 was selected to give the PRNG priority before > software

Re: [PATCH net-next] net: phy: meson-gxl: cleanup by defining the control registers

2017-12-05 Thread Andrew Lunn
On Tue, Dec 05, 2017 at 10:33:34AM +0100, Jerome Brunet wrote: > From: Neil Armstrong > > Define registers and bits in meson-gxl PHY driver to make a bit > more human friendly. No functional change > static int meson_gxl_config_init(struct phy_device *phydev) > { > -

RE: [PATCH v4 0/5] ARM: ep93xx: ts72xx: Add support for BK3 board

2017-12-05 Thread Hartley Sweeten
On Thursday, November 30, 2017 4:52 PM, Lukasz Majewski wrote: > > This patch series adds support for Liebherr's BK3 board, being a derivative > of TS72XX design. > > This patchset consists of following patches: > > - ts72xx.[c|h] cosmetic cleanup/improvement > - Rewrite ts72xx.c to be reusable

Re: [PATCH net-next] net: phy: meson-gxl: cleanup by defining the control registers

2017-12-05 Thread Jerome Brunet
On Tue, 2017-12-05 at 19:01 +0100, Andrew Lunn wrote: > On Tue, Dec 05, 2017 at 10:33:34AM +0100, Jerome Brunet wrote: > > From: Neil Armstrong > > > > Define registers and bits in meson-gxl PHY driver to make a bit > > more human friendly. No functional change > > > >

Re: [PATCH v2 1/2] of: overlay: Fix memory leak in of_overlay_apply() error path

2017-12-05 Thread Frank Rowand
On 12/05/17 08:58, Geert Uytterhoeven wrote: > Hi Frank, > > On Tue, Dec 5, 2017 at 2:45 PM, Frank Rowand wrote: >> On 12/05/17 03:01, Geert Uytterhoeven wrote: >>> On Tue, Dec 5, 2017 at 3:07 AM, Frank Rowand wrote: Also, the previous

Re: [PATCH] w1: w1-gpio: Convert to use GPIO descriptors

2017-12-05 Thread Evgeniy Polyakov
Hi Linus Sorry for late reply 20.11.2017, 11:47, "Linus Walleij" : > The w1 master driver includes a complete open drain emulation > reimplementation among other things. > > This converts the driver and all board files using it to use > GPIO descriptors associated with

Re: [PATCH v6 2/2] staging: ion: create one device entry per heap

2017-12-05 Thread Laura Abbott
On 12/02/2017 07:53 AM, Greg KH wrote: This is one of the item in the TODO list before been able to unstage ION which is my real need. Why does it matter where in the tree this code is? Don't go adding new things to it that are not needed. Who needs this? What userspace code wants this type

Re: [PATCH] clk: fix a panic error caused by accessing NULL pointer

2017-12-05 Thread Stephen Boyd
On 11/21, Chunyan Zhang wrote: > On 21 November 2017 at 16:57, Chunyan Zhang wrote: > > On 21 November 2017 at 03:12, Stephen Boyd wrote: > >> On 11/20, Chunyan Zhang wrote: > >>> From: Cai Li > >>> > >>> In some cases the clock

Re: [PATCH V2] clk: fix a panic error caused by accessing NULL pointer

2017-12-05 Thread Stephen Boyd
On 11/21, Chunyan Zhang wrote: > From: Cai Li > > In some cases the clock parent would be set NULL when doing re-parent, > it will cause a NULL pointer accessing if clk_set trace event is > enabled. > > This patch sets the parent as "none" if the input parameter is NULL.

Re: [PATCH tip/core/rcu 21/21] drivers/vhost: Remove now-redundant read_barrier_depends()

2017-12-05 Thread Paul E. McKenney
On Wed, Dec 06, 2017 at 12:09:36AM +0200, Michael S. Tsirkin wrote: > On Tue, Dec 05, 2017 at 10:57:00PM +0100, Peter Zijlstra wrote: > > On Tue, Dec 05, 2017 at 11:24:49PM +0200, Michael S. Tsirkin wrote: > > > READ_ONCE is really all over the place (some code literally replaced all > > > memory

Re: [PATCH v3 02/15] NTB: Set dma mask and dma coherent mask to NTB devices

2017-12-05 Thread Logan Gunthorpe
On 05/12/17 03:39 PM, Serge Semin wrote: The dma_mask and dma_coherent_mask fields of the NTB struct device weren't initialized in hardware drivers. In fact it should be done instead of PCIe interface usage, since NTB clients are supposed to use NTB API and left unaware of real hardware

[PATCH v4 60/73] dax: Convert __dax_invalidate_mapping_entry to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Simple now that we already have an xa_state! Signed-off-by: Matthew Wilcox --- fs/dax.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index ad984dece12e..66f6c4ea18f7

[PATCH v4 54/73] nilfs2: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox I'm not 100% convinced that the rewrite of nilfs_copy_back_pages is correct, but it will at least have different bugs from the current version. Signed-off-by: Matthew Wilcox --- fs/nilfs2/btnode.c | 37

[PATCH v4 61/73] dax: Convert dax_writeback_one to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Likewise easy Signed-off-by: Matthew Wilcox --- fs/dax.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 66f6c4ea18f7..7bd94f1b61d0 100644 --- a/fs/dax.c +++

[PATCH v4 62/73] dax: Convert dax_insert_pfn_mkwrite to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 7bd94f1b61d0..619aff70583f 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1498,21

[PATCH v4 28/73] page cache: Remove stray radix comment

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 9e6158cfbaeb..79d0731b8762 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@

[PATCH v4 40/73] pagevec: Use xa_tag_t

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Removes sparse warnings. Signed-off-by: Matthew Wilcox --- fs/btrfs/extent_io.c| 4 ++-- fs/ext4/inode.c | 2 +- fs/f2fs/data.c | 2 +- fs/gfs2/aops.c | 2 +- include/linux/pagevec.h | 8

[PATCH v4 46/73] shmem: Convert shmem_add_to_page_cache to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This removes the last caller of radix_tree_maybe_preload_order(). Simpler code, unless we run out of memory for new xa_nodes partway through inserting entries into the xarray. Hopefully we can support multi-index entries in the page cache soon and

[PATCH v4 42/73] shmem: Convert shmem_confirm_swap to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox xa_load has its own RCU locking, so we can eliminate it here. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index

[PATCH v4 00/73] XArray version 4

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox I looked through some notes and decided this was version 4 of the XArray. Last posted two weeks ago, this version includes a *lot* of changes. I'd like to thank Dave Chinner for his feedback, encouragement and distracting ideas for improvement, which

[PATCH v4 27/73] page cache: Convert delete_batch to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Rename the function from page_cache_tree_delete_batch to just page_cache_delete_batch. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git

[PATCH v4 06/73] xarray: Add definition of struct xarray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a direct replacement for struct radix_tree_root. Some of the struct members have changed name; convert those, and use a #define so that radix_tree users continue to work without change. Signed-off-by: Matthew Wilcox

[PATCH v4 08/73] xarray: Add documentation

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is documentation on how to use the XArray, not details about its internal implementation. Signed-off-by: Matthew Wilcox --- Documentation/core-api/index.rst | 1 + Documentation/core-api/xarray.rst | 281

Re: [PATCH v2 0/3] macb rx filter cleanups

2017-12-05 Thread David Miller
From: Julia Cartwright Date: Tue, 5 Dec 2017 18:02:47 -0600 > Here's a proper patchset based on net-next. > > v1 -> v2: > - Rebased on net-next > - Add Nicolas's Acks > - Reorder commits, putting the list_empty() cleanups prior to the > others. > - Added commit

[PATCH v4 19/73] xarray: Add MAINTAINERS entry

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Add myself as XArray and IDR maintainer. Signed-off-by: Matthew Wilcox --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d4fdcb12616c..b2f8d606756b 100644 ---

[RFC][PATCHv2] Fixing POSIX wait queue to insert in task priority order for real-time, including normal tasks

2017-12-05 Thread Jonathan Haws
Signed-off-by: Jonathan Haws --- ipc/mqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 9649ecd..cb96db9 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -546,7 +546,7 @@ static void wq_add(struct mqueue_inode_info

Re: [PATCH v3 4/4] document: change the document for immovable_mem

2017-12-05 Thread Chao Fan
On Tue, Dec 05, 2017 at 09:36:24AM -0800, Randy Dunlap wrote: >On 12/05/2017 12:52 AM, Chao Fan wrote: >> Add the document for the change of new parameter >> immovable_mem=nn[KMG]@ss[KMG]. >> >> Cc: linux-...@vger.kernel.org >> Cc: Jonathan Corbet >> Signed-off-by: Chao Fan

[PATCH] scripts/faddr2line: fix CROSS_COMPILE unset error

2017-12-05 Thread Liu, Changcheng
faddr2line hit var unbound error When CROSS_COMPILE isn't set since nounset option is set in bash script. Signed-off-by: Liu Changcheng Reported-by: Richard Weinberger diff --git a/scripts/faddr2line b/scripts/faddr2line index

[PATCHv3 2/2] userns: control capabilities of some user namespaces

2017-12-05 Thread Mahesh Bandewar
From: Mahesh Bandewar With this new notion of "controlled" user-namespaces, the controlled user-namespaces are marked at the time of their creation while the capabilities of processes that belong to them are controlled using the global mask. Init-user-ns is always

[PATCHv3 1/2] capability: introduce sysctl for controlled user-ns capability whitelist

2017-12-05 Thread Mahesh Bandewar
From: Mahesh Bandewar Add a sysctl variable kernel.controlled_userns_caps_whitelist. This takes input as capability mask expressed as two comma separated hex u32 words. The mask, however, is stored in kernel as kernel_cap_t type. Any capabilities that are not part of this

Re: [PATCH] ALSA: pcm: prevent UAF in snd_pcm_info

2017-12-05 Thread Takashi Iwai
On Tue, 05 Dec 2017 20:29:07 +0100, Kees Cook wrote: > > On Tue, Dec 5, 2017 at 11:14 AM, Takashi Iwai wrote: > > On Tue, 05 Dec 2017 18:16:55 +0100, > > Nick Desaulniers wrote: > >> > >> From: Robb Glasser > >> > >> When the device descriptor is closed, the

[PATCH v3 13/15] NTB: ntb_test: Update ntb_tool MW tests

2017-12-05 Thread Serge Semin
There are devices (like IDT PCIe switches), which outbound MWs xlat address is setup on peer side. In this case local side is supposed to allocate a memory buffer and somehow deliver the xlat DMA address to peer so one could set the outbound MW up. The MW test is altered so to support both

[PATCH v3 04/15] NTB: ntb_pp: Add full multi-port NTB API support

2017-12-05 Thread Serge Semin
Current Ping Pong driver can't truly work with multi-port devices. Additionally it requires the Scratchpad registers being available on NTB device. This patches rewrites the driver so one would perform the cyclic Ping-Pong algorithm around all the available NTB peers and makes it working with NTB

[PATCH v3 00/15] NTB: Add full multi-port API support to the test drivers

2017-12-05 Thread Serge Semin
The multi-port NTB API was introduced in kernel 4.13 as well as the first driver for the true multi-port devices of IDT PCIe-switches series. But the test drivers still were left almost unchanged. Yes, they didn't fail being used with new NTB API, but they only worked with two-ports NTB devices.

[PATCH v3 02/15] NTB: Set dma mask and dma coherent mask to NTB devices

2017-12-05 Thread Serge Semin
The dma_mask and dma_coherent_mask fields of the NTB struct device weren't initialized in hardware drivers. In fact it should be done instead of PCIe interface usage, since NTB clients are supposed to use NTB API and left unaware of real hardware implementation. In addition to that

Re: linux-next: build warnings after merge of the gpio tree

2017-12-05 Thread Stephen Rothwell
Hi Rob, On Wed, 15 Nov 2017 17:12:00 -0600 Rob Herring wrote: > > On Wed, Nov 15, 2017 at 4:42 PM, Stephen Rothwell > wrote: > > Hi all, > > > > On Thu, 9 Nov 2017 08:37:00 -0600 Rob Herring wrote: > >> > >> On Thu, Nov 9, 2017 at

Re: [Intel-gfx] [PATCH v3 2/9] drm/i915: Add more control to wait_for routines

2017-12-05 Thread Chris Wilson
Quoting Sean Paul (2017-12-05 05:15:01) > This patch adds a little more control to a couple wait_for routines such > that we can avoid open-coding read/wait/timeout patterns which: > - need the value of the register after the wait_for > - run arbitrary operation for the read portion > > This

Re: [patch 00/60] x86/kpti: Kernel Page Table Isolation (was KAISER)

2017-12-05 Thread Andy Lutomirski
On Tue, Dec 5, 2017 at 1:57 PM, Dave Hansen wrote: > On 12/05/2017 01:49 PM, Andy Lutomirski wrote: >> Random thought for the future: KPTI will make it possible to avoid >> global IPI broadcasts on kernel flushes as we discussed, incorrectly, >> two years ago at LPC. This

[PATCH v9 7/8] crypto: caam: cleanup CONFIG_64BIT ifdefs when using io{read|write}64

2017-12-05 Thread Logan Gunthorpe
Clean up the extra ifdefs which defined the wr_reg64 and rd_reg64 functions in non-64bit cases in favour of the new common io-64-nonatomic-lo-hi header. Signed-off-by: Logan Gunthorpe Cc: Andy Shevchenko Cc: Horia Geantă Cc:

[PATCH v9 0/8] Add io{read|write}64 to io-64-atomic headers

2017-12-05 Thread Logan Gunthorpe
This is v9 of my cleanup series to push a number of instances of people defining their own io{read|write}64 functions when they don't exist in non-64bit systems. This series adds inline functions to the io-64-nonatomic headers and then cleans up the drivers that defined their own. Changes since

[PATCH v9 3/8] powerpc: iomap.c: introduce io{read|write}64_{lo_hi|hi_lo}

2017-12-05 Thread Logan Gunthorpe
These functions will be introduced into the generic iomap.c so they can deal with PIO accesses in hi-lo/lo-hi variants. Thus, the powerpc version of iomap.c will need to provide the same functions even though, in this arch, they are identical to the regular io{read|write}64 functions.

[PATCH v9 4/8] iomap: introduce io{read|write}64_{lo_hi|hi_lo}

2017-12-05 Thread Logan Gunthorpe
In order to provide non-atomic functions for io{read|write}64 that will use readq and writeq when appropriate. We define a number of variants of these functions in the generic iomap that will do non-atomic operations on pio but atomic operations on mmio. These functions are only defined if readq

[PATCH v4 67/73] vmalloc: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The radix tree of vmap blocks is simpler to express as an XArray. Saves a couple of hundred bytes of text and eliminates a user of the radix tree preload API. Signed-off-by: Matthew Wilcox --- mm/vmalloc.c | 39

[PATCH v4 73/73] usb: Convert xhci-mem to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The XArray API is a slightly better fit for xhci_insert_segment_mapping() than the radix tree API was. Signed-off-by: Matthew Wilcox --- drivers/usb/host/xhci-mem.c | 70 +

[PATCH v4 66/73] page cache: Finish XArray conversion

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox With no more radix tree API users left, we can drop the GFP flags and use xa_init() instead of INIT_RADIX_TREE(). Signed-off-by: Matthew Wilcox --- fs/inode.c | 2 +- include/linux/fs.h | 2 +- mm/swap_state.c| 2

[PATCH v4 51/73] btrfs: Convert page cache to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/btrfs/compression.c | 4 +--- fs/btrfs/extent_io.c | 6 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index

[PATCH v4 34/73] mm: Convert cgroup writeback to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a fairly naive conversion, leaving in place the GFP_ATOMIC allocation. By switching the locking around, we could use GFP_KERNEL and probably simplify the error handling. Signed-off-by: Matthew Wilcox ---

[PATCH v4 38/73] mm: Convert collapse_shmem to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox I found another victim of the radix tree being hard to use. Because there was no call to radix_tree_preload(), khugepaged was allocating radix_tree_nodes using GFP_ATOMIC. I also converted a local_irq_save()/restore() pair to disable()/enable().

[PATCH v4 26/73] page cache: Convert page cache lookups to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Introduce page_cache_pin() to factor out the common logic between the various lookup routines: find_get_entry find_get_entries find_get_pages_range find_get_pages_contig find_get_pages_range_tag find_get_entries_tag filemap_map_pages By using the

[PATCH v4 31/73] mm: Convert truncate to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is essentially xa_cmpxchg() with the locking handled above us, and it doesn't have to handle replacing a NULL entry. Signed-off-by: Matthew Wilcox --- mm/truncate.c | 15 ++- 1 file changed, 6 insertions(+),

[PATCH v4 02/73] xarray: Add the xa_lock to the radix_tree_root

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This results in no change in structure size on 64-bit x86 as it fits in the padding between the gfp_t and the void *. Signed-off-by: Matthew Wilcox --- fs/f2fs/gc.c | 2 +- include/linux/idr.h|

[PATCH v4 10/73] xarray: Add xa_get_tag, xa_set_tag and xa_clear_tag

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox XArray tags are slightly more strongly typed than the radix tree tags, but occupy the same bits. This commit also adds the xas_ family of tag operations, for cases where the caller is already holding the lock, and xa_tagged() to ask whether any array

Re: [PATCH 4.4 13/16] ocfs2: should wait dio before inode lock in ocfs2_setattr()

2017-12-05 Thread alex chen
Hi Ben, Thanks for your reply. On 2017/12/5 23:49, Ben Hutchings wrote: > On Wed, 2017-11-22 at 11:12 +0100, Greg Kroah-Hartman wrote: >> 4.4-stable review patch. If anyone has any objections, please let me know. >> >> -- >> >> From: alex chen >> >> commit

[PATCH v4 07/73] xarray: Define struct xa_node

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a direct replacement for struct radix_tree_node. Use a #define so that radix tree users continue to work without change. Signed-off-by: Matthew Wilcox --- include/linux/radix-tree.h | 29

x86 TLB flushing: INVPCID vs. deferred CR3 write

2017-12-05 Thread Dave Hansen
tl;dr: Kernels with pagetable isolation using INVPCID compile kernels 0.58% faster than using the deferred CR3 write. This tends to say that we should leave things as-is and keep using INVPCID, but it's far from definitive. If folks have better ideas for a test methodology, or specific workloads

Re: [PATCH] w1: remove redundant assignments to search_bit and last_rn

2017-12-05 Thread Evgeniy Polyakov
Hi 07.11.2017, 21:49, "Colin King" : > From: Colin Ian King > > Variables search_bit and last_rn are assigned values before a while-loop > however these initial values are never read (as they are overwritten > inside the loop). Thus these

[PATCH 3/5] perf tools: reuse perf_mmap__read_catchup in perf_mmap__push

2017-12-05 Thread kan . liang
From: Kan Liang perf_mmap__push uses the same codes as perf_mmap__read_catchup to calculate the ring buffer start, end and size. No funcational change. Signed-off-by: Kan Liang --- tools/perf/util/mmap.c | 31 ++- 1 file

[PATCH 4/5] perf top: switch to overwrite mode

2017-12-05 Thread kan . liang
From: Kan Liang perf_top__mmap_read has severe performance issue in Knights Landing/Mill, when monitoring in heavy load system. It costs several minutes to finish, which is unacceptable. Currently, perf top is non overwrite mode. For non overwrite mode, it tries to read

[PATCH v3 15/15] NTB: ntb_hw_idt: Set NTB_TOPO_SWITCH topology

2017-12-05 Thread Serge Semin
Since Switchtec patch there has been a new topology added to the NTB API. It's called NTB_TOPO_SWITCH and dedicated for PCIe switch chips. Even though topo field isn't used within the IDT driver much, lets set it for the sake of unification. Signed-off-by: Serge Semin

[PATCH 2/5] perf tools: rewrite perf mmap read for overwrite

2017-12-05 Thread kan . liang
From: Kan Liang perf_mmap__read_catchup and perf_mmap__read_backward are used to read events one by one from ring buffer under overwrite mode. It always read the stale buffer which is already processed. Because the previous location of processed ring buffer is discarded.

[PATCH 5/5] perf top: check the latency of perf_top__mmap_read

2017-12-05 Thread kan . liang
From: Kan Liang The latency of perf_top__mmap_read should be lower than refresh time. If not, give some hints to reduce the latency. Signed-off-by: Kan Liang --- tools/perf/builtin-top.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v3 14/15] NTB: ntb_test: Update ntb_perf tests

2017-12-05 Thread Serge Semin
ntb_perf driver has been also updated so to have the multi-port interface support. User now must specify what peer port is going to be used to perform the test. Signed-off-by: Serge Semin --- tools/testing/selftests/ntb/ntb_test.sh | 13 +++-- 1 file changed, 7

[PATCH] netlink: Add netns check on taps

2017-12-05 Thread Kevin Cernekee
Currently, a nlmon link inside a child namespace can observe systemwide netlink activity. Filter the traffic so that in a non-init netns, nlmon can only sniff netlink messages from its own netns. Test case: vpnns -- bash -c "ip link add nlmon0 type nlmon; \ ip link set

Re: [kernel-hardening][PATCH v3 3/3] arm: mm: dump: add checking for writable and executable pages

2017-12-05 Thread Laura Abbott
On 12/04/2017 06:27 AM, Jinbum Park wrote: Page mappings with full RWX permissions are a security risk. x86, arm64 has an option to walk the page tables and dump any bad pages. (1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages")) Add a similar implementation for arm.

Re: [PATCH v2 0/6] bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type

2017-12-05 Thread Daniel Borkmann
On 12/05/2017 04:53 PM, Daniel Borkmann wrote: > On 12/04/2017 10:56 AM, Hendrik Brueckner wrote: >> Perf tool bpf selftests revealed a broken uapi for s390 and arm64. >> With the BPF_PROG_TYPE_PERF_EVENT program type the bpf_perf_event >> structure exports the pt_regs structure for all

Re: [PATCH][v5] uprobes/x86: emulate push insns for uprobe on x86

2017-12-05 Thread Yonghong Song
Hi, Ingo and Peter, Could you take a look at this patch and if no objection merge it into tip? This patch has been reviewed by Oleg Nesterov. Thanks! Yonghong On 11/30/17 4:12 PM, Yonghong Song wrote: Uprobe is a tracing mechanism for userspace programs. Typical uprobe will incur overhead of

[RESEND PATCH] partial revert of "[media] tvp5150: add HW input connectors support"

2017-12-05 Thread Javier Martinez Canillas
Commit f7b4b54e6364 ("[media] tvp5150: add HW input connectors support") added input signals support for the tvp5150, but the approach was found to be incorrect so the corresponding DT binding commit 82c2ffeb217a ("[media] tvp5150: document input connectors DT bindings") was reverted. This left

[PATCH v4 71/73] xfs: Convert xfs dquot to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a pretty straight-forward conversion. Signed-off-by: Matthew Wilcox --- fs/xfs/xfs_dquot.c | 33 + fs/xfs/xfs_qm.c| 32 fs/xfs/xfs_qm.h| 18

[PATCH v4 69/73] xfs: Convert m_perag_tree to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Getting rid of the m_perag_lock lets us also get rid of the call to radix_tree_preload(). This is a relatively naive conversion; we could improve performance over the radix tree implementation by passing around xa_state pointers instead of indices,

[PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This eliminates a call to radix_tree_preload(). Signed-off-by: Matthew Wilcox --- fs/xfs/xfs_mru_cache.c | 72 +++--- 1 file changed, 33 insertions(+), 39 deletions(-) diff --git

[PATCH v4 49/73] shmem: Convert shmem_partial_swap_usage to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Simpler code because the xarray takes care of things like the limit and dereferencing the slot. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff

[PATCH v4 57/73] dax: Convert dax_unlock_mapping_entry to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Replace slot_locked() with dax_locked() and inline unlock_slot() into its only caller. Signed-off-by: Matthew Wilcox --- fs/dax.c | 50 -- 1 file changed, 16 insertions(+), 34

[PATCH v4 48/73] shmem: Convert shmem_free_swap to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a perfect use for xa_cmpxchg(). Note the use of 0 for GFP flags; we won't be allocating memory. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH v4 05/73] xarray: Change definition of sibling entries

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Instead of storing a pointer to the slot containing the canonical entry, store the offset of the slot. Produces slightly more efficient code (~300 bytes) and simplifies the implementation. Signed-off-by: Matthew Wilcox ---

[PATCH v4 21/73] ida: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Use the xarray infrstructure like we used the radix tree infrastructure. This lets us get rid of idr_get_free() from the radix tree code. Signed-off-by: Matthew Wilcox --- include/linux/idr.h| 8 +-

[PATCH v4 29/73] mm: Convert page-writeback to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Includes moving mapping_tagged() to fs.h as a static inline, and changing it to return bool. Signed-off-by: Matthew Wilcox --- include/linux/fs.h | 17 +-- mm/page-writeback.c | 62

linux-next: build failure after merge of the drm-misc tree

2017-12-05 Thread Stephen Rothwell
Hi all, After merging the drm-misc tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/i915/intel_dsi.c: In function 'intel_dsi_get_panel_orientation': drivers/gpu/drm/i915/intel_dsi.c:1673:13: error: storage size of 'plane' isn't known enum plane plane;

[PATCH v4 16/73] xarray: Add xa_destroy

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This function frees all the internal memory allocated to the xarray and reinitialises it to be empty. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 1 + lib/xarray.c | 26 ++ 2

Re: [PATCH v3 3/3] arm64: dts: meson-axg: add clock DT info for Meson AXG SoC

2017-12-05 Thread Stephen Boyd
On 12/01, Jerome Brunet wrote: > On Fri, 2017-12-01 at 08:34 -0800, Stephen Boyd wrote: > > On 11/30, Yixun Lan wrote: > > > Hi Stephen > > > > > > On 11/30/17 03:35, Stephen Boyd wrote: > > > > > > > > Maybe just call the node "bus@ff63c000"? > > > > > > > > > > isn't this just a name? what's

[PATCH v4 25/73] page cache: Convert page deletion to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The code is slightly shorter and simpler. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index

[PATCH v4 14/73] xarray: Add xas_for_each_tag

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This iterator operates across each tagged entry in the specified range. We do not yet have a user for an xa_for_each_tag iterator, but it would be straight-forward to add one if needed. This commit also includes xas_find_tag() and xas_next_tag().

[PATCH v4 20/73] idr: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The IDR distinguishes between unallocated entries (read as NULL) and entries where the user has chosen to store NULL. The radix tree was modified to consider NULL entries which had tag 0 _clear_ as being allocated, but it added a lot of complexity.

[PATCH v4 17/73] xarray: Add xas_next and xas_prev

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox These two functions move the xas index by one position, and adjust the rest of the iterator state to match it. This is more efficient than calling xas_set() as it keeps the iterator at the leaves of the tree instead of walking the iterator from the

[PATCH v3 06/15] NTB: ntb_perf: Add full multi-port NTB API support

2017-12-05 Thread Serge Semin
Former NTB Performance driver could only work with NTB devices, which got Scratchpads available and had just two ports. Since there are devices, which don't have Scratchpads and got more than two peer ports, the performance measuring tool needs to be rewritten. This patch adds the ability to test

[PATCH v3 12/15] NTB: ntb_test: Add ntb_tool Message tests

2017-12-05 Thread Serge Semin
Messages NTB API is now available. ntb_tool driver has been altered to perform messages send and receive operation. The test of messages read/write to/from peer device has been added to the script. Signed-off-by: Serge Semin --- tools/testing/selftests/ntb/ntb_test.sh |

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