Re: [PATCH v2 1/2] mmc: cqhci: fix space allocated for transfer descriptor

2019-02-27 Thread Adrian Hunter
On 25/02/19 9:22 PM, Alamy Liu wrote: > There is not enough space being allocated when DCMD is disabled. > > CQE_DCMD is not necessary to be enabled when CQE is enabled. > (Software could halt CQE to send command) > > In the case that CQE_DCMD is not enabled, it still needs to allocate > space fo

Re: [PATCH 4/5] ocxl: Remove superfluous 'extern' from headers

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva The 'extern' keyword adds no value here. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/ocxl_internal.h | 54 +++ include/misc/ocxl.h

[PATCH] cpuidle: menu: Avoid overflows when computing variance

2019-02-27 Thread Rafael J. Wysocki
From: Rafael J. Wysocki The variance computation in get_typical_interval() may overflow if the square of the value of diff exceeds the maximum for the int64_t data type value which basically is the case when it is of the order of UINT_MAX. However, data points so far in the future don't matter f

Re: [PATCH 5/5] ocxl: Remove some unused exported symbols

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva Remove some unused exported symbols. Signed-off-by: Alastair D'Silva --- If you have a respin of the series, that patch also adds a comment around ocxl_context_attach(), which is for later. But in any case: Acked-

Re: [PATCH 2/5] ocxl: Clean up printf formats

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva Use %# instead of using a literal '0x' Signed-off-by: Alastair D'Silva --- I don't really care either way, but it looks ok. Acked-by: Frederic Barrat drivers/misc/ocxl/config.c | 6 +++--- drivers/misc/ocx

Re: [PATCH v2 2/2] mmc: cqhci: Fix a tiny potential memory leak on error condition

2019-02-27 Thread Adrian Hunter
On 25/02/19 9:22 PM, Alamy Liu wrote: > Free up the allocated memory in the case of error return > > --- code study --- > The value of mmc_host->cqe_enabled stays 'false'. > Thus, cqhci_disable (mmc_cqe_ops->cqe_disable) won't be called to > free the memory. > Also, cqhci_disable() seems to be des

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 09:18, Andrew Donnellan a écrit : On 27/2/19 7:04 pm, Alastair D'Silva wrote: -Original Message- From: Andrew Donnellan Sent: Wednesday, 27 February 2019 6:55 PM To: Alastair D'Silva ; 'Alastair D'Silva' Cc: 'Greg Kurz' ; 'Frederic Barrat' ; 'Arnd Bergmann' ; 'Greg K

Re: [PATCH] phy: qcom: qmp: Add SDM845 PCIe QMP PHY support

2019-02-27 Thread Marc Gonzalez
On 26/02/2019 07:59, Bjorn Andersson wrote: > +static const unsigned int sdm845_pciephy_regs_layout[] = { > + [QPHY_START_CTRL] = 0x08, > + [QPHY_PCS_READY_STATUS] = 0x174, > +}; > + Just use pciephy_regs_layout? > +static const struct qmp_phy_cfg sdm845_pciephy_cfg

Re: [PATCH] fw_cfg: use __ATTR_RO_MODE to define rev sysfs

2019-02-27 Thread Michael S. Tsirkin
On Wed, Feb 27, 2019 at 01:33:19PM +0800, Wei Yang wrote: > On Tue, Feb 26, 2019 at 11:10:06AM -0500, Michael S. Tsirkin wrote: > >On Tue, Feb 26, 2019 at 03:31:59PM +0800, Wei Yang wrote: > >> Leverage __ATTR_RO_MODE to define rev sysfs instead of using open code > >> to define the attribute. > >>

Re: [Qemu-devel] [PATCH] fw_cfg: use __ATTR_RO_MODE to define rev sysfs

2019-02-27 Thread Michael S. Tsirkin
On Wed, Feb 27, 2019 at 11:07:16AM +0800, Wei Yang wrote: > On Tue, Feb 26, 2019 at 07:45:46PM +0100, Philippe Mathieu-Daudé wrote: > >Hi Wei, > > > >On 2/26/19 8:31 AM, Wei Yang wrote: > >> Leverage __ATTR_RO_MODE to define rev sysfs instead of using open code > >> to define the attribute. > >> >

Re: [RFC PATCH v1 20/25] serial: 8250: implement write_atomic

2019-02-27 Thread Petr Mladek
On Wed 2019-02-27 11:32:05, John Ogness wrote: > On 2019-02-27, Petr Mladek wrote: > >> Implement a non-sleeping NMI-safe write_atomic console function in > >> order to support emergency printk messages. > > > > It uses console_atomic_lock() added in 18th patch. That one uses > > prb_lock() added

Re: [PATCH v6 0/2] Clean up UFSHC driver

2019-02-27 Thread Martin K. Petersen
Marc, > This mini-series removes the "disable-VCCQ-power-rail-for-some-Flash-chips" > quirk, and cleans up after the dust settles. Applied to 5.1/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v4 4/9] pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver

2019-02-27 Thread Linus Walleij
On Wed, Feb 27, 2019 at 10:35 AM Amelie Delaunay wrote: > This patch adds pinctrl/GPIO driver for STMicroelectronics > Multi-Function eXpander (STMFX) GPIO expander. > STMFX is an I2C slave controller, offering up to 24 GPIOs. > The driver relies on generic pin config interface to configure the G

