Re: [PATCH] net: return value of skb_linearize should be handled in Linux kernel

2016-12-06 Thread Yuval Shaia
On Tue, Dec 06, 2016 at 03:10:33PM +0800, Zhouyi Zhou wrote: > kmalloc_reserve may fail to allocate memory inside skb_linearize, > which means skb_linearize's return value should not be ignored. > Following patch correct the uses of skb_linearize. > > Compiled in x86_64 FWIW compiled also on SP

Re: [RESEND][PATCH v4] cgroup: Use CAP_SYS_RESOURCE to allow a process to migrate other tasks between cgroups

2016-12-06 Thread Tejun Heo
Hello, Serge. On Mon, Dec 05, 2016 at 08:00:11PM -0600, Serge E. Hallyn wrote: > > I really don't know. The cgroupfs interface is a bit unfortunate in > > that it doesn't really express the constraints. To safely migrate a > > task, ISTM you ought to have some form of privilege over the task > >

[PATCH] locking/pvqspinlock: Wait early if vcpu is preempted

2016-12-06 Thread Pan Xinhui
If prev node is not in runnig state or its cpu is preempted, we need wait early in pv_wait_node. After commit "sched/core: Introduce the vcpu_is_preempted(cpu) interface" kernel has knowledge of one vcpu is running or not. So lets use it. Signed-off-by: Pan Xinhui --- kernel/locking/qspinlock_pa

Re: [RFC v2 2/2] i2c: Pass i2c_device_id to probe func when using DT ids through ACPI

2016-12-06 Thread Dmitry Torokhov
On Tue, Nov 01, 2016 at 01:14:16PM +0700, Phong Vo wrote: > >From: Mika Westerberg > >Subject: Re: [RFC v2 2/2] i2c: Pass i2c_device_id to probe func when > using DT ids through ACPI > >Date: Monday 13th June 2016 09:26:55 UTC (5 months ago) > > > >On Fri, Jun 10, 2016 at 06:57:36PM +0300, Crestez

Re: [RESEND][PATCH v4] cgroup: Use CAP_SYS_RESOURCE to allow a process to migrate other tasks between cgroups

2016-12-06 Thread Andy Lutomirski
On Tue, Dec 6, 2016 at 8:55 AM, Tejun Heo wrote: > Hello, > > On Mon, Dec 05, 2016 at 04:36:51PM -0800, Andy Lutomirski wrote: >> I really don't know. The cgroupfs interface is a bit unfortunate in >> that it doesn't really express the constraints. To safely migrate a >> task, ISTM you ought to

Re: [PATCHv4 05/10] arm64: Use __pa_symbol for kernel symbols

2016-12-06 Thread Mark Rutland
Hi, As a heads-up, it looks like this got mangled somewhere. In the hunk at arch/arm64/mm/kasan_init.c:68, 'do' in the context became 'edo'. Deleting the 'e' makes it apply. I think this is almost there; other than James's hibernate bug I only see one real issue, and everything else is a minor ni

[GIT] Networking

2016-12-06 Thread David Miller
1) When dcbnl_cee_fill() fails to be able to push a new netlink attribute, it return 0 instead of an error code. From Pan Bian. 2) Two suffix handling fixes to FIB trie code, from Alexander Duyck. 3) bnxt_hwrm_stat_ctx_alloc() goes through all the trouble of setting and maintaining a retu

[PATCH 3/7] arm: module: Add apply_relocate_add

2016-12-06 Thread Abel Vesa
It was only added to fix compiler error. It is not implemented yet. Signed-off-by: Abel Vesa --- arch/arm/kernel/module.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 4f14b5c..bf94922 100644 --- a/arch/arm/kernel/module.c

[PATCH 4/7] arm: Add ftrace with regs support

2016-12-06 Thread Abel Vesa
This adds __ftrace_regs_caller which, unlike __ftrace_caller, adds register saving/restoring and livepatch handling if the pc register gets modified by klp_ftrace_handler. Signed-off-by: Abel Vesa --- arch/arm/kernel/entry-ftrace.S | 49 ++ 1 file changed,

[PATCH 2/7] arm: ftrace: Add call modify mechanism

2016-12-06 Thread Abel Vesa
Function ftrace_modify_call provides a way to replace ftrace_stub with the ftrace function. This helps the klp_ftrace_handler to be called via ftrace_ops_no_ops, which in turn will set the pc with the patched function's starting address. This is used for livepatching. Signed-off-by: Abel Vesa ---

Re: i8042 error at booting an Intel Cherry Trail-based device

2016-12-06 Thread Dmitry Torokhov
Hi Takashi, On Tue, Dec 06, 2016 at 11:36:09AM +0100, Takashi Iwai wrote: > On Tue, 06 Dec 2016 07:07:54 +0100, > Dmitry Torokhov wrote: > > > > On December 5, 2016 4:56:05 PM PST, Marcos Paulo de Souza > > wrote: > > >Hi Takashi, > > > > > >On Fri, Dec 02, 2016 at 11:55:07AM +0100, Takashi Iwa

Re: [PATCH v3] mach-omap2: fixing wrong strcat for Non-NULL terminated string

2016-12-06 Thread Tony Lindgren
* Maninder Singh [161204 21:32]: > Issue caught with static analysis tool: > "Dangerous usage of 'name' (strncpy doesn't always 0-terminate it)" > > Use strlcpy _includes_ the NUL terminator, and strlcat() which ensures > that it won't overflow the buffer. > > Reported-by: Maninder Singh > Si

