Re: [Patch V2] x86, mce: Ensure offline CPU's don't participate in mce rendezvous process.

2015-12-08 Thread Borislav Petkov
On Tue, Dec 08, 2015 at 03:59:58PM +, Luck, Tony wrote: > > No, the system did panic in both times. The "strange" observation is > > that the MCE gets reported only on the cores on node 0. Or at least only > > the printks from mce_panic() on the cores on node0 reach the serial > > console. >

Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on the slow path

2015-12-08 Thread Ingo Molnar
* Brian Gerst wrote: > > We could adjust it a bit and check whether we're in C land (by checking rsp > > for ts) and jump into the slow path if we aren't, but I'm not sure this is > > a > > huge win. It does save some rodata space by avoiding duplicating the table. > > The syscall table is

Re: [PATCH] power: qcom_smbb: Add otg regulator for control of vbus

2015-12-08 Thread Tim Bird
On 12/05/2015 08:07 AM, Sebastian Reichel wrote: > Hi Tim, > > On Thu, Oct 22, 2015 at 02:12:17PM -0700, Tim Bird wrote: >> Add a regulator to control the OTG chargepath switch. The OTG >> switch gets its power from pm8941_5vs1, and that should be expressed >> as an usb_otg_in-supply property

[RFC][PATCH] ppc: Implement save_stack_trace_regs()

2015-12-08 Thread Steven Rostedt
It has come to my attention that kprobe event stack tracing does not work on powerpc. You can see with the following: # cd /sys/kernel/debug/tracing # echo stacktrace > trace_options # echo 'p kfree' > kprobe_events # echo 'r exit_mmap' >> kprobe_events # echo 1 > events/kprobes/enable

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 07:16:26PM +0100, Jiri Olsa wrote: > On Mon, Dec 07, 2015 at 10:21:52PM -0600, Josh Poimboeuf wrote: > > The perf subcommand framework is needed for other tools. Move > > parse-options.c and its dependencies over to libapi. > > > > Any function names with 'perf' have been

Re: [PATCH v2 01/14] perf: Fix 'make clean'

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 07:40:43PM +0100, Jiri Olsa wrote: > On Tue, Dec 08, 2015 at 06:40:12PM +0100, Jiri Olsa wrote: > > On Mon, Dec 07, 2015 at 10:21:39PM -0600, Josh Poimboeuf wrote: > > > Add some missing files to the 'make clean' target. > > > > > > Reported-by: Jiri Olsa > > >

Re: [PATCH 30/34] x86, fpu: allow setting of XSAVE state

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > > From: Dave Hansen > > We want to modify the Protection Key rights inside the kernel, so > we need to change PKRU's contents. But, if we do a plain > 'wrpkru', when we return to userspace we might do an XRSTOR and > wipe out the kernel's 'wrpkru'.

Re: [PATCH 28/34] x86: wire up mprotect_key() system call

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > #include > diff -puN mm/Kconfig~pkeys-16-x86-mprotect_key mm/Kconfig > --- a/mm/Kconfig~pkeys-16-x86-mprotect_key2015-12-03 16:21:31.114920208 > -0800 > +++ b/mm/Kconfig 2015-12-03 16:21:31.119920435 -0800 > @@ -679,4 +679,5 @@ config

Re: [PATCH 1/7] kernfs: Add API to generate relative kernfs path