Re: linux-next: manual merge of the vhost tree with the iommu tree

2019-02-27 Thread Michael S. Tsirkin
On Wed, Feb 27, 2019 at 11:30:27AM +, Jean-Philippe Brucker wrote: > On 27/02/2019 04:25, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the vhost tree got conflicts in: > > > > drivers/iommu/Kconfig > > drivers/iommu/Makefile > > > > between commit: > > > > 0

[PATCH 1/2] perf tools: Add error path into hist_entry__init

2019-02-27 Thread Jiri Olsa
Adding error path into hist_entry__init to unify error handling, so every new member does not need to free everything else. Link: http://lkml.kernel.org/n/tip-v0ssws4hsr0tozb7lm0k5...@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/util/hist.c | 39 +++

[PATCH 2/2] perf hist: Fix memory leak of srcline

2019-02-27 Thread Jiri Olsa
From: Jiri Olsa We can't allocate he->srcline unconditionaly, only when new hist_entry is created. Moving he->srcline allocation into hist_entry__init function. Original-patch-by: Jonas Rabenstein Suggested-by: Namhyung Kim Link: http://lkml.kernel.org/n/tip-2ijaiiwlzmk4cae3zs97p...@git.kernel

Re: [REPOST PATCH v4 0/3] scsi: ufs-bsg: Add read descriptor

2019-02-27 Thread Martin K. Petersen
Avri, > UFS Protocol Information Units (UPIU) are UFS packets that travel > between the host and the device on the UniPro bus. Our previous series > added the capability to send UPIUs to the ufs driver. It does not > cover all the possible UPIU types - we are mainly focused on device > managemen

Re: [PATCH V4 2/4] tpm: Reserve the TPM final events table

2019-02-27 Thread Jarkko Sakkinen
On Fri, Feb 22, 2019 at 12:26:04PM -0800, Matthew Garrett wrote: > From: Matthew Garrett > > UEFI systems provide a boot services protocol for obtaining the TPM > event log, but this is unusable after ExitBootServices() is called. > Unfortunately ExitBootServices() itself triggers additional TPM

Re: [PATCH] can: flexcan: add TX support for variable payload size

2019-02-27 Thread Marc Kleine-Budde
On 12/12/18 7:46 AM, Joakim Zhang wrote: > Now the FlexCAN driver always use last mailbox for TX, it will work well > when MB payload size is 8/16 bytes. > TX mailbox would change to 13 when MB payload size is 64 bytes to > support CANFD. So we may need to set iflag register to add support for > va

Re: [PATCH] Revert "dma-contiguous: do not allocate a single page from CMA area"

2019-02-27 Thread Jon Hunter
On 26/02/2019 20:23, Nicolin Chen wrote: > This reverts commit d222e42e88168fd67e6d131984b86477af1fc256. > > The original change breaks omap dss: > omapdss_dispc 58001000.dispc: > dispc_errata_i734_wa_init: dma_alloc_writecombine failed > > Let's revert it first and then find a safe

Re: [PATCH 5/6] objtool: Add UACCESS validation

2019-02-27 Thread Peter Zijlstra
On Mon, Feb 25, 2019 at 01:43:35PM +0100, Peter Zijlstra wrote: > It is important that UACCESS regions are as small as possible; > furthermore the UACCESS state is not scheduled, so doing anything that > might directly call into the scheduler will cause random code to be > ran with UACCESS enabled.

Re: [PATCH] tmpfs: fix uninitialized return value in shmem_link

2019-02-27 Thread Qian Cai
On Mon, 2019-02-25 at 16:07 -0800, Linus Torvalds wrote: > On Mon, Feb 25, 2019 at 4:03 PM Qian Cai wrote: > > > > > > Of course, that's just gcc. I have no idea what llvm ends up doing. > > > > Clang 7.0: > > > > # clang  -O2 -S -Wall /tmp/test.c > > /tmp/test.c:46:6: warning: variable 'ret' i

Re: [PATCH v2 2/2] mmc: cqhci: Fix a tiny potential memory leak on error condition

2019-02-27 Thread Ulf Hansson
On Mon, 25 Feb 2019 at 20:22, Alamy Liu wrote: > > Free up the allocated memory in the case of error return > > --- code study --- Using three dashes makes "git am" believe this hole text snippet is a comment and drops it from the changelog. I fixed it up this time, no worries. > The value of mm

Re: [PATCH v2 1/2] mmc: cqhci: fix space allocated for transfer descriptor

2019-02-27 Thread Ulf Hansson
On Mon, 25 Feb 2019 at 20:22, Alamy Liu wrote: > > There is not enough space being allocated when DCMD is disabled. > > CQE_DCMD is not necessary to be enabled when CQE is enabled. > (Software could halt CQE to send command) > > In the case that CQE_DCMD is not enabled, it still needs to allocate

Re: [PATCH 00/14] Prepare syscall_get_arch for PTRACE_GET_SYSCALL_INFO

