Re: [PATCH v7 00/25] Unify vDSOs across more architectures

2019-06-24 Thread Russell King - ARM Linux admin
On Mon, Jun 24, 2019 at 04:18:28PM +0200, Thomas Gleixner wrote: > Vincenzo, > > On Mon, 24 Jun 2019, Thomas Gleixner wrote: > > > I did not merge the ARM and MIPS parts as they lack any form of > > acknowlegment from their maintainers. Please talk to those folks. If they > > ack/review the chang

[PATCH v3 0/5] x86 instruction emulator fuzzing

2019-06-24 Thread Sam Caccavale
Dear all, This series aims to provide an entrypoint for, and fuzz KVM's x86 instruction emulator from userspace. It mirrors Xen's application of the AFL fuzzer to it's instruction emulator in the hopes of discovering vulnerabilities. Since this entrypoint also allows arbitrary execution of the em

[PATCH v3 1/5] Build target for emulate.o as a userspace binary

2019-06-24 Thread Sam Caccavale
This commit contains the minimal set of functionality to build afl-harness around arch/x86/emulate.c which allows exercising code in that source file, like x86_emulate_insn. --- v1 -> v2: - Moved -O0 to ifdef DEBUG - Building with ASAN by default v2 -> v3: - Removed a workaround for printf sm

Re: [PATCH] sched/topology: Improve load balancing on AMD EPYC

2019-06-24 Thread Mel Gorman
On Wed, Jun 19, 2019 at 10:34:37PM +0100, Matt Fleming wrote: > On Tue, 18 Jun, at 02:33:18PM, Peter Zijlstra wrote: > > On Tue, Jun 18, 2019 at 11:43:19AM +0100, Matt Fleming wrote: > > > This works for me under all my tests. Thoughts? > > > > > > --->8--- > > > > > > diff --git a/arch/x86/kerne

[PATCH v3 2/5] Emulate simple x86 instructions in userspace

2019-06-24 Thread Sam Caccavale
Added the minimal subset of code to run afl-harness with a binary file as input. These bytes are used to populate the vcpu structure and then as an instruction stream for the emulator. It does not attempt to handle exceptions and only supports very simple ops. --- v1 -> v2: - Removed a number

[PATCH v3 4/5] Added build and install scripts

2019-06-24 Thread Sam Caccavale
install_afl.sh installs AFL locally and emits AFLPATH, build.sh, and run.sh build and run respectively --- v1 -> v2: - Introduced this patch v2 -> v3: - Moved non-essential development scripts to a later patch Signed-off-by: Sam Caccavale --- tools/fuzz/x86ie/scripts/afl-many | 31 +++

[PATCH v3 3/5] Demonstrating unit testing via simple-harness

2019-06-24 Thread Sam Caccavale
Simple-harness.c uses inline asm support to generate asm and then has the emulator emulate this code. This may be useful as a form of testing for the emulator. --- v1 -> v2: - Accidentally changed the example V2 -> v3: - Reverted the example back to the more useful original one Signed-off-by

[PATCH v3 5/5] Development scripts for crash triage and deploy

2019-06-24 Thread Sam Caccavale
Not meant for upstream consumption. --- v2 -> v3: - Introduced this patch as a place for non-essential dev scripts Signed-off-by: Sam Caccavale --- tools/fuzz/x86ie/scripts/bin.sh | 49 +++ tools/fuzz/x86ie/scripts/coalesce.sh | 5 ++ tools/fuzz/x86ie/s

Re: [PATCH net-next 4/6] arm64: dts: fsl: ls1028a: Add Felix switch port DT node