2015-12-08 Thread Serge E. Hallyn
On Tue, Dec 08, 2015 at 10:52:51AM -0500, Tejun Heo wrote: > Hello, Serge. > > On Mon, Dec 07, 2015 at 05:06:16PM -0600, serge.hal...@ubuntu.com wrote: > > +/* kernfs_node_depth - compute depth from @from to @to */ > > +static size_t kernfs_node_distance(struct kernfs_node *from, struct > >

Re: [PATCH 29/34] x86: separate out LDT init from context init

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > The arch-specific mm_context_t is a great place to put > protection-key allocation state. > > But, we need to initialize the allocation state because pkey 0 is > always "allocated". All of the runtime initialization of > mm_context_t is done in *_ldt()

Re: [PATCH v2 01/14] perf: Fix 'make clean'

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 06:40:12PM +0100, Jiri Olsa wrote: > On Mon, Dec 07, 2015 at 10:21:39PM -0600, Josh Poimboeuf wrote: > > Add some missing files to the 'make clean' target. > > > > Reported-by: Jiri Olsa > > Signed-off-by: Josh Poimboeuf > > --- > > tools/perf/Makefile.perf | 13

Re: [PATCH 27/34] x86, pkeys: make mprotect_key() mask off additional vm_flags

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > > From: Dave Hansen > > Today, mprotect() takes 4 bits of data: PROT_READ/WRITE/EXEC/NONE. > Three of those bits: READ/WRITE/EXEC get translated directly in to > vma->vm_flags by calc_vm_prot_bits(). If a bit is unset in > mprotect()'s 'prot' argument

Re: [PATCH v2 01/14] perf: Fix 'make clean'

2015-12-08 Thread Jiri Olsa
On Tue, Dec 08, 2015 at 06:40:12PM +0100, Jiri Olsa wrote: > On Mon, Dec 07, 2015 at 10:21:39PM -0600, Josh Poimboeuf wrote: > > Add some missing files to the 'make clean' target. > > > > Reported-by: Jiri Olsa > > Signed-off-by: Josh Poimboeuf > > --- > > tools/perf/Makefile.perf | 13

Re: [RFC PATCH v2 5/6] samples: livepatch: init reloc section array and mark as klp module

2015-12-08 Thread Josh Poimboeuf
On Mon, Nov 30, 2015 at 11:21:18PM -0500, Jessica Yu wrote: > Create the array of klp relocation sections in the sample > klp_object (even if the array is empty in this case). > > In addition, mark the module as a livepatch module so that > the module loader can appropriately identify and

Re: [PATCH 25/34] x86, pkeys: add arch_validate_pkey()

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > +#define arch_max_pkey() (boot_cpu_has(X86_FEATURE_OSPKE) ? \ > + CONFIG_NR_PROTECTION_KEYS : 1) Should this really be a config option? Can't that value change ? Thanks, tglx -- To unsubscribe from this list: send

Re: [RFC PATCH v2 4/6] livepatch: reuse module loader code to write relocations

2015-12-08 Thread Josh Poimboeuf
On Mon, Nov 30, 2015 at 11:21:17PM -0500, Jessica Yu wrote: > Reuse module loader code to write relocations, thereby eliminating the need > for architecture specific relocation code in livepatch. Namely, we reuse > apply_relocate_add() in the module loader to write relocations instead of >

Re: [PATCH v2] ARM: mm: mark section-aligned portion of rodata NX

2015-12-08 Thread Kees Cook
On Mon, Dec 7, 2015 at 11:47 PM, Ard Biesheuvel wrote: > On 7 December 2015 at 23:35, Kees Cook wrote: >> When rodata is large enough that it crosses a section boundary after the >> kernel text, mark the rest NX. This is as close to full NX of rodata as >> we can get without splitting page

[PATCH 1/8] mm: memcontrol: drop unused @css argument in memcg_init_kmem

2015-12-08 Thread Johannes Weiner
Signed-off-by: Johannes Weiner --- include/net/tcp_memcontrol.h | 3 ++- mm/memcontrol.c | 6 +++--- net/ipv4/tcp_memcontrol.c| 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/net/tcp_memcontrol.h b/include/net/tcp_memcontrol.h index 3a17b16..dc2da2f

[PATCH 4/8] mm: memcontrol: group kmem init and exit functions together

2015-12-08 Thread Johannes Weiner
Put all the related code to setup and teardown the kmem accounting state into the same location. No functional change intended. Signed-off-by: Johannes Weiner --- mm/memcontrol.c | 157 +++- 1 file changed, 76 insertions(+), 81 deletions(-)

Re: [PATCH 10/34] x86, pkeys: arch-specific protection bitsy

2015-12-08 Thread Thomas Gleixner
On Tue, 8 Dec 2015, Thomas Gleixner wrote: > On Tue, 8 Dec 2015, Dave Hansen wrote: > > > Here's how it looks with the suggested modifications. > > > > Whatever compiler wonkiness I was seeing is gone now, so I've used the > > most straightforward version of the shifts. > > > +* gcc

[PATCH 7/8] mm: memcontrol: account "kmem" consumers in cgroup2 memory controller

2015-12-08 Thread Johannes Weiner
The original cgroup memory controller has an extension to account slab memory (and other "kernel memory" consumers) in a separate "kmem" counter, once the user set an explicit limit on that "kmem" pool. However, this includes various consumers whose sizes are directly linked to userspace

[PATCH 8/8] mm: memcontrol: introduce CONFIG_MEMCG_LEGACY_KMEM

2015-12-08 Thread Johannes Weiner
Let the user know that CONFIG_MEMCG_KMEM does not apply to the cgroup2 interface. This also makes legacy-only code sections stand out better. Signed-off-by: Johannes Weiner --- include/linux/memcontrol.h | 4 ++-- init/Kconfig | 10 +- mm/memcontrol.c| 16

Re: use-after-free in __perf_install_in_context

2015-12-08 Thread Dmitry Vyukov
On Tue, Dec 8, 2015 at 7:05 PM, Alexei Starovoitov wrote: > On Tue, Dec 08, 2015 at 06:56:23PM +0100, Dmitry Vyukov wrote: >> On Tue, Dec 8, 2015 at 6:54 PM, Alexei Starovoitov >> wrote: >> > On Tue, Dec 08, 2015 at 05:12:04PM +0100, Dmitry Vyukov wrote: >> >> On Tue, Dec 8, 2015 at 4:24 AM,

[PATCH 5/8] mm: memcontrol: separate kmem code from legacy tcp accounting code

2015-12-08 Thread Johannes Weiner
The cgroup2 memory controller will include important in-kernel memory consumers per default, including socket memory, but it will no longer carry the historic tcp control interface. Separate the kmem state init from the tcp control interface init in preparation for that. Signed-off-by: Johannes

[PATCH 2/8] mm: memcontrol: remove double kmem page_counter init

2015-12-08 Thread Johannes Weiner
The kmem page_counter's limit is initialized to PAGE_COUNTER_MAX inside mem_cgroup_css_online(). There is no need to repeat this from memcg_propagate_kmem(). Signed-off-by: Johannes Weiner --- mm/memcontrol.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff

[PATCH 3/8] mm: memcontrol: give the kmem states more descriptive names

2015-12-08 Thread Johannes Weiner
On any given memcg, the kmem accounting feature has three separate states: not initialized, structures allocated, and actively accounting slab memory. These are represented through a combination of the kmem_acct_activated and kmem_acct_active flags, which is confusing. Convert to a kmem_state

[PATCH 6/8] mm: memcontrol: move kmem accounting code to CONFIG_MEMCG

2015-12-08 Thread Johannes Weiner
The cgroup2 memory controller will account important in-kernel memory consumers per default. Move all necessary components to CONFIG_MEMCG. Signed-off-by: Johannes Weiner --- include/linux/list_lru.h | 4 +- include/linux/memcontrol.h | 317 ++---

[PATCH 0/8] mm: memcontrol: account "kmem" in cgroup2

2015-12-08 Thread Johannes Weiner
Hi, this series adds accounting of the historical "kmem" memory consumers to the cgroup2 memory controller. These consumers include the dentry cache, the inode cache, kernel stack pages, and a few others that are pointed out in patch 7/8. The footprint of these consumers is directly tied to

[PATCH v2 7/9] drm/vc4: Add support for drawing 3D frames.

2015-12-08 Thread Eric Anholt
The user submission is basically a pointer to a command list and a pointer to uniforms. We copy those in to the kernel, validate and relocate them, and store the result in a GPU BO which we queue for execution. Signed-off-by: Eric Anholt --- v2: Drop support for NV shader recs (not necessary

[PATCH v2 8/9] drm/vc4: Add support for async pageflips.

2015-12-08 Thread Eric Anholt
An async pageflip stores the modeset to be done and executes it once the BOs are ready to be displayed. This gets us about 3x performance in full screen rendering with pageflipping. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_crtc.c | 99 +-

[PATCH] powercap, intel_rapl.c, fix BIOS lock check

2015-12-08 Thread Prarit Bhargava
Intel RAPL initialized on several systems where the BIOS lock bit (msr 0x610, bit 63) was set. This occured because the return value of rapl_read_data_raw() was being checked, rather than the value of the variable passed in, locked. This patch properly implments the rapl_read_data_raw() call to

[PATCH v2 6/9] drm/vc4: Bind and initialize the V3D engine.

2015-12-08 Thread Eric Anholt
This is the component of the GPU that does 3D rendering. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/Makefile | 1 + drivers/gpu/drm/vc4/vc4_debugfs.c | 2 + drivers/gpu/drm/vc4/vc4_drv.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 13 +++ drivers/gpu/drm/vc4/vc4_v3d.c

[PATCH v2 9/9] drm/vc4: Add an interface for capturing the GPU state after a hang.

2015-12-08 Thread Eric Anholt
This can be parsed with vc4-gpu-tools tools for trying to figure out what was going on. Signed-off-by: Eric Anholt --- v2: Use __u32-style types. drivers/gpu/drm/vc4/vc4_drv.c | 2 + drivers/gpu/drm/vc4/vc4_drv.h | 4 + drivers/gpu/drm/vc4/vc4_gem.c | 185

Re: [RFC PATCH v2 2/6] module: preserve Elf information for livepatch modules

2015-12-08 Thread Josh Poimboeuf
On Mon, Nov 30, 2015 at 11:21:15PM -0500, Jessica Yu wrote: > For livepatch modules, copy Elf section, symbol, and string information > from the load_info struct in the module loader. > > Livepatch uses special relocation sections in order to be able to patch > modules that are not yet loaded, as

[PATCH v2 5/9] drm/vc4: Fix a typo in a V3D debug register.

2015-12-08 Thread Eric Anholt
Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h index 9e4e904..4e52a0a 100644 --- a/drivers/gpu/drm/vc4/vc4_regs.h +++

[PATCH v2 4/9] drm/vc4: Add an API for creating GPU shaders in GEM BOs.

2015-12-08 Thread Eric Anholt
Since we have no MMU, the kernel needs to validate that the submitted shader code won't make any accesses to memory that the user doesn't control, which involves banning some operations (general purpose DMA writes), and tracking where we need to write out pointers for other operations (texture

[PATCH v2 3/9] drm/vc4: Add create and map BO ioctls.

2015-12-08 Thread Eric Anholt
While there exist dumb APIs for creating and mapping BOs, one of the rules is that drivers doing 3D acceleration have to provide their own APIs for buffer allocation (besides, the pitch/height parameters of the dumb alloc don't really make sense for a lot of 3D allocations). Signed-off-by: Eric

[PATCH v2 2/9] drm/vc4: Add a BO cache.

2015-12-08 Thread Eric Anholt
We need to allocate new BOs in the kernel as part of each frame, but the CMA allocator is way too slow for that. As an optimization, keep track of recently-freed BOs and reuse them, with a 1 second timeout to fully free them back to the system. This improves 3D performance by about 15%.

[PATCH v2 1/9] drm: Create a driver hook for allocating GEM object structs.

2015-12-08 Thread Eric Anholt
The CMA helpers had no way for a driver to extend the struct with its own fields. Since the CMA helpers are mostly "Allocate a drm_gem_cma_object, then fill in a few fields", it's hard to write as pure helpers without passing in a driver callback for the allocate step. Signed-off-by: Eric Anholt

[PATCH v2 0/9] VC4 3D rendering support.

2015-12-08 Thread Eric Anholt
Updated version of the patch series for Emil's comments about vc4_drm.h. I also pulled in some improvements to the validation code which I'd written in Mesa and failed to propagate to this branch. The series can be found at: https://github.com/anholt/linux/tree/vc4-kms-v3d-squash-2 and a

Re: [PATCH 16/34] x86, mm: simplify get_user_pages() PTE bit handling

2015-12-08 Thread Dave Hansen
On 12/08/2015 10:01 AM, Thomas Gleixner wrote: > static inline int pte_allows_gup(unsigned long pteval, int write) > { > unsigned long mask = _PAGE_PRESENT|_PAGE_USER; > > if (write) > mask |= _PAGE_RW; > > if ((pteval & mask) != mask) > return 0; >

Re: [PATCH 10/34] x86, pkeys: arch-specific protection bitsy

2015-12-08 Thread Thomas Gleixner
On Tue, 8 Dec 2015, Dave Hansen wrote: > Here's how it looks with the suggested modifications. > > Whatever compiler wonkiness I was seeing is gone now, so I've used the > most straightforward version of the shifts. > +* gcc generates better code if we do this rather than: > +*

Re: [PATCH] dm ioctl: Access user-land memory through safe functions.

2015-12-08 Thread Scotty Bauer
On 12/01/2015 11:11 AM, Scotty wrote: > > 0001-dm-ioctl-Access-user-land-memory-through-safe-functi.patch > > > From b26adf880eba03ac6f2b1dd87426bb96fd2a0282 Mon Sep 17 00:00:00 2001 > From: Scotty Bauer > Date: Tue, 1 Dec 2015 10:52:46 -0700 > Subject: [PATCH] dm ioctl: Access user-land

Re: [PATCH 23/34] x86, pkeys: add Kconfig prompt to existing config option

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > I don't have a strong opinion on whether we need this or not. > Protection Keys has relatively little code associated with it, > and it is not a heavyweight feature to keep enabled. However, > I can imagine that folks would still appreciate being able to >

Re: [PATCH 22/34] x86, pkeys: dump PTE pkey in /proc/pid/smaps

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > The protection key can now be just as important as read/write > permissions on a VMA. We need some debug mechanism to help > figure out if it is in play. smaps seems like a logical > place to expose it. > > arch/x86/kernel/setup.c is a bit of a weirdo

Re: [PATCH 21/34] x86, pkeys: dump PKRU with other kernel registers

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > > From: Dave Hansen > > I'm a bit ambivalent about whether this is needed or not. > > Protection Keys never affect kernel mappings. But, they can > affect whether the kernel will fault when it touches a user > mapping. But, the kernel doesn't touch

Re: [PATCH v2 3/5] ARM: bcm2835: add rpi power domain driver

2015-12-08 Thread Kevin Hilman
Hi Eric, Eric Anholt writes: > Kevin Hilman writes: > >> Eric Anholt writes: >> >>> From: Alexander Aring >>> >>> This patch adds support for several power domains on Raspberry Pi, >>> including USB (so it can be enabled even if the bootloader didn't do >>> it), and graphics. >>> >>> This

Re: [PATCH 20/34] x86, pkeys: differentiate instruction fetches

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, > - bool write, bool foreign) > + bool write, bool execute, bool foreign) > + /* > + * gups are always data accesses, not instruction > + *

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-08 Thread Jiri Olsa
On Mon, Dec 07, 2015 at 10:21:52PM -0600, Josh Poimboeuf wrote: > The perf subcommand framework is needed for other tools. Move > parse-options.c and its dependencies over to libapi. > > Any function names with 'perf' have been renamed to something more > generic. > > Also created a util_cfg

Re: [PATCH 19/34] x86, pkeys: optimize fault handling in access_error()

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > diff -puN arch/x86/mm/fault.c~pkeys-15-access_error arch/x86/mm/fault.c > --- a/arch/x86/mm/fault.c~pkeys-15-access_error 2015-12-03 > 16:21:26.872727820 -0800 > +++ b/arch/x86/mm/fault.c 2015-12-03 16:21:26.876728002 -0800 > @@ -900,10 +900,16

Re: [PATCH 17/34] x86, pkeys: check VMAs and PTEs for protection keys

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > Today, for normal faults and page table walks, we check the VMA > and/or PTE to ensure that it is compatible with the action. For > instance, if we get a write fault on a non-writeable VMA, we > SIGSEGV. > > We try to do the same thing for protection

Re: [PATCH net-next 1/2] net: hns: enet specisies a reference to dsaf

2015-12-08 Thread Florian Fainelli
Subject: s/specisies/specifies/? On 04/12/15 23:59, yankejian wrote: > enet is associating with dasf. before this patch, the association is > the same strings between ae-name and dsa-name. in a general way, enet > specifies a reference to dsaf should be a good idea. so this patch > deletes the

Re: [PATCH 10/34] x86, pkeys: arch-specific protection bitsy

2015-12-08 Thread Dave Hansen
Here's how it looks with the suggested modifications. Whatever compiler wonkiness I was seeing is gone now, so I've used the most straightforward version of the shifts. From: Dave Hansen Lots of things seem to do: vma->vm_page_prot = vm_get_page_prot(flags); and the ptes get created

[PATCH V1] input: da9063: report KEY_POWER instead of KEY_SLEEP during power key-press

2015-12-08 Thread Steve Twiss
From: Steve Twiss Stop reporting KEY_SLEEP for a short key-press and report KEY_POWER instead This change applied to both DA9063 and DA9062 ONKEY drivers. Signed-off-by: Steve Twiss --- This patch applies against linux-next and v4.4-rc4 Regards, Steve drivers/input/misc/da9063_onkey.c |

Re: use-after-free in __perf_install_in_context

2015-12-08 Thread Alexei Starovoitov
On Tue, Dec 08, 2015 at 06:56:23PM +0100, Dmitry Vyukov wrote: > On Tue, Dec 8, 2015 at 6:54 PM, Alexei Starovoitov > wrote: > > On Tue, Dec 08, 2015 at 05:12:04PM +0100, Dmitry Vyukov wrote: > >> On Tue, Dec 8, 2015 at 4:24 AM, Alexei Starovoitov > >> wrote: > >> > On Mon, Dec 07, 2015 at

Re: [PATCH 16/34] x86, mm: simplify get_user_pages() PTE bit handling

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > > From: Dave Hansen > > The current get_user_pages() code is a wee bit more complicated > than it needs to be for pte bit checking. Currently, it establishes > a mask of required pte _PAGE_* bits and ensures that the pte it > goes after has all those

[PATCH] Create sysfs entries for VPD-R keys

2015-12-08 Thread Jordan Hargrave
The VPD-R is a readonly area contained within the PCI Vital Product data. There are some standard and vendor-specific keys stored in this region. PN = Part Number SN = Serial Number MN = Manufacturer ID Vx = Vendor-specific (x=0..9 A..Z) Biosdevname/Systemd will use these VPD keys for

Re: use-after-free in __perf_install_in_context

2015-12-08 Thread Dmitry Vyukov
On Tue, Dec 8, 2015 at 6:54 PM, Alexei Starovoitov wrote: > On Tue, Dec 08, 2015 at 05:12:04PM +0100, Dmitry Vyukov wrote: >> On Tue, Dec 8, 2015 at 4:24 AM, Alexei Starovoitov >> wrote: >> > On Mon, Dec 07, 2015 at 05:09:21PM +0100, Dmitry Vyukov wrote: >> >> > So it would be _awesome_ if we

Re: use-after-free in __perf_install_in_context

2015-12-08 Thread Alexei Starovoitov
On Tue, Dec 08, 2015 at 05:12:04PM +0100, Dmitry Vyukov wrote: > On Tue, Dec 8, 2015 at 4:24 AM, Alexei Starovoitov > wrote: > > On Mon, Dec 07, 2015 at 05:09:21PM +0100, Dmitry Vyukov wrote: > >> > So it would be _awesome_ if we could somehow extend this callchain to > >> > include the site that

[PATCH] iio/inkern.c Use list_for_each_entry_safe

2015-12-08 Thread Anshul Garg
Use list_for_each_entry_safe instead of list_for_each_safe and list_entry call. Signed-off-by: Anshul Garg --- drivers/iio/inkern.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index c8bad3c..f764eb6 100644 ---

Re: [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI

2015-12-08 Thread Jeremy Linton
On 10/27/2015 11:38 AM, Tomasz Nowicki wrote: From the functionality point of view this series might be split into two logic parts: 1. Making MMCONFIG code arch-agnostic which allows all architectures to collect PCI config regions and used when necessary. 2. Using generic MMCONFIG code and

Re: [PATCH] LDM: use list_for_each_entry*

2015-12-08 Thread Richard Russon
On Tue, Dec 08, 2015 at 10:25:41PM +0800, Geliang Tang wrote: > Use list_for_each_entry*() instead of list_for_each*() to simplify > the code. Fix coding style by the way. Looks good to me. Thanks for letting me know. Rich -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v2 01/14] perf: Fix 'make clean'

2015-12-08 Thread Jiri Olsa
On Mon, Dec 07, 2015 at 10:21:39PM -0600, Josh Poimboeuf wrote: > Add some missing files to the 'make clean' target. > > Reported-by: Jiri Olsa > Signed-off-by: Josh Poimboeuf > --- > tools/perf/Makefile.perf | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff

Re: [PATCH mmotm] memcg: Ignore partial THP when moving task

2015-12-08 Thread Johannes Weiner
On Tue, Dec 08, 2015 at 06:13:09PM +0100, Michal Hocko wrote: > From: Michal Hocko > > After "mm: rework mapcount accounting to enable 4k mapping of THPs" > it is possible to have a partial THP accessible via ptes. Memcg task > migration code is not prepared for this situation and uncharges the

Re: [PATCH 4/5] of: do not use 0x in front of %pa

2015-12-08 Thread Rob Herring
On Mon, Nov 30, 2015 at 2:45 PM, Dmitry V. Krivenok wrote: > Signed-off-by: Dmitry V. Krivenok Applied, thanks. > --- > drivers/of/fdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c > index d243029..1bbe3a9 100644 > ---

m(un)map kmalloc buffers to userspace

2015-12-08 Thread Sebastian Frias
Hi, We are porting a driver from Linux 3.4.39+ to 4.1.13+, CPU is Cortex-A9. The driver maps kmalloc'ed memory to user space. The usermode sees a contiguous space, although in reality it could span several chunks of memory allocated with separate calls to kmalloc. For simplicity, the below

Re: [PATCH 15/34] mm: factor out VMA fault permission checking

2015-12-08 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Dave Hansen wrote: > This code matches a fault condition up with the VMA and ensures > that the VMA allows the fault to be handled instead of just > erroring out. > > We will be extending this in a moment to comprehend protection > keys. > > Signed-off-by: Dave Hansen

Re: [PATCH 10/34] x86, pkeys: arch-specific protection bitsy

2015-12-08 Thread Thomas Gleixner
Dave, On Tue, 8 Dec 2015, Dave Hansen wrote: > On 12/08/2015 07:15 AM, Thomas Gleixner wrote: > > On Thu, 3 Dec 2015, Dave Hansen wrote: > >> > >> +static inline int vma_pkey(struct vm_area_struct *vma) > > > > Shouldn't this return something unsigned? > > Ingo had asked that we use 'int' in

Re: [PATCH v3 9/9] Revert "dmaengine: dw: platform: provide platform data for Intel"

2015-12-08 Thread Vinod Koul
On Fri, Dec 04, 2015 at 11:49:25PM +0200, Andy Shevchenko wrote: > Since we have a work around to prevent a system hangup we don't need to > provide > a platform data explicitly anymore. Acked-by: Vinod Koul -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH v3 7/9] dmaengine: dw: platform: power on device on shutdown

2015-12-08 Thread Vinod Koul
On Fri, Dec 04, 2015 at 11:49:23PM +0200, Andy Shevchenko wrote: > We have to call dw_dma_disable() to stop any ongoing transfer. On some > platforms we can't do that since DMA device is powered off. Moreover we have > no > possibility at that point to check if the platform is affected or not.

Re: [PATCH v3 8/9] dmaengine: dw: return immediately from IRQ when DMA isn't in use

2015-12-08 Thread Vinod Koul
On Fri, Dec 04, 2015 at 11:49:24PM +0200, Andy Shevchenko wrote: > There is no need to bother the hardware when all channels are idle. We have > not > to get any interrupts. Acked-by: Vinod Koul -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH] iio/inkern.c Use list_for_each_entry_safe

2015-12-08 Thread kbuild test robot
Hi Anshul, [auto build test ERROR on v4.4-rc4] [also build test ERROR on next-20151208] url: https://github.com/0day-ci/linux/commits/Anshul-Garg/iio-inkern-c-Use-list_for_each_entry_safe/20151209-005155 config: sh-allyesconfig (attached as .config) reproduce: wget https

Re: [PATCH] vhost: vsock: select CONFIG_VHOST

2015-12-08 Thread David Miller
From: "Michael S. Tsirkin" Date: Tue, 8 Dec 2015 18:09:44 +0200 > On Tue, Dec 08, 2015 at 04:46:08PM +0100, Arnd Bergmann wrote: >> When building the new vsock code without vhost, we get a build error: >> >> drivers/built-in.o: In function `vhost_vsock_flush': >> :(.text+0x24d29c): undefined

[PATCH mmotm] memcg: Ignore partial THP when moving task

2015-12-08 Thread Michal Hocko
From: Michal Hocko After "mm: rework mapcount accounting to enable 4k mapping of THPs" it is possible to have a partial THP accessible via ptes. Memcg task migration code is not prepared for this situation and uncharges the tail page from the original memcg while the original THP is still

Re: [PATCH] hfs: use list_for_each_entry in hfs_cat_delete

2015-12-08 Thread Vyacheslav Dubeyko
On Tue, 2015-12-08 at 23:22 +0800, Geliang Tang wrote: > Use list_for_each_entry() instead of list_for_each() to simplify > the code. > Looks good. Reviewed-by: Vyacheslav Dubeyko Thanks, Vyacheslav Dubeyko. > Signed-off-by: Geliang Tang > --- > fs/hfs/catalog.c | 6 ++ > 1 file

Re: [PATCH 1/3] regmap: cache: Tidy up the code to suppress style check warnings

2015-12-08 Thread Mark Brown
On Thu, Dec 03, 2015 at 05:31:51PM +0800, Xiubo Li wrote: > There will be some warning like the following when checking new > patches near this code: > "WARNING: Missing a blank line after declarations" > This patch will suppress this warning. > switch (map->cache_word_size) { > -

Re: dm verity: use sector_div for division

2015-12-08 Thread Mike Snitzer
On Tue, Dec 08 2015 at 10:42am -0500, Arnd Bergmann wrote: > The dm verity sec implementation uses do_div for dividing a sector_t, > which is slower than necessary when sector_t is a 32-bit type, and > we now get a warning for this case: > > include/asm-generic/div64.h:224:22: warning: passing

[PATCH v2 1/5] Drivers: hv: ring_buffer.c: fix comment style

2015-12-08 Thread Vitaly Kuznetsov
Convert 6+-string comments repeating function names to normal kernel-style comments and fix a couple of other comment style issues. No textual or functional changes intended. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/ring_buffer.c | 135 +-- 1

[PATCH v2 3/5] Drivers: hv: ring_buffer: remove code duplication from hv_ringbuffer_peek/read()

2015-12-08 Thread Vitaly Kuznetsov
hv_ringbuffer_peek() does the same as hv_ringbuffer_read() without advancing the read index. The only functional change this patch brings is moving hv_need_to_signal_on_read() call under the ring_lock but this function is just a couple of comparisons. Signed-off-by: Vitaly Kuznetsov ---

[PATCH v2 2/5] Drivers: hv: ring_buffer: remove stray smp_read_barrier_depends()

2015-12-08 Thread Vitaly Kuznetsov
smp_read_barrier_depends() does nothing on almost all arcitectures including x86 and having it in the beginning of hv_get_ringbuffer_availbytes() does not provide any guarantees anyway. Signed-off-by: Vitaly Kuznetsov --- include/linux/hyperv.h | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v2 0/5] Drivers: hv: ring_buffer: do some code cleanup and optimization

2015-12-08 Thread Vitaly Kuznetsov
Changes since v1: added PATCH 4/5 and 5/5. 1) Fix comment style in ring_buffer.c 2) Remove unneeded smp_read_barrier_depends() from hyperv.h 3) Unify hv_ringbuffer_peek/read() functions 4) Unify vmbus_recvpacket()/vmbus_recvpacket_raw() functions 5) Eliminate hv_ringbuffer_peek(). Vitaly

[PATCH v2 4/5] Drivers: hv: remove code duplication between vmbus_recvpacket()/vmbus_recvpacket_raw()

2015-12-08 Thread Vitaly Kuznetsov
vmbus_recvpacket() and vmbus_recvpacket_raw() are almost identical but there are two discrepancies: 1) vmbus_recvpacket() doesn't propagate errors from hv_ringbuffer_read() which looks like it is not desired. 2) There is an error message printed in packetlen > bufferlen case in

[PATCH v2 5/5] Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()

2015-12-08 Thread Vitaly Kuznetsov
Currently, there is only one user for hv_ringbuffer_read()/ hv_ringbuffer_peak() functions and the usage of these functions is: - insecure as we drop ring_lock between them, someone else (in theory only) can acquire it in between; - non-optimal as we do a number of things (acquire/release the

Re: [PATCH] regmap: speed up the regcache_init()

2015-12-08 Thread Mark Brown
On Thu, Dec 03, 2015 at 10:19:10AM +0800, Xiubo Li wrote: > If the cache is not used by the device driver, there is not need to > check the striding of the registers. It will just return 0 from > regcache_init() and let the register striding be checked in proper > place when needed. > - for

Re: cgroup pids controller -- WARN_ON_ONCE triggering

2015-12-08 Thread Andy Whitcroft
On Tue, Dec 08, 2015 at 10:24:28AM -0500, Tejun Heo wrote: > Hello, Andy. > > On Tue, Dec 08, 2015 at 02:58:51PM +, Andy Whitcroft wrote: > > Converting this to a printk I was able to obtain confirmation that we are > > indeed seeing this go negative in some cases. > > > > Reverting the

Re: [PATCH] iio/inkern.c Use list_for_each_entry_safe

2015-12-08 Thread kbuild test robot
Hi Anshul, [auto build test ERROR on v4.4-rc4] [also build test ERROR on next-20151208] url: https://github.com/0day-ci/linux/commits/Anshul-Garg/iio-inkern-c-Use-list_for_each_entry_safe/20151209-005155 config: x86_64-randconfig-x014-201549 (attached as .config) reproduce: # save

Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err()

2015-12-08 Thread Joe Perches
On Tue, 2015-12-08 at 08:16 -0800, Joe Perches wrote: > On Wed, 2015-12-09 at 01:07 +0900, Masahiro Yamada wrote: > > Trivial changes suggested by checkpatch.pl. > [] > > diff --git a/drivers/of/address.c b/drivers/of/address.c > [] > > @@ -23,7 +23,7 @@ static int __of_address_to_resource(struct

Re: [PATCH] sched/fair: update scale invariance of pelt

2015-12-08 Thread Morten Rasmussen
On Tue, Nov 24, 2015 at 02:49:30PM +0100, Vincent Guittot wrote: > The current implementation of load tracking invariance scales the load > tracking value with current frequency and uarch performance (only for > utilization) of the CPU. > > One main result of the current formula is that the

Re: [PATCH v3] bus: uniphier-system-bus: add UniPhier System Bus driver

2015-12-08 Thread Arnd Bergmann
On Wednesday 09 December 2015 01:21:58 Masahiro Yamada wrote: > The UniPhier System Bus is an external that connects on-board devices > to the UniPhier SoC. Each bank (chip select) is dynamically mapped > to the CPU-viewed address base via the bus controller. The bus > controller must be

Re: [PATCH 02/10] clk: ti: Add few dm814x clock aliases

2015-12-08 Thread Tony Lindgren
* Tony Lindgren [151201 15:43]: > The timer clock aliases are needed early on dm814x. Let's also > add the aliases for the interconnects and MMC. > > Cc: Michael Turquette > Cc: Stephen Boyd > Cc: Tero Kristo > Signed-off-by: Tony Lindgren Anybody from the clock department care to ack this

Re: [PATCH 00/13] mvneta Buffer Management and enhancements

2015-12-08 Thread David Miller
From: Marcin Wojtas Date: Tue, 8 Dec 2015 11:56:28 +0100 > Do you think you can point to anything similar that could be a sort > of reference for such solution? I don't have much time to explain because I'm constantly backlogged doing patch review, but mostly it has to do with page management

Re: [PATCH 2/7] perf: Generalize task_function_call()ers

2015-12-08 Thread Peter Zijlstra
On Tue, Dec 08, 2015 at 06:42:01PM +0200, Alexander Shishkin wrote: > > +void ___perf_event_disable(void *info) > > Only maybe change these to __perf_event_disable_locked() or something > visually distinctive from the 'active' callback? Yeah, I ran out of naming-foo and punted. I'll give it

Re: [PATCH] regulator: add regulator_sync_voltage inline dummy

2015-12-08 Thread Mark Brown
On Tue, Dec 08, 2015 at 05:49:20PM +0100, Arnd Bergmann wrote: > On Tuesday 08 December 2015 16:37:39 Mark Brown wrote: > > On Tue, Dec 08, 2015 at 04:43:35PM +0100, Arnd Bergmann wrote: > > We don't do this for *all* regulator API functions - there's some where > > using them strongly suggests

Re: [PATCH] soc: TI knav_qmss: fix dma_addr_t printing

2015-12-08 Thread santosh shilimkar
On 12/8/2015 7:30 AM, Arnd Bergmann wrote: The knav_qmss driver is currently broken when CONFIG_LPAE is set, which is a bit surprising because I'd expect that any serious users of this platforms would have more than 2GB of RAM and require LPAE. Well it has been working with LPAE enable always.

Re: [PATCH v5 2/4] drm: Add support for ARM's HDLCD controller.

2015-12-08 Thread Liviu Dudau
On Tue, Dec 08, 2015 at 04:25:27PM +, Robin Murphy wrote: > Hi Liviu, > > On 07/12/15 12:11, Liviu Dudau wrote: > >The HDLCD controller is a display controller that supports resolutions > >up to 4096x4096 pixels. It is present on various development boards > >produced by ARM Ltd and emulated

[GIT PULL] cgroup fixes for v4.4-rc4

2015-12-08 Thread Tejun Heo
Hello, Linus. More change than I'd have liked at this stage. The pids controller and the changes made to cgroup core to support it introduced and revealed several important issues. * Assigning membership to a newly created task and migrating it can race leading to incorrect accounting. Oleg

Re: use-after-free in __perf_install_in_context

2015-12-08 Thread Dmitry Vyukov
On Tue, Dec 8, 2015 at 5:27 PM, Peter Zijlstra wrote: > On Fri, Dec 04, 2015 at 09:04:35PM +0100, Dmitry Vyukov wrote: > >> I was able to reproduce it by >> restricting syscalls only to perf_event_open, perf ioctls and bpf >> syscall. > > Does that include cpu hotplug? I have CONFIG_HOTPLUG_CPU

Re: [PATCH] regulator: add regulator_sync_voltage inline dummy

2015-12-08 Thread Arnd Bergmann
On Tuesday 08 December 2015 16:37:39 Mark Brown wrote: > On Tue, Dec 08, 2015 at 04:43:35PM +0100, Arnd Bergmann wrote: > > > This modifies the API header so we provide a static inline function > > with the same prototype as the normal function of this name. This matches > > what we do for all

[PATCH] iio/inkern.c Use list_for_each_entry_safe

2015-12-08 Thread Anshul Garg
Use list_for_each_entry_safe instead of list_for_each_safe and list_entry call. Signed-off-by: Anshul Garg --- drivers/iio/inkern.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index c8bad3c..f764eb6 100644 ---

Re: [PATCH 5/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2015-12-08 Thread Serge E. Hallyn
On Tue, Dec 08, 2015 at 11:20:40AM -0500, Tejun Heo wrote: > Hello, > > On Mon, Dec 07, 2015 at 05:06:20PM -0600, serge.hal...@ubuntu.com wrote: > > fs/kernfs/mount.c | 74 > > > > include/linux/kernfs.h |2 ++ > > kernel/cgroup.c

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