2019-02-27 Thread Dmitry V. Levin
On Sat, Feb 09, 2019 at 01:22:19AM +0300, Dmitry V. Levin wrote: > On Thu, Jan 17, 2019 at 03:34:44PM -0500, Richard Guy Briggs wrote: > > On 2019-01-09 15:40, Dmitry V. Levin wrote: > > > syscall_get_arch() is required to be implemented on all architectures in > > > order > > > to extend the gene

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
On Wed, 27 Feb 2019 15:57:37 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The term 'link' is ambiguous (especially when the struct is used for a > list), so rename it for clarity. > > Signed-off-by: Alastair D'Silva > Reviewed-by: Greg Kurz > --- > drivers/misc/ocxl/file.c |

Re: [PATCH RFC 1/1] uio: Add dma-buf import ioctls

2019-02-27 Thread Daniel Vetter
On Tue, Feb 26, 2019 at 11:20 PM Hyun Kwon wrote: > > Hi Daniel, > > Thanks for the comment. > > On Tue, 2019-02-26 at 04:06:13 -0800, Daniel Vetter wrote: > > On Tue, Feb 26, 2019 at 12:53 PM Greg Kroah-Hartman > > wrote: > > > > > > On Sat, Feb 23, 2019 at 12:28:17PM -0800, Hyun Kwon wrote: > >

Re: [PATCH v2 5/5] selftests/ima: loading kernel modules

2019-02-27 Thread Mimi Zohar
Hi Shuah, > > diff --git a/tools/testing/selftests/ima/test_kernel_module.sh > > b/tools/testing/selftests/ima/test_kernel_module.sh > > new file mode 100755 > > index ..4009e1b60b03 > > --- /dev/null > > +++ b/tools/testing/selftests/ima/test_kernel_module.sh > > @@ -0,0 +1,96 @@ > >

Re: [PATCH] lib/scatterlist: introduce sg_nents_for_dma() helper

2019-02-27 Thread Andy Shevchenko
On Wed, Feb 27, 2019 at 2:26 PM Ardelean, Alexandru wrote: > > On Wed, 2019-02-27 at 11:46 +0200, Andy Shevchenko wrote: > > [External] > > > > > > +Cc Vinod > > > > On Wed, Feb 27, 2019 at 11:45 AM Andy Shevchenko > > wrote: > > > > > > On Wed, Feb 27, 2019 at 10:51 AM Alexandru Ardelean > > >

[PATCH] ASoC: tlv320aix3x: fix reset gpio reference counting

2019-02-27 Thread Philipp Puschmann
This patch fixes a bug that prevents freeing the reset gpio on unloading the module. aic3x_i2c_probe is called when loading the module and it calls list_add with a probably uninitialized list entry aic3x->list (next = prev = NULL)). So even if list_del is called it does nothing and in the end the

Re: [PATCH 5/6] objtool: Add UACCESS validation

2019-02-27 Thread Andrey Ryabinin
On 2/27/19 5:08 PM, Peter Zijlstra wrote: > On Mon, Feb 25, 2019 at 01:43:35PM +0100, Peter Zijlstra wrote: >> It is important that UACCESS regions are as small as possible; >> furthermore the UACCESS state is not scheduled, so doing anything that >> might directly call into the scheduler will c

Re: [PATCH] cros_ec: instantiate properly Intel ISH MCU device

2019-02-27 Thread Enric Balletbo i Serra
Hi, On 26/2/19 18:21, Jett Rink wrote: > We are specifically wanting userspace applications to not worry/confuse > cros_ish > with a normal cros_ec. Adding an attribute instead of changing the path would > make it easy for userspace application to forget to check properly before > accessing the i

Re: [PATCH v2 1/3] perf diff: Support --time filter option

2019-02-27 Thread Jin, Yao
On 2/27/2019 9:10 PM, Jiri Olsa wrote: On Wed, Feb 27, 2019 at 08:51:44PM +0800, Jin, Yao wrote: On 2/27/2019 5:28 PM, Jiri Olsa wrote: On Tue, Feb 26, 2019 at 08:11:07PM +0800, Jin Yao wrote: SNIP + .ordered_events = true, + .ordering_requires_timestamps = t

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-27 Thread Peter Zijlstra
On Wed, Feb 27, 2019 at 09:35:56AM +0800, Ming Lei wrote: > On Tue, Feb 26, 2019 at 07:08:02PM +0100, Peter Zijlstra wrote: > > On Fri, Feb 15, 2019 at 10:26:59AM +0800, Ming Lei wrote: > > > There might be lots of blk_flush_queue instance which is allocated > > > for each hctx, then lots of class

Re: [PATCH] arm64: dts: qcom: Add Dragonboard 845c

2019-02-27 Thread Jeffrey Hugo
On 2/27/2019 12:40 AM, Bjorn Andersson wrote: This adds an initial dts for the Dragonboard 845. Supported functionality includes Debug UART, UFS, USB-C (peripheral), USB-A (host), Ethernet, microSD-card and Bluetooth. Initializing the SMMU is clearing the mapping used for the splash screen frame

Re: [PATCH 5/6] objtool: Add UACCESS validation

2019-02-27 Thread Peter Zijlstra
On Wed, Feb 27, 2019 at 05:17:58PM +0300, Andrey Ryabinin wrote: > > > On 2/27/19 5:08 PM, Peter Zijlstra wrote: > > I can't actually find any definitions of those functions, so I can't > > very well mark the safe, even if we wanted to. > > > > They are macro-generated. Use 'git grep DEFINE_AS

Re: [Qemu-devel] [PATCH] fw_cfg: use __ATTR_RO_MODE to define rev sysfs

