Re: [PATCH] media: vb2: Fix regression on poll() for RW mode

2016-04-22 Thread Hans Verkuil
On 04/22/2016 05:21 PM, Mauro Carvalho Chehab wrote: > Em Fri, 22 Apr 2016 16:56:00 +0200 > Hans Verkuil escreveu: > >> On 04/22/2016 04:48 PM, Mauro Carvalho Chehab wrote: >>> Em Fri, 22 Apr 2016 16:31:28 +0200 >>> Hans Verkuil escreveu: >>> On

Re: [PATCH] media: vb2: Fix regression on poll() for RW mode

2016-04-22 Thread Hans Verkuil
On 04/22/2016 05:21 PM, Mauro Carvalho Chehab wrote: > Em Fri, 22 Apr 2016 16:56:00 +0200 > Hans Verkuil escreveu: > >> On 04/22/2016 04:48 PM, Mauro Carvalho Chehab wrote: >>> Em Fri, 22 Apr 2016 16:31:28 +0200 >>> Hans Verkuil escreveu: >>> On 04/22/2016 04:21 PM, Mauro Carvalho

[PATCH v6 1/7] clk: ti: am335x/am4372: Add tbclk to pwm node

2016-04-22 Thread Franklin S Cooper Jr
Add tblck to the pwm nodes. This insures that the ehrpwm driver has access to the time-based clk. Do not remove similar entries for ehrpwm node. Later patches will switch from using ehrpwm node name to pwm. But to maintain ABI compatibility we shouldn't remove the old entries. Signed-off-by:

[PATCH v6 1/7] clk: ti: am335x/am4372: Add tbclk to pwm node

2016-04-22 Thread Franklin S Cooper Jr
Add tblck to the pwm nodes. This insures that the ehrpwm driver has access to the time-based clk. Do not remove similar entries for ehrpwm node. Later patches will switch from using ehrpwm node name to pwm. But to maintain ABI compatibility we shouldn't remove the old entries. Signed-off-by:

[PATCH v6 3/7] ARM: dts: am437x/am33xx/da850: Add new ECAP and EPWM bindings

2016-04-22 Thread Franklin S Cooper Jr
Switch to a new ECAP and EPWM bindings that doesn't depend on hwmod to provide the various required clocks. For AM437 and AM335x, add the required clocks explicitly to DT. The hwmod entries for ECAP and EPWM will be removed and this will prevent anything from breaking. Signed-off-by: Franklin S

[PATCH v6 3/7] ARM: dts: am437x/am33xx/da850: Add new ECAP and EPWM bindings

2016-04-22 Thread Franklin S Cooper Jr
Switch to a new ECAP and EPWM bindings that doesn't depend on hwmod to provide the various required clocks. For AM437 and AM335x, add the required clocks explicitly to DT. The hwmod entries for ECAP and EPWM will be removed and this will prevent anything from breaking. Signed-off-by: Franklin S

[PATCH v6 7/7] ARM: dts: DRA7: Add dt nodes for PWMSS

2016-04-22 Thread Franklin S Cooper Jr
From: Vignesh R Add PWMSS device tree nodes for DRA7 SoC family and add documentation for dt bindings. Signed-off-by: Vignesh R [fcoo...@ti.com: Add eCAP and use updated bindings for PWMSS and ePWM] Signed-off-by: Franklin S Cooper Jr ---

[PATCH v6 5/7] ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP and EPWM nodes

2016-04-22 Thread Franklin S Cooper Jr
Previous patches switched the ECAP and EPWM to use the new bindings. These bindings explicitly adds the various required clocks via DT rather than depending on hwmod. Therefore, it is safe to remove the hwmod entries since they are no longer needed. Signed-off-by: Franklin S Cooper Jr

[PATCH v6 7/7] ARM: dts: DRA7: Add dt nodes for PWMSS

2016-04-22 Thread Franklin S Cooper Jr
From: Vignesh R Add PWMSS device tree nodes for DRA7 SoC family and add documentation for dt bindings. Signed-off-by: Vignesh R [fcoo...@ti.com: Add eCAP and use updated bindings for PWMSS and ePWM] Signed-off-by: Franklin S Cooper Jr --- .../devicetree/bindings/pwm/pwm-tiecap.txt |

[PATCH v6 5/7] ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP and EPWM nodes

2016-04-22 Thread Franklin S Cooper Jr
Previous patches switched the ECAP and EPWM to use the new bindings. These bindings explicitly adds the various required clocks via DT rather than depending on hwmod. Therefore, it is safe to remove the hwmod entries since they are no longer needed. Signed-off-by: Franklin S Cooper Jr ---

[PATCH v6 2/7] pwm: pwm-tiehrpwm: Update dt binding document to use generic node name

2016-04-22 Thread Franklin S Cooper Jr
Now that the node name has been changed from ehrpwm to pwm the document should show this proper usage. Also change the unit address in the example from 0 to the proper physical address value that should be used. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring

[PATCH v6 2/7] pwm: pwm-tiehrpwm: Update dt binding document to use generic node name