2019-06-24 Thread Andrew Lunn
> > Yeah, there are 2 ethernet controller ports (managed by the enetc driver) > > connected inside the SoC via SGMII links to 2 of the switch ports, one of > > these switch ports can be configured as CPU port (with follow-up patches). > > > > This configuration may look prettier on DSA, but the m

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Kirill A. Shutemov
On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: > >> @@ -1392,6 +1403,23 @@ static void collapse_file(struct mm_struct *mm, > >>result = SCAN_FAIL; > >>goto xa_unlocked; > >>} > >> + } else if (!page || x

Re: [PATCH v6 5/6] khugepaged: enable collapse pmd for pte-mapped THP

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 6:19 AM, Kirill A. Shutemov wrote: > > On Sat, Jun 22, 2019 at 10:48:28PM -0700, Song Liu wrote: >> khugepaged needs exclusive mmap_sem to access page table. When it fails >> to lock mmap_sem, the page will fault in as pte-mapped THP. As the page >> is already a THP, khug

Re: [PATCH] get_maintainer: Add --cc option

2019-06-24 Thread Joe Perches
On Mon, 2019-06-24 at 15:33 +0200, Peter Zijlstra wrote: > On Mon, Jun 24, 2019 at 03:03:23PM +0200, Sebastian Andrzej Siewior wrote: > > The --cc adds a Cc: prefix infront of the email address so it can be > > used by other Scripts directly instead of adding another wrapper for > > this. Not sure

Re: [PATCH 0/4] arm64: wire up VM_FLUSH_RESET_PERMS

2019-06-24 Thread Ard Biesheuvel
(+ Catalin) On Mon, 24 Jun 2019 at 13:23, Ard Biesheuvel wrote: > > On 6/24/19 1:16 PM, Will Deacon wrote: > > On Tue, May 28, 2019 at 11:04:20AM +0100, Will Deacon wrote: > >> On Thu, May 23, 2019 at 11:22:52AM +0100, Ard Biesheuvel wrote: > >>> Wire up the code introduced in v5.2 to manage the

[GIT PULL v2] MFD fixes for v5.2

2019-06-24 Thread Lee Jones
Linus, Hopefully this is more to your liking. The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9: Linux 5.2-rc1 (2019-05-19 15:47:09 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git mfd-fixes-5.2-1 for you to

[PATCH v18 08/15] userfaultfd: untag user pointers

2019-06-24 Thread Andrey Konovalov
This patch is a part of a series that extends kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. userfaultfd code use provided user pointers for vma lookups, which can only by done with untagged pointers. Untag user poi

[PATCH v18 10/15] drm/radeon: untag user pointers in radeon_gem_userptr_ioctl

2019-06-24 Thread Andrey Konovalov
This patch is a part of a series that extends kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In radeon_gem_userptr_ioctl() an MMU notifier is set up with a (tagged) userspace pointer. The untagged address should be u

[PATCH v2 1/6] lib: logic_pio: Fix RCU usage

2019-06-24 Thread John Garry
The traversing of io_range_list with list_for_each_entry_rcu() is not properly protected by rcu_read_lock() and rcu_read_unlock(), so add them. These functions mark the critical section scope where the list is protected for the reader, it cannot be "reclaimed". Any updater - in this case, the log

[PATCH v2 3/6] lib: logic_pio: Add logic_pio_unregister_range()

2019-06-24 Thread John Garry
Add a function to unregister a logical PIO range. Logical PIO space can still be leaked when unregistering certain LOGIC_PIO_CPU_MMIO regions, but this acceptable for now since there are no callers to unregister LOGIC_PIO_CPU_MMIO regions, and the logical PIO region allocation scheme would need si

[PATCH v2 0/6] Fixes for HiSilicon LPC driver and logical PIO code

2019-06-24 Thread John Garry
As reported in [1], the hisi-lpc driver has certain issues in handling logical PIO regions, specifically unregistering regions. This series add a method to unregister a logical PIO region, and fixes up the driver to use them. RCU usage in logical PIO code looks to always have been broken, so that

Re: [ANNOUNCE] New release rt-tests-1.4

2019-06-24 Thread David Runge
On 2019-06-21 14:08:01 (+0200), John Kacur wrote: > I just pushed the tags, let me know if you can see them now. Whoops, forgot to answer! Yes, already pushed the new package. Thank you! :) Best, David -- https://sleepmap.de signature.asc Description: PGP signature

[PATCH v2 4/6] bus: hisi_lpc: Unregister logical PIO range to avoid potential use-after-free

2019-06-24 Thread John Garry
If, after registering a logical PIO range, the driver probe later fails, the logical PIO range memory will be released automatically. This causes an issue, in that the logical PIO range is not unregistered and the released range memory may be later referenced. Fix by unregistering the logical PIO

[PATCH v2 5/6] bus: hisi_lpc: Add .remove method to avoid driver unbind crash

2019-06-24 Thread John Garry
The original driver author seemed to be under the impression that a driver cannot be removed if it does not have a .remove method. Or maybe if it is a built-in platform driver. This is not true. This crash can be created: root@ubuntu:/sys/bus/platform/drivers/hisi-lpc# echo HISI0191\:00 > unbind

[PATCH v2 2/6] lib: logic_pio: Avoid possible overlap for unregistering regions

2019-06-24 Thread John Garry
The code was originally written to not support unregistering logical PIO regions. To accommodate supporting unregistering logical PIO regions, subtly modify LOGIC_PIO_CPU_MMIO region registration code, such that the "end" of the registered regions is the "end" of the last region, and not the sum o

[PATCH v2 6/6] lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at registration

2019-06-24 Thread John Garry
Since the only LOGIC_PIO_INDIRECT host (hisi-lpc) now sets the ops prior to registration, enforce this check at registration instead of in the IO port accessors to simplify and marginally optimise the code. A slight misalignment is also tidied. Suggested-by: Bjorn Helgaas Signed-off-by: John Gar

Re: [PATCH 1/6] x86/xen: Mark xen_hvm_need_lapic() and xen_hvm_need_lapic() as __init

2019-06-24 Thread Zhenzhong Duan
On 2019/6/24 21:58, Thomas Gleixner wrote: On Sun, 23 Jun 2019, Zhenzhong Duan wrote: .. as they are only called at early bootup stage. In fact, other functions in x86_hyper_xen_hvm.init.* are all marked as __init. Unexport xen_hvm_need_lapic as it's never used outside. Can you please provi

[PATCH] arm64: Kconfig: Enable NODES_SPAN_OTHER_NODES config for NUMA

2019-06-24 Thread Hoan Tran OS
Some NUMA nodes have memory ranges that span other nodes. Even though a pfn is valid and between a node's start and end pfns, it may not reside on that node. This patch enables NODES_SPAN_OTHER_NODES config for NUMA to support this type of NUMA layout. Signed-off-by: Hoan Tran --- arch/arm64/Kc

Re:Re: [PATCH v3] mtd: spi-nor: fix nor->addr_width when its value configured from SFDP does not match the actual width

2019-06-24 Thread Liu Xiang
Hi, ta Thanks for your advice! I will send the update patch in soon. At 2019-06-22 19:49:25, tudor.amba...@microchip.com wrote: >Hi, Liu, > >On 03/31/2019 10:42 AM, Liu Xiang wrote: > >> Some is25lp256 get BFPT_DWORD1_ADDRESS_BYTES_3_ONLY from BFPT table for >> address width. But in actual f

[PATCH v5 03/14] epoll: allocate user header and user events ring for polling from userspace

2019-06-24 Thread Roman Penyaev
This one allocates user header and user events ring according to max items number, passed as a parameter. User events (index) ring is in a pow2. Pages, which will be shared between kernel and userspace, are accounted through user->locked_vm counter. No support on architectures with reduced set of

[PATCH v5 07/14] epoll: call ep_add_event_to_uring() from ep_poll_callback()

2019-06-24 Thread Roman Penyaev
Each ep_poll_callback() is called when fd calls wakeup() on epfd. So account new event in user ring. The tricky part here is EPOLLONESHOT. Since we are lockless we have to be deal with ep_poll_callbacks() called in paralle, thus use cmpxchg to clear public event bits and filter out concurrent cal

Re: [PATCH v6 0/5] LM36274 Introduction

2019-06-24 Thread Lee Jones
On Wed, 05 Jun 2019, Dan Murphy wrote: > Hello > > The v5 patchset missed adding in the new validation code. > Patch 1 of the v5 series was squashed into patch 4 of the v5 series. > So this will reduce the patchset by 1. > > Sorry for the extra noise on the patchsets. The change was lost when I

[PATCH v5 11/14] epoll: support polling from userspace for ep_poll()

2019-06-24 Thread Roman Penyaev
Rule of thumb for epfd polled from userspace is simple: epfd has events if ->head != ->tail, no traversing of each item is performed. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- fs/eventpo

[PATCH v5 14/14] kselftest: add uepoll-test which tests polling from userspace

2019-06-24 Thread Roman Penyaev
Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/uepoll/.gitignore | 1 + tools/testing/selftests/uepoll/Make

[PATCH v5 12/14] epoll: support mapping for epfd when polled from userspace

2019-06-24 Thread Roman Penyaev
User has to mmap user_header and user_index vmalloce'd pointers in order to consume events from userspace. Also we do not let any copies of vma on fork(). Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kern

[PATCH v5 08/14] epoll: support polling from userspace for ep_insert()

2019-06-24 Thread Roman Penyaev
When epfd is polled by userspace and new item is inserted new bit should be get from a bitmap and then user item is set accordingly. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- fs/eventpol

[PATCH v5 13/14] epoll: implement epoll_create2() syscall

2019-06-24 Thread Roman Penyaev
epoll_create2() is needed to accept EPOLL_USERPOLL flags and size, i.e. this patch wires up polling from userspace. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Arnd Bergmann Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- arch/alph

[PATCH v5 09/14] epoll: support polling from userspace for ep_remove()

2019-06-24 Thread Roman Penyaev
On ep_remove() simply mark a user item with EPOLLREMOVE if the item was ready (i.e. has some bits set). That will prevent further user index entry creation on item ->bit reuse. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc:

[PATCH v5 04/14] epoll: some sanity flags checks for epoll syscalls for polling from userspace

2019-06-24 Thread Roman Penyaev
There are various of limitations if epfd is polled by user: 1. Expect always EPOLLET flag (Edge Triggered behavior) 2. No support for EPOLLWAKEUP events are consumed from userspace, thus no way to call __pm_relax() 3. No support for EPOLLEXCLUSIVE If device does not pass pollfla

[PATCH v5 00/14] epoll: support pollable epoll from userspace

2019-06-24 Thread Roman Penyaev
Hi all, This is v5 which introduces pollable epoll from userspace. v5: - Do not support architectures with reduced set of atomic ops, namely arc-plat-eznps, sparc32, parisc. Return -EOPNOTSUP on attempt to create uepoll on these archs. - Explicitly hint compiler, that return value o

[PATCH v5 05/14] epoll: offload polling to a work in case of epfd polled from userspace

2019-06-24 Thread Roman Penyaev
Not every device reports pollflags on wake_up(), expecting that it will be polled later. vfs_poll() can't be called from ep_poll_callback(), because ep_poll_callback() is called under the spinlock. Obviously userspace can't call vfs_poll(), thus epoll has to offload vfs_poll() to a work and then

Re: [next][PowerPC] RCU stalls while booting linux-next on PowerVM LPAR

2019-06-24 Thread David Hildenbrand
On 24.06.19 16:09, Sachin Sant wrote: > Latest -next fails to boot on POWER9 PowerVM LPAR due to RCU stalls. > > This problem was introduced with next-20190620 (dc636f5d78). > next-20190619 was last good kernel. > > Reverting following commit allows the kernel to boot. > 2fd4aeea6b603 : mm/memory

[PATCH v5 06/14] epoll: introduce helpers for adding/removing events to uring

2019-06-24 Thread Roman Penyaev
Both add and remove events are lockless and can be called in parallel. ep_add_event_to_uring(): o user item is marked atomically as ready o if on previous stem user item was observed as not ready, then new entry is created for the index uring. ep_remove_user_item():

[PATCH v5 01/14] epoll: move private helpers from a header to the source

2019-06-24 Thread Roman Penyaev
Those helpers will access private eventpoll structure in future patches, so keep those helpers close to callers. Nothing important here. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- fs/eve

[PATCH v5 02/14] epoll: introduce user structures for polling from userspace

2019-06-24 Thread Roman Penyaev
This one introduces structures of user items array: struct epoll_uheader - describes inserted epoll items. struct epoll_uitem - single epoll item visible to userspace. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc:

Re: [PATCH 2/4] drm/rockchip: Enable DRM InfoFrame support on RK3328 and RK3399

2019-06-24 Thread Andrzej Hajda
On 26.05.2019 23:20, Jonas Karlman wrote: > This patch enables Dynamic Range and Mastering InfoFrame on RK3328 and RK3399. > > Cc: Sandy Huang > Cc: Heiko Stuebner > Signed-off-by: Jonas Karlman Reviewed-by: Andrzej Hajda  -- Regards Andrzej > --- > drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c

[PATCH v5 10/14] epoll: support polling from userspace for ep_modify()

2019-06-24 Thread Roman Penyaev
When epfd is polled from userspace and item is being modified: 1. Update user item with new pointer or poll flags. 2. Add event to user ring if needed. Signed-off-by: Roman Penyaev Cc: Andrew Morton Cc: Al Viro Cc: Linus Torvalds Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov wrote: > > On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: @@ -1392,6 +1403,23 @@ static void collapse_file(struct mm_struct *mm, result = SCAN_FAIL; goto xa_unlocke

CVE-2019-12817: Linux kernel: powerpc: Unrelated processes may be able to read/write to each other's virtual memory

2019-06-24 Thread Michael Ellerman
The Linux kernel for powerpc since 4.17 has a bug where unrelated processes may be able to read/write to each other's virtual memory under certain conditions. This bug only affects machines using 64-bit CPUs with the hash page table MMU, see below for more detail on affected CPUs. To trigger the

Re: [PATCH] x86/kvm/nVMCS: fix VMCLEAR when Enlightened VMCS is in use

2019-06-24 Thread Liran Alon
> On 24 Jun 2019, at 17:16, Vitaly Kuznetsov wrote: > > Liran Alon writes: > >>> On 24 Jun 2019, at 16:30, Vitaly Kuznetsov wrote: >>> >>> When Enlightened VMCS is in use, it is valid to do VMCLEAR and, >>> according to TLFS, this should "transition an enlightened VMCS from the >>> active

[PATCH][next] 6lowpan: fix off-by-one comparison of index id with LOWPAN_IPHC_CTX_TABLE_SIZE

2019-06-24 Thread Colin King
From: Colin Ian King The WARN_ON_ONCE check on id is off-by-one, it should be greater or equal to LOWPAN_IPHC_CTX_TABLE_SIZE and not greater than. Fix this. Signed-off-by: Colin Ian King --- net/6lowpan/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/6lowpan/d

Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

2019-06-24 Thread Schrempf Frieder
On 24.06.19 14:15, liaoweixiong wrote: > In case of the last page containing bitflips (ret > 0), > spinand_mtd_read() will return that number of bitflips for the last > page. But to me it looks like it should instead return max_bitflips like > it does when the last page read returns with 0. > > Si

[PATCH 2/9] drm: meson: crtc: use proper macros instead of magic constants

2019-06-24 Thread Julien Masson
This patch add new macros which describe couple bits field of the following registers: - VD1_BLEND_SRC_CTRL - VPP_SC_MISC Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_crtc.c | 17 +++-- drivers/gpu/drm/meson/meson_registers.h | 16 2 files change

[PATCH 4/9] drm: meson: vpp: use proper macros instead of magic constants

2019-06-24 Thread Julien Masson
This patch add new macros which are used to set the following registers: - VPP_OSD_SCALE_COEF_IDX - VPP_DOLBY_CTRL - VPP_OFIFO_SIZE - VPP_HOLD_LINES - VPP_SC_MISC - VPP_VADJ_CTRL Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_registers.h | 8 drivers/gpu/drm/meson/meson_v

[PATCH 3/9] drm: meson: drv: use macro when initializing vpu

2019-06-24 Thread Julien Masson
This patch add new macro which is used to set WRARB/RDARB mode of the VPU. Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_drv.c | 26 + drivers/gpu/drm/meson/meson_registers.h | 1 + 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/driv

Re: [PATCH v4 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-24 Thread Jin, Yao
On 6/24/2019 3:57 PM, Jiri Olsa wrote: On Thu, Jun 20, 2019 at 10:36:39PM +0800, Jin Yao wrote: SNIP + +static void *block_entry_zalloc(size_t size) +{ + return zalloc(size + sizeof(struct hist_entry)); +} + +static void block_entry_free(void *he) +{ + struct block_info *bi = ((

[PATCH 9/9] drm: meson: venc: set the correct macrovision max amplitude value

2019-06-24 Thread Julien Masson
According to the register description of ENCI_MACV_MAX_AMP, the macrovision max amplitude value should be: - hdmi 480i => 0xb - hdmi 576i => 0x7 The max value is 0x7ff (10 bits). Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_venc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

Re: [PATCH v7 00/25] Unify vDSOs across more architectures

2019-06-24 Thread Catalin Marinas
On Mon, Jun 24, 2019 at 03:23:46PM +0100, Russell King wrote: > On Mon, Jun 24, 2019 at 04:18:28PM +0200, Thomas Gleixner wrote: > > Vincenzo, > > > > On Mon, 24 Jun 2019, Thomas Gleixner wrote: > > > > > I did not merge the ARM and MIPS parts as they lack any form of > > > acknowlegment from the

Re: [PATCHv6 2/2] mtd: spi-nor: cadence-quadspi: add reset control

2019-06-24 Thread Dinh Nguyen
Hi Tudor, On 6/22/19 5:21 AM, tudor.amba...@microchip.com wrote: > Hi, Dinh, > > On 06/13/2019 02:31 PM, Dinh Nguyen wrote: >> +struct reset_control *rstc; >> +struct reset_control *rstc_ocp; > > I'll add these on a single line when applying. The patch is good, I'm waiting > for Rob to r

Re: [PATCH 01/12] list.h: add a list_pop helper

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:42AM +0200, Christoph Hellwig wrote: > We have a very common pattern where we want to delete the first entry > from a list and return it as the properly typed container structure. > > Add a list_pop helper to implement this behavior. > > Signed-off-by: Christoph Hell

Re: [PATCH 03/12] xfs: fix a comment typo in xfs_submit_ioend

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:44AM +0200, Christoph Hellwig wrote: > The fail argument is long gone, update the comment. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Kirill A. Shutemov
On Mon, Jun 24, 2019 at 02:42:13PM +, Song Liu wrote: > > > > On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov > > wrote: > > > > On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: > @@ -1392,6 +1403,23 @@ static void collapse_file(struct mm_struct *mm, >

Re: [PATCH 04/12] xfs: initialize ioma->flags in xfs_bmbt_to_iomap

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:45AM +0200, Christoph Hellwig wrote: > Currently we don't overwrite the flags field in the iomap in > xfs_bmbt_to_iomap. This works fine with 0-initialized iomaps on stack, > but is harmful once we want to be able to reuse an iomap in the > writeback code. Is that go

Re: [PATCH 2/2] usbip: Implement SG support to vhci

2019-06-24 Thread Suwan Kim
On Fri, Jun 21, 2019 at 04:05:24PM -0400, Alan Stern wrote: > On Sat, 22 Jun 2019, Suwan Kim wrote: > > > There are bugs on vhci with usb 3.0 storage device. Originally, vhci > > doesn't supported SG. So, USB storage driver on vhci divides SG list > > into multiple URBs and it causes buffer overfl

Re: [PATCH bpf-next] samples: bpf: Remove bpf_debug macro in favor of bpf_printk

2019-06-24 Thread Daniel Borkmann
On 06/18/2019 08:13 PM, Michal Rostecki wrote: > ibumad example was implementing the bpf_debug macro which is exactly the > same as the bpf_printk macro available in bpf_helpers.h. This change > makes use of bpf_printk instead of bpf_debug. > > Signed-off-by: Michal Rostecki Applied, thanks!

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 7:54 AM, Kirill A. Shutemov wrote: > > On Mon, Jun 24, 2019 at 02:42:13PM +, Song Liu wrote: >> >> >>> On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov >>> wrote: >>> >>> On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: >> @@ -1392,6 +1403,23 @@ stati

Re: [PATCH v7 4/7] arm: Use common cpu_topology structure and functions.

2019-06-24 Thread Sudeep Holla
On Wed, Jun 19, 2019 at 01:10:57PM +0100, Sudeep Holla wrote: > Hi Russell, > > On Mon, Jun 17, 2019 at 11:59:17AM -0700, Atish Patra wrote: > > Currently, ARM32 and ARM64 uses different data structures to represent > > their cpu topologies. Since, we are moving the ARM64 topology to common > > cod

Re: [Intel-wired-lan] Opportunistic S0ix blocked by e1000e when ethernet is in use

2019-06-24 Thread Kai-Heng Feng
at 19:56, Neftin, Sasha wrote: On 6/24/2019 10:03, Kai-Heng Feng wrote: Hi Jeffrey, at 19:08, Kai-Heng Feng wrote: Hi Jeffrey, There are several platforms that uses e1000e can’t enter Opportunistic S0ix (PC10) when the ethernet has a link partner. This behavior also exits in out-of-tree

[PATCH v2 03/24] EDAC, ghes: Remove pvt->detail_location string

2019-06-24 Thread Robert Richter
The detail_location[] string in struct ghes_edac_pvt is complete useless and data is just copied around. Put everything into e->other_detail from the beginning. Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH v2 01/24] EDAC, mc: Fix grain_bits calculation

2019-06-24 Thread Robert Richter
The grain in edac is defined as "minimum granularity for an error report, in bytes". The following calculation of the grain_bits in edac_mc is wrong: grain_bits = fls_long(e->grain) + 1; Where grain_bits is defined as: grain = 1 << grain_bits Example: grain = 8 #

[PATCH v2 04/24] EDAC, ghes: Unify trace_mc_event() code with edac_mc driver

2019-06-24 Thread Robert Richter
Duplicate code, remove it. The only difference is the missing IS_ENABLED(CONFIG_RAS) switch in ghes_edac which we will need there too. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 34 +- drivers/edac/ghes_edac.c | 16 +--- 2 files chang

[PATCH v2 02/24] EDAC, ghes: Fix grain calculation

2019-06-24 Thread Robert Richter
The conversion from the physical address mask to a grain (defined as granularity in bytes) is broken: e->grain = ~(mem_err->physical_addr_mask & ~PAGE_MASK); E.g., a physical address mask of ~0xfff should give a grain of 0x1000, instead the grain is wrong with the upper bits always set. W

[PATCH v2 13/24] EDAC, ghes: Add support for legacy API counters

2019-06-24 Thread Robert Richter
The ghes driver is not able yet to count legacy API counters in sysfs, e.g.: /sys/devices/system/edac/mc/mc0/csrow2/ce_count /sys/devices/system/edac/mc/mc0/csrow2/ch0_ce_count /sys/devices/system/edac/mc/mc0/csrow2/ch1_ce_count Make counting csrows/channels generic so that the ghes driver can

[PATCH v2 07/24] EDAC: Kill EDAC_DIMM_OFF() macro

2019-06-24 Thread Robert Richter
We do not need to calculate the offset in the mc's dimm array, let's just store the index in struct dimm_info and we can get rid of this macro. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 13 drivers/edac/edac_mc_sysfs.c | 20 -- include/linux/ed

[PATCH v2 09/24] EDAC, mc: Cleanup _edac_mc_free() code

2019-06-24 Thread Robert Richter
Remove needless and boilerplate variable declarations. No functional changes. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 27277ca46ab3..f2

[PATCH v2 17/24] EDAC, ghes: Create one memory controller device per node

2019-06-24 Thread Robert Richter
Typically for most systems, there is one edac memory controller device per node. This patch implements the same for the ghes driver. Now, create multiple mc devices and map the dimms based on the node id. We need at least one node that is used as fallback if no node information is available in the

[PATCH v2 15/24] EDAC, ghes: Extract numa node information for each dimm

2019-06-24 Thread Robert Richter
In a later patch we want to have one mc device per node. This patch extracts the numa node information for each dimm. This is done by collecting the physical address ranges from the DMI table (Memory Array Mapped Address - Type 19 of SMBIOS spec). The node information for a physical address is alre

[PATCH v2 05/24] EDAC, mc: Fix and improve sysfs init functions

2019-06-24 Thread Robert Richter
Remove gotos as they just create overhead. Also, fix debug message for the case edac_create_dimm_object() is failing. Signed-off-by: Robert Richter --- drivers/edac/edac_mc_sysfs.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/edac/edac_mc

[PATCH v2 18/24] EDAC, ghes: Fill sysfs with the DMI DIMM label information

2019-06-24 Thread Robert Richter
This patch extracts the DIMM label from the DMI table and puts this information into sysfs. E.g. on a ThunderX2 system we found this now: # grep . /sys/devices/system/edac/mc/mc*/dimm*/dimm_label /sys/devices/system/edac/mc/mc0/dimm0/dimm_label:N0 DIMM_A0 /sys/devices/system/edac/mc/mc0/dimm1/d

[PATCH v2 20/24] EDAC, ghes: Identify dimm by node, card, module and handle

2019-06-24 Thread Robert Richter
According to SMBIOS Spec. 2.7 (N.2.5 Memory Error Section), a failing DIMM (module or rank number) can be identified by its error location consisting of node, card and module. A module handle is used to map it to the dimms listed in the dmi table. Collect all those data from the error record and se

[PATCH v2 21/24] EDAC, ghes: Enable per-layer reporting based on card/module

2019-06-24 Thread Robert Richter
This patch enables per-layer reporting of the GHES driver based on node, card and module. A dimm can be uniquely identified by those 3 identifiers. The mc device is selected by the node id. Thus, each ghes edac memory controller device has a 2-dimensional layer hierarchy based on card and module in

[PATCH v2 19/24] EDAC, mc: Introduce edac_mc_alloc_by_dimm() for per dimm allocation

2019-06-24 Thread Robert Richter
Systems using ACPI GHES for error detection do not have exact knowledge of the memory hierarchy. Compared to other memory controller drivers the total size of each layer is unknown (card/module, channel/slot, etc.). But there is the total number of dimms. So add a function to allocate an mc device

[PATCH v2 24/24] EDAC, ghes: Disable legacy API for ARM64

2019-06-24 Thread Robert Richter
James Morse: "I'm all for removing/warning-its-broken it when ghes_edac is in use." Let's just disable legacy API for the ghes driver on arm64. Though, I don't agree with it as there still could be some userland tools that use this interface that cannot be used any longer after a transition from x

[PATCH v2 22/24] EDAC, ghes: Move struct member smbios_handle to struct ghes_dimm_info

2019-06-24 Thread Robert Richter
This is private to the ghes_edac driver, so better keep that data in the struct ghes_dimm_info. Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 15 +++ include/linux/edac.h | 2 -- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/edac/ghes_eda

[PATCH v2 10/24] EDAC, mc: Remove per layer counters

2019-06-24 Thread Robert Richter
Looking at how mci->{ue,ce}_per_layer[EDAC_MAX_LAYERS] is used, it turns out that only the leaves in the memory hierarchy are consumed (in sysfs), but not the intermediate layers, e.g.: count = dimm->mci->ce_per_layer[dimm->mci->n_layers-1][dimm->idx]; So let's get rid of the unused counters tha

[PATCH v2 06/24] EDAC: Kill EDAC_DIMM_PTR() macro

2019-06-24 Thread Robert Richter
Get rid of this macro and instead use the new function edac_get_dimm(). Also introduce the edac_get_dimm_by_index() function for later use. Semantic patch used: @@ expression mci, a, b,c; @@ -EDAC_DIMM_PTR(mci->layers, mci->dimms, mci->n_layers, a, b, c) +edac_get_dimm(mci, a, b, c) Signed-off-

[PATCH v2 16/24] EDAC, ghes: Moving code around ghes_edac_register()

2019-06-24 Thread Robert Richter
This is in preparation of the next patch to make the changes there more visible. Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 97 ++-- 1 file changed, 53 insertions(+), 44 deletions(-) diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_

[PATCH v2 08/24] EDAC: Introduce mci_for_each_dimm() iterator

2019-06-24 Thread Robert Richter
Make code more readable by introducing a mci_for_each_dimm() iterator. Now, we just get a pointer to a struct dimm_info. Direct array access using an index is no longer needed to iterate. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 18 ++ drivers/edac/edac_mc

[PATCH v2 11/24] EDAC, mc: Rework edac_raw_mc_handle_error() to use struct dimm_info

2019-06-24 Thread Robert Richter
Rework edac_raw_mc_handle_error() to use struct dimm_info. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 28 +--- drivers/edac/edac_mc.h | 2 ++ drivers/edac/ghes_edac.c | 5 - 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH v2 14/24] EDAC, ghes: Rework memory hierarchy detection

2019-06-24 Thread Robert Richter
In a later patch we want to add more information about the memory hierarchy (NUMA topology, DIMM label information). Rework memory hierarchy detection to make the code extendable for this. The general approach is roughly like: mem_info_setup(); for_each_node(nid) {

[PATCH v2 00/24] EDAC, mc, ghes: Fixes and updates to improve memory error reporting

2019-06-24 Thread Robert Richter
Current arm64 systems that use the ghes driver lack kernel support for a proper memory error reporting. Following issues are seen: * Error record shows insufficient data, such as "EDAC MC0: 1 CE unknown error on unknown label", * DMI DIMM labels are not decoded for error reporting, * No me

[PATCH v2 12/24] EDAC, ghes: Use standard kernel macros for page calculations

2019-06-24 Thread Robert Richter
Use standard macros for page calculations. Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 786f1b32eee1..746083876b5f 100644 --- a/drivers/edac/ghes_edac.c

Re: [PATCH 4.19 00/90] 4.19.56-stable review

2019-06-24 Thread kernelci.org bot
stable-rc/linux-4.19.y boot: 120 boots: 0 failed, 113 passed with 7 offline (v4.19.55-91-gc491b02eb03a) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-4.19.y/kernel/v4.19.55-91-gc491b02eb03a/ Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-4.19

Re: [PATCH 5.1 000/121] 5.1.15-stable review

2019-06-24 Thread kernelci.org bot
stable-rc/linux-5.1.y boot: 128 boots: 3 failed, 118 passed with 7 offline (v5.1.14-122-gd74a88068af9) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-5.1.y/kernel/v5.1.14-122-gd74a88068af9/ Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-5.1.y/

RE: [PATCH v9 02/17] drivers/net/b44: Align pwol_mask to unsigned long for better performance

2019-06-24 Thread David Laight
From: Fenghua Yu > Sent: 18 June 2019 23:41 > From: Peter Zijlstra > > A bit in pwol_mask is set in b44_magic_pattern() by atomic set_bit(). > But since pwol_mask is local and never exposed to concurrency, there is > no need to set bit in pwol_mask atomically. > > set_bit() sets the bit in a sin

Re: [PATCH v2 3/3] ext4: use jbd2_inode dirty range scoping

2019-06-24 Thread Ross Zwisler
On Mon, Jun 24, 2019 at 02:54:49AM +0800, kbuild test robot wrote: > Hi Ross, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v5.2-rc6 next-20190621] > [if your patch is applied to the wrong git tree, please drop us a

RE: [PATCH v9 03/17] x86/split_lock: Align x86_capability to unsigned long to avoid split locked access

2019-06-24 Thread David Laight
From: Fenghua Yu > Sent: 18 June 2019 23:41 > > set_cpu_cap() calls locked BTS and clear_cpu_cap() calls locked BTR to > operate on bitmap defined in x86_capability. > > Locked BTS/BTR accesses a single unsigned long location. In 64-bit mode, > the location is at: > base address of x86_capability

Re: [PATCH] platform/chrome: cros_ec_lpc: fix semicolon.cocci warnings

2019-06-24 Thread Nick Crews
I fixed this in the new version. On Fri, Jun 21, 2019 at 6:55 PM kbuild test robot wrote: > > From: kbuild test robot > > drivers/platform/chrome/wilco_ec/event.c:161:3-4: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: 22

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Kirill A. Shutemov
On Mon, Jun 24, 2019 at 03:04:21PM +, Song Liu wrote: > > > > On Jun 24, 2019, at 7:54 AM, Kirill A. Shutemov > > wrote: > > > > On Mon, Jun 24, 2019 at 02:42:13PM +, Song Liu wrote: > >> > >> > >>> On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov > >>> wrote: > >>> > >>> On Mon, J

Re: [PATCH 02/12] xfs: simplify xfs_chain_bio

2019-06-24 Thread Darrick J. Wong
On Mon, Jun 24, 2019 at 07:52:43AM +0200, Christoph Hellwig wrote: > Move setting up operation and write hint to xfs_alloc_ioend, and > then just copy over all needed information from the previous bio > in xfs_chain_bio and stop passing various parameters to it. > > Signed-off-by: Christoph Hellwi

Re: [PATCH] platform/chrome: cros_ec_lpc: fix stream_open.cocci warnings

2019-06-24 Thread Nick Crews
I applied this in the new version as well. On Fri, Jun 21, 2019 at 6:55 PM kbuild test robot wrote: > > From: kbuild test robot > > drivers/platform/chrome/wilco_ec/event.c:270:1-17: WARNING: event_fops: > .read() has stream semantic; safe to change nonseekable_open -> stream_open. > > Generate

Re: [PATCH] mm: fix page cache convergence regression

2019-06-24 Thread Johannes Weiner
On Thu, May 30, 2019 at 10:13:56AM -0700, Matthew Wilcox wrote: > On Thu, May 30, 2019 at 12:15:48PM -0400, Johannes Weiner wrote: > > Are there any objections or feedback on the proposed fix below? This > > is kind of a serious regression. > > I'll drop it into the xarray tree for merging in a we

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