2019-02-27 Thread Wei Yang
On Wed, Feb 27, 2019 at 08:51:11AM -0500, Michael S. Tsirkin wrote: >On Wed, Feb 27, 2019 at 01:33:19PM +0800, Wei Yang wrote: >> On Tue, Feb 26, 2019 at 11:10:06AM -0500, Michael S. Tsirkin wrote: >> >On Tue, Feb 26, 2019 at 03:31:59PM +0800, Wei Yang wrote: >> >> Leverage __ATTR_RO_MODE to define

Re: [PATCH v3 0/9] perf: enable compression of record mode trace to save storage space

2019-02-27 Thread Jiri Olsa
On Tue, Feb 26, 2019 at 08:31:38AM +0300, Alexey Budankov wrote: > > The patch set implements runtime trace compression (-z option) in > record mode and trace auto decompression in report and inject modes. > Streaming Zstandard (Zstd) API (zstd) is used for compression and > decompression of da

Re: [PATCH v3 0/9] perf: enable compression of record mode trace to save storage space

2019-02-27 Thread Jiri Olsa
On Tue, Feb 26, 2019 at 08:31:38AM +0300, Alexey Budankov wrote: SNIP > TESTING: > > tools/perf/perf test > 1: vmlinux symtab matches kallsyms : Skip > 2: Detect openat syscall event : Ok > 3: Detect openat syscall event on all cpus

Re: [PATCH v3 2/2] PCI: hv: Refactor hv_irq_unmask() to use cpumask_to_vpset()

2019-02-27 Thread Lorenzo Pieralisi
On Wed, Feb 27, 2019 at 01:34:44PM +0100, Vitaly Kuznetsov wrote: > Maya Nakamura writes: > > > Remove the duplicate implementation of cpumask_to_vpset() and use the > > shared implementation. Export hv_max_vp_index, which is required by > > cpumask_to_vpset(). > > > > Apply changes to hv_irq_unm

Re: [Qemu-devel] [PATCH] fw_cfg: use __ATTR_RO_MODE to define rev sysfs

2019-02-27 Thread Wei Yang
On Wed, Feb 27, 2019 at 08:54:58AM -0500, Michael S. Tsirkin wrote: >On Wed, Feb 27, 2019 at 11:07:16AM +0800, Wei Yang wrote: >> On Tue, Feb 26, 2019 at 07:45:46PM +0100, Philippe Mathieu-Daudé wrote: >> >Hi Wei, >> > >> >On 2/26/19 8:31 AM, Wei Yang wrote: >> >> Leverage __ATTR_RO_MODE to define

Re: [PATCH 11/13] iommu/mediatek: Use builtin_platform_driver

2019-02-27 Thread Yong Wu
On Mon, 2019-02-25 at 15:56 -0800, Evan Green wrote: > On Mon, Dec 31, 2018 at 8:53 PM Yong Wu wrote: > > > > MediaTek IOMMU should wait for smi larb which need wait for the > > power domain(mtk-scpsys.c) and the multimedia ccf who both are > > module init. Thus, subsys_initcall for MediaTek IOMMU

Re: [PATCH 05/13] memory: mtk-smi: Add device-link between smi-larb and smi-common

2019-02-27 Thread Yong Wu
On Mon, 2019-02-25 at 15:54 -0800, Evan Green wrote: > On Mon, Dec 31, 2018 at 8:52 PM Yong Wu wrote: > > > > Normally, If the smi-larb HW need work, we should enable the smi-common > > HW power and clock firstly. > > This patch adds device-link between the smi-larb dev and the smi-common > > dev.

Re: [PATCH 5/6] objtool: Add UACCESS validation

2019-02-27 Thread Peter Zijlstra
On Wed, Feb 27, 2019 at 03:26:23PM +0100, Peter Zijlstra wrote: > On Wed, Feb 27, 2019 at 05:17:58PM +0300, Andrey Ryabinin wrote: > > > > > > On 2/27/19 5:08 PM, Peter Zijlstra wrote: > > > > I can't actually find any definitions of those functions, so I can't > > > very well mark the safe, eve

Re: [PATCH 02/13] driver core: Remove the link if there is no driver with AUTO flag

2019-02-27 Thread Yong Wu
On Mon, 2019-02-25 at 15:53 -0800, Evan Green wrote: > On Mon, Dec 31, 2018 at 8:52 PM Yong Wu wrote: > > > > DL_FLAG_AUTOREMOVE_CONSUMER/SUPPLIER means "Remove the link > > automatically on consumer/supplier driver unbind", that means we should > > remove whole the device_link when there is no th

Re: [PATCH] USB: serial: option: set driver_info for SIM5218 and compatibles

2019-02-27 Thread Måns Rullgård
Johan Hovold writes: > Adding Bjørn. > > On Wed, Feb 27, 2019 at 11:57:16AM +, Måns Rullgård wrote: >> Johan Hovold writes: >> >> > On Tue, Feb 26, 2019 at 05:07:10PM +, Mans Rullgard wrote: >> >> The SIMCom SIM5218 and compatible devices have 5 USB interfaces, only 4 >> >> of which are

Re: [PATCH] scsi: aacraid: Fix missing break in switch statement