2016-04-22 Thread Franklin S Cooper Jr
Now that the node name has been changed from ehrpwm to pwm the document should show this proper usage. Also change the unit address in the example from 0 to the proper physical address value that should be used. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring ---

[PATCH v6 4/7] pwms: pwm-ti*: Get the clock from the PWMSS parent when using old bindings

2016-04-22 Thread Franklin S Cooper Jr
When using the old eCAP and ePWM bindings for AM335x and AM437x the clock can be retrieved from the PWMSS parent. Newer bindings will insure that this clock is provided via device tree. Therefore, update this driver to support the newer and older bindings. In the case of the older binding being

[PATCH v6 0/7] ARM: dts: DRA7: Add dt nodes for PWMSS

2016-04-22 Thread Franklin S Cooper Jr
This patch series adds support for PWM for DRA7. The IP is the same as the one present in AM33XX and AM437XX. However, before doing so remove unnecessary hwmod entries for eCAP, ePWM and eQEP. The following are the biggest changes from v5 to v6: * Created two new bindings to allow ECAP and PWM

[PATCH v6 4/7] pwms: pwm-ti*: Get the clock from the PWMSS parent when using old bindings

2016-04-22 Thread Franklin S Cooper Jr
When using the old eCAP and ePWM bindings for AM335x and AM437x the clock can be retrieved from the PWMSS parent. Newer bindings will insure that this clock is provided via device tree. Therefore, update this driver to support the newer and older bindings. In the case of the older binding being

[PATCH v6 0/7] ARM: dts: DRA7: Add dt nodes for PWMSS

2016-04-22 Thread Franklin S Cooper Jr
This patch series adds support for PWM for DRA7. The IP is the same as the one present in AM33XX and AM437XX. However, before doing so remove unnecessary hwmod entries for eCAP, ePWM and eQEP. The following are the biggest changes from v5 to v6: * Created two new bindings to allow ECAP and PWM

[PATCH v6 6/7] ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries

2016-04-22 Thread Franklin S Cooper Jr
Devices that utilize the OCP registers and/or PRCM registers and register bit fields should be modeled using hwmod. Since eQEP, ePWM and eCAP don't fall under this category, remove their hwmod entries. Instead these clocks simply use the clock that is passed through by its parent PWMSS.

[PATCH v6 6/7] ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries

2016-04-22 Thread Franklin S Cooper Jr
Devices that utilize the OCP registers and/or PRCM registers and register bit fields should be modeled using hwmod. Since eQEP, ePWM and eCAP don't fall under this category, remove their hwmod entries. Instead these clocks simply use the clock that is passed through by its parent PWMSS.

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-22 Thread Thomas Gleixner
On Fri, 22 Apr 2016, Lianwei Wang wrote: > On Thu, Apr 21, 2016 at 3:50 AM, Peter Zijlstra wrote: > > On Wed, Apr 20, 2016 at 09:56:07PM -0700, Lianwei Wang wrote: > >> Currently it just print a warning message but did not > >> reset cpu_hotplug_disabled when the

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-22 Thread Thomas Gleixner
On Fri, 22 Apr 2016, Lianwei Wang wrote: > On Thu, Apr 21, 2016 at 3:50 AM, Peter Zijlstra wrote: > > On Wed, Apr 20, 2016 at 09:56:07PM -0700, Lianwei Wang wrote: > >> Currently it just print a warning message but did not > >> reset cpu_hotplug_disabled when the enable/disable is > >>

Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}()

2016-04-22 Thread Boqun Feng
On Fri, Apr 22, 2016 at 11:04:31AM +0200, Peter Zijlstra wrote: > Implement FETCH-OP atomic primitives, these are very similar to the > existing OP-RETURN primitives we already have, except they return the > value of the atomic variable _before_ modification. > > This is especially useful for

Re: [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}()

2016-04-22 Thread Boqun Feng
On Fri, Apr 22, 2016 at 11:04:31AM +0200, Peter Zijlstra wrote: > Implement FETCH-OP atomic primitives, these are very similar to the > existing OP-RETURN primitives we already have, except they return the > value of the atomic variable _before_ modification. > > This is especially useful for

Re: [PATCH] regulator: arizona-ldo1: Only enable status change if we have LDOENA

2016-04-22 Thread Richard Fitzgerald
On 22/04/16 16:04, Mark Brown wrote: On Fri, Apr 22, 2016 at 02:43:28PM +0100, Richard Fitzgerald wrote: The driver was hardcoding REGULATOR_CHANGE_STATUS on the regulator which made the regulator core assume that it can be powered off. The power state of the regulator is controlled by the

Re: [PATCH] regulator: arizona-ldo1: Only enable status change if we have LDOENA

