[GIT PULL] Staging/IIO driver fixes for 5.0-rc6

2019-02-08 Thread Greg KH
The following changes since commit f17b5f06cb92ef2250513a1e154c47b78df07d40: Linux 5.0-rc4 (2019-01-27 15:18:05 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git tags/staging-5.0-rc6 for you to fetch changes up to 6d923f8fe821c0

Re: [PATCH v2 0/7] binder: eliminate use of vmalloc space for binder buffers

2019-02-08 Thread Greg KH
On Wed, Jan 30, 2019 at 02:46:48PM -0800, Todd Kjos wrote: > Binder buffers have always been mapped into kernel space > via map_kernel_range_noflush() to allow the binder driver > to modify the buffer before posting to userspace for > processing. > > In recent Android releases, the number of long-

Re: [PATCH 2/2] staging: android: ashmem: Don't allow range_alloc() to fail.

2019-02-08 Thread Joel Fernandes
On Wed, Feb 06, 2019 at 08:45:32AM +0900, Tetsuo Handa wrote: > Joel Fernandes wrote: > > On Tue, Feb 05, 2019 at 07:28:41PM +0900, Tetsuo Handa wrote: > > > ashmem_pin() is calling range_shrink() without checking whether > > > range_alloc() succeeded. Since memory allocation fault injection might

Re: [PATCH 2/3] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Tim Harvey
On Sun, Feb 3, 2019 at 11:48 AM Steve Longerbeam wrote: > > Pass v4l2 encoding enum to the ipu_ic task init functions, and add > support for the BT.709 encoding and inverse encoding matrices. > > Reported-by: Tim Harvey > Signed-off-by: Steve Longerbeam > --- > drivers/gpu/ipu-v3/ipu-ic.c

Re: [PATCH v2 0/7] binder: eliminate use of vmalloc space for binder buffers

2019-02-08 Thread Todd Kjos
On Fri, Feb 8, 2019 at 3:26 AM Greg KH wrote: > > On Wed, Jan 30, 2019 at 02:46:48PM -0800, Todd Kjos wrote: > > Binder buffers have always been mapped into kernel space > > via map_kernel_range_noflush() to allow the binder driver > > to modify the buffer before posting to userspace for > > proce

[PATCH v3 2/7] binder: add functions to copy to/from binder buffers

2019-02-08 Thread Todd Kjos
Avoid vm_area when copying to or from binder buffers. Instead, new copy functions are added that copy from kernel space to binder buffer space. These use kmap_atomic() and kunmap_atomic() to create temporary mappings and then memcpy() is used to copy within that page. Also, kmap_atomic() / kunmap_

[PATCH v3 3/7] binder: add function to copy binder object from buffer

2019-02-08 Thread Todd Kjos
When creating or tearing down a transaction, the binder driver examines objects in the buffer and takes appropriate action. To do this without needing to dereference pointers into the buffer, the local copies of the objects are needed. This patch introduces a function to validate and copy binder ob

[PATCH v3 5/7] binder: remove kernel vm_area for buffer space

2019-02-08 Thread Todd Kjos
Remove the kernel's vm_area and the code that maps buffer pages into it. Signed-off-by: Todd Kjos --- drivers/android/binder_alloc.c | 40 ++ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_all

[PATCH v3 6/7] binder: remove user_buffer_offset

2019-02-08 Thread Todd Kjos
Remove user_buffer_offset since there is no kernel buffer pointer anymore. Signed-off-by: Todd Kjos --- v2: remove casts as suggested by Dan Carpenter drivers/android/binder.c | 39 ++ drivers/android/binder_alloc.c | 16 ++ drivers/android/bind

[PATCH v3 1/7] binder: create userspace-to-binder-buffer copy function

2019-02-08 Thread Todd Kjos
The binder driver uses a vm_area to map the per-process binder buffer space. For 32-bit android devices, this is now taking too much vmalloc space. This patch removes the use of vm_area when copying the transaction data from the sender to the buffer space. Instead of using copy_from_user() for mult

[PATCH v3 4/7] binder: avoid kernel vm_area for buffer fixups

2019-02-08 Thread Todd Kjos
Refactor the functions to validate and fixup struct binder_buffer pointer objects to avoid using vm_area pointers. Instead copy to/from kernel space using binder_alloc_copy_to_buffer() and binder_alloc_copy_from_buffer(). The following functions were refactored: refactor binder_validate_pt

[PATCH v3 7/7] binder: use userspace pointer as base of buffer space

2019-02-08 Thread Todd Kjos
Now that alloc->buffer points to the userspace vm_area rename buffer->data to buffer->user_data and rename local pointers that hold user addresses. Also use the "__user" tag to annotate all user pointers so sparse can flag cases where user pointer vaues are copied to kernel pointers. Refactor code

[PATCH v3 0/7] binder: eliminate use of vmalloc space for binder buffers

2019-02-08 Thread Todd Kjos
Binder buffers have always been mapped into kernel space via map_kernel_range_noflush() to allow the binder driver to modify the buffer before posting to userspace for processing. In recent Android releases, the number of long-running binder processes has increased to the point that for 32-bit sys

Re: [PATCH 2/3] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
On 2/8/19 8:24 AM, Tim Harvey wrote: On Sun, Feb 3, 2019 at 11:48 AM Steve Longerbeam wrote: Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- driv

[PATCH v2 4/4] media: imx: Allow BT.709 encoding for IC routes

2019-02-08 Thread Steve Longerbeam
From: Steve Longerbeam The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - move ic_route check above default colorimetry checks,

[PATCH v2 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
From: Steve Longerbeam Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - only return "Unsupported YCbCr encoding" error if inf != outf,

[PATCH v3 4/4] media: imx: Allow BT.709 encoding for IC routes

2019-02-08 Thread Steve Longerbeam
The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - move ic_route check above default colorimetry checks, and fill default color

[PATCH v3 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - only return "Unsupported YCbCr encoding" error if inf != outf, since if inf == outf, th

Re: [GIT PULL] Staging/IIO driver fixes for 5.0-rc6

2019-02-08 Thread pr-tracker-bot
The pull request you sent on Fri, 8 Feb 2019 09:38:35 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > tags/staging-5.0-rc6 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e464f50c057a1fbefae6c6078f9bd5511f84f199 Thank you! -- Deet-doot-do

[PATCH 0/2] Drivers: hv: vmbus: Fix sysfs functions that display monitor id and page data

2019-02-08 Thread Kimberly Brown
Some of the monitor id and monitor page data sysfs files display incorrect data. This patchset provides the following changes: 1) Change the monitor_pages index in server_monitor_pending_show() to '0', which is the correct index for the server. 2) If monitor pages are not allocated to a channel,

[PATCH 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-08 Thread Kimberly Brown
Change the monitor_pages index in server_monitor_pending_show() to '0'. '0' is the correct monitor_pages index for the server. A comment for the monitor_pages field in the vmbus_connection struct definition indicates that the 1st page is for parent->child notifications. In addition, the server_moni

[PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-08 Thread Kimberly Brown
If monitor pages are not allocated to a channel, the channel does not have a valid monitor id or valid monitor page data. In these cases, some of the "_show" functions display incorrect data. The "_show" functions that display monitor page data access and display data that is beyond the bounds of t

Re: [PATCH 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-08 Thread Stephen Hemminger
On Fri, 8 Feb 2019 04:58:52 -0500 Kimberly Brown wrote: > Change the monitor_pages index in server_monitor_pending_show() to '0'. > '0' is the correct monitor_pages index for the server. A comment for the > monitor_pages field in the vmbus_connection struct definition indicates > that the 1st pag

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-08 Thread Stephen Hemminger
On Fri, 8 Feb 2019 05:01:12 -0500 Kimberly Brown wrote: You are right, the current behavior is broken. It would be good to add a description of under what conditions monitor is not used. Is this some part of a project emulating Hyper-V? > + > + if (!hv_dev->channel->offermsg.monitor_allocat

Re: [PATCH v3 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Tim Harvey
On Fri, Feb 8, 2019 at 11:28 AM Steve Longerbeam wrote: > > Pass v4l2 encoding enum to the ipu_ic task init functions, and add > support for the BT.709 encoding and inverse encoding matrices. > > Reported-by: Tim Harvey > Signed-off-by: Steve Longerbeam > --- > Changes in v2: > - only return "Un

[PATCH net-next 00/16] net: Remove switchdev_ops

2019-02-08 Thread Florian Fainelli
Hi all, This patch series finishes by the removal of switchdev_ops. To get there we need to do a few things: - get rid of the one and only call to switchdev_port_attr_get() which is used to fetch the device's bridge port flags capabilities, instead we can just check what flags are being progr

[PATCH net-next 04/16] net: dsa: Add setter for SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

2019-02-08 Thread Florian Fainelli
In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, add support for a function that processes the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute and returns not supported for any flag set, since DSA does not currently support toggling those bridge port attributes (yet). Signed-

[PATCH net-next 06/16] net: bridge: Stop calling switchdev_port_attr_get()

2019-02-08 Thread Florian Fainelli
Now that all switchdev drivers have been converted to checking the bridge port flags during the prepare phase of the switchdev_port_attr_set(), we can move straight to trying to set the desired flag through SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS. Signed-off-by: Florian Fainelli --- net/bridge/br_sw

[PATCH net-next 05/16] rocker: Check bridge flags during prepare phase

2019-02-08 Thread Florian Fainelli
In preparation for getting rid of switchdev_port_attr_get(), have rocker check for the bridge flags being set through switchdev_port_attr_set() with the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute identifier. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/rocker/rocker_main.c | 40 ++

[PATCH net-next 02/16] mlxsw: spectrum: Check bridge flags during prepare phase

2019-02-08 Thread Florian Fainelli
In preparation for getting rid of switchdev_port_attr_get(), have mlxsw check for the bridge flags being set through switchdev_port_attr_set() with the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute identifier. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switc

[PATCH net-next 03/16] staging: fsl-dpaa2: ethsw: Check bridge port flags during set

2019-02-08 Thread Florian Fainelli
In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, have ethsw check that the bridge port flags that are being set are supported. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH net-next 09/16] switchdev: Add SWITCHDEV_PORT_ATTR_SET

2019-02-08 Thread Florian Fainelli
In preparation for allowing switchdev enabled drivers to veto specific attribute settings from within the context of the caller, introduce a new switchdev notifier type for port attributes. Suggested-by: Ido Schimmel Signed-off-by: Florian Fainelli --- include/net/switchdev.h | 9 + 1 f

[PATCH net-next 08/16] net: Get rid of switchdev_port_attr_get()

2019-02-08 Thread Florian Fainelli
With the bridge no longer calling switchdev_port_attr_get() to obtain the supported bridge port flags from a driver but instead trying to set the bridge port flags directly and relying on driver to reject unsupported configurations, we can effectively get rid of switchdev_port_attr_get() entirely s

[PATCH net-next 01/16] Documentation: networking: switchdev: Update port parent ID section

2019-02-08 Thread Florian Fainelli
Update the section about switchdev drivers having to implement a switchdev_port_attr_get() function to return SWITCHDEV_ATTR_ID_PORT_PARENT_ID since that is no longer valid after commit bccb30254a4a ("net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID"). Fixes: bccb30254a4a ("net: Get rid of SWITCHD

[PATCH net-next 14/16] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-08 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare ethsw to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing swdev_port_attr_set() call

[PATCH net-next 07/16] net: Remove SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT

2019-02-08 Thread Florian Fainelli
Now that we have converted the bridge code and the drivers to check for bridge port(s) flags at the time we try to set them, there is no need for a get() -> set() sequence anymore and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT therefore becomes unused. Signed-off-by: Florian Fainelli --- .../ne

[PATCH net-next 12/16] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-08 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare mlxsw to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing mlxsw_sp_port_attr_set() c

[PATCH net-next 10/16] rocker: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-08 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare rocker to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing rocker_port_attr_set call

[PATCH net-next 13/16] net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-08 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare ocelot to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing ocelot_port_attr_set() ca

[PATCH net-next 15/16] net: switchdev: Replace port attr set SDO with a notification

2019-02-08 Thread Florian Fainelli
Drop switchdev_ops.switchdev_port_attr_set. Drop the uses of this field from all clients, which were migrated to use switchdev notification in the previous patches. Add a new function switchdev_port_attr_notify() that sends the switchdev notifications SWITCHDEV_PORT_ATTR_SET. Drop __switchdev_por

[PATCH net-next 11/16] net: dsa: Handle SWITCHDEV_PORT_ATTR_SET

2019-02-08 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare DSA to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing dsa_slave_port_attr_set() ca

[PATCH net-next 16/16] net: Remove switchdev_ops

2019-02-08 Thread Florian Fainelli
Now that we have converted all possible callers to using a switchdev notifier for attributes we do not have a need for implementing switchdev_ops anymore, and this can be removed from all drivers the net_device structure. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mellanox/mlxsw/sp

Re: [PATCH net-next 15/16] net: switchdev: Replace port attr set SDO with a notification

2019-02-08 Thread Florian Fainelli
On 2/8/19 4:32 PM, Florian Fainelli wrote: > Drop switchdev_ops.switchdev_port_attr_set. Drop the uses of this field > from all clients, which were migrated to use switchdev notification in > the previous patches. > > Add a new function switchdev_port_attr_notify() that sends the switchdev > notif

Re: [PATCH v3 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
On 2/8/19 4:20 PM, Tim Harvey wrote: On Fri, Feb 8, 2019 at 11:28 AM Steve Longerbeam wrote: if (inf == outf) params = &ic_csc_identity; else if (inf == IPUV3_COLORSPACE_YUV) - params = &ic_csc_ycbcr2rgb_bt601; + params = &ic_csc

[PATCH v4 4/4] media: imx: Allow BT.709 encoding for IC routes

2019-02-08 Thread Steve Longerbeam
The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - move ic_route check above default colorimetry checks, and fill default color

[PATCH v4 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v4: - fix compile error. Chnges in v3: - none. Changes in v2: - only return "Unsupported YCbCr

Re: [PATCH 2/2] staging: android: ashmem: Don't allow range_alloc() to fail.

2019-02-08 Thread Tetsuo Handa
On 2019/02/08 23:45, Joel Fernandes wrote: > On Wed, Feb 06, 2019 at 08:45:32AM +0900, Tetsuo Handa wrote: >> Joel Fernandes wrote: >>> On Tue, Feb 05, 2019 at 07:28:41PM +0900, Tetsuo Handa wrote: ashmem_pin() is calling range_shrink() without checking whether range_alloc() succeeded. Si