2019-02-27 Thread Martin K. Petersen
Gustavo, > Add missing break statement and fix identation issue. So much bad indentation in this driver. Tried various tab widths and it is still all over the place. Anyway. After staring at the firmware header I have convinced myself that your fix is correct. Applied to 5.1/scsi-queue. -- M

Re: [PATCH 03/13] iommu/mediatek: Add probe_defer for smi-larb

2019-02-27 Thread Yong Wu
On Mon, 2019-02-25 at 15:54 -0800, Evan Green wrote: > On Mon, Dec 31, 2018 at 8:52 PM Yong Wu wrote: > > > > The iommu consumer should use device_link to connect with the > > smi-larb(supplier). then the smi-larb should run before the iommu > > consumer. Here we delay the iommu driver until the s

Re: [PATCH 04/13] iommu/mediatek: Add device_link between the consumer and the larb devices

2019-02-27 Thread Yong Wu
On Mon, 2019-02-25 at 15:54 -0800, Evan Green wrote: > On Mon, Dec 31, 2018 at 8:52 PM Yong Wu wrote: > > > > MediaTek IOMMU don't have its power-domain. all the consumer connect > > with smi-larb, then connect with smi-common. > > > > M4U > > | > > smi-common > > | >

[PATCH V2] mm/cma: cma_declare_contiguous: correct err handling

2019-02-27 Thread Peng Fan
In case cma_init_reserved_mem failed, need to free the memblock allocated by memblock_reserve or memblock_alloc_range. Quote Catalin's comments: https://lkml.org/lkml/2019/2/26/482 Kmemleak is supposed to work with the memblock_{alloc,free} pair and it ignores the memblock_reserve() as a memblock_

[PATCH] bpf: drop refcount if bpf_map_new_fd() fails in map_create()

2019-02-27 Thread zerons
In bpf/syscall.c, map_create() first set map->usercnt to 1, a file descriptor is supposed to return to userspace. When bpf_map_new_fd() fails, drop the refcount. Signed-off-by: Peng Sun --- kernel/bpf/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/sy

Re: [PATCH] scsi: mpt3sas: Add missing breaks in switch statements

2019-02-27 Thread Martin K. Petersen
Gustavo, > Fix the following warnings by adding the proper missing breaks: > > drivers/scsi/mpt3sas/mpt3sas_base.c: In function > ‘_base_display_OEMs_branding’: > drivers/scsi/mpt3sas/mpt3sas_base.c:3548:4: warning: this statement may fall > thr Applied to 5.1/scsi-queue, thanks. -- Martin

Re: [PATCH v2 1/2] scsi: replace GFP_ATOMIC with GFP_KERNEL for allocations in scsi_scan.c

2019-02-27 Thread Martin K. Petersen
Benjamin, > We had a test-report where, under memory pressure, adding LUNs to the > systems would fail (the tests add LUNs strictly in sequence): Applied to 5.1/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH v3 0/5] tracing/probes: uaccess: Add support user-space access

2019-02-27 Thread Masami Hiramatsu
Hi, Here is the v3 series of probe-event to support user-space access. In this version I removed unneeded kernel_uaccess_faults_ok patch, included PeterZ's user_access_ok(), and simplifies non-pagefault user-space read functions according to the discussion on the previous sereis. https://lkml.ke

[PATCH v3 1/5] uaccess: Add user_access_ok()

2019-02-27 Thread Masami Hiramatsu
From: Peter Zijlstra Add user_access_ok() macro which ensures current context is user context, or explicitly do set_fs(USER_DS). This function is very much like access_ok(), except it (may) have different context validation. In general we must be very careful when using this. Signed-off-by: Pet

[PATCH v3 2/5] uaccess: Use user_access_ok() in user_access_begin()

2019-02-27 Thread Masami Hiramatsu
Use user_access_ok() instead of access_ok() in user_access_begin() to validate the access context is user. This also allow us to use (generic) strncpy_from_user() and strnlen_user() in atomic state with setting USER_DS and disable pagefaults. Signed-off-by: Masami Hiramatsu --- arch/x86/include/

Re: [PATCH 6/5] x86/percpu: Optimize raw_cpu_xchg()

2019-02-27 Thread Peter Zijlstra
On Wed, Feb 27, 2019 at 11:24:45AM +0100, Peter Zijlstra wrote: > > And because it's one of _those_ days, I forgot to include one patch... > > --- > Subject: x86/percpu: Optimize raw_cpu_xchg() > From: Peter Zijlstra > Date: Wed Feb 27 11:09:56 CET 2019 > > Since raw_cpu_xchg() doesn't need to

[PATCH v3 3/5] uaccess: Add non-pagefault user-space read functions

2019-02-27 Thread Masami Hiramatsu
Add probe_user_read() and strncpy_from_unsafe_user() which allows caller to access user-space in IRQ context. Current probe_kernel_read() and strncpy_from_unsafe() are not available for user-space memory, because it sets KERNEL_DS while accessing data. On some arch, user address space and kernel a

[PATCH 2/3] drm/virtio: implement prime pin/unpin

2019-02-27 Thread Gerd Hoffmann
virtio-gpu objects never move around, so effectively they are pinned all the time. This makes the the implementation pretty easy ;) Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_prime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/v

[PATCH 1/3] drm/virtio: implement prime mmap