[PATCH V3] staging: dgnc: Fix lines longer than 80 characters

2016-12-06 Thread Fernando Apesteguia
For two cases (beginning and end of the patch) I opted to create small functions instead of breaking the the lines in a weird way. The other changes are simple ones: either by breaking the line when appropriate or by turning a comment into a multi-line one. Signed-off-by: Fernando Apesteguia ---

[PATCH 5/7] arm: ftrace: Add ARCH_SUPPORTS_FTRACE_OPS for ftrace with regs

2016-12-06 Thread Abel Vesa
ARCH_SUPPORTS_FTRACE_OPS is needed for livepatch if CONFIG_DYNAMIC_FTRACE_WITH_REGS is defined. Signed-off-by: Abel Vesa --- arch/arm/include/asm/ftrace.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index bfe2a2f..f434ce9

[PATCH 6/7] arm: Add livepatch to build if CONFIG_LIVEPATCH

2016-12-06 Thread Abel Vesa
Necessary livepatch file added to makefile. Signed-off-by: Abel Vesa --- arch/arm/kernel/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index ad325a8..9e70220 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@

[PATCH 7/7] arm: Add livepatch necessary arch selects into Kconfig

2016-12-06 Thread Abel Vesa
This adds HAVE_LIVEPATCH, MODULES_USE_ELF_RELA and HAVE_LIVEPATCH to arm Kconfig. Signed-off-by: Abel Vesa --- arch/arm/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 186c4c2..f4e9ace 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig

[PATCH 0/7] arm: Add livepatch support

2016-12-06 Thread Abel Vesa
This is just an idea I've been trying out for a while now. Just in case somebody wants to play with it, this applies to linux-arm/for-next. Also please note that this was only tested in qemu, but I will do some testing on some real hardware in the following days. FWICT, on this arch the compil

[PATCH 1/7] arm: Add livepatch arch specific code

2016-12-06 Thread Abel Vesa
klp_get_ftrace_location is used by ftrace to get the entry for a specific function from the mcount list. klp_arch_set_pc is used to set the pc from the regs passed as an argument to the ftrace_ops_no_ops function to the starting address of the patched function. klp_write_module_reloc is not doing a

Re: Enabling peer to peer device transactions for PCIe devices

2016-12-06 Thread Christoph Hellwig
On Tue, Dec 06, 2016 at 09:38:50AM -0700, Jason Gunthorpe wrote: > > > I'm not opposed to mapping /dev/nvmeX. However, the lookup is trivial > > > to accomplish in sysfs through /sys/dev/char to find the sysfs path of the > > > device-dax instance under the nvme device, or if you already have the

[PATCH v2 1/2] vfio iommu type1: Fix size argument to vfio_find_dma() during DMA UNMAP.

2016-12-06 Thread Kirti Wankhede
vfio_dma keeps track of address range from (dma->iova + 0) to (dma->iova + dma->size - 1), while vfio_find_dma() search logic looks for range from (dma->iova + 1) to (dma->iova + dma->size). In vfio_find_dma(), when the start address is equal to dma->iova and size is 0, check for the end of search

[PATCH v2 2/2] vfio iommu: Fix size argument to vfio_find_dma() in pin_pages/unpin_pages

2016-12-06 Thread Kirti Wankhede
vfio_dma keeps track of address range from (dma->iova + 0) to (dma->iova + dma->size - 1), while vfio_find_dma() search logic looks for range from (dma->iova + 1) to (dma->iova + dma->size). In vfio_find_dma(), when the start address is equal to dma->iova and size is 0, check for the end of search

[PATCH 1/1] mtd: spi-nor: remove WARN_ONCE() message in spi_nor_write()

2016-12-06 Thread Cyrille Pitchen
This patch removes the WARN_ONCE() test in spi_nor_write(). This macro triggers the display of a warning message almost every time we use a UBI file-system because a write operation is performed at offset 64, which is in the middle of the SPI NOR memory page. This is a valid operation for ubifs. H

[PATCH 1/5] ARM: BCM5301X: Fix LAN LED labels for Luxul XWR-3100

2016-12-06 Thread Rafał Miłecki
From: Rafał Miłecki They were named incorrectly most likely due to copy & paste mistake. Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts b/arc

[PATCH 2/5] ARM: BCM5301X: Specify USB controllers in DT

2016-12-06 Thread Rafał Miłecki
From: Rafał Miłecki There are 3 separated controllers, one per USB /standard/. With PHY drivers in place they can be simply supported with generic drivers. Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm5301x.dtsi | 33 - 1 file changed, 32 insertions(+),

[PATCH 4/5] ARM: BCM5301X: Specify all RAM by including extra block

2016-12-06 Thread Rafał Miłecki
From: Rafał Miłecki So far we were specifying only the first block which is always limited up to 128 MiB. There are many devices with 256 MiB and few with 512 MiB. Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts| 3 ++- arch/arm/boot/dts/bcm4708-asus-rt-ac6

[PATCH 3/5] ARM: BCM5301X: Set GPIO enabling USB power on Netgear R7000

2016-12-06 Thread Rafał Miłecki
There is one GPIO controlling power for both USB ports. Signed-off-by: Rafał Miłecki Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts b/arch/arm/boot/dts/bcm4709-