2016-04-22 Thread Richard Fitzgerald
On 22/04/16 16:04, Mark Brown wrote: On Fri, Apr 22, 2016 at 02:43:28PM +0100, Richard Fitzgerald wrote: The driver was hardcoding REGULATOR_CHANGE_STATUS on the regulator which made the regulator core assume that it can be powered off. The power state of the regulator is controlled by the

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-22 Thread Lianwei Wang
On Thu, Apr 21, 2016 at 3:50 AM, Peter Zijlstra wrote: > On Wed, Apr 20, 2016 at 09:56:07PM -0700, Lianwei Wang wrote: >> Currently it just print a warning message but did not >> reset cpu_hotplug_disabled when the enable/disable is >> unbalanced. The unbalanced

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-22 Thread Lianwei Wang
On Thu, Apr 21, 2016 at 3:50 AM, Peter Zijlstra wrote: > On Wed, Apr 20, 2016 at 09:56:07PM -0700, Lianwei Wang wrote: >> Currently it just print a warning message but did not >> reset cpu_hotplug_disabled when the enable/disable is >> unbalanced. The unbalanced enable/disable will lead >> the

Re: [PATCH v2.1 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding

2016-04-22 Thread Rob Herring
On Thu, Apr 21, 2016 at 12:20 PM, Bjorn Andersson wrote: > From: Bjorn Andersson > > The document defines the binding for a component that loads firmware for > and boots the Qualcomm WCNSS core. > > Signed-off-by: Bjorn Andersson

Re: [PATCH v2.1 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding

2016-04-22 Thread Rob Herring
On Thu, Apr 21, 2016 at 12:20 PM, Bjorn Andersson wrote: > From: Bjorn Andersson > > The document defines the binding for a component that loads firmware for > and boots the Qualcomm WCNSS core. > > Signed-off-by: Bjorn Andersson > Signed-off-by: Bjorn Andersson > --- > > Rob, > > I got your

[PATCH] tools: hv: lsvmbus: add pci pass-through UUID

2016-04-22 Thread Vitaly Kuznetsov
lsvmbus keeps its own copy of all VMBus UUIDs, add PCIe pass-through device there to not report 'Unknown' for such devices. Signed-off-by: Vitaly Kuznetsov --- tools/hv/lsvmbus | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus index

[PATCH] tools: hv: lsvmbus: add pci pass-through UUID

2016-04-22 Thread Vitaly Kuznetsov
lsvmbus keeps its own copy of all VMBus UUIDs, add PCIe pass-through device there to not report 'Unknown' for such devices. Signed-off-by: Vitaly Kuznetsov --- tools/hv/lsvmbus | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus index 162a378..e223284 100644

Re: [PATCH V6 00/13] Support for generic ACPI based PCI host controller

2016-04-22 Thread Robert Richter
On 15.04.16 19:06:35, Tomasz Nowicki wrote: > From the functionality point of view this series might be split into the > following logic parts: > 1. Necessary fixes as the preparation for using driver on ARM64. > 2. New ECAM API and update for users of the pci-host-common API > 3. Use new MCFG

Re: [PATCH V6 00/13] Support for generic ACPI based PCI host controller

2016-04-22 Thread Robert Richter
On 15.04.16 19:06:35, Tomasz Nowicki wrote: > From the functionality point of view this series might be split into the > following logic parts: > 1. Necessary fixes as the preparation for using driver on ARM64. > 2. New ECAM API and update for users of the pci-host-common API > 3. Use new MCFG

Re: [PATCH v1 4/5] perf: Introduce address range filtering

2016-04-22 Thread Alexander Shishkin
Peter Zijlstra writes: > On Thu, Apr 21, 2016 at 06:17:02PM +0300, Alexander Shishkin wrote: >> +/* otherwise, fall through to the cross-call */ >> +} >> + >> +/* matches smp_wmb() in event_sched_in() */ >> +smp_rmb();

Re: [PATCH v1 4/5] perf: Introduce address range filtering

2016-04-22 Thread Alexander Shishkin
Peter Zijlstra writes: > On Thu, Apr 21, 2016 at 06:17:02PM +0300, Alexander Shishkin wrote: >> +/* otherwise, fall through to the cross-call */ >> +} >> + >> +/* matches smp_wmb() in event_sched_in() */ >> +smp_rmb(); >> + >> +

Re: [PATCH v6 1/2] Documentation: DT: dma: Add Xilinx zynqmp dma device tree binding documentation

2016-04-22 Thread Rob Herring
On Fri, Apr 22, 2016 at 12:36 AM, Appana Durga Kedareswara Rao wrote: > Hi Rob, > > Thanks for the review... > >> -Original Message- >> From: Rob Herring [mailto:r...@kernel.org] >> Sent: Thursday, April 21, 2016 7:12 PM >> To: Appana Durga Kedareswara

Re: [PATCH v6 1/2] Documentation: DT: dma: Add Xilinx zynqmp dma device tree binding documentation

2016-04-22 Thread Rob Herring
On Fri, Apr 22, 2016 at 12:36 AM, Appana Durga Kedareswara Rao wrote: > Hi Rob, > > Thanks for the review... > >> -Original Message- >> From: Rob Herring [mailto:r...@kernel.org] >> Sent: Thursday, April 21, 2016 7:12 PM >> To: Appana Durga Kedareswara Rao >> Cc:

Re: [PATCH 2/2] MIPS: Force CPUs to lose FP context during mode switches