2019-02-27 Thread Gerd Hoffmann
Sync gem vm_node.start with ttm vm_node.start, then we can just call drm_gem_prime_mmap(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_prime.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/

[PATCH v3 4/5] tracing/probe: Add ustring type for user-space string

2019-02-27 Thread Masami Hiramatsu
Add "ustring" type for fetching user-space string from kprobe event. User can specify ustring type at uprobe event, and it is same as "string" for uprobe. Note that probe-event provides this option but it doesn't choose the correct type automatically since we have not way to decide the address is

[PATCH 3/3] drm/virtio: implement prime export

2019-02-27 Thread Gerd Hoffmann
Just run drm_prime_pages_to_sg() on the ttm pages list to get an sg_table for export. The pages list is created at object initialization time, so there should be no need to handle an unpopulated page list. Add a sanity check nevertheless. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/

[PATCH v3 5/5] tracing/probe: Support user-space dereference

2019-02-27 Thread Masami Hiramatsu
Support user-space dereference syntax for probe event arguments to dereference the data-structure or array in user-space. The syntax is just adding 'u' before an offset value. +|-u() e.g. +u8(%ax), +u0(+0(%si)) For example, if you probe do_sched_setscheduler(pid, policy, param) and record para

Re: [PATCH] dt-bindings: net: can: binding for CTU CAN FD open-source IP core.

2019-02-27 Thread Marc Kleine-Budde
On 2/22/19 2:20 PM, Pavel Pisa wrote: > From 3e19a7f5c33e5fb50f52c9df05bf00022e3f3dd5 Mon Sep 17 00:00:00 2001 > From: Pavel Pisa > Date: Fri, 22 Feb 2019 14:11:11 +0100 > Subject: [PATCH] dt-bindings: net: can: binding for CTU CAN FD open-source IP > core. Nice! I appreciate open-source hardwar

Re: [PATCH v4 03/10] dt-bindings: Add documentation for Milbeaut SoCs

2019-02-27 Thread Rob Herring
On Tue, Feb 26, 2019 at 10:51 PM Sugaya Taichi wrote: > > This adds a DT binding documentation for the M10V and its evaluation > board. > > Signed-off-by: Sugaya Taichi > --- > .../bindings/arm/socionext/milbeaut.yaml | 22 > ++ > 1 file changed, 22 insertions(+) >

[PATCH v8 0/4] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2019-02-27 Thread Aneesh Kumar K.V
ppc64 use CMA area for the allocation of guest page table (hash page table). We won't be able to start guest if we fail to allocate hash page table. We have observed hash table allocation failure because we failed to migrate pages out of CMA region because they were pinned. This happen when we ar

[PATCH v8 2/4] mm: Update get_user_pages_longterm to migrate pages allocated from CMA region

2019-02-27 Thread Aneesh Kumar K.V
This patch updates get_user_pages_longterm to migrate pages allocated out of CMA region. This makes sure that we don't keep non-movable pages (due to page reference count) in the CMA area. This will be used by ppc64 in a later patch to avoid pinning pages in the CMA region. ppc64 uses CMA region f

[PATCH v8 1/4] mm/cma: Add PF flag to force non cma alloc

2019-02-27 Thread Aneesh Kumar K.V
This patch adds PF_MEMALLOC_NOCMA which make sure any allocation in that context is marked non-movable and hence cannot be satisfied by CMA region. This is useful with get_user_pages_longterm where we want to take a page pin by migrating pages from CMA region. Marking the section PF_MEMALLOC_NOCMA

[PATCH v8 4/4] powerpc/mm/iommu: Allow large IOMMU page size only for hugetlb backing

2019-02-27 Thread Aneesh Kumar K.V
THP pages can get split during different code paths. An incremented reference count does imply we will not split the compound page. But the pmd entry can be converted to level 4 pte entries. Keep the code simpler by allowing large IOMMU page size only if the guest ram is backed by hugetlb pages. S

[PATCH v8 3/4] powerpc/mm/iommu: Allow migration of cma allocated pages during mm_iommu_do_alloc

2019-02-27 Thread Aneesh Kumar K.V
The current code doesn't do page migration if the page allocated is a compound page. With HugeTLB migration support, we can end up allocating hugetlb pages from CMA region. Also, THP pages can be allocated from CMA region. This patch updates the code to handle compound pages correctly. The patch a

RE: [PATCH v2 3/6] EDAC/amd64: Use a macro for iterating over Unified Memory Controllers

2019-02-27 Thread Ghannam, Yazen
> -Original Message- > From: linux-edac-ow...@vger.kernel.org On > Behalf Of Borislav Petkov > Sent: Tuesday, February 26, 2019 3:53 PM > To: Ghannam, Yazen > Cc: linux-e...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2 3/6] EDAC/amd64: Use a macro for iterating

[PATCH V2] staging: wilc1000: fix incorrent type in initializer

2019-02-27 Thread Bo YU
Fix sparse warning: drivers/staging/wilc1000//host_interface.c:444:49: warning: incorrect type in initializer (different address spaces) drivers/staging/wilc1000//host_interface.c:444:49:expected struct cfg80211_bss_ies const *ies drivers/staging/wilc1000//host_interface.c:444:49:got str

[PATCH V6 0/3] x86/Hyper-V/IOMMU: Add Hyper-V IOMMU driver to support x2apic mode

