Re: [PATCH 4/6] driver core: Don't leak secondary fwnode on device removal

2016-08-16 Thread Rafael J. Wysocki
On Thursday, July 28, 2016 02:25:41 AM Lukas Wunner wrote: > If device_add_property_set() is called for a device, a secondary fwnode > is allocated and assigned to the device but currently not freed once the > device is removed. > > This can be triggered on Apple Macs if a Thunderbolt device is pl

Re: [PATCH 2/6] ACPI / bus: Make acpi_get_first_physical_node() public

2016-08-16 Thread Rafael J. Wysocki
On Thursday, July 28, 2016 02:25:41 AM Lukas Wunner wrote: > Following the fwnode of a device is currently a one-way road: We provide > ACPI_COMPANION() to obtain the fwnode but there's no (public) method to > do the reverse. Granted, there may be multiple physical_nodes, but often > the first one

Patch prefix guidelines

2016-08-16 Thread Darren Hart
Question specifically to other maintainers, do we have a preferred patch prefix rule set? To date I try to use a subsystem prefix (with slashes) when a patch updates multiple drivers or the subsystem Kconfig files,. e.g. platform/x86: Drop duplicate dependencies on X86 (but I also see things lik

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Brian Gerst
On Tue, Aug 16, 2016 at 5:01 PM, Borislav Petkov wrote: > On Tue, Aug 16, 2016 at 12:49:52PM -0700, Kees Cook wrote: >> Am I misreading this? > > No you're not. > >> Shouldn't it be: >> >>cont = container; >> #ifdef CONFIG_RANDOMIZE_MEMORY >>cont += PAGE_OFFSET - __PAGE_OFFSET_BASE

Re: [PATCH v6 4/8] Documentation: bindings: add dt documentation for dfi controller

2016-08-16 Thread Chanwoo Choi
Hi Lin, I add one minor comment. After fixing it, looks good to me. Acked-by: Chanwoo Choi On 2016년 08월 17일 07:36, Lin Huang wrote: > This patch adds the documentation for rockchip dfi devfreq-event driver. > > Signed-off-by: Lin Huang > --- > Changes in v6: > -None > > Changes in v5: > -Non

Re: [PATCH v3 0/5] Fixing a set of bugs for ioapic hotplug

2016-08-16 Thread Rafael J. Wysocki
On Wednesday, August 10, 2016 12:01:53 PM Rui Wang wrote: > A set of patches fixing bugs found while testing IOAPIC hotplug. This should have been posted to the x...@kernel.org list too for the benefit of the maintainers. Can you please resend it with a CC to that one (and the Bjorn's ACK on the

Re: [PATCH v3 2/5] x86/ioapic: Support hot-removal of IOAPICs present during boot

2016-08-16 Thread Rafael J. Wysocki
On Wednesday, August 10, 2016 12:01:55 PM Rui Wang wrote: > IOAPICs present during system boot aren't added to ioapic_list, > thus are unable to be hot-removed. Fix it by calling > acpi_ioapic_add() during root bus enumeration. > > Signed-off-by: Rui Wang This patch has been ACKed by Bjorn, righ

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Guenter Roeck
On Tue, Aug 16, 2016 at 1:50 PM, Kees Cook wrote: [ ... ] >>> persistent_ram uses atomic ops in uncached memory to store the start >>> and end positions in the ringbuffer so that the state of the >>> ringbuffer will be valid if the kernel crashes at any time. This was >>> inherited from Android

[PATCH v2 0/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Kees Cook
This adds a CONFIG to trigger BUG()s when the kernel encounters unexpected data structure integrity as currently detected with CONFIG_DEBUG_LIST. Specifically list operations have been a target for widening flaws to gain "write anywhere" primitives for attackers, so this also consolidates the debu

Re: [PATCH 3.16 289/305] netfilter: x_tables: validate targets of jumps

2016-08-16 Thread Ben Hutchings
On Sat, 2016-08-13 at 22:35 +0200, Florian Westphal wrote: > > Ben Hutchings wrote: > > > > On Sat, 2016-08-13 at 20:30 +0200, Florian Westphal wrote: > > > > > > > > > > > > > > > Ben Hutchings wrote: > > > > > > > > 3.16.37-rc1 review patch.  If anyone has any objections, please let me > >

Re: [PATCH v2 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Joe Perches
On Tue, 2016-08-16 at 17:20 -0700, Kees Cook wrote: > The kernel checks for cases of data structure corruption under some > CONFIGs (e.g. CONFIG_DEBUG_LIST). When corruption is detected, some > systems may want to BUG() immediately instead of letting the system run > with known corruption.  Usually

[PATCH v2 5/5] lkdtm: Add tests for struct list corruption

2016-08-16 Thread Kees Cook
When building under CONFIG_DEBUG_LIST, list addition and removal will be sanity-checked. This validates that the check is working as expected by setting up classic corruption attacks against list manipulations, available with the new lkdtm tests CORRUPT_LIST_ADD and CORRUPT_LIST_DEL. Signed-off-by

[PATCH v2 2/5] rculist: Consolidate DEBUG_LIST for list_add_rcu()

2016-08-16 Thread Kees Cook
Consolidates the debug checking for list_add_rcu() into the new single debug function. Notably, this fixes the sanity check that was added in commit 17a801f4bfeb ("list_debug: WARN for adding something already in the list"). Before, it wasn't being checked for RCU lists. Signed-off-by: Kees Cook

Re: [PATCH v4 3/3] tools/power/acpi/acpidbg: Add multi-commands support in batch mode

2016-08-16 Thread Rafael J. Wysocki
On Tuesday, July 26, 2016 07:01:45 PM Lv Zheng wrote: > This patch adds multi-commands support for the batch mode. The same mode > can be seen in acpiexec. > > However people may think this is not useful for an in-kernel debugger, > because the in-kernel debugger is always running, never exits. So

[PATCH v2 1/5] list: Split list_add() debug checking into separate function

2016-08-16 Thread Kees Cook
Right now, __list_add() code is repeated either in list.h or in list_debug.c, but only the debug checks are the different part. This extracts the checking into a separate function and consolidates __list_add(). Additionally this __list_add_debug() will stop list manipulations if a corruption is det

Re: [PATCH v4 2/3] tools/power/acpi/acpidbg: Use new flushing mechanism

2016-08-16 Thread Rafael J. Wysocki
On Tuesday, July 26, 2016 07:01:39 PM Lv Zheng wrote: > This patch converts tools/power/acpi/tools/acpidbg/acpidbg to use the new > flushing mechanism. I guess it will use the flush interface provided by the kernel instead of the previously existing flush implementation in user space? Thanks, Raf

Re: [PATCH] platform: intel_pmic: make gpio explicitly non-modular

2016-08-16 Thread Darren Hart
On Mon, Aug 15, 2016 at 06:24:59PM -0400, Paul Gortmaker wrote: > The Kconfig entry controlling compilation of this code is: > > drivers/platform/x86/Kconfig:config GPIO_INTEL_PMIC > drivers/platform/x86/Kconfig: bool "Intel PMIC GPIO support" > > ...meaning that it currently is not being built

Re: [PATCH v4 1/3] ACPI / debugger: Add kernel flushing support

2016-08-16 Thread Rafael J. Wysocki
On Tuesday, July 26, 2016 07:01:33 PM Lv Zheng wrote: > This patch adds debugger output flushing support in kernel via .ioctl() > callback. The in-kernel flushing is more efficient, because it reduces > useless log IOs by bypassing log user_read/kern_write during the flush > period. > > This mecha

Re: [PATCH v7 1/2] ACPI / button: Fix an issue that the platform triggered reliable events may not be delivered to the userspace

2016-08-16 Thread Rafael J. Wysocki
On Tuesday, July 26, 2016 05:52:24 PM Lv Zheng wrote: > On most platforms, _LID returning value, lid open/close events are all > reliable, but there are exceptions. Some AML tables report wrong initial > lid state (Link 1), and some of them never report lid open state (Link 2). > The usage model on

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Kees Cook
On Tue, Aug 16, 2016 at 5:01 PM, Paul E. McKenney wrote: > On Tue, Aug 16, 2016 at 02:42:28PM -0700, Kees Cook wrote: >> On Tue, Aug 16, 2016 at 2:26 PM, Paul E. McKenney >> wrote: >> > On Tue, Aug 16, 2016 at 02:11:04PM -0700, Kees Cook wrote: >> >> The kernel checks for several cases of data st

Re: [PATCH] platform: olpc: make ec explicitly non-modular

2016-08-16 Thread Darren Hart
On Mon, Aug 15, 2016 at 06:01:20PM -0700, Andres Salomon wrote: > Fine by me. > > Acked-by: Andres Salomon > > On Mon, 15 > Aug 2016 18:25:17 -0400 Paul Gortmaker > wrote: > > > The Kconfig entry controlling compilation of this code is: > > > > arch/x86/Kconfig:config OLPC > > arch/x86/Kconfi

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Paul E. McKenney
On Tue, Aug 16, 2016 at 02:42:28PM -0700, Kees Cook wrote: > On Tue, Aug 16, 2016 at 2:26 PM, Paul E. McKenney > wrote: > > On Tue, Aug 16, 2016 at 02:11:04PM -0700, Kees Cook wrote: > >> The kernel checks for several cases of data structure corruption under > >> either normal runtime, or under va

Re: [PATCH v3 RFC 2/2] nvme: improve performance for virtual NVMe devices

2016-08-16 Thread Keith Busch
On Tue, Aug 16, 2016 at 01:45:03PM -0700, J Freyensee wrote: > On Mon, 2016-08-15 at 22:41 -0300, Helen Koike wrote: > >   struct nvmf_connect_command connect; > >   struct nvmf_property_set_command prop_set; > >   struct nvmf_property_get_command prop_get; > > +

[PATCH] dma-buf: fix kernel-doc warning and typos

2016-08-16 Thread Randy Dunlap
From: Randy Dunlap Fix dma-buf kernel-doc warning and 2 minor typos in fence_array_create(). Fixes this warning: ..//drivers/dma-buf/fence-array.c:124: warning: No description found for parameter 'signal_on_any' Signed-off-by: Randy Dunlap Cc: Sumit Semwal Cc: linux-me...@vger.kernel

Re: [RFC 3/7] dt: bindings: Add nokia-bluetooth

2016-08-16 Thread Sebastian Reichel
Hi Rob, On Tue, Aug 16, 2016 at 08:51:55AM -0500, Rob Herring wrote: > On Sat, Aug 13, 2016 at 05:14:34AM +0200, Sebastian Reichel wrote: > > --- > > .../devicetree/bindings/net/nokia-bluetooth.txt| 43 > > ++ > > 1 file changed, 43 insertions(+) > > create mode 100644

Re: [LKP] [lkp] [xfs] 68a9f5e700: aim7.jobs-per-min -13.6% regression

2016-08-16 Thread Linus Torvalds
On Tue, Aug 16, 2016 at 3:02 PM, Dave Chinner wrote: >> >> What does your profile show for when you actually dig into >> __remove_mapping() itself?, Looking at your flat profile, I'm assuming >> you get > > - 22.26% 0.93% [kernel] [k] __remove_mapping >- 3.86% __remove_mapping

Re: [PATCH 3/4] ARM: dts: da850-lcdk: Add NAND to DT

2016-08-16 Thread Karl Beldan
On Wed, Aug 10, 2016 at 05:23:23PM +0530, Sekhar Nori wrote: > On Wednesday 10 August 2016 04:49 PM, Karl Beldan wrote: > > On Wed, Aug 10, 2016 at 03:01:30PM +0530, Sekhar Nori wrote: > >> On Wednesday 10 August 2016 02:34 PM, Karl Beldan wrote: > >>> On Wed, Aug 10, 2016 at 02:01:57PM +0530, Sekh

Re: [PATCH 1/2] kernel: show current values of user namespace counters

2016-08-16 Thread Andrei Vagin
On Tue, Aug 16, 2016 at 03:05:29PM -0500, Serge E. Hallyn wrote: > Quoting Kees Cook (keesc...@chromium.org): > > On Mon, Aug 15, 2016 at 1:10 PM, Andrei Vagin wrote: > > > Recently Eric added user namespace counters. User namespace counters is > > > a feature that allows to limit the number of v

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Kees Cook
On Tue, Aug 16, 2016 at 2:57 PM, Steven Rostedt wrote: > On Tue, 16 Aug 2016 17:53:54 -0400 > Steven Rostedt wrote: > > >> WARN(1, "list_del corruption. next->prev should be %p, but was >> %p\n", >> entry, next->prev); >> BUG_ON(CORRUPTED_DATA_STRUC

[PACTH v9] stacktrace: Eliminate task stack trace duplication

2016-08-16 Thread robert . foss
From: Ying Han The problem with small dmesg ring buffer like 512k is that only limited number of task traces will be logged. Sometimes we lose important information only because of too many duplicated stack traces. This problem occurs when dumping lots of stacks in a single operation, such as sys

Re: [lkp] [x86/hweight] 65ea11ec6a: will-it-scale.per_process_ops 9.3% improvement

2016-08-16 Thread H. Peter Anvin
On August 16, 2016 10:16:35 AM PDT, Borislav Petkov wrote: >On Tue, Aug 16, 2016 at 09:59:00AM -0700, H. Peter Anvin wrote: >> Dang... > >Isn't 9.3% improvement a good thing(tm) ? Yes, it's huge. The only explanation I could imagine is that scrambling %rdi caused the scheduler to do completely

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Kees Cook
On Tue, Aug 16, 2016 at 2:50 PM, Laura Abbott wrote: > On 08/16/2016 02:11 PM, Kees Cook wrote: >> >> The kernel checks for several cases of data structure corruption under >> either normal runtime, or under various CONFIG_DEBUG_* settings. When >> corruption is detected, some systems may want to

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-16 Thread Wanpeng Li
2016-08-16 22:01 GMT+08:00 Rik van Riel : > On Tue, 2016-08-16 at 14:54 +0800, Wanpeng Li wrote: >> 2016-08-16 10:11 GMT+08:00 Rik van Riel : >> > On Tue, 2016-08-16 at 09:31 +0800, Wanpeng Li wrote: >> > > 2016-08-15 23:00 GMT+08:00 Rik van Riel : >> > > > On Mon, 2016-08-15 at 16:53 +0800, Wanpen

Re: [PATCH 0/2 v2] userns: show current values of user namespace counters

2016-08-16 Thread Serge E. Hallyn
Quoting Andrei Vagin (ava...@openvz.org): > Recently Eric added user namespace counters. User namespace counters is > a feature that allows to limit the number of various kernel objects a > user can create. These limits are set via /proc/sys/user/ sysctls on a > per user namespace basis and are ap

Re: [PATCH 1/7] ext2: tell DAX the size of allocation holes

2016-08-16 Thread Ross Zwisler
On Tue, Aug 16, 2016 at 11:10:25AM +0200, Jan Kara wrote: > On Mon 15-08-16 13:09:12, Ross Zwisler wrote: > > When DAX calls ext2_get_block() and the file offset points to a hole we > > currently don't set bh_result->b_size. When we re-enable PMD faults DAX > > will need bh_result->b_size to tell

Re: [PATCH v6 0/5] /dev/random - a new approach

2016-08-16 Thread H. Peter Anvin
On 08/16/16 15:28, H. Peter Anvin wrote: > On 08/15/16 22:45, Stephan Mueller wrote: >> Am Montag, 15. August 2016, 13:42:54 CEST schrieb H. Peter Anvin: >> >> Hi H, >> >>> On 08/11/16 05:24, Stephan Mueller wrote: * prevent fast noise sources from dominating slow noise sources in

[PATCH v2] clk: qcom: Migrate to clk_hw based registration and OF APIs

2016-08-16 Thread Stephen Boyd
Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers in this driver, allowing us to move closer to a clear split of consumer and provider clk APIs. Signed-off-by: Stephen Boyd --- drivers/clk/qcom/clk-regmap.c | 5 ++-- drivers/clk/qcom/clk-regma

[PATCH] clk: h8300: Migrate to clk_hw based registration APIs

2016-08-16 Thread Stephen Boyd
Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Yoshinori Sato Cc: Signed-off-by: Stephen Boyd --- drivers/clk/h8300/c

[PATCH v2] clk: max77686: Migrate to clk_hw based OF and registration APIs

2016-08-16 Thread Stephen Boyd
Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Javier Martinez Canillas Cc: Laxman Dewangan Cc: Krzysztof Kozlowski Si

[PATCH v2] clk: berlin: Migrate to clk_hw based registration and OF APIs

2016-08-16 Thread Stephen Boyd
Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. We also remove some __init markings in header files as they're useless and we'r

[PATCH v6 2/8] clk: rockchip: rk3399: add SCLK_DDRCLK ID for ddrc

2016-08-16 Thread Lin Huang
Signed-off-by: Lin Huang --- Changes in v6: -None Changes in v5: -None Changes in v4: -None Changes in v3: -None Changes in v2: -None Changes in v1: -None include/dt-bindings/clock/rk3399-cru.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/clock/rk3399-cru.h b/inc

[PATCH v6 4/8] Documentation: bindings: add dt documentation for dfi controller

2016-08-16 Thread Lin Huang
This patch adds the documentation for rockchip dfi devfreq-event driver. Signed-off-by: Lin Huang --- Changes in v6: -None Changes in v5: -None Changes in v4: -None Changes in v3: -None Changes in v2: -None Changes in v1: -None .../bindings/devfreq/event/rockchip-dfi.txt | 20 +++

[PATCH v6 1/8] clk: rockchip: add new clock-type for the ddrclk

2016-08-16 Thread Lin Huang
On new rockchip platform(rk3399 etc), there have dcf controller to do ddr frequency scaling, and this controller will implement in arm-trust-firmware. We add a special clock-type to handle that. Signed-off-by: Lin Huang --- Changes in v6: - none Changes in v5: - delete unuse mux_flag - use div_f

[PATCH v6 0/8] rk3399 support ddr frequency scaling

2016-08-16 Thread Lin Huang
rk3399 platform have dfi controller can monitor ddr load, and dcf controller to handle ddr register so we can get the right ddr frequency and make ddr controller happy work(which will implement in bl31). So we do ddr frequency scaling with following flow: kernel

[PATCH v6 8/8] drm/rockchip: Add dmc notifier in vop driver

2016-08-16 Thread Lin Huang
when in ddr frequency scaling process, vop can not do enable or disable operation, since dcf will base on vop vblank time to do frequency scaling and need to get vop irq if there have vop enabled. So need register to devfreq notifier, and we can get the dmc status. Also, when there have two vop ena

[PATCH v6 3/8] clk: rockchip: rk3399: add ddrc clock support

2016-08-16 Thread Lin Huang
add ddrc clock setting, so we can do ddr frequency scaling on rk3399 platform in future. Signed-off-by: Lin Huang --- Changes in v6: - None Changes in v5: - fit for the ddr type Changes in v4: - None Changes in v3: - None Changes in v2: - remove clk_ddrc_dpll_src from critical clock list Cha

[PATCH v6 6/8] Documentation: bindings: add dt documentation for rk3399 dmc

2016-08-16 Thread Lin Huang
This patch adds the documentation for rockchip rk3399 dmc driver. Signed-off-by: Lin Huang --- Changes in v6: -Add more detail in Documentation Changes in v5: -None Changes in v4: -None Changes in v3: -None Changes in v2: -None Changes in v1: -None .../devicetree/bindings/devfreq/rk3399_dm

[PATCH v6 5/8] PM / devfreq: event: support rockchip dfi controller

2016-08-16 Thread Lin Huang
on rk3399 platform, there is dfi conroller can monitor ddr load, base on this result, we can do ddr freqency scaling. Signed-off-by: Lin Huang Acked-by: Chanwoo Choi --- Changes in v6: -None Changes in v5: -None Changes in v4: -None Changes in v3: -None Changes in v2: -None Changes in v1:

[PATCH v6 7/8] PM / devfreq: rockchip: add devfreq driver for rk3399 dmc

2016-08-16 Thread Lin Huang
base on dfi result, we do ddr frequency scaling, register dmc driver to devfreq framework, and use simple-ondemand policy. Signed-off-by: Lin Huang Reviewed-by: Chanwoo Choi --- Changes in v6: - fix some nit suggest by Chanwoo Choi Changes in v5: - improve dmc driver suggest by Chanwoo Choi Ch

[PATCH 1/5] kernfs: allow creating kernfs objects with arbitrary uid/gid

2016-08-16 Thread Dmitry Torokhov
This change allows creating kernfs files and directories with arbitrary uid/gid instead of always using GLOBAL_ROOT_UID/GID by extending kernfs_create_dir_ns() and kernfs_create_file_ns() with uid/gid arguments. The "simple" kernfs_create_file() and kernfs_create_dir() are left alone and always cre

[PATCH 4/5] driver core: set up ownership of class devices in sysfs

2016-08-16 Thread Dmitry Torokhov
Plumb in get_ownership() callback for devices belonging to a class so that they can be created with uid/gid different from global root. This will allow network devices in a container to belong to container's root and not global root. Signed-off-by: Dmitry Torokhov --- drivers/base/core.c| 9

[PATCH 3/5] kobject: kset_create_and_add() - fetch ownership info from parent

2016-08-16 Thread Dmitry Torokhov
This change implements get_ownership() for ksets created with kset_create_and_add() call by fetching ownership data from parent kobject. This is done mostly for benefit of "queues" attribute of net devices so that corresponding directory belongs to container's root instead of global root for networ

[PACTH v4 3/3] Documentation/filesystems: Added /proc/PID/totmaps documentation

2016-08-16 Thread robert . foss
From: Robert Foss Added documentation covering /proc/PID/totmaps. Signed-off-by: Robert Foss --- Documentation/filesystems/proc.txt | 21 + 1 file changed, 21 insertions(+) diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 7d001be.

[PATCH 5/5] net-sysfs: make sure objects belong to contrainer's owner

2016-08-16 Thread Dmitry Torokhov
When creating various objects in /sys/class/net/... make sure that they belong to container's owner instead of global root (if they belong to a container/namespace). Signed-off-by: Dmitry Torokhov --- net/core/net-sysfs.c | 44 +++- 1 file changed, 43 inse

[PACTH v4 2/3] Documentation/filesystems: Fixed typo

2016-08-16 Thread robert . foss
From: Robert Foss Fixed a -> an typo. Signed-off-by: Robert Foss --- Documentation/filesystems/proc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index e8d0075..7d001be 100644 --- a/Documentation

[PACTH v4 0/3] Implement /proc//totmaps

2016-08-16 Thread robert . foss
From: Robert Foss This series provides the /proc/PID/totmaps feature, which summarizes the information provided by /proc/PID/smaps for improved performance and usability reasons. A use case is to speed up monitoring of memory consumption in environments where RSS isn't precise. For example C

[PATCH 0/5] Make /sys/class/net per net namespace objects belong to container

2016-08-16 Thread Dmitry Torokhov
There are objects in /sys hierarchy (/sys/class/net/) that logically belong to a namespace/container. Unfortunately all sysfs objects start their life belonging to global root, and while we could change ownership manually, keeping tracks of all objects that come and go is cumbersome. It would be be

[PATCH 2/5] sysfs, kobject: allow creating kobject belonging to arbitrary users

2016-08-16 Thread Dmitry Torokhov
Normally kobjects and their sysfs representation belong to global root, however it is not necessarily the case for objects in separate namespaces. For example, objects in separate network namespace logically belong to the container's root and not global root. This change lays groundwork for allowi

[PACTH v4 1/3] mm, proc: Implement /proc//totmaps

2016-08-16 Thread robert . foss
From: Robert Foss This is based on earlier work by Thiago Goncales. It implements a new per process proc file which summarizes the contents of the smaps file but doesn't display any addresses. It gives more detailed information than statm like the PSS (proprotional set size). It differs from th

Re: [PATCH v6 0/5] /dev/random - a new approach

2016-08-16 Thread H. Peter Anvin
On 08/15/16 22:45, Stephan Mueller wrote: > Am Montag, 15. August 2016, 13:42:54 CEST schrieb H. Peter Anvin: > > Hi H, > >> On 08/11/16 05:24, Stephan Mueller wrote: >>> * prevent fast noise sources from dominating slow noise sources >>> >>> in case of /dev/random >> >> Can someone please expl

Re: [bisected] "sched: Allow per-cpu kernel threads to run on online && !active" causes warning

2016-08-16 Thread Heiko Carstens
On Tue, Aug 16, 2016 at 11:42:05AM -0400, Tejun Heo wrote: > Hello, Peter. > > On Tue, Aug 16, 2016 at 05:29:49PM +0200, Peter Zijlstra wrote: > > On Tue, Aug 16, 2016 at 11:20:27AM -0400, Tejun Heo wrote: > > > As long as the mapping doesn't change after the first onlining of the > > > CPU, the w

[PATCH] ARC: Support syscall ABI v4

2016-08-16 Thread Vineet Gupta
The syscall ABI includes the gcc functional calling ABI since a syscall implies userland caller and kernel callee. The current gcc ABI (v3) for ARCv2 ISA required 64-bit data be passed in even-odd register pairs, (potentially punching reg holes when passing such values as args). This was partly dr

Re: [PATCH v1] power: reset: reboot mode: fix build error of missing ioremap/iounmap on UM

2016-08-16 Thread Sebastian Reichel
Hi Andy, On Tue, Aug 16, 2016 at 06:55:49PM +0800, Andy Yan wrote: > On 2016年08月12日 20:48, Krzysztof Kozlowski wrote: > > On 08/12/2016 12:01 PM, Andy Yan wrote: > > > commit 4fcd504edbf7 ("power: reset: add reboot mode driver") uses api from > > > syscon, and syscon uses ioremap/iounmap which dep

Re: [LKP] [lkp] [xfs] 68a9f5e700: aim7.jobs-per-min -13.6% regression

2016-08-16 Thread Dave Chinner
On Mon, Aug 15, 2016 at 06:51:42PM -0700, Linus Torvalds wrote: > Anyway, including the direct reclaim call paths gets > __remove_mapping() a bit higher, and _raw_spin_lock_irqsave climbs to > 0.26%. But perhaps more importlantly, looking at what __remove_mapping > actually *does* (apart from the s

Re: [PATCH 2/2] pipe: make pipe user buffer limit checks more precise

2016-08-16 Thread Vegard Nossum
On 08/16/2016 10:21 PM, Michael Kerrisk (man-pages) wrote: @@ -1132,8 +1136,8 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) if (!capable(CAP_SYS_RESOURCE) && size > pipe_max_size) { ret = -EPERM;

Re: [Documentation] State of CPU controller in cgroup v2

2016-08-16 Thread Tejun Heo
Hello, Peter. On Tue, Aug 16, 2016 at 04:07:38PM +0200, Peter Zijlstra wrote: > On Wed, Aug 10, 2016 at 06:09:44PM -0400, Johannes Weiner wrote: > > > [ That, and a disturbing number of emotional outbursts against > > systemd, which has nothing to do with any of this. ] > > Oh, so I'm entirely

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Steven Rostedt
On Tue, 16 Aug 2016 17:53:54 -0400 Steven Rostedt wrote: > WARN(1, "list_del corruption. next->prev should be %p, but was > %p\n", > entry, next->prev); > BUG_ON(CORRUPTED_DATA_STRUCTURE); > > Will always warn (as stated by "1") and and the BUG_ON

mmotm 2016-08-16-14-54 uploaded

2016-08-16 Thread akpm
The mm-of-the-moment snapshot 2016-08-16-14-54 has been uploaded to http://www.ozlabs.org/~akpm/mmotm/ mmotm-readme.txt says README for mm-of-the-moment: http://www.ozlabs.org/~akpm/mmotm/ This is a snapshot of my -mm patch queue. Uploaded at random hopefully more than once a week. You wi

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Steven Rostedt
On Tue, 16 Aug 2016 14:42:28 -0700 Kees Cook wrote: > > OK, I will bite... Why both the WARN() and the BUG_ON()? > > Mostly because not every case of BUG(CORRUPTED_DATA_STRUCTURE) is > cleanly paired with a WARN (see the workqueue addition that wants to > dump locks too). I could rearrange t

[PATCH 2/2] net: sched: avoid duplicates in qdisc dump

2016-08-16 Thread Jiri Kosina
From: Jiri Kosina tc_dump_qdisc() performs dumping of the per-device qdiscs in two phases; first, the "standard" dev->qdisc is being dumped. Second, if there is/are ingress queue(s), they are being dumped as well. After conversion of netdevice's qdisc linked-list into hashtable, these two set

[PATCH 1/2] net: sched: fix handling of singleton qdiscs with qdisc_hash

2016-08-16 Thread Jiri Kosina
From: Jiri Kosina qdisc_match_from_root() is now iterating over per-netdevice qdisc hashtable instead of going through a linked-list of qdiscs (independently on the actual underlying netdev), which was the case before the switch to hashtable for qdiscs. For singleton qdiscs, there is no under

[PATCH next-next 0/2] qdisc-hashtable fixes

2016-08-16 Thread Jiri Kosina
The following two patches fix all the issues that have been reported against the conversion of qdisc linked list to hashtable (currently in net-next) so far. First patch adjusts handling of singleton qdiscs to the new semantics, and is rather straightforward. The second patch, which fixes "cos

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Laura Abbott
On 08/16/2016 02:11 PM, Kees Cook wrote: The kernel checks for several cases of data structure corruption under either normal runtime, or under various CONFIG_DEBUG_* settings. When corruption is detected, some systems may want to BUG() immediately instead of letting the corruption continue. Many

RE: [PATCH v2 RESEND 2/4] Drivers: hv: balloon: account for gaps in hot add regions

2016-08-16 Thread Alex Ng (LIS)
> >> static unsigned long handle_pg_range(unsigned long pg_start, @@ - > 834,13 > >> +881,19 @@ static unsigned long process_hot_add(unsigned long > pg_start, > >>unsigned long rg_size) > >> { > >>struct hv_hotadd_state *ha_region = NULL; > >> + int covere

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Kees Cook
On Tue, Aug 16, 2016 at 2:26 PM, Paul E. McKenney wrote: > On Tue, Aug 16, 2016 at 02:11:04PM -0700, Kees Cook wrote: >> The kernel checks for several cases of data structure corruption under >> either normal runtime, or under various CONFIG_DEBUG_* settings. When >> corruption is detected, some s

[PATCH] ARC: Change ld.as instruction to regular ld.

2016-08-16 Thread Liav Rehana
From: Liav Rehana The instruction ld.as takes as operands a base address and an offset, and doesn't access the sum of these two, but the sum of the base address and a shifted version of the offset. This isn't what we want in that case, since it causes a bug during the push and pop of r25, since h

Re: [PATCH] [media] vb2: move dma-buf unmap from __vb2_dqbuf() to vb2_buffer_done()

2016-08-16 Thread Javier Martinez Canillas
Hello Sakari, On 08/16/2016 05:13 PM, Sakari Ailus wrote: > Hi Javier, > > Javier Martinez Canillas wrote: >> Hello Sakari, >> >> On 08/16/2016 04:47 PM, Sakari Ailus wrote: >>> Hi Javier, >>> >>> Javier Martinez Canillas wrote: Hello Hans, Thanks a lot for your feedback.

[PATCH v15 00/13] support "task_isolation" mode

2016-08-16 Thread Chris Metcalf
Here is a respin of the task-isolation patch set. Again, I have been getting email asking me when and where this patch will be upstreamed so folks can start using it. I had been thinking the obvious path was via Frederic Weisbecker to Ingo as a NOHZ kind of thing. But perhaps it touches enough o

Re: [PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Paul E. McKenney
On Tue, Aug 16, 2016 at 02:11:04PM -0700, Kees Cook wrote: > The kernel checks for several cases of data structure corruption under > either normal runtime, or under various CONFIG_DEBUG_* settings. When > corruption is detected, some systems may want to BUG() immediately instead > of letting the c

[PACTH v3] mmc: sdhci: Do not allow tuning procedure to be interrupted

2016-08-16 Thread robert . foss
From: Christopher Freeman wait_event_interruptible_timeout() will return early if the blocked process receives a signal, causing the driver to abort the tuning procedure and possibly leaving the controller in a bad state. Since the tuning command is expected to complete quickly (<50ms) and we've

Re: [PATCH] sh: Fix building j2_defconfig

2016-08-16 Thread Jason Cooper
Hi Rob, On Tue, Aug 16, 2016 at 04:15:22PM -0500, Rob Landley wrote: > On 08/16/2016 10:41 AM, Jason Cooper wrote: > > When targeting the j2, we need to retain '-m2'. Previously, the > > Makefile blew out -m2 on the next line via :=. > > > > Fix this by s/:=/+=/ when building for the J2. > > > >

[PATCH v15 07/13] arm64: factor work_pending state machine to C

2016-08-16 Thread Chris Metcalf
Currently ret_fast_syscall, work_pending, and ret_to_user form an ad-hoc state machine that can be difficult to reason about due to duplicated code and a large number of branch targets. This patch factors the common logic out into the existing do_notify_resume function, converting the code to C in

[PATCH v15 03/13] lru_add_drain_all: factor out lru_add_drain_needed

2016-08-16 Thread Chris Metcalf
This per-cpu check was being done in the loop in lru_add_drain_all(), but having it be callable for a particular cpu is helpful for the task-isolation patches. Signed-off-by: Chris Metcalf --- include/linux/swap.h | 1 + mm/swap.c| 15 ++- 2 files changed, 11 insertions(

[PATCH v15 08/13] arch/arm64: enable task isolation functionality

2016-08-16 Thread Chris Metcalf
In do_notify_resume(), call task_isolation_ready() for TIF_TASK_ISOLATION tasks when we are checking the thread-info flags; and after we've handled the other work, call task_isolation_enter() for such tasks. To ensure we always call task_isolation_enter() when returning to userspace, add _TIF_TASK

[PATCH v15 01/13] vmstat: add quiet_vmstat_sync function

2016-08-16 Thread Chris Metcalf
In commit f01f17d3705b ("mm, vmstat: make quiet_vmstat lighter") the quiet_vmstat() function became asynchronous, in the sense that the vmstat work was still scheduled to run on the core when the function returned. For task isolation, we need a synchronous version of the function that guarantees t

[PATCH v15 12/13] task_isolation: add user-settable notification signal

2016-08-16 Thread Chris Metcalf
By default, if a task in task isolation mode re-enters the kernel, it is terminated with SIGKILL. With this commit, the application can choose what signal to receive on a task isolation violation by invoking prctl() with PR_TASK_ISOLATION_ENABLE, or'ing in the PR_TASK_ISOLATION_USERSIG bit, and se

[PATCH v15 13/13] task_isolation self test

2016-08-16 Thread Chris Metcalf
This code tests various aspects of task_isolation. Signed-off-by: Chris Metcalf --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/task_isolation/Makefile| 11 + tools/testing/selftests/task_isolation/config | 2 + tools/testing/selftests/task_iso

[PATCH v15 04/13] task_isolation: add initial support

2016-08-16 Thread Chris Metcalf
The existing nohz_full mode is designed as a "soft" isolation mode that makes tradeoffs to minimize userspace interruptions while still attempting to avoid overheads in the kernel entry/exit path, to provide 100% kernel semantics, etc. However, some applications require a "hard" commitment from th

[PATCH v15 10/13] arm, tile: turn off timer tick for oneshot_stopped state

2016-08-16 Thread Chris Metcalf
When the schedule tick is disabled in tick_nohz_stop_sched_tick(), we call hrtimer_cancel(), which eventually calls down into __remove_hrtimer() and thus into hrtimer_force_reprogram(). That function's call to tick_program_event() detects that we are trying to set the expiration to KTIME_MAX and ca

Re: [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()

2016-08-16 Thread Vaibhav Hiremath
On Monday 15 August 2016 06:33 PM, Peter Chen wrote: On Mon, Aug 15, 2016 at 11:31:10AM -0700, Vaibhav Hiremath wrote: In case of HUB devices connected to USB ports, we may not have DT node representing it inside USB, and when devices connected to hub gets enumerated, call to usb_of_get_child_

[PATCH v15 05/13] task_isolation: track asynchronous interrupts

2016-08-16 Thread Chris Metcalf
This commit adds support for tracking asynchronous interrupts delivered to task-isolation tasks, e.g. IPIs or IRQs. Just as for exceptions and syscalls, when this occurs we arrange to deliver a signal to the task so that it knows it has been interrupted. If the task is interrupted by an NMI, we c

[PATCH v15 09/13] arch/tile: enable task isolation functionality

2016-08-16 Thread Chris Metcalf
We add the necessary call to task_isolation_enter() in the prepare_exit_to_usermode() routine. We already unconditionally call into this routine if TIF_NOHZ is set, since that's where we do the user_enter() call. We add calls to task_isolation_quiet_exception() in places where exceptions may not

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-08-16 Thread Rafał Miłecki
On 29 July 2016 at 09:09, Rafał Miłecki wrote: > HI Rob, > > I got problems following your objections, so it took me some time to > go back to this. > > On 21 July 2016 at 22:42, Rob Herring wrote: >> On Wed, Jul 20, 2016 at 10:06:23AM +0200, Rafał Miłecki wrote: >>> On 20 July 2016 at 03:02, Rob

[PATCH v15 11/13] task_isolation: support CONFIG_TASK_ISOLATION_ALL

2016-08-16 Thread Chris Metcalf
This option, similar to NO_HZ_FULL_ALL, simplifies configuring a system to boot by default with all cores except the boot core running in task isolation mode. Signed-off-by: Chris Metcalf --- init/Kconfig | 10 ++ kernel/isolation.c | 6 ++ 2 files changed, 16 insertions(+) d

[PATCH v15 06/13] arch/x86: enable task isolation functionality

2016-08-16 Thread Chris Metcalf
In exit_to_usermode_loop(), call task_isolation_ready() for TIF_TASK_ISOLATION tasks when we are checking the thread-info flags, and after we've handled the other work, call task_isolation_enter() for such tasks. In syscall_trace_enter_phase1(), we add the necessary support for reporting syscalls

[PATCH v15 02/13] vmstat: add vmstat_idle function

2016-08-16 Thread Chris Metcalf
This function checks to see if a vmstat worker is not running, and the vmstat diffs don't require an update. The function is called from the task-isolation code to see if we need to actually do some work to quiet vmstat. Acked-by: Christoph Lameter Signed-off-by: Chris Metcalf --- include/linu

Re: [PATCH] sh: Fix building j2_defconfig

2016-08-16 Thread Rob Landley
On 08/16/2016 10:41 AM, Jason Cooper wrote: > When targeting the j2, we need to retain '-m2'. Previously, the > Makefile blew out -m2 on the next line via :=. > > Fix this by s/:=/+=/ when building for the J2. > > Fixes: 5a846abad07f6 ("sh: add support for J-Core J2 processor") > Signed-off-by: J

Re: [PATCH] [media] vb2: move dma-buf unmap from __vb2_dqbuf() to vb2_buffer_done()

2016-08-16 Thread Sakari Ailus
Hi Javier, Javier Martinez Canillas wrote: > Hello Sakari, > > On 08/16/2016 04:47 PM, Sakari Ailus wrote: >> Hi Javier, >> >> Javier Martinez Canillas wrote: >>> Hello Hans, >>> >>> Thanks a lot for your feedback. >>> >>> On 08/13/2016 09:47 AM, Hans Verkuil wrote: On 07/20/2016 08:22 PM, J

[PATCH 1/5] list: Split list_add() debug checking into separate function

2016-08-16 Thread Kees Cook
Right now, __list_add() code is repeated either in list.h or in list_debug.c, but only the debug checks are the different part. This extracts the checking into a separate function and consolidates __list_add(). Additionally this __list_add_debug() will stop list manipulations if a corruption is det

[PATCH 4/5] bug: Provide toggle for BUG on data corruption

2016-08-16 Thread Kees Cook
The kernel checks for several cases of data structure corruption under either normal runtime, or under various CONFIG_DEBUG_* settings. When corruption is detected, some systems may want to BUG() immediately instead of letting the corruption continue. Many of these manipulation primitives can be us

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