2016-04-22 Thread Maciej W. Rozycki
On Thu, 21 Apr 2016, Paul Burton wrote: > Fix this by broadcasting an IPI if other CPUs may have live FP context > for an affected thread, with a handler causing those CPUs to relinquish > their FPU ownership. Threads will then be allowed to continue running > but will stall on the

Re: [PATCH 2/2] MIPS: Force CPUs to lose FP context during mode switches

2016-04-22 Thread Maciej W. Rozycki
On Thu, 21 Apr 2016, Paul Burton wrote: > Fix this by broadcasting an IPI if other CPUs may have live FP context > for an affected thread, with a handler causing those CPUs to relinquish > their FPU ownership. Threads will then be allowed to continue running > but will stall on the

Re: [PATCH 0/5] userfaultfd: extension for non cooperative uffd usage

2016-04-22 Thread Andrea Arcangeli
Hello Pavel and Mike, On Wed, Apr 20, 2016 at 12:44:48PM +0300, Pavel Emelyanov wrote: > On 03/20/2016 03:42 PM, Mike Rapoport wrote: > > Hi, > > > > This set is to address the issues that appear in userfaultfd usage > > scenarios when the task monitoring the uffd and the mm-owner do not > >

Re: [PATCH 0/5] userfaultfd: extension for non cooperative uffd usage

2016-04-22 Thread Andrea Arcangeli
Hello Pavel and Mike, On Wed, Apr 20, 2016 at 12:44:48PM +0300, Pavel Emelyanov wrote: > On 03/20/2016 03:42 PM, Mike Rapoport wrote: > > Hi, > > > > This set is to address the issues that appear in userfaultfd usage > > scenarios when the task monitoring the uffd and the mm-owner do not > >

Re: [RFC][PATCH 3/3] locking,arm64: Introduce cmpwait()