2019-02-27 Thread lantianyu1986
From: Lan Tianyu On the bare metal, enabling X2APIC mode requires interrupt remapping function which helps to deliver irq to cpu with 32-bit APIC ID. Hyper-V doesn't provide interrupt remapping function so far and Hyper-V MSI protocol already supports to deliver interrupt to the CPU whose virtual

[PATCH V6 1/3] x86/Hyper-V: Set x2apic destination mode to physical when x2apic is available

2019-02-27 Thread lantianyu1986
From: Lan Tianyu Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic, set x2apic destination mode to physcial mode when x2apic is available and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have 8-bit APIC id. Reviewed-by: Thomas Gleixner Reviewed-by: Michael K

[PATCH V6 2/3] IOMMU/Hyper-V: Add Hyper-V stub IOMMU driver

2019-02-27 Thread lantianyu1986
From: Lan Tianyu On the bare metal, enabling X2APIC mode requires interrupt remapping function which helps to deliver irq to cpu with 32-bit APIC ID. Hyper-V doesn't provide interrupt remapping function so far and Hyper-V MSI protocol already supports to deliver interrupt to the CPU whose virtual

[PATCH V6 3/3] MAINTAINERS: Add Hyper-V IOMMU driver into Hyper-V CORE AND DRIVERS scope

2019-02-27 Thread lantianyu1986
From: Lan Tianyu This patch is to add Hyper-V IOMMU driver file into Hyper-V CORE and DRIVERS scope. Reviewed-by: Michael Kelley Signed-off-by: Lan Tianyu --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9f64f8d..5fb6306 100644 --- a/MAINTAIN

Re: [RFC PATCH] x86, hyperv: fix kernel panic when kexec on HyperV VM

2019-02-27 Thread Kairui Song
On Wed, Feb 27, 2019 at 8:02 PM Peter Zijlstra wrote: > > On Tue, Feb 26, 2019 at 11:56:15PM +0800, Kairui Song wrote: > > arch/x86/hyperv/hv_init.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c > > index 7abb09e2eeb8..922

Re: [PATCH v3 0/9] perf: enable compression of record mode trace to save storage space

2019-02-27 Thread Alexey Budankov
On 27.02.2019 17:27, Jiri Olsa wrote: > On Tue, Feb 26, 2019 at 08:31:38AM +0300, Alexey Budankov wrote: >> >> The patch set implements runtime trace compression (-z option) in >> record mode and trace auto decompression in report and inject modes. >> Streaming Zstandard (Zstd) API (zstd) is us

Re: [PATCH 00/14] Prepare syscall_get_arch for PTRACE_GET_SYSCALL_INFO

2019-02-27 Thread Paul Moore
On Wed, Feb 27, 2019 at 9:13 AM Dmitry V. Levin wrote: > On Sat, Feb 09, 2019 at 01:22:19AM +0300, Dmitry V. Levin wrote: > > On Thu, Jan 17, 2019 at 03:34:44PM -0500, Richard Guy Briggs wrote: > > > On 2019-01-09 15:40, Dmitry V. Levin wrote: > > > > syscall_get_arch() is required to be implement

[PATCH] appletalk: Fix use-after-free in atalk_proc_exit

2019-02-27 Thread Yue Haibing
From: YueHaibing KASAN report this: BUG: KASAN: use-after-free in pde_subdir_find+0x12d/0x150 fs/proc/generic.c:71 Read of size 8 at addr 8881f41fe5b0 by task syz-executor.0/2806 CPU: 0 PID: 2806 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (i440FX + PIIX,

[PATCH -next] appletalk: use remove_proc_subtree to simplify procfs code

2019-02-27 Thread Yue Haibing
From: YueHaibing Use remove_proc_subtree to remove the whole subtree on cleanup.Also do some cleanup. Signed-off-by: YueHaibing --- net/appletalk/atalk_proc.c | 56 ++ 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/net/appletalk/atal

Re: [PATCH v4 07/10] dt-bindings: serial: Add Milbeaut serial driver description

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 01:53:30PM +0900, Sugaya Taichi wrote: > Add DT bindings document for Milbeaut serial driver. > > Signed-off-by: Sugaya Taichi > Reviewed-by: Rob Herring > --- > .../devicetree/bindings/serial/milbeaut-uart.txt| 21 > + > 1 file changed, 21 inser

Re: [PATCH v1] drm/tegra: plane: Remove format-modifier checking

2019-02-27 Thread Dmitry Osipenko
24.02.2019 18:34, Dmitry Osipenko пишет: > Tiling modifier can't be applied to YV12 video overlay because all tiling > modifiers are filtered out for multi-plane formats. AFAIK, all modifiers > should work with all of formats, hence the checking is incorrect and > simply not needed. > > Fixes: e90

Re: [PATCH v2 00/11] LSM documentation update

2019-02-27 Thread Denis Efremov
The rest of the warnings are about undocumented hooks. This patchset fixes the existing documentation. I will try to document the hooks from warnings in a separate patch. Some of the hooks are trivial enough, but others require me digging into the code and mailing lists. Can't promise to do it quic

Re: [PATCH] cros_ec: instantiate properly Intel ISH MCU device

2019-02-27 Thread Jett Rink
The diagram you provided is correct. The ISH device is a MCU that can run general purpose code that is located on the SoC. Typically the ISH collects sensor data and processes it before giving it to the AP. The ISH HW can run any RTOS, and in this scenario we are choosing to run the ECOS RTOS. In

Re: [PATCH RE-SEND] clk: tegra: Don't enable already enabled PLLs

2019-02-27 Thread Dmitry Osipenko
24.02.2019 18:32, Dmitry Osipenko пишет: > Initially Common Clock Framework isn't aware of the clock-enable status, > this results in enabling of clocks that were enabled by bootloader. This > is not a big deal for a regular clock-gates, but for PLL's it may have > some unpleasant consequences. Thu

[PATCH v2] ASoC: tlv320aic3x: fix reset gpio reference counting

2019-02-27 Thread Philipp Puschmann
This patch fixes a bug that prevents freeing the reset gpio on unloading the module. aic3x_i2c_probe is called when loading the module and it calls list_add with a probably uninitialized list entry aic3x->list (next = prev = NULL)). So even if list_del is called it does nothing and in the end the

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
On Wed, 27 Feb 2019 14:45:44 +0100 Frederic Barrat wrote: > Le 27/02/2019 à 09:18, Andrew Donnellan a écrit : > > On 27/2/19 7:04 pm, Alastair D'Silva wrote: > >>> -Original Message- > >>> From: Andrew Donnellan > >>> Sent: Wednesday, 27 February 2019 6:55 PM > >>> To: Alastair D'Silva