[PATCH 5/5] ARM: BCM53573: Specify USB ports of on-SoC controllers

2016-12-06 Thread Rafał Miłecki
From: Rafał Miłecki Broadcom OHCI and EHCI controllers always have 2 ports each on the root hub. Describe them in DT to allow specifying extra info or referencing port nodes. Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm53573.dtsi | 22 ++ 1 file changed, 22 insert

[PATCH v7 0/4] Enabling ATA Command Priorities

2016-12-06 Thread Adam Manzanares
From: Adam Manzanares This patch builds ATA commands with high priority if the iocontext of a process is set to real time. The goal of the patch is to improve tail latencies of workloads that use higher queue depths. This requires setting the iocontext ioprio on the request when it is initializ

Re: [PATCH v4 09/13] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-12-06 Thread Richard Cochran
On Tue, Dec 06, 2016 at 10:45:55AM -0600, Grygorii Strashko wrote: > On 12/06/2016 07:40 AM, Richard Cochran wrote: > > [ BTW, resetting the timecounter here makes no sense either. Why > > reset the clock just because the interface goes down? ] > > > > Huh. This is how it works now (even befo

[GIT] Sparc

2016-12-06 Thread David Miller
Please pull to get this quick use-before-NULL-check from Dan Carpenter. Thanks! The following changes since commit 88abd8249ee8bcebb98c90e890ea5e342db832af: Merge branch 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata (2016-11-28 14:17:10 -0800) are available in

Re: [PATCHv4 08/10] mm/kasan: Switch to using __pa_symbol and lm_alias

2016-12-06 Thread Mark Rutland
On Thu, Dec 01, 2016 at 02:36:05PM +0300, Andrey Ryabinin wrote: > On 11/29/2016 09:55 PM, Laura Abbott wrote: > > __pa_symbol is the correct API to find the physical address of symbols. > > Switch to it to allow for debugging APIs to work correctly. > > But __pa() is correct for symbols. I see ho

Re: [BUG 4.9] New led trigger usbport gets the kernel to panic

2016-12-06 Thread Pavel Machek
On Fri 2016-12-02 09:48:18, Ralph Sennhauser wrote: > On Thu, 1 Dec 2016 17:56:07 +0100 > Rafał Miłecki wrote: > > > On 12/01/2016 03:28 PM, Ralph Sennhauser wrote: > > > Below the oops with your debug patch applied. > > > > > > (...) > > > > > > root@wrt1900acs:/# cd sys/class/leds/pca963x\:shel

Re: [RFC v3 03/10] iommu: Add new reserved IOMMU attributes

2016-12-06 Thread Robin Murphy
On 15/11/16 13:09, Eric Auger wrote: > IOMMU_RESV_NOMAP is used to tag reserved IOVAs that are not > supposed to be IOMMU mapped. IOMMU_RESV_MSI tags IOVAs > corresponding to MSIs that need to be IOMMU mapped. > > IOMMU_RESV_MASK allows to check if the IOVA is reserved. > > Signed-off-by: Eric Au

Re: [PATCH V6 6/6] iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged'

2016-12-06 Thread Will Deacon
On Fri, Dec 02, 2016 at 08:25:09PM +0530, Sricharan R wrote: > Currently the driver sets all the device transactions privileges > to UNPRIVILEGED, but there are cases where the iommu masters wants > to isolate privileged supervisor and unprivileged user. > So don't override the privileged setting t

Re: [RFC v3 02/10] iommu: Rename iommu_dm_regions into iommu_resv_regions

2016-12-06 Thread Robin Murphy
On 15/11/16 13:09, Eric Auger wrote: > We want to extend the callbacks used for dm regions and > use them for reserved regions. Reserved regions can be > - directly mapped regions > - regions that cannot be iommu mapped (PCI host bridge windows, ...) > - MSI regions (because they belong to another

Re: [RFC v3 04/10] iommu: iommu_alloc_resv_region

2016-12-06 Thread Robin Murphy
On 15/11/16 13:09, Eric Auger wrote: > Introduce a new helper serving the purpose to allocate a reserved > region. This will be used in iommu driver implementing reserved > region callbacks. > > Signed-off-by: Eric Auger > --- > drivers/iommu/iommu.c | 16 > include/linux/iommu

Re: [PATCH 2/5] ARM: BCM5301X: Specify USB controllers in DT

2016-12-06 Thread Rafał Miłecki
On 6 December 2016 at 18:28, Ray Jui wrote: > On 12/6/2016 9:17 AM, Rafał Miłecki wrote: >> From: Rafał Miłecki >> >> There are 3 separated controllers, one per USB /standard/. With PHY >> drivers in place they can be simply supported with generic drivers. >> >> Signed-off-by: Rafał Miłecki >> -

Re: [PATCH v6 4/9] dt-bindings: iio: iio-mux: document iio-mux bindings

2016-12-06 Thread Peter Rosin
On 2016-12-06 00:26, Rob Herring wrote: > On Wed, Nov 30, 2016 at 09:16:58AM +0100, Peter Rosin wrote: >> Signed-off-by: Peter Rosin >> --- >> .../bindings/iio/multiplexer/iio-mux.txt | 40 >> ++ >> MAINTAINERS| 6 >> 2

Re: Enabling peer to peer device transactions for PCIe devices

2016-12-06 Thread Jason Gunthorpe
On Tue, Dec 06, 2016 at 09:51:15AM -0700, Logan Gunthorpe wrote: > Hey, > > On 06/12/16 09:38 AM, Jason Gunthorpe wrote: > >>> I'm not opposed to mapping /dev/nvmeX. However, the lookup is trivial > >>> to accomplish in sysfs through /sys/dev/char to find the sysfs path of the > >>> device-dax in

Re: [PATCH] ipmi: bt-bmc: Use a regmap for register access

2016-12-06 Thread Cédric Le Goater
[ this is a resend bc of some mailing list issues] On 12/06/2016 03:57 AM, Andrew Jeffery wrote: > The registers for the bt-bmc device live under the Aspeed LPC > controller. Devicetree bindings have recently been introduced for the > LPC controller where the "host" portion of the LPC register sp

Re: [BUG 4.9] New led trigger usbport gets the kernel to panic

2016-12-06 Thread Rafał Miłecki
On 6 December 2016 at 18:26, Pavel Machek wrote: > On Fri 2016-12-02 09:48:18, Ralph Sennhauser wrote: >> On Thu, 1 Dec 2016 17:56:07 +0100 >> Rafał Miłecki wrote: >> >> > On 12/01/2016 03:28 PM, Ralph Sennhauser wrote: >> > > Below the oops with your debug patch applied. >> > > >> > > (...) >> >

Re: [PATCH 2/5] ARM: BCM5301X: Specify USB controllers in DT

2016-12-06 Thread Ray Jui
On 12/6/2016 9:17 AM, Rafał Miłecki wrote: > From: Rafał Miłecki > > There are 3 separated controllers, one per USB /standard/. With PHY > drivers in place they can be simply supported with generic drivers. > > Signed-off-by: Rafał Miłecki > --- > arch/arm/boot/dts/bcm5301x.dtsi | 33 +++

Re: [PATCH] iommu/intel-iommu: fix pasid table size encoding

2016-12-06 Thread Jacob Pan
On Tue, 6 Dec 2016 17:31:11 +0100 Joerg Roedel wrote: > Hi Jacob, > > On Thu, Dec 01, 2016 at 01:50:26PM -0800, Jacob Pan wrote: > > diff --git a/drivers/iommu/intel-iommu.c > > b/drivers/iommu/intel-iommu.c index 27596e6..f112aa9 100644 > > --- a/drivers/iommu/intel-iommu.c > > +++ b/drivers/io

[PATCH v7 4/4] ata: set ncq_prio_enabled iff device has support

2016-12-06 Thread Adam Manzanares
From: Adam Manzanares We previously had a check to see if the device has support for prioritized ncq commands and a check to see if a device flag is set, through a sysfs variable, in order to send a prioritized command. This patch only allows the sysfs variable to be set if the device supports p

[PATCH v7 3/4] ata: ATA Command Priority Disabled By Default

2016-12-06 Thread Adam Manzanares
From: Adam Manzanares Add a sysfs entry to turn on priority information being passed to a ATA device. By default this feature is turned off. This patch depends on ata: Enabling ATA Command Priorities tj: Renamed ncq_prio_on to ncq_prio_enable and removed trivial ata_ncq_prio_on() and open-c

Re: [PATCH 2/5] ARM: BCM5301X: Specify USB controllers in DT

2016-12-06 Thread Ray Jui
On 12/6/2016 9:31 AM, Rafał Miłecki wrote: > On 6 December 2016 at 18:28, Ray Jui wrote: >> On 12/6/2016 9:17 AM, Rafał Miłecki wrote: >>> From: Rafał Miłecki >>> >>> There are 3 separated controllers, one per USB /standard/. With PHY >>> drivers in place they can be simply supported with gener

Re: [RFC v3 05/10] iommu: Do not map reserved regions

2016-12-06 Thread Robin Murphy
On 15/11/16 13:09, Eric Auger wrote: > As we introduced IOMMU_RESV_NOMAP and IOMMU_RESV_MSI regions, > let's prevent those new regions from being mapped. > > Signed-off-by: Eric Auger > --- > drivers/iommu/iommu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iommu/iommu.c

Re: [PATCH 0/2] Hibernate fixes for 'Fix memmap to be initialized for the entire section'

2016-12-06 Thread Will Deacon
On Mon, Dec 05, 2016 at 03:42:14PM +, Ard Biesheuvel wrote: > On 2 December 2016 at 14:49, James Morse wrote: > > Patch "arm64: mm: Fix memmap to be initialized for the entire section" > > changes pfn_valid() in a way that breaks hibernate. These patches fix > > hibernate, and provided struct

Re: [PATCH v2 1/2] vfio iommu type1: Fix size argument to vfio_find_dma() during DMA UNMAP.

2016-12-06 Thread Alex Williamson
On Tue, 6 Dec 2016 22:43:30 +0530 Kirti Wankhede wrote: > vfio_dma keeps track of address range from (dma->iova + 0) to > (dma->iova + dma->size - 1), while vfio_find_dma() search logic looks for > range from (dma->iova + 1) to (dma->iova + dma->size). This is not true. The issue is with the no

Re: [PATCH v2 2/2] vfio iommu: Fix size argument to vfio_find_dma() in pin_pages/unpin_pages

2016-12-06 Thread Alex Williamson
On Tue, 6 Dec 2016 22:43:45 +0530 Kirti Wankhede wrote: > vfio_dma keeps track of address range from (dma->iova + 0) to > (dma->iova + dma->size - 1), while vfio_find_dma() search logic looks for > range from (dma->iova + 1) to (dma->iova + dma->size). Also not true as described in reply to 1/2.

Re: [PATCHv4 08/10] mm/kasan: Switch to using __pa_symbol and lm_alias

2016-12-06 Thread Mark Rutland
On Tue, Nov 29, 2016 at 10:55:27AM -0800, Laura Abbott wrote: > __pa_symbol is the correct API to find the physical address of symbols. > Switch to it to allow for debugging APIs to work correctly. Other > functions such as p*d_populate may call __pa internally. Ensure that the > address passed is

Re: [Xen-devel] [PATCH v3 4/4] x86/asm: Rewrite sync_core() to use IRET-to-self

2016-12-06 Thread Andy Lutomirski
On Tue, Dec 6, 2016 at 1:49 AM, Jan Beulich wrote: On 06.12.16 at 10:25, wrote: >> On Tue, Dec 06, 2016 at 01:46:37AM -0700, Jan Beulich wrote: >>> > + asm volatile ( >>> > + "pushfl\n\t" >>> > + "pushl %%cs\n\t" >>> > + "pushl $1f\n\t" >>> > + "iret\n\t"

Re: [PATCH v4 09/13] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-12-06 Thread Grygorii Strashko
Hi Richard, On 12/06/2016 11:18 AM, Richard Cochran wrote: > On Tue, Dec 06, 2016 at 10:45:55AM -0600, Grygorii Strashko wrote: >> On 12/06/2016 07:40 AM, Richard Cochran wrote: >>> [ BTW, resetting the timecounter here makes no sense either. Why >>> reset the clock just because the interface g

[PATCH v7 1/4] block: Add iocontext priority to request

2016-12-06 Thread Adam Manzanares
From: Adam Manzanares Patch adds an association between iocontext ioprio and the ioprio of a request. This is done to enable request based drivers the ability to act on priority information stored in the request. An example being ATA devices that support command priorities. If the ATA driver disc

Re: [PATCH v3 4/4] x86/asm: Rewrite sync_core() to use IRET-to-self

2016-12-06 Thread Andy Lutomirski
On Mon, Dec 5, 2016 at 11:52 PM, Borislav Petkov wrote: > On Mon, Dec 05, 2016 at 01:32:43PM -0800, Andy Lutomirski wrote: >> Aside from being excessively slow, CPUID is problematic: Linux runs >> on a handful of CPUs that don't have CPUID. Use IRET-to-self >> instead. IRET-to-self works everywh

Re: [PATCH] ipmi: bt-bmc: Use a regmap for register access

2016-12-06 Thread Cédric Le Goater
On 12/06/2016 03:57 AM, Andrew Jeffery wrote: > The registers for the bt-bmc device live under the Aspeed LPC > controller. Devicetree bindings have recently been introduced for the > LPC controller where the "host" portion of the LPC register space is > described as a syscon device. Future devicet

Re: [RFC PATCH 5/6] x86/fpu: Fix CPUID-less FPU detection

2016-12-06 Thread Andy Lutomirski
On Tue, Dec 6, 2016 at 1:40 AM, Borislav Petkov wrote: > On Mon, Dec 05, 2016 at 05:01:14PM -0800, Andy Lutomirski wrote: >> The old code didn't work at all because it adjusted the current caps >> instead of the forced caps. Anything it did would be undone later >> during cpu identification. Fix

[RFC v2 1/4] ACPI: SPCR: check bit width for the 16550 UART

2016-12-06 Thread Aleksey Makarov
Check the 'Register Bit Width' field of the ACPI Generic Address Structure that specifies the address of the UART registers to decide if the driver should use "mmio32" access instead of "mmio". If the driver is other than 16550 the access width is defined by the Interface Type field of the SPCR ta

[RFC v2 2/4] ACPI: SPCR: don't initialize baud rate

2016-12-06 Thread Aleksey Makarov
AppliedMicro X-Gene based boards don't use the "standard" 16550 clock rate so supplying a baud rate makes it change to a random baud rate. I suggest to introduce a new value '0' for the "Baud Rate" field of SPCR (now this value is reserved). This patch introduces a check for this value. In this

[RFC v2 3/4] ACPI: DBG2: add 16550 UART with 32-bit access

2016-12-06 Thread Aleksey Makarov
It was suggested to add a new Microsoft Debug Port Table 2 (DBG2) (the table used to enumerate the various subtypes of serial port covered by the SPCR) 16550 UART subtype that may be needed for some additional platforms, such as those based upon AppliedMicro X-Gene ARMv8 SoCs. This new subtype wou

Re: [RFC PATCH 4/6] x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message

2016-12-06 Thread Andy Lutomirski
On Tue, Dec 6, 2016 at 1:24 AM, Borislav Petkov wrote: > On Mon, Dec 05, 2016 at 05:01:13PM -0800, Andy Lutomirski wrote: >> That message isn't at all clear -- what does "Legacy x87" even >> mean? >> >> Clarify it. If there's no FPU, say "x86/fpu: No FPU detected". If >> there's an FPU that does

[RFC v2 0/4] ACPI: SPCR: 32-bit access and non-standard baud rate

2016-12-06 Thread Aleksey Makarov
ACPI [SPCR] (Serial Port Console Redirection Table) specifies which console should be used by system. 'ARM Server Base Boot Requirements' [SBBR] mentions SPCR as a mandatory ACPI table. Support for this table for Linux kernel ([SPCR v10]) was merged for 4.9 (patches 1/4-3/4) and 4.10 (patch 4/4).

[RFC v2 4/4] ACPI: SPCR: support 16550 UART with 32-bit access

2016-12-06 Thread Aleksey Makarov
It was suggested to add a new Microsoft Debug Port Table 2 (DBG2) (the table used to enumerate the various subtypes of serial port covered by the SPCR) 16550 UART subtype that may be needed for some additional platforms, such as those based upon AppliedMicro X-Gene ARMv8 SoCs. This new subtype wou

Re: [PATCH 7/8] staging: fsl-dpaa2/eth: Add TODO file

2016-12-06 Thread Greg KH
On Tue, Dec 06, 2016 at 12:59:59PM +, Stuart Yoder wrote: > > > > -Original Message- > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Sent: Tuesday, December 06, 2016 4:20 AM > > To: Ruxandra Ioana Radulescu > > Cc: de...@driverdev.osuosl.org; linux-kernel@vger.kernel.org;

Re: [PATCH 1/2] arm: kernel: Add SMC structure parameter

2016-12-06 Thread Andy Gross
On Tue, Dec 06, 2016 at 11:55:08AM +, Will Deacon wrote: > Hi Andy, > > On Tue, Nov 29, 2016 at 01:44:22AM -0600, Andy Gross wrote: > > This patch adds a quirk parameter to the arm_smccc_smc call. The quirk > > structure allows for specialized SMC operations due to SoC specific > > requiremen

Re: [PATCH v4 09/13] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-12-06 Thread Richard Cochran
On Tue, Dec 06, 2016 at 11:49:14AM -0600, Grygorii Strashko wrote: > But we do reset whole cpsw :( and that's required to support PM use cases as > suspend/resume. The code is resetting the clock unconditionally on ifup/down. That sucks. If you reset the clock *only* after resume, that would be

Re: [RFC PATCH 4/6] x86/fpu: Fix "x86/fpu: Legacy x87 FPU detected" message

2016-12-06 Thread Borislav Petkov
On Tue, Dec 06, 2016 at 09:59:56AM -0800, Andy Lutomirski wrote: > I did something like this for FSAVE vs FXSAVE. XSAVE has its own pile > of printouts and I don't feel like I need to add another. So frankly, replacing "legacy" with "pre-XSAVE" is not making it any clearer - it is just calling it

[PATCH] staging: dgnc: fix blank line after '{' warnings.

2016-12-06 Thread Fernando Apesteguia
Remove blank lines between open brace and comment. Remove blank lines after comment in line with the rest of the comments of the file. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_tty.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b

Re: [PATCH 4/6] net: ethernet: ti: cpts: add ptp pps support

2016-12-06 Thread Richard Cochran
On Wed, Nov 30, 2016 at 11:05:19AM +0100, Richard Cochran wrote: > Can you adjust the frequency of the keystone devices in hardware? If > so, then please implement it, and just disable PPS for the CPSW. > > The only reason I used the timecounter for frequency adjustment was > because the am335x H

Re: [RESEND][PATCH v4] cgroup: Use CAP_SYS_RESOURCE to allow a process to migrate other tasks between cgroups

2016-12-06 Thread Tejun Heo
Hello, On Tue, Dec 06, 2016 at 09:01:17AM -0800, Andy Lutomirski wrote: > How would one be granted the right to move processes around in one's > own subtree? Through expicit delegation - chowning of the directory and cgroup.procs file. > Are you imagining that, if you're in /a/b and you want to

Re: [RESEND][PATCH v4] cgroup: Use CAP_SYS_RESOURCE to allow a process to migrate other tasks between cgroups

2016-12-06 Thread Andy Lutomirski
On Tue, Dec 6, 2016 at 10:12 AM, Tejun Heo wrote: > Hello, > > On Tue, Dec 06, 2016 at 09:01:17AM -0800, Andy Lutomirski wrote: >> How would one be granted the right to move processes around in one's >> own subtree? > > Through expicit delegation - chowning of the directory and > cgroup.procs file

[PATCH v3 2/7] irda: w83977af_ir: More whitespace neatening

2016-12-06 Thread Joe Perches
Add spaces around operators. git diff -w shows no differences. Signed-off-by: Joe Perches --- drivers/net/irda/w83977af_ir.c | 230 - 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977

[PATCH v2] iommu/intel-iommu: fix pasid table size encoding

2016-12-06 Thread Jacob Pan
Different encodings are used to represent supported PASID bits and number of PASID table entries. The current code assigns ecap_pss directly to extended context table entry PTS which is wrong and could result in writing non-zero bits to the reserved fields. IOMMU fault reason 11 will be reported wh

[PATCH v3 7/7] irda: w83977af_ir: Neaten logging

2016-12-06 Thread Joe Perches
Use more common logging style, standardize function output logging use. Miscellanea: o Add and use pr_fmt o Convert printks to pr_ Signed-off-by: Joe Perches --- drivers/net/irda/w83977af_ir.c | 56 -- 1 file changed, 27 insertions(+), 29 deletions(-) d

[PATCH v3 0/7] irda: w83977af_ir: Neatening

2016-12-06 Thread Joe Perches
Originally on top of Arnd's overly long udelay patches because I noticed a misindented block. That's now already fixed along with some other whitespace problems. These patches are the remainder style issues from my original series. Even though I haven't turned on the netwinder in a box in the ga

[PATCH v3 4/7] irda: w83977af_ir: Neaten pointer comparisons

2016-12-06 Thread Joe Perches
Convert pointer comparisons to NULL. Signed-off-by: Joe Perches --- drivers/net/irda/w83977af_ir.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index e30cbf005320..92f1525b0570 1

[PATCH v3 5/7] irda: w83977af_ir: Use the common brace style

2016-12-06 Thread Joe Perches
Add braces where appropriate and remove an unnecessary else. Signed-off-by: Joe Perches --- drivers/net/irda/w83977af_ir.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index 92f1525b0570.

[PATCH v3 6/7] irda: w83977af_ir: Parenthesis alignment

2016-12-06 Thread Joe Perches
Neaten function declaration and definition arguments. Signed-off-by: Joe Perches --- drivers/net/irda/w83977af_ir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index 5d5ec8938e2b..2f95ee26ed49 100644 --

[PATCH v3 3/7] irda: w83977af_ir: Remove and add blank lines

2016-12-06 Thread Joe Perches
Use a more typical vertical spacing style. Signed-off-by: Joe Perches --- drivers/net/irda/w83977af_ir.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index 166dd4e524fc..e30cbf005320 100644 --- a/drivers/n

[PATCH v3 1/7] irda: w83977af_ir: Whitespace neatening

2016-12-06 Thread Joe Perches
Remove leading and trailing whitespace. git diff -w shows no differences. Signed-off-by: Joe Perches --- drivers/net/irda/w83977af_ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index 96745888a4fc..d4b1d74d

Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias

2016-12-06 Thread Mark Rutland
On Tue, Nov 29, 2016 at 11:39:44AM -0800, Kees Cook wrote: > On Tue, Nov 29, 2016 at 10:55 AM, Laura Abbott wrote: > > > > The usercopy checking code currently calls __va(__pa(...)) to check for > > aliases on symbols. Switch to using lm_alias instead. > > > > Signed-off-by: Laura Abbott > > Ack

Re: [RFC v2 0/4] ACPI: SPCR: 32-bit access and non-standard baud rate

2016-12-06 Thread Jon Masters
Hi Aleksey, On 12/06/2016 12:58 PM, Aleksey Makarov wrote: > It turns out that this approach does not work for all the existing hardware. > There are two problems with AppliedMicro X-Gene based boards > ([discussion], [v1]): > > 1. Their console is a 16550 port that requires 32-bit access. Now

Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias

2016-12-06 Thread Mark Rutland
On Tue, Nov 29, 2016 at 10:55:28AM -0800, Laura Abbott wrote: > > The usercopy checking code currently calls __va(__pa(...)) to check for > aliases on symbols. Switch to using lm_alias instead. > > Signed-off-by: Laura Abbott I've given this a go on Juno, which boots happily. LKDTM triggers as

Re: [PATCH v2 1/2] vfio iommu type1: Fix size argument to vfio_find_dma() during DMA UNMAP.

2016-12-06 Thread Kirti Wankhede
On 12/6/2016 11:08 PM, Alex Williamson wrote: > On Tue, 6 Dec 2016 22:43:30 +0530 > Kirti Wankhede wrote: > >> vfio_dma keeps track of address range from (dma->iova + 0) to >> (dma->iova + dma->size - 1), while vfio_find_dma() search logic looks for >> range from (dma->iova + 1) to (dma->iova +

Re: [RESEND][PATCH v4] cgroup: Use CAP_SYS_RESOURCE to allow a process to migrate other tasks between cgroups

2016-12-06 Thread Tejun Heo
Hello, On Tue, Dec 06, 2016 at 10:13:53AM -0800, Andy Lutomirski wrote: > > Delegation is an explicit operation and reflected in the ownership of > > the subdirectories and cgroup interface files in them. The > > subhierarchy containment is achieved by requiring the user who's > > trying to migra

Re: [RFC v3 06/10] iommu: iommu_get_group_resv_regions

2016-12-06 Thread Robin Murphy
On 15/11/16 13:09, Eric Auger wrote: > Introduce iommu_get_group_resv_regions whose role consists in > enumerating all devices from the group and collecting their > reserved regions. It checks duplicates. > > Signed-off-by: Eric Auger > > --- > > - we do not move list elements from device to gr

[PATCH v2 1/2] vfio iommu type1: Fix size argument to vfio_find_dma() during DMA UNMAP.

2016-12-06 Thread Kirti Wankhede
Passing zero for the size to vfio_find_dma() isn't compatible with matching the start address of an existing vfio_dma. Doing so triggers a corner case. In vfio_find_dma(), when the start address is equal to dma->iova and size is 0, check for the end of search range makes it to take wrong side of RB

[PATCH] staging/android: remove Sync Framework tasks from TODO

2016-12-06 Thread Gustavo Padovan
From: Gustavo Padovan The destaging work is now fully complete. Cc: Arve Hjønnevåg Cc: Riley Andrews Signed-off-by: Gustavo Padovan --- drivers/staging/android/TODO | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO index 64

[PATCH v2 2/2] vfio iommu: Fix size argument to vfio_find_dma() in pin_pages/unpin_pages

2016-12-06 Thread Kirti Wankhede
Passing zero for the size to vfio_find_dma() isn't compatible with matching the start address of an existing vfio_dma. Doing so triggers a corner case. In vfio_find_dma(), when the start address is equal to dma->iova and size is 0, check for the end of search range makes it to take wrong side of RB

Re: [PATCH V2 03/13] perf/x86: output sampling overhead

2016-12-06 Thread Peter Zijlstra
On Tue, Dec 06, 2016 at 03:47:40PM +, Liang, Kan wrote: > > It doesn't record anything, it generates the output. And it doesn't explain > > why that needs to be in pmu::del(), in general that's a horrible thing to > > do. > > Yes, it only generate/log the output. Sorry for the confused wordi

Re: [tpmdd-devel] [PATCH v2 1/3] tpm_crb: map locality registers

2016-12-06 Thread Jarkko Sakkinen
On Mon, Dec 05, 2016 at 09:31:57PM +, Winkler, Tomas wrote: > > > > On Mon, Dec 05, 2016 at 12:07:51PM +, Winkler, Tomas wrote: > > > > > --- > > > > > drivers/char/tpm/tpm_crb.c | 96 > > > > > ++ > > > > > 1 file changed, 64 insertions(+), 32

Re: [PATCH v7 0/4] Enabling ATA Command Priorities

2016-12-06 Thread Tejun Heo
Adam, On Tue, Dec 06, 2016 at 09:18:01AM -0800, Adam Manzanares wrote: > From: Adam Manzanares > > This patch builds ATA commands with high priority if the iocontext of a > process > is set to real time. The goal of the patch is to improve tail latencies of > workloads that use higher queue de

Re: [tpmdd-devel] [PATCH v2 2/3] tpm_crb: encapsulate crb_wait_for_reg_32

2016-12-06 Thread Jarkko Sakkinen
On Mon, Dec 05, 2016 at 09:34:50PM +, Winkler, Tomas wrote: > > CC linux-security-module > > > > On Sat, Dec 03, 2016 at 07:52:12PM +0200, Jarkko Sakkinen wrote: > > > Encapsulated crb_wait_for_reg32() so that state changes in other CRB > > > registers than TPM_CRB_CTRL_REQ_x can be waited. >

Re: [PATCH] x86/irq: Add additional unhandled IRQ debug information

2016-12-06 Thread kbuild test robot
Hi Prarit, [auto build test ERROR on tip/x86/core] [also build test ERROR on v4.9-rc8 next-20161206] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Prarit-Bhargava/x86-irq-Add-additional

Re: [tpmdd-devel] [PATCH v2 3/3] tpm_crb: request and relinquish locality 0

2016-12-06 Thread Jarkko Sakkinen
On Mon, Dec 05, 2016 at 09:51:42PM +, Winkler, Tomas wrote: > > > > CC linux-security-module > > > > On Sat, Dec 03, 2016 at 07:52:13PM +0200, Jarkko Sakkinen wrote: > > > Request and relinquish locality for the driver use in order to be a > > > better citizen in a multi locality environment

Re: [PATCH v6 3/3] sound/usb: Use Media Controller API to share media resources

2016-12-06 Thread Shuah Khan
Hi Takashi, On 12/05/2016 11:50 PM, Takashi Iwai wrote: > On Wed, 30 Nov 2016 23:01:16 +0100, > Shuah Khan wrote: >> >> --- a/sound/usb/card.c >> +++ b/sound/usb/card.c > (snip) >> @@ -616,6 +617,11 @@ static int usb_audio_probe(struct usb_interface *intf, >> if (err < 0) >> goto

Re: [PATCH v2 3/3] tpm_crb: request and relinquish locality 0

2016-12-06 Thread Jarkko Sakkinen
On Mon, Dec 05, 2016 at 09:32:35AM -0700, Jason Gunthorpe wrote: > On Sat, Dec 03, 2016 at 07:52:13PM +0200, Jarkko Sakkinen wrote: > > + iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); > > Since regs_h can be null shouldn't there be some guards ? Yes, there should. Thanks for poin

Re: [PATCH v2 02/11] locking/ww_mutex: Re-check ww->ctx in the inner optimistic spin loop

2016-12-06 Thread Waiman Long
On 12/06/2016 01:29 PM, Peter Zijlstra wrote: > On Tue, Dec 06, 2016 at 11:03:28AM -0500, Waiman Long wrote: >> The mutex_spin_on_owner() function was originally marked noinline >> because it could be a major consumer of CPU cycles in a contended lock. >> Having it shown separately in the perf outp

[PATCH v7 2/4] ata: Enabling ATA Command Priorities

2016-12-06 Thread Adam Manzanares
From: Adam Manzanares This patch checks to see if an ATA device supports NCQ command priorities. If so and the user has specified an iocontext that indicates IO_PRIO_CLASS_RT then we build a tf with a high priority command. This is done to improve the tail latency of commands that are high prior

[Question] New mmap64 syscall?

2016-12-06 Thread Yury Norov
Hi all, (Sorry if there is similar discussion, and I missed it. I didn't find something in LKML in last half a year.) In aarch64/ilp32 discussion Catalin wondered why we don't pass offset in mmap() as 64-bit value (in 2 registers if needed). Looking at kernel code I found that there's no generic

<    1   2   3   4   5   6   7   8   9   >