2016-04-22 Thread Boqun Feng
On Tue, Apr 12, 2016 at 05:59:41PM +0100, Will Deacon wrote: [...] > > +static inline void __cmpwait(volatile void *ptr, unsigned long val, int > > size) > > +{ > > + switch (size) { > > + case 1: return __cmpwait_case_1(ptr, val); > > + case 2: return __cmpwait_case_2(ptr, val); > > +

Re: [RFC][PATCH 3/3] locking,arm64: Introduce cmpwait()

2016-04-22 Thread Boqun Feng
On Tue, Apr 12, 2016 at 05:59:41PM +0100, Will Deacon wrote: [...] > > +static inline void __cmpwait(volatile void *ptr, unsigned long val, int > > size) > > +{ > > + switch (size) { > > + case 1: return __cmpwait_case_1(ptr, val); > > + case 2: return __cmpwait_case_2(ptr, val); > > +

Re: [PATCH V6 08/13] PCI: generic, thunder: update to use generic ECAM API

2016-04-22 Thread David Daney
On 04/22/2016 07:30 AM, Jon Masters wrote: On 04/21/2016 06:08 AM, Tomasz Nowicki wrote: On 21.04.2016 11:36, Arnd Bergmann wrote: On Thursday 21 April 2016 11:28:15 Tomasz Nowicki wrote: On 19.04.2016 15:06, Arnd Bergmann wrote: On Monday 18 April 2016 21:31:54 Tomasz Nowicki wrote:

Re: [PATCH V6 08/13] PCI: generic, thunder: update to use generic ECAM API

2016-04-22 Thread David Daney
On 04/22/2016 07:30 AM, Jon Masters wrote: On 04/21/2016 06:08 AM, Tomasz Nowicki wrote: On 21.04.2016 11:36, Arnd Bergmann wrote: On Thursday 21 April 2016 11:28:15 Tomasz Nowicki wrote: On 19.04.2016 15:06, Arnd Bergmann wrote: On Monday 18 April 2016 21:31:54 Tomasz Nowicki wrote:

Re: [PATCH 1/2] MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...)

2016-04-22 Thread Maciej W. Rozycki
On Thu, 21 Apr 2016, Paul Burton wrote: > Whilst a PR_SET_FP_MODE prctl is performed there are decisions made > based upon whether the task is executing on the current CPU. This may > change if we're preempted, so disable preemption to avoid such changes > for the lifetime of the mode switch.

Re: [PATCH 1/2] MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...)

2016-04-22 Thread Maciej W. Rozycki
On Thu, 21 Apr 2016, Paul Burton wrote: > Whilst a PR_SET_FP_MODE prctl is performed there are decisions made > based upon whether the task is executing on the current CPU. This may > change if we're preempted, so disable preemption to avoid such changes > for the lifetime of the mode switch.

Re: [PATCH 12/25] arm64: compat: change config dependences to aarch32

2016-04-22 Thread Catalin Marinas
On Wed, Apr 06, 2016 at 01:08:34AM +0300, Yury Norov wrote: > From: Bamvor Jian Zhang > > With the patches of ILP32, COMPAT is not equivalent to AARCH32 in EL0. > This patch fix this by updating the dependency from COMPAT to > AARCH32_EL0 for ARMV8_DEPRECATED and

Re: [PATCH 12/25] arm64: compat: change config dependences to aarch32

2016-04-22 Thread Catalin Marinas
On Wed, Apr 06, 2016 at 01:08:34AM +0300, Yury Norov wrote: > From: Bamvor Jian Zhang > > With the patches of ILP32, COMPAT is not equivalent to AARCH32 in EL0. > This patch fix this by updating the dependency from COMPAT to > AARCH32_EL0 for ARMV8_DEPRECATED and ARM64_ERRATUM_845719. > >

Re: [PATCH] MIPS: Allow R6 compact branch policy to be left unspecified

2016-04-22 Thread Maciej W. Rozycki
On Fri, 22 Apr 2016, Paul Burton wrote: > It turns out that some toolchains which support MIPS R6 don't support > the -mcompact-branches flag to specify compact branch behaviour. Default > to not providing the -mcompact-branch option to the compiler such that > we can build with such toolchains.

Re: [PATCH] MIPS: Allow R6 compact branch policy to be left unspecified

2016-04-22 Thread Maciej W. Rozycki
On Fri, 22 Apr 2016, Paul Burton wrote: > It turns out that some toolchains which support MIPS R6 don't support > the -mcompact-branches flag to specify compact branch behaviour. Default > to not providing the -mcompact-branch option to the compiler such that > we can build with such toolchains.

[PATCH v3 00/21] Support fuse mounts in user namespaces

2016-04-22 Thread Seth Forshee
Hi Eric, Sorry that it's taken a while to get this update sent out. In part that's because of a few problems I found, which resulted in some new patches. I wanted to point out one problem in particular because I'm not fully settled on the solution. It turns out that for the sysfs and cgroup

[PATCH v3 02/21] fs: Remove check of s_user_ns for existing mounts in fs_fully_visible()

2016-04-22 Thread Seth Forshee
fs_fully_visible() ignores MNT_LOCK_NODEV when FS_USERS_DEV_MOUNT is not set for the filesystem, but there is a bug in the logic that may cause mounting to fail. It is doing this only when the existing mount is not in init_user_ns but should check the new mount instead. But the new mount is always

[PATCH v3 02/21] fs: Remove check of s_user_ns for existing mounts in fs_fully_visible()

2016-04-22 Thread Seth Forshee
fs_fully_visible() ignores MNT_LOCK_NODEV when FS_USERS_DEV_MOUNT is not set for the filesystem, but there is a bug in the logic that may cause mounting to fail. It is doing this only when the existing mount is not in init_user_ns but should check the new mount instead. But the new mount is always

[PATCH v3 00/21] Support fuse mounts in user namespaces

2016-04-22 Thread Seth Forshee
Hi Eric, Sorry that it's taken a while to get this update sent out. In part that's because of a few problems I found, which resulted in some new patches. I wanted to point out one problem in particular because I'm not fully settled on the solution. It turns out that for the sysfs and cgroup

[PATCH v3 06/21] fs: Treat foreign mounts as nosuid

2016-04-22 Thread Seth Forshee
From: Andy Lutomirski If a process gets access to a mount from a different user namespace, that process should not be able to take advantage of setuid files or selinux entrypoints from that filesystem. Prevent this by treating mounts from other mount namespaces and those

[PATCH v3 05/21] block_dev: Check permissions towards block device inode when mounting

2016-04-22 Thread Seth Forshee
Unprivileged users should not be able to mount block devices when they lack sufficient privileges towards the block device inode. Update blkdev_get_by_path() to validate that the user has the required access to the inode at the specified path. The check will be skipped for CAP_SYS_ADMIN, so

[PATCH v3 04/21] block_dev: Support checking inode permissions in lookup_bdev()

2016-04-22 Thread Seth Forshee
When looking up a block device by path no permission check is done to verify that the user has access to the block device inode at the specified path. In some cases it may be necessary to check permissions towards the inode, such as allowing unprivileged users to mount block devices in user

[PATCH v3 09/21] Smack: Handle labels consistently in untrusted mounts

2016-04-22 Thread Seth Forshee
The SMACK64, SMACK64EXEC, and SMACK64MMAP labels are all handled differently in untrusted mounts. This is confusing and potentically problematic. Change this to handle them all the same way that SMACK64 is currently handled; that is, read the label from disk and check it at use time. For SMACK64

[PATCH v3 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces

2016-04-22 Thread Seth Forshee
Both of these filesystems already have use cases for mounting the same super block from multiple user namespaces. For sysfs this happens when using criu for snapshotting a container, where sysfs is mounted in the containers network ns but the hosts user ns. The cgroup filesystem shares the same

Re: [PATCH 2/2] genirq: Add error code reporting to irq_{reserve,destroy}_ipi

2016-04-22 Thread Matt Redfearn
On Fri, Apr 22, 2016 at 05:35:46PM +0200, Thomas Gleixner wrote: > On Fri, 22 Apr 2016, Matt Redfearn wrote: > > > Make these functions return appropriate error codes when something goes > > wrong. > > And the reason for this change is? Hi Thomas, Mainly for irq_destroy_ipi, where the first

[PATCH v3 06/21] fs: Treat foreign mounts as nosuid

2016-04-22 Thread Seth Forshee
From: Andy Lutomirski If a process gets access to a mount from a different user namespace, that process should not be able to take advantage of setuid files or selinux entrypoints from that filesystem. Prevent this by treating mounts from other mount namespaces and those not owned by

[PATCH v3 05/21] block_dev: Check permissions towards block device inode when mounting

2016-04-22 Thread Seth Forshee
Unprivileged users should not be able to mount block devices when they lack sufficient privileges towards the block device inode. Update blkdev_get_by_path() to validate that the user has the required access to the inode at the specified path. The check will be skipped for CAP_SYS_ADMIN, so

[PATCH v3 04/21] block_dev: Support checking inode permissions in lookup_bdev()

2016-04-22 Thread Seth Forshee
When looking up a block device by path no permission check is done to verify that the user has access to the block device inode at the specified path. In some cases it may be necessary to check permissions towards the inode, such as allowing unprivileged users to mount block devices in user

[PATCH v3 09/21] Smack: Handle labels consistently in untrusted mounts

2016-04-22 Thread Seth Forshee
The SMACK64, SMACK64EXEC, and SMACK64MMAP labels are all handled differently in untrusted mounts. This is confusing and potentically problematic. Change this to handle them all the same way that SMACK64 is currently handled; that is, read the label from disk and check it at use time. For SMACK64

[PATCH v3 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces

2016-04-22 Thread Seth Forshee
Both of these filesystems already have use cases for mounting the same super block from multiple user namespaces. For sysfs this happens when using criu for snapshotting a container, where sysfs is mounted in the containers network ns but the hosts user ns. The cgroup filesystem shares the same

Re: [PATCH 2/2] genirq: Add error code reporting to irq_{reserve,destroy}_ipi

2016-04-22 Thread Matt Redfearn
On Fri, Apr 22, 2016 at 05:35:46PM +0200, Thomas Gleixner wrote: > On Fri, 22 Apr 2016, Matt Redfearn wrote: > > > Make these functions return appropriate error codes when something goes > > wrong. > > And the reason for this change is? Hi Thomas, Mainly for irq_destroy_ipi, where the first

[PATCH v3 07/21] selinux: Add support for unprivileged mounts from user namespaces

2016-04-22 Thread Seth Forshee
Security labels from unprivileged mounts in user namespaces must be ignored. Force superblocks from user namespaces whose labeling behavior is to use xattrs to use mountpoint labeling instead. For the mountpoint label, default to converting the current task context into a form suitable for file

[PATCH v3 16/21] fs: Allow superblock owner to access do_remount_sb()

2016-04-22 Thread Seth Forshee
Superblock level remounts are currently restricted to global CAP_SYS_ADMIN, as is the path for changing the root mount to read only on umount. Loosen both of these permission checks to also allow CAP_SYS_ADMIN in any namespace which is privileged towards the userns which originally mounted the

[PATCH v3 07/21] selinux: Add support for unprivileged mounts from user namespaces

2016-04-22 Thread Seth Forshee
Security labels from unprivileged mounts in user namespaces must be ignored. Force superblocks from user namespaces whose labeling behavior is to use xattrs to use mountpoint labeling instead. For the mountpoint label, default to converting the current task context into a form suitable for file

[PATCH v3 16/21] fs: Allow superblock owner to access do_remount_sb()

2016-04-22 Thread Seth Forshee
Superblock level remounts are currently restricted to global CAP_SYS_ADMIN, as is the path for changing the root mount to read only on umount. Loosen both of these permission checks to also allow CAP_SYS_ADMIN in any namespace which is privileged towards the userns which originally mounted the

Re: [kbuild-all] mipsel-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal'

2016-04-22 Thread Maciej W. Rozycki
On Fri, 22 Apr 2016, Paul Burton wrote: > > In that case however it looks to me like these `-mcompact-branches=' > > options (all the three we support) need to be wrapped into `$(call > > cc-option,...)'. > > An alternative that it could be argued better fits the principle of > least surprise

[PATCH v3 10/21] fs: Check for invalid i_uid in may_follow_link()

2016-04-22 Thread Seth Forshee
Filesystem uids which don't map into a user namespace may result in inode->i_uid being INVALID_UID. A symlink and its parent could have different owners in the filesystem can both get mapped to INVALID_UID, which may result in following a symlink when this would not have otherwise been permitted

[PATCH v3 11/21] cred: Reject inodes with invalid ids in set_create_file_as()

2016-04-22 Thread Seth Forshee
Using INVALID_[UG]ID for the LSM file creation context doesn't make sense, so return an error if the inode passed to set_create_file_as() has an invalid id. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn --- kernel/cred.c | 2 ++ 1

[PATCH v3 10/21] fs: Check for invalid i_uid in may_follow_link()

2016-04-22 Thread Seth Forshee
Filesystem uids which don't map into a user namespace may result in inode->i_uid being INVALID_UID. A symlink and its parent could have different owners in the filesystem can both get mapped to INVALID_UID, which may result in following a symlink when this would not have otherwise been permitted

[PATCH v3 11/21] cred: Reject inodes with invalid ids in set_create_file_as()

2016-04-22 Thread Seth Forshee
Using INVALID_[UG]ID for the LSM file creation context doesn't make sense, so return an error if the inode passed to set_create_file_as() has an invalid id. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn --- kernel/cred.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/cred.c

Re: [kbuild-all] mipsel-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal'

2016-04-22 Thread Maciej W. Rozycki
On Fri, 22 Apr 2016, Paul Burton wrote: > > In that case however it looks to me like these `-mcompact-branches=' > > options (all the three we support) need to be wrapped into `$(call > > cc-option,...)'. > > An alternative that it could be argued better fits the principle of > least surprise

Re: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L

2016-04-22 Thread Mauro Carvalho Chehab
Em Fri, 22 Apr 2016 17:18:24 +0200 Hans Verkuil escreveu: > On 04/22/2016 05:07 PM, Nick Dyer wrote: > > On 22/04/2016 15:45, Mauro Carvalho Chehab wrote: > >> Em Fri, 22 Apr 2016 10:26:37 +0200 > >> Hans Verkuil escreveu: > >>> On 04/21/2016 11:31

Re: [PATCH net v2 2/3] drivers: net: cpsw: fix error messages when using phy-handle DT property

2016-04-22 Thread David Rivshin (Allworx)
On Fri, 22 Apr 2016 16:03:34 +0300 Grygorii Strashko wrote: > On 04/21/2016 09:26 PM, David Rivshin (Allworx) wrote: > > From: David Rivshin > > > > The phy-handle, phy_id, and fixed-link properties are mutually exclusive, > > and only one need

[PATCH v3 14/21] fs: Allow superblock owner to change ownership of inodes with unmappable ids

2016-04-22 Thread Seth Forshee
In a userns mount some on-disk inodes may have ids which do not map into s_user_ns, in which case the in-kernel inodes are owned by invalid users. The superblock owner should be able to change attributes of these inodes but cannot. However it is unsafe to grant the superblock owner privileged

[PATCH v3 18/21] fuse: Add support for pid namespaces

2016-04-22 Thread Seth Forshee
When the userspace process servicing fuse requests is running in a pid namespace then pids passed via the fuse fd are not being translated into that process' namespace. Translation is necessary for the pid to be useful to that process. Since no use case currently exists for changing namespaces

Re: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L

2016-04-22 Thread Mauro Carvalho Chehab
Em Fri, 22 Apr 2016 17:18:24 +0200 Hans Verkuil escreveu: > On 04/22/2016 05:07 PM, Nick Dyer wrote: > > On 22/04/2016 15:45, Mauro Carvalho Chehab wrote: > >> Em Fri, 22 Apr 2016 10:26:37 +0200 > >> Hans Verkuil escreveu: > >>> On 04/21/2016 11:31 AM, Nick Dyer wrote: > This is a

Re: [PATCH net v2 2/3] drivers: net: cpsw: fix error messages when using phy-handle DT property

2016-04-22 Thread David Rivshin (Allworx)
On Fri, 22 Apr 2016 16:03:34 +0300 Grygorii Strashko wrote: > On 04/21/2016 09:26 PM, David Rivshin (Allworx) wrote: > > From: David Rivshin > > > > The phy-handle, phy_id, and fixed-link properties are mutually exclusive, > > and only one need be specified. However if phy-handle was

[PATCH v3 14/21] fs: Allow superblock owner to change ownership of inodes with unmappable ids

2016-04-22 Thread Seth Forshee
In a userns mount some on-disk inodes may have ids which do not map into s_user_ns, in which case the in-kernel inodes are owned by invalid users. The superblock owner should be able to change attributes of these inodes but cannot. However it is unsafe to grant the superblock owner privileged

[PATCH v3 18/21] fuse: Add support for pid namespaces

2016-04-22 Thread Seth Forshee
When the userspace process servicing fuse requests is running in a pid namespace then pids passed via the fuse fd are not being translated into that process' namespace. Translation is necessary for the pid to be useful to that process. Since no use case currently exists for changing namespaces

Re: [PATCH 5/6] leds: pca963x: Inform the output that it is inverted

2016-04-22 Thread Olliver Schinagl
On April 22, 2016 3:09:35 PM CEST, Rob Herring wrote: >On Fri, Apr 22, 2016 at 7:38 AM, Olliver Schinagl >wrote: >> Hey Rob, >> >> On 21-04-16 17:07, Rob Herring wrote: >>> >>> On Tue, Apr 19, 2016 at 09:40:49AM +0200, Olliver Schinagl wrote: When

Re: [PATCH 5/6] leds: pca963x: Inform the output that it is inverted

2016-04-22 Thread Olliver Schinagl
On April 22, 2016 3:09:35 PM CEST, Rob Herring wrote: >On Fri, Apr 22, 2016 at 7:38 AM, Olliver Schinagl >wrote: >> Hey Rob, >> >> On 21-04-16 17:07, Rob Herring wrote: >>> >>> On Tue, Apr 19, 2016 at 09:40:49AM +0200, Olliver Schinagl wrote: When leds are connected in a totem-pole

[PATCH net-next 2/9] libnl: nla_put_le64(): align on a 64-bit area

2016-04-22 Thread Nicolas Dichtel
nla_data() is now aligned on a 64-bit area. Signed-off-by: Nicolas Dichtel --- include/net/netlink.h | 8 +--- include/net/nl802154.h| 6 ++ net/ieee802154/nl802154.c | 13 - 3 files changed, 19 insertions(+), 8 deletions(-) diff --git

[PATCH v3 08/21] userns: Replace in_userns with current_in_userns

2016-04-22 Thread Seth Forshee
All current callers of in_userns pass current_user_ns as the first argument. Simplify by replacing in_userns with current_in_userns which checks whether current_user_ns is in the namespace supplied as an argument. Signed-off-by: Seth Forshee Acked-by: James Morris

[PATCH net-next 2/9] libnl: nla_put_le64(): align on a 64-bit area

2016-04-22 Thread Nicolas Dichtel
nla_data() is now aligned on a 64-bit area. Signed-off-by: Nicolas Dichtel --- include/net/netlink.h | 8 +--- include/net/nl802154.h| 6 ++ net/ieee802154/nl802154.c | 13 - 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/include/net/netlink.h

[PATCH v3 08/21] userns: Replace in_userns with current_in_userns

2016-04-22 Thread Seth Forshee
All current callers of in_userns pass current_user_ns as the first argument. Simplify by replacing in_userns with current_in_userns which checks whether current_user_ns is in the namespace supplied as an argument. Signed-off-by: Seth Forshee Acked-by: James Morris Acked-by: Serge Hallyn ---

[PATCH v3 15/21] fs: Don't remove suid for CAP_FSETID in s_user_ns

2016-04-22 Thread Seth Forshee
Expand the check in should_remove_suid() to keep privileges for CAP_FSETID in s_user_ns rather than init_user_ns. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn --- fs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH v3 17/21] capabilities: Allow privileged user in s_user_ns to set security.* xattrs

2016-04-22 Thread Seth Forshee
A privileged user in s_user_ns will generally have the ability to manipulate the backing store and insert security.* xattrs into the filesystem directly. Therefore the kernel must be prepared to handle these xattrs from unprivileged mounts, and it makes little sense for commoncap to prevent

[PATCH v3 15/21] fs: Don't remove suid for CAP_FSETID in s_user_ns

2016-04-22 Thread Seth Forshee
Expand the check in should_remove_suid() to keep privileges for CAP_FSETID in s_user_ns rather than init_user_ns. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn --- fs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/inode.c b/fs/inode.c index

[PATCH v3 17/21] capabilities: Allow privileged user in s_user_ns to set security.* xattrs

2016-04-22 Thread Seth Forshee
A privileged user in s_user_ns will generally have the ability to manipulate the backing store and insert security.* xattrs into the filesystem directly. Therefore the kernel must be prepared to handle these xattrs from unprivileged mounts, and it makes little sense for commoncap to prevent

[PATCH v3 21/21] fuse: Allow user namespace mounts

2016-04-22 Thread Seth Forshee
Signed-off-by: Seth Forshee Acked-by: Miklos Szeredi --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 0a771145d853..254f1944ee98 100644 --- a/fs/fuse/inode.c +++

[PATCH v3 21/21] fuse: Allow user namespace mounts

2016-04-22 Thread Seth Forshee
Signed-off-by: Seth Forshee Acked-by: Miklos Szeredi --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 0a771145d853..254f1944ee98 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1199,7 +1199,7 @@ static

[PATCH v3 01/21] fs: fix a posible leak of allocated superblock

2016-04-22 Thread Seth Forshee
From: Pavel Tikhomirov We probably need to fix superblock leak in patch (v4 "fs: Add user namesapace member to struct super_block"): Imagine posible code path in sget_userns: we iterate through type->fs_supers and do not find suitable sb, we drop sb_lock to allocate s

[PATCH v3 01/21] fs: fix a posible leak of allocated superblock

2016-04-22 Thread Seth Forshee
From: Pavel Tikhomirov We probably need to fix superblock leak in patch (v4 "fs: Add user namesapace member to struct super_block"): Imagine posible code path in sget_userns: we iterate through type->fs_supers and do not find suitable sb, we drop sb_lock to allocate s and go to retry. After we

[PATCH v3 13/21] fs: Update posix_acl support to handle user namespace mounts

2016-04-22 Thread Seth Forshee
ids in on-disk ACLs should be converted to s_user_ns instead of init_user_ns as is done now. This introduces the possibility for id mappings to fail, and when this happens syscalls will return EOVERFLOW. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn

[PATCH v3 13/21] fs: Update posix_acl support to handle user namespace mounts

2016-04-22 Thread Seth Forshee
ids in on-disk ACLs should be converted to s_user_ns instead of init_user_ns as is done now. This introduces the possibility for id mappings to fail, and when this happens syscalls will return EOVERFLOW. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn --- fs/posix_acl.c |

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