Re: [PATCH 2/2] drivers/misc: Add Aspeed P2A control driver

2019-02-27 Thread Patrick Venture
On Tue, Feb 26, 2019 at 9:05 PM Florian Fainelli wrote: > > > > On 2/21/2019 2:25 PM, Patrick Venture wrote: > > The ASPEED AST2400, and AST2500 in some configurations include a > > PCI-to-AHB MMIO bridge. This bridge allows a server to read and write > > in the BMC's memory space. This feature

Re: [PATCH 2/2] drivers/misc: Add Aspeed P2A control driver

2019-02-27 Thread Patrick Venture
On Tue, Feb 26, 2019 at 9:53 PM Andrew Jeffery wrote: > > > > On Wed, 27 Feb 2019, at 13:04, Patrick Venture wrote: > > On Tue, Feb 26, 2019 at 5:05 PM Andrew Jeffery wrote: > > > > > > > > > > > > On Wed, 27 Feb 2019, at 08:12, Patrick Venture wrote: > > > > On Sun, Feb 24, 2019 at 5:26 PM Andre

Re: [PATCH] ARM: socfpga_defconfig: enable support for large block devices

2019-02-27 Thread Dinh Nguyen
On 2/25/19 12:55 PM, Andrey Zhizhikin wrote: > Hello Dinh, > > On Mon, Feb 25, 2019 at 5:35 PM Dinh Nguyen wrote: >> >> Hi Andrey, >> >> On 2/22/19 6:21 AM, Andrey Zhizhikin wrote: >>> Enable CONFIG_LBDAF, which is required by ext4 fs. This option could >>> hanle both ext3 and ext4, and ex4 re

[PATCH 04/14] h8300: define syscall_get_arch()

2019-02-27 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Acked-by

[PATCH 05/14] Move EM_HEXAGON to uapi/linux/elf-em.h

2019-02-27 Thread Dmitry V. Levin
This should never have been defined in the arch tree to begin with, and now uapi/linux/audit.h header is going to use EM_HEXAGON in order to define AUDIT_ARCH_HEXAGON which is needed to implement syscall_get_arch() which in turn is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_I

[PATCH 06/14] hexagon: define syscall_get_arch()

2019-02-27 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Acked-by

[PATCH 08/14] Move EM_NDS32 to uapi/linux/elf-em.h

2019-02-27 Thread Dmitry V. Levin
This should never have been defined in the arch tree to begin with, and now uapi/linux/audit.h header is going to use EM_NDS32 in order to define AUDIT_ARCH_NDS32 which is needed to implement syscall_get_arch() which in turn is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO

[PATCH 09/14] nds32: define syscall_get_arch()

2019-02-27 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Acked-by

[PATCH 10/14] nios2: define syscall_get_arch()

2019-02-27 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Acked-by

[PATCH 12/14] Move EM_UNICORE to uapi/linux/elf-em.h

2019-02-27 Thread Dmitry V. Levin
This should never have been defined in the arch tree to begin with, and now uapi/linux/audit.h header is going to use EM_UNICORE in order to define AUDIT_ARCH_UNICORE which is needed to implement syscall_get_arch() which in turn is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_I

[PATCH 13/14] unicore32: define syscall_get_arch()

2019-02-27 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Acked-by

Re: [PATCH 2/2] arm64: allwinner: a64: Add Oceanic A64-5inMFD initial support

2019-02-27 Thread Maxime Ripard
Hi, On Tue, Feb 26, 2019 at 11:32:40AM +0530, Jagan Teki wrote: > Oceanic A64-5inMFD is a 5 inch Multi function display baseboard > designed to mount SoPine SOM. > > Key features: > - Allwinner A64 Cortex-A53 > - Mali-400MP2 GPU > - AXP803 PMIC > - 2GB DDR3 RAM > - SD Slot > - SPI-NOR flash > - E

<    1   2   3   4   5   6   7   8   9   >