Re: [PATCH v4 7/9] vsprintf: Factor out %pO handler as kobject_string()

2018-04-04 Thread Sergey Senozhatsky
On (04/04/18 10:58), Petr Mladek wrote: > static noinline_for_stack > +char *kobject_string(char *buf, char *end, void *ptr, > + struct printf_spec spec, const char *fmt) > +{ > + switch (fmt[1]) { > + case 'F': > + return device_node_string(buf, end, ptr, spec

rcu_process_callbacks irqsoff latency caused by taking spinlock with irqs disabled

2018-04-04 Thread Nicholas Piggin
Hi Paul, Just looking at latencies, and RCU showed up as one of the maximums. This is a 2 socket system with (176 CPU threads). Just doing a `make -j 352` kernel build. Got a max latency of 3ms. I don't think that's anything to worry about really, but I wanted to check the cause. # tracer: irqsof

[tip:efi/urgent] x86/mm: Fix bogus warning during EFI bootup, use boot_cpu_has() instead of this_cpu_has() in build_cr3_noflush()

2018-04-04 Thread tip-bot for Sai Praneeth
Commit-ID: 162ee5a8ab49be40d253f90e94aef712470a3a24 Gitweb: https://git.kernel.org/tip/162ee5a8ab49be40d253f90e94aef712470a3a24 Author: Sai Praneeth AuthorDate: Wed, 4 Apr 2018 12:34:19 -0700 Committer: Ingo Molnar CommitDate: Thu, 5 Apr 2018 01:27:49 +0200 x86/mm: Fix bogus warning du

[PATCH] [RESEND] drm/i915/dp: Send DPCD ON for MST before phy_up

2018-04-04 Thread Lyude Paul
As it turns out, the aux block being off was not the real problem here, as transition from D3 to D0 is mandated by the DP spec to take a maximum of 1ms, whereas we're allowed a 100ms timeframe to respond to ESI irqs. The real problem here is a bit more subtle. When doing a modeset where the proble

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Matthias Kaehlcke
El Wed, Apr 04, 2018 at 03:39:24PM -0700 Linus Torvalds ha dit: > On Wed, Apr 4, 2018 at 3:17 PM, Matthias Kaehlcke wrote: > > > > Getting our compiler team high to look into this might affect a timely > > (and correct ...) implementation of asm-goto and others important > > features. Arnd, do yo

RE: Any standard kernel API to dynamically allocate/free per-cpu vectors on x86?

2018-04-04 Thread Dexuan Cui
> From: Thomas Gleixner > > I'm wondering if there is such a standard kernel API on x86. > > As I skimmed through the code, I haven't found it yet, if any. > > > We don't have a simple way to do such allocations because they involve IDT > entry manipulation. Hi tglx, Thanks for the quick detailed

[PATCH] isofs compress: Remove VLA usage

2018-04-04 Thread Kyle Spiers
As part of the effort to remove VLAs from the kernel[1], this changes the allocation of the bhs and pages arrays from being on the stack to being kcalloc()ed. This also allows for the removal of the explicit zeroing of bhs. https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kyle Spiers --- fs/is

[PATCH] drm/i915/dp: Send DPCD ON for MST before phy_up

2018-04-04 Thread Lyude Paul
As it turns out, the aux block being off was not the real problem here, as transition from D3 to D0 is mandated by the DP spec to take a maximum of 1ms, whereas we're allowed a 100ms timeframe to respond to ESI irqs. The real problem here is a bit more subtle. When doing a modeset where the proble

Re: An actual suggestion (Re: [GIT PULL] Kernel lockdown for secure boot)

2018-04-04 Thread James Morris
On Wed, 4 Apr 2018, David Howells wrote: > > 6. There's a way to *decrease* the lockdown level below the configured > > value. (This ability itself may be gated by a config option.) > > Choices include a UEFI protected variable, > > By turning secure boot off, maybe? It's surely reasonable to a

Re: [v8, 11/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2018-04-04 Thread Stephen Rothwell
Hi Dan, On Wed, 4 Apr 2018 14:35:20 -0700 Dan Williams wrote: > > New branch pushed out with this offending commit removed. Thanks, I refetched. -- Cheers, Stephen Rothwell pgp_h2Pq0AFWY.pgp Description: OpenPGP digital signature

Re: [PATCH] Add Second Fan Support for Thinkpad P50

2018-04-04 Thread Alexander Kappner
Andy: Thanks for pushing, and for the pointers regarding formalities; I'll keep those in mind. Also, it would be great if someone could test the fan reporting on a P70 Thinkpad (which has the same fan configuration as my P50 and thus likely needs the same quirk). Best Alexander Kappner > On

sched_rt_period_timer causing large latencies

2018-04-04 Thread Nicholas Piggin
Hi, I'm seeing some pretty big latencies on a ~idle system when a CPU wakes out of a nohz idle. Looks like it's due to the taking a lot of remote locks and cache lines. irqoff trace: latency: 407 us, #608/608, CPU#3 | (M:server VP:0, KP:0, SP:0 HP:0 #P:176) -0 3d...0us : decrementer_

Re: [PATCH 4/4] x86: usercopy: reimplement arch_within_stack_frames with unwinder

2018-04-04 Thread Kees Cook
[resending with the CCs I forgot...] On Thu, Mar 1, 2018 at 2:19 AM, wrote: > From: Sahara > > The old arch_within_stack_frames which used the frame pointer is > now reimplemented to use frame pointer unwinder apis. So the main > functionality is same as before. > > Signed-off-by: Sahara This

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Nick Desaulniers
On Wed, Apr 4, 2018 at 10:13 AM Linus Torvalds < torva...@linux-foundation.org> wrote: > The fact that clang by default enables "-fmerge-all-constants" > behavior is just inexcusable. That's not just "let's do invalid > optimizations based on undefined behavior". That's an actual "let's do > known

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-04 Thread Sergey Senozhatsky
On (04/04/18 10:58), Petr Mladek wrote: > > restricted_pointer() pretends that it prints the address when kptr_restrict > is set to zero. But it is never called in this situation. Instead, > pointer() falls back to ptr_to_id() and hashes the pointer. > > This patch removes the potential confusion.

Noisy Sparse warnings

2018-04-04 Thread Steve French
I have been getting the following sparse warnings repeatedly on my current Ubutu (17.10) when compiling the current mainline kernel: ./arch/x86/include/asm/nospec-branch.h:144:38: warning: Unknown escape '@' ./include/linux/string.h:239:1: error: attribute 'gnu_inline': unknown attribute I get th

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Nick Desaulniers
On Wed, Apr 4, 2018 at 12:17 PM Matthias Kaehlcke wrote: > Even with clang having known issues it would be preferable not to > break kernel builds with clang, if this doesn't place a signifcant > burden on the kernel. I'm not sure it is strictly necessary to 'wait' > for clang to enforce asm-goto

Re: [PATCH 2/4] arm64: usercopy: implement arch_within_stack_frames

2018-04-04 Thread Kees Cook
On Thu, Mar 1, 2018 at 2:19 AM, wrote: > From: James Morse > > This implements arch_within_stack_frames() for arm64 that should > validate if a given object is contained by a kernel stack frame. > > Signed-off-by: James Morse > Reviewed-by: Sahara Looks good to me. Does this end up passing th

Re: [PATCH 06/12] fscache: Detect multiple relinquishment of a cookie

2018-04-04 Thread Linus Torvalds
On Wed, Apr 4, 2018 at 3:07 PM, David Howells wrote: > Report if an fscache cookie is relinquished multiple times by the netfs. > > - set_bit(FSCACHE_COOKIE_RELINQUISHED, &cookie->flags); > + if (test_and_set_bit(FSCACHE_COOKIE_RELINQUISHED, &cookie->flags)) > + BUG(); U

Re: [PATCH 1/4] stacktrace: move arch_within_stack_frames from thread_info.h

2018-04-04 Thread Kees Cook
On Thu, Mar 1, 2018 at 2:19 AM, wrote: > From: Sahara > > Since the inlined arch_within_stack_frames function was placed within > asm/thread_info.h, using stacktrace functions to unwind stack was > restricted. Now in order to have this function use more abundant apis, > it is moved to architectu

[PATCH] PCI: quirk HT1100 & HT2000 and one HT2100 Root Ports for Extended Tags

2018-04-04 Thread Sinan Kaya
Per PCIe r3.1, sec 2.2.6.2 and 7.8.4, a Requester may not use 8-bit Tags unless its Extended Tag Field Enable is set, but all Receivers/Completers must handle 8-bit Tags correctly regardless of their Extended Tag Field Enable. Some devices do not handle 8-bit Tags as Completers, so add a quirk for

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Linus Torvalds
On Wed, Apr 4, 2018 at 3:17 PM, Matthias Kaehlcke wrote: > > Getting our compiler team high to look into this might affect a timely > (and correct ...) implementation of asm-goto and others important > features. Arnd, do you have another, preferably simple instance to > keep our compiler folks (ha

Re: [PATCH net] netns: filter uevents correctly

2018-04-04 Thread Eric W. Biederman
Christian Brauner writes: > On Wed, Apr 04, 2018 at 09:48:57PM +0200, Christian Brauner wrote: >> commit 07e98962fa77 ("kobject: Send hotplug events in all network >> namespaces") >> >> enabled sending hotplug events into all network namespaces back in 2010. >> Over time the set of uevents that

Re: [PATCH] arm: decompressor: mark error() as __noreturn

2018-04-04 Thread Russell King - ARM Linux
On Wed, Apr 04, 2018 at 03:34:06PM -0700, Kees Cook wrote: > On Wed, Apr 4, 2018 at 5:30 AM, Arnd Bergmann wrote: > > gcc complains about fortify_panic() possibly returning: > > > > arch/arm/boot/compressed/misc.c: In function 'fortify_panic': > > arch/arm/boot/compressed/misc.c:167:1: error: 'nor

Re: [PATCH v1] mm: help the ALLOC_HARDER allocation pass the watermarki when CMA on

2018-04-04 Thread Andrew Morton
On Wed, 4 Apr 2018 09:31:10 +0900 Joonsoo Kim wrote: > On Fri, Mar 23, 2018 at 01:04:08PM -0700, Andrew Morton wrote: > > On Fri, 23 Mar 2018 10:33:27 +0100 Michal Hocko wrote: > > > > > On Fri 23-03-18 17:19:26, Zhaoyang Huang wrote: > > > > On Fri, Mar 23, 2018 at 4:38 PM, Michal Hocko wrote

Re: [PATCH v7 2/5] of: change overlay apply input data from unflattened to FDT

2018-04-04 Thread Jan Kiszka
Hi Frank, On 2018-03-04 01:17, frowand.l...@gmail.com wrote: > From: Frank Rowand > > Move duplicating and unflattening of an overlay flattened devicetree > (FDT) into the overlay application code. To accomplish this, > of_overlay_apply() is replaced by of_overlay_fdt_apply(). > > The copy of

Re: [PATCH] arm: decompressor: mark error() as __noreturn

2018-04-04 Thread Kees Cook
On Wed, Apr 4, 2018 at 5:30 AM, Arnd Bergmann wrote: > gcc complains about fortify_panic() possibly returning: > > arch/arm/boot/compressed/misc.c: In function 'fortify_panic': > arch/arm/boot/compressed/misc.c:167:1: error: 'noreturn' function does return > [-Werror] > > This annotates the error

[PATCH] drm/sched: Extend the documentation.

2018-04-04 Thread Eric Anholt
These comments answer all the questions I had for myself when implementing a driver using the GPU scheduler. Signed-off-by: Eric Anholt --- include/drm/gpu_scheduler.h | 46 + 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/include/drm/gpu_sched

RE: [RFC PATCH] packet: mark ring entry as in-use inside spin_lock to prevent RX ring overrun

2018-04-04 Thread Jon Rosen (jrosen)
> >> >One issue with the above proposed change to use TP_STATUS_IN_PROGRESS > >> >is that the documentation of the tp_status field is somewhat > >> >inconsistent. In some places it's described as TP_STATUS_KERNEL(0) > >> >meaning the entry is owned by the kernel and !TP_STATUS_KERN

Re: [PATCH RFC v5] pidns: introduce syscall translate_pid

2018-04-04 Thread Eric W. Biederman
Nagarathnam Muthusamy writes: > On 04/04/2018 12:11 PM, Konstantin Khlebnikov wrote: >> Each process have different pids, one for each pid namespace it belongs. >> When interaction happens within single pid-ns translation isn't required. >> More complicated scenarios needs special handling. >> >>

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Linus Torvalds
On Wed, Apr 4, 2018 at 3:21 PM, James Y Knight wrote: > > But allowing random pointer arithmetic, and pointer arithmetic wraparound, > is still different than asserting that an object _field access_ can > overflow. But that's not what the code does. It never _accessed_ the field. It only looked

Re: [PATCH 1/1] z3fold: fix memory leak

2018-04-04 Thread Andrew Morton
On Wed, 4 Apr 2018 15:20:39 -0700 Andrew Morton wrote: > On Wed, 4 Apr 2018 08:51:51 +0800 Xidong Wang wrote: > > > In function z3fold_create_pool(), the memory allocated by > > __alloc_percpu() is not released on the error path that pool->compact_wq > > , which holds the return value of crea

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread James Y Knight
On Wed, Apr 4, 2018 at 3:42 PM Linus Torvalds wrote: > So we'd definitely want that "-fno-strict-overflow" to affect pointer > arithmetic too (or have a separate flag for the pointer equivalent of > "we play games that may temporarily wrap pointer values around".. The -fno-strict-overflow flag in

Re: [PATCH 1/1] z3fold: fix memory leak

2018-04-04 Thread Andrew Morton
On Wed, 4 Apr 2018 08:51:51 +0800 Xidong Wang wrote: > In function z3fold_create_pool(), the memory allocated by > __alloc_percpu() is not released on the error path that pool->compact_wq > , which holds the return value of create_singlethread_workqueue(), is NULL. > This will result in a memory

Re: An actual suggestion (Re: [GIT PULL] Kernel lockdown for secure boot)

2018-04-04 Thread David Howells
Jann Horn wrote: > > Uh, no. bpf, for example, can be used to modify kernel memory. > > I'm pretty sure bpf isn't supposed to be able to modify arbitrary > kernel memory. AFAIU if you can use BPF to write to arbitrary kernel > memory, that's a bug; with CAP_SYS_ADMIN, you can read from userspac

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Matthias Kaehlcke
El Wed, Apr 04, 2018 at 02:59:09PM -0700 Linus Torvalds ha dit: > On Wed, Apr 4, 2018 at 2:46 PM, Matthias Kaehlcke wrote: > > > > I understand this is annoying, but it seems I'm missing something: > > I think you're looking at !AEABI case. > > The AEABI case is worse. It ends up getting the co

Re: Any standard kernel API to dynamically allocate/free per-cpu vectors on x86?

2018-04-04 Thread Thomas Gleixner
Dexuan, On Wed, 4 Apr 2018, Dexuan Cui wrote: > Hi, > Recently, two Hyper-V specific vectors were introduced in > arch/x86/include/asm/irq_vectors.h: > > #if IS_ENABLED(CONFIG_HYPERV) > #define HYPERV_REENLIGHTENMENT_VECTOR 0xee > #define HYPERV_STIMER0_VECTOR 0xed > #endif > > What

Re: [PATCH net-next 00/12] fscache: Fixes, traces and development

2018-04-04 Thread David Howells
> Subject: [PATCH net-next 00/12] fscache: Fixes, traces and development Apologies: that shouldn't say net-next in there. Cut'n'paste error. David

[PATCH 11/12] fscache: Pass object size in rather than calling back for it

2018-04-04 Thread David Howells
Pass the object size in to fscache_acquire_cookie() and fscache_write_page() rather than the netfs providing a callback by which it can be received. This makes it easier to update the size of the object when a new page is written that extends the object. The current object size is also passed by

[PATCH 12/12] fscache: Maintain a catalogue of allocated cookies

2018-04-04 Thread David Howells
Maintain a catalogue of allocated cookies so that cookie collisions can be handled properly. For the moment, this just involves printing a warning and returning a NULL cookie to the caller of fscache_acquire_cookie(), but in future it might make sense to wait for the old cookie to finish being cle

[PATCH 10/12] fscache: Attach the index key and aux data to the cookie

2018-04-04 Thread David Howells
Attach copies of the index key and auxiliary data to the fscache cookie so that: (1) The callbacks to the netfs for this stuff can be eliminated. This can simplify things in the cache as the information is still available, even after the cache has relinquished the cookie. (2) Simplif

[PATCH 06/12] fscache: Detect multiple relinquishment of a cookie

2018-04-04 Thread David Howells
Report if an fscache cookie is relinquished multiple times by the netfs. Signed-off-by: David --- fs/fscache/cookie.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index d705125665f0..98d22f495cd8 100644 --- a/fs/fscache/cooki

[PATCH 07/12] fscache: Fix hanging wait on page discarded by writeback

2018-04-04 Thread David Howells
If the fscache asynchronous write operation elects to discard a page that's pending storage to the cache because the page would be over the store limit then it needs to wake the page as someone may be waiting on completion of the write. The problem is that the store limit may be updated by a diffe

[PATCH 08/12] fscache: Add tracepoints

2018-04-04 Thread David Howells
Add some tracepoints to fscache: (*) fscache_cookie - Tracks a cookie's usage count. (*) fscache_netfs - Logs registration of a network filesystem, including the pointer to the cookie allocated. (*) fscache_acquire - Logs cookie acquisition. (*) fscache_relinquish - Logs cookie relinqu

[PATCH 09/12] fscache: Add more tracepoints

2018-04-04 Thread David Howells
Add more tracepoints to fscache, including: (*) fscache_page - Tracks netfs pages known to fscache. (*) fscache_check_page - Tracks the netfs querying whether a page is pending storage. (*) fscache_wake_cookie - Tracks cookies being woken up after a page completes/aborts storage in

[PATCH 05/12] fscache: Pass the correct cancelled indications to fscache_op_complete()

2018-04-04 Thread David Howells
The last parameter to fscache_op_complete() is a bool indicating whether or not the operation was cancelled. A lot of the time the inverse value is given or no differentiation is made. Fix this. Signed-off-by: David Howells --- fs/fscache/page.c | 15 +-- include/lin

[PATCH 03/12] afs: Be more aggressive in retiring cached vnodes

2018-04-04 Thread David Howells
When relinquishing cookies, either due to iget failure or to inode eviction, retire a cookie if we think the corresponding vnode got deleted on the server rather than just letting it lie in the cache. Signed-off-by: David Howells --- fs/afs/inode.c |5 +++-- 1 file changed, 3 insertions(+),

[PATCH 04/12] fscache, cachefiles: Fix checker warnings

2018-04-04 Thread David Howells
Fix a couple of checker warnings in fscache and cachefiles: (1) fscache_n_op_requeue is never used, so get rid of it. (2) cachefiles_uncache_page() is passed in a lock that it releases, so this needs annotating. Signed-off-by: David Howells --- fs/cachefiles/rdwr.c |1 + fs/fscache

[PATCH 02/12] afs: Use the vnode ID uniquifier in the cache key not the aux data

2018-04-04 Thread David Howells
AFS vnodes (files) are referenced by a triplet of { volume ID, vnode ID, uniquifier }. Currently, kafs is only using the vnode ID as the file key in the volume fscache index and checking the uniquifier on cookie acquisition against the contents of the auxiliary data stored in the cache. Unfortuna

[PATCH 01/12] afs: Invalidate cache on server data change

2018-04-04 Thread David Howells
Invalidate any data stored in fscache for a vnode that changes on the server so that we don't end up with the cache in a bad state locally. Signed-off-by: David Howells --- fs/afs/inode.c |4 1 file changed, 4 insertions(+) diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 6b39d0255b

[PATCH net-next 00/12] fscache: Fixes, traces and development

2018-04-04 Thread David Howells
ation of the storage and also make it possible to bring cookies online if the cache is added after the cookie has been obtained. The patches are tagged here: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/fscache-next-20180404 and can als

[PATCH v2] locking/hung_task: Show all hung tasks before panic

2018-04-04 Thread Tetsuo Handa
When we get a hung task it can often be valuable to see _all_ the hung tasks on the system before calling panic(). Quoting from https://syzkaller.appspot.com/text?tag=CrashReport&id=5316056503549952 INFO: task syz-executor0:6540 blocked for more than 120 s

Re: [PATCH v5 2/3] lib: Rename compiler intrinsic selects to GENERIC_LIB_*

2018-04-04 Thread James Hogan
On Tue, Apr 03, 2018 at 03:39:34PM -0700, Palmer Dabbelt wrote: > Sorry, I'm not sure if this is the right patch -- someone suggested acking > this, but it's already Review-By me and if I understand correctly it's going > through your tree. I'm a bit new to this, but if it helps then here's a >

Re: [PATCH] [RFC][WIP] namespace.c: Allow some unprivileged proc mounts when not fully visible

2018-04-04 Thread Eric W. Biederman
"Serge E. Hallyn" writes: > Quoting Eric W. Biederman (ebied...@xmission.com): >> It looks like a cruft free cousin of proc that is just processes would >> be applicable to your usecase. > > Just to check - is that something you're working on? Only to the point of reviewing code, and I don't hav

Re: [lustre-devel] [PATCH 11/17] staging: lustre: libcfs: discard cfs_time_shift().

2018-04-04 Thread NeilBrown
On Wed, Apr 04 2018, Dilger, Andreas wrote: > On Apr 2, 2018, at 16:26, NeilBrown wrote: >> On Mon, Apr 02 2018, Dilger, Andreas wrote: >>> On Mar 30, 2018, at 13:02, James Simmons wrote: > This function simply multiplies by HZ and adds jiffies. > This is simple enough to be opencoded, a

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Jerome Glisse
On Wed, Apr 04, 2018 at 06:26:44PM +0200, Laurent Dufour wrote: > > > On 03/04/2018 21:39, Jerome Glisse wrote: > > On Tue, Mar 13, 2018 at 06:59:45PM +0100, Laurent Dufour wrote: > >> When dealing with the speculative fault path we should use the VMA's field > >> cached value stored in the vm_fa

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Linus Torvalds
On Wed, Apr 4, 2018 at 2:46 PM, Matthias Kaehlcke wrote: > > I understand this is annoying, but it seems I'm missing something: I think you're looking at !AEABI case. The AEABI case is worse. It ends up getting the code from include/asm-generic/div64.h after defining a few helper inline asm func

RE: aacraid code passes GFP_DMA32 to kmalloc this will not work

2018-04-04 Thread Dave Carroll
> -Original Message- > From: Hans de Goede [mailto:hdego...@redhat.com] > Sent: Thursday, March 29, 2018 8:51 AM > To: dl-esc-Aacraid Linux Driver ; James E.J. > Bottomley ; Martin K. Petersen > ; SCSI development list s...@vger.kernel.org>; Linux Kernel Mailing List > > Subject: aacraid

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread David Rientjes
On Wed, 4 Apr 2018, Laurent Dufour wrote: > > I also think the following is needed: > > > > diff --git a/fs/exec.c b/fs/exec.c > > --- a/fs/exec.c > > +++ b/fs/exec.c > > @@ -312,6 +312,10 @@ static int __bprm_mm_init(struct linux_binprm *bprm) > > vma->vm_flags = VM_SOFTDIRTY | VM_STACK_FLAG

[alsa-devel][RESEND PATCH 1/3 v3] ASoC: TSCS42xx: Shorten lines and other cleanup

2018-04-04 Thread Steven Eckhoff
Shorten lines greater than 80 chars Add const to struct snd_soc_component_driver Signed-off-by: Steven Eckhoff --- sound/soc/codecs/tscs42xx.c | 87 - 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/sound/soc/codecs/tscs42xx.c b/sound/s

[RFC PATCH 1/1 v2] vmscan: Support multiple kswapd threads per node

2018-04-04 Thread Buddy Lumpkin
Page replacement is handled in the Linux Kernel in one of two ways: 1) Asynchronously via kswapd 2) Synchronously, via direct reclaim At page allocation time the allocating task is immediately given a page from the zone free list allowing it to go right back to work doing whatever it was doing; P

[alsa-devel][RESEND PATCH 3/3 v3] ASoC: TSCS42xx: Add CCF support to get sysclk

2018-04-04 Thread Steven Eckhoff
The TSCS42xx relies on set_sysclk to get a unique clock id and rate, which prevents it from being used with the simple-card. Remove set_sysclk callback Add CCF support to get clock id and rate Add clocks and clock-names to device tree binding Signed-off-by: Steven Eckhoff --- .../devicetree/bin

[alsa-devel][RESEND PATCH 2/3 v3] ASoC: TSCS42xx: Cleanup private data members

2018-04-04 Thread Steven Eckhoff
Remove blrcm from private data Remove dev from private data Signed-off-by: Steven Eckhoff --- sound/soc/codecs/tscs42xx.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/tscs42xx.c b/sound/soc/codecs/tscs42xx.c index 5ad68e5538ae..bf207b0345

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Matthias Kaehlcke
El Wed, Apr 04, 2018 at 11:11:36PM +0200 Arnd Bergmann ha dit: > On Wed, Apr 4, 2018 at 10:58 PM, Matthias Kaehlcke wrote: > > El Wed, Apr 04, 2018 at 10:33:19PM +0200 Arnd Bergmann ha dit: > >> > >> In most cases, this is used to implement a fast-path for a helper > >> function, so not doing it

Re: [RFC PATCH] packet: mark ring entry as in-use inside spin_lock to prevent RX ring overrun

2018-04-04 Thread Willem de Bruijn
>> >One issue with the above proposed change to use TP_STATUS_IN_PROGRESS >> >is that the documentation of the tp_status field is somewhat >> >inconsistent. In some places it's described as TP_STATUS_KERNEL(0) >> >meaning the entry is owned by the kernel and !TP_STATUS_KERNEL(0) >>

Re: [PATCH v2] powerpc, pkey: make protection key 0 less special

2018-04-04 Thread Thiago Jung Bauermann
Hello Ram, Ram Pai writes: > Applications need the ability to associate an address-range with some > key and latter revert to its initial default key. Pkey-0 comes close to > providing this function but falls short, because the current > implementation disallows applications to explicitly assoc

Re: REGRESSION/TEST FAILURE caused by DEBUG_RWSEMS

2018-04-04 Thread Dave Chinner
On Wed, Apr 04, 2018 at 09:55:18AM -0400, Waiman Long wrote: > On 04/04/2018 09:23 AM, Theodore Y. Ts'o wrote: > > The commit 5149cbac4235: "locking/rwsem: Add DEBUG_RWSEMS to look for > > lock/unlock emismatches" (newly added in this merge window) will cause > > xfstests tests failures in generic/

Re: [v8, 11/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2018-04-04 Thread Andrei Vagin
On Wed, Apr 04, 2018 at 02:23:40PM -0700, Andrei Vagin wrote: > Hi Dan, > > I catch the following bug on the linux-next 20180404. git bisect brought me > to this commit: The next patch fixes the problem: diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 5b13da127982..

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Cyrill Gorcunov
On Wed, Apr 04, 2018 at 02:36:55PM -0700, Randy Dunlap wrote: > > > > So, maybe just get rid of any warning message at all? > > That would be OK since -EINVAL or something similar is being returned. Thanks for feedback! Will do tomorrow and send it out.

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Randy Dunlap
On 04/04/2018 02:29 PM, Cyrill Gorcunov wrote: > On Wed, Apr 04, 2018 at 01:53:08PM -0700, Randy Dunlap wrote: >>> >>> At first this was plain warning without code removal but I've >>> been advised that dropping it completely may be a better idea >>> which I agree https://lkml.org/lkml/2018/4/4/31

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-04 Thread Oleksandr Natalenko
Hi. 04.04.2018 23:25, Kees Cook wrote: Actually, I can trigger a BUG too: [ 129.259213] usercopy: Kernel memory exposure attempt detected from SLUB object 'scsi_sense_cache' (offset 119, size 22)! Wow, yeah, that's totally outside the slub object_size. How did you trigger this? Just luck o

Re: [v8, 11/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2018-04-04 Thread Dan Williams
[ adding Stephen ] On Wed, Apr 4, 2018 at 2:27 PM, Dan Williams wrote: > On Wed, Apr 4, 2018 at 2:23 PM, Andrei Vagin wrote: >> Hi Dan, >> >> I catch the following bug on the linux-next 20180404. git bisect brought me >> to this commit: > > Yes, I will be

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Cyrill Gorcunov
On Wed, Apr 04, 2018 at 01:53:08PM -0700, Randy Dunlap wrote: > > > > At first this was plain warning without code removal but I've > > been advised that dropping it completely may be a better idea > > which I agree https://lkml.org/lkml/2018/4/4/31 Or you mean the > > warning message itsef? We ar

Re: [v8, 11/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2018-04-04 Thread Dan Williams
On Wed, Apr 4, 2018 at 2:23 PM, Andrei Vagin wrote: > Hi Dan, > > I catch the following bug on the linux-next 20180404. git bisect brought me > to this commit: Yes, I will be yanking this functionality out of -next shortly and try again for v4.18.

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Cyrill Gorcunov
On Wed, Apr 04, 2018 at 02:16:33PM -0700, Yang Shi wrote: > On 4/4/18 11:55 AM, Cyrill Gorcunov wrote: > > An ability to manipulate mm_struct fields was introduced in > > sake of CRIU in first place. Later we provide more suitable > > and safe operation PR_SET_MM_MAP where all fields to be modifed

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-04 Thread Kees Cook
On Wed, Apr 4, 2018 at 1:49 PM, Oleksandr Natalenko wrote: > Hi. > > On středa 4. dubna 2018 22:21:53 CEST Kees Cook wrote: >> >> ... >> That means scsi_sense_cache should be 96 bytes in size? But a 22 byte >> read starting at offset 94 happened? That seems like a 20 byte read >> beyond the end of

[PATCH] trace: Fixup logic inversion on setting trace_global_clock defaults

2018-04-04 Thread Chris Wilson
In commit 932066a15335 ("tracing: Default to using trace_global_clock if sched_clock is unstable"), the logic for deciding to override the default clock if unstable was reversed from the earlier posting. I was trying to reduce the width of the message by using an early return rather than a if-block

Re: [v8, 11/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2018-04-04 Thread Andrei Vagin
Hi Dan, I catch the following bug on the linux-next 20180404. git bisect brought me to this commit: commit 8e4d1ccc5286d2c3da6515b92323a3529aa64496 (HEAD, refs/bisect/bad) Author: Dan Williams Date: Sat Oct 21 14:41:13 2017 -0700 mm, dax: enable filesystems to trigger dev_pagemap

Re: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked()

2018-04-04 Thread David Howells
Randy Dunlap wrote: > > * Note that the function only tells you that the CPU is seen to be locked, > > the CPU is locked?? > > > * not that it is locked on your CPU. Sorry, yes: "... that the lock is seen to be locked, not that it is locked on your CPU".

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Yang Shi
On 4/4/18 11:55 AM, Cyrill Gorcunov wrote: An ability to manipulate mm_struct fields was introduced in sake of CRIU in first place. Later we provide more suitable and safe operation PR_SET_MM_MAP where all fields to be modifed are passed in one structure which allows us to make more detailed ve

Re: [PATCH V2 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring support

2018-04-04 Thread Megha Dey
On Wed, 2017-12-20 at 13:23 -0800, Megha Dey wrote: > On Wed, 2017-12-13 at 08:21 +0100, Peter Zijlstra wrote: > > On Tue, Dec 12, 2017 at 03:08:00PM -0800, Megha Dey wrote: > > > > > > > > There's work on the way to allow multiple HW PMUs. You'll either have to > > > > wait for that or help in ma

Re: Control dependency between prior load in while condition and later store?

2018-04-04 Thread Daniel Jordan
On 04/04/2018 04:35 PM, Alan Stern wrote: On Wed, 4 Apr 2018, Daniel Jordan wrote: A question for memory-barriers.txt aficionados. Is there a control dependency between the prior load of 'a' and the later store of 'c'?: while (READ_ONCE(a)); WRITE_ONCE(c, 1); I would say that yes, t

Re: [PATCH 3/3] mailbox: ACPI: erroneous error message when parsing the ACPI PCCT

2018-04-04 Thread Al Stone
On 04/04/2018 02:39 PM, kbuild test robot wrote: > Hi Al, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on pm/linux-next] > [also build test WARNING on v4.16 next-20180404] > [if your patch is applied to the wrong git tree, ple

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Arnd Bergmann
On Wed, Apr 4, 2018 at 10:58 PM, Matthias Kaehlcke wrote: > El Wed, Apr 04, 2018 at 10:33:19PM +0200 Arnd Bergmann ha dit: >> >> In most cases, this is used to implement a fast-path for a helper >> function, so not doing it the same way as gcc just results in >> slower execution, but I assume we a

Re: [PATCH v3] trace: Default to using trace_global_clock if sched_clock is unstable

2018-04-04 Thread Steven Rostedt
Can you add a patch on top. I already added your patch to my tree. See branch ftrace/core git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git -- Steve On April 4, 2018 4:51:02 PM EDT, Chris Wilson wrote: >Across suspend, we may see a very large drift in timestamps if the >sch

Re: [GIT PULL] x86/build changes for v4.17

2018-04-04 Thread Matthias Kaehlcke
El Wed, Apr 04, 2018 at 10:33:19PM +0200 Arnd Bergmann ha dit: > On Wed, Apr 4, 2018 at 9:17 PM, Matthias Kaehlcke wrote: > > El Wed, Apr 04, 2018 at 11:30:07AM +0200 Peter Zijlstra ha dit: > > > >> On Tue, Apr 03, 2018 at 11:06:58AM -0700, Matthias Kaehlcke wrote: > >> > >> > Yes, Chrome OS R67

Re: [PATCH v2] i2c: i801: blacklist Host Notify on HP EliteBook G3 850

2018-04-04 Thread Jean Delvare
Hi Jason, On Mon, 2 Apr 2018 08:34:35 -0400, Jason Andryuk wrote: > The HP EliteBook G3 850 has a weird bug where a subsequent cold boot > hangs while plugged in if Linux enables the Host Notify features of > i2c-i801. The cold boot hang depends on how the system boots. It does > not hang on UE

Re: [PATCH 1/1] drm/i915: Do not use kfree() to free kmem_cache_alloc() return value

2018-04-04 Thread Chris Wilson
Quoting Xidong Wang (2018-04-04 08:37:54) > In eb_lookup_vmas(), the return value of kmem_cache_alloc() is freed > with kfree(). I think the expected paired function is kmem_cahce_free(). > > Signed-off-by: Xidong Wang Thank you for the fix; applied. -Chris

Re: [PATCH] prctl: Deprecate non PR_SET_MM_MAP operations

2018-04-04 Thread Randy Dunlap
On 04/04/2018 01:04 PM, Cyrill Gorcunov wrote: > On Wed, Apr 04, 2018 at 12:24:33PM -0700, Randy Dunlap wrote: >> >>> + pr_warn_once("Non PR_SET_MM_MAP operations are deprecated\n"); >>> + return -EINVAL; >>> } >> >> I'm not against removing such functionality, but I think that it's more than

[PATCH v3] trace: Default to using trace_global_clock if sched_clock is unstable

2018-04-04 Thread Chris Wilson
Across suspend, we may see a very large drift in timestamps if the sched clock is unstable, prompting the global trace's ringbuffer code to warn and suggest switching to the global clock. Preempt this request by detecting when the sched clock is unstable (determined during late_initcall) and automa

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-04 Thread Oleksandr Natalenko
Hi. On středa 4. dubna 2018 22:21:53 CEST Kees Cook wrote: ... That means scsi_sense_cache should be 96 bytes in size? But a 22 byte read starting at offset 94 happened? That seems like a 20 byte read beyond the end of the SLUB object? Though if it were reading past the actual end of the object,

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-04 Thread Douglas Gilbert
On 2018-04-04 04:32 PM, Kees Cook wrote: On Wed, Apr 4, 2018 at 12:07 PM, Oleksandr Natalenko wrote: [ 261.262135] Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'scsi_sense_cache' (offset 94, size 22)! I can easily reproduce it with a qemu VM and 2

Re: [PATCH v2 1/2] trace: Default to using trace_global_clock if sched_clock is unstable

2018-04-04 Thread Chris Wilson
Quoting Chris Wilson (2018-03-30 16:01:31) > Across suspend, we may see a very large drift in timestamps if the sched > clock is unstable, prompting the global trace's ringbuffer code to warn > and suggest switching to the global clock. Preempt this request by > detecting when the sched clock is un

Any standard kernel API to dynamically allocate/free per-cpu vectors on x86?

2018-04-04 Thread Dexuan Cui
Hi, Recently, two Hyper-V specific vectors were introduced in arch/x86/include/asm/irq_vectors.h: #if IS_ENABLED(CONFIG_HYPERV) #define HYPERV_REENLIGHTENMENT_VECTOR 0xee #define HYPERV_STIMER0_VECTOR 0xed #endif What if we need more such vectors on Hyper-V? This static global reserva

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-04 Thread Douglas Gilbert
On 2018-04-04 04:21 PM, Kees Cook wrote: On Wed, Apr 4, 2018 at 12:07 PM, Oleksandr Natalenko wrote: With v4.16 I get the following dump while using smartctl: [...] [ 261.262135] Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'scsi_sense_cache' (off

Re: [PATCH 3/3] mailbox: ACPI: erroneous error message when parsing the ACPI PCCT

2018-04-04 Thread kbuild test robot
Hi Al, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on v4.16 next-20180404] [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

[PATCH driver-core 2/2] test_firmware: fix setting old custom fw path back on exit, second try

2018-04-04 Thread Ben Hutchings
Commit 65c79230576 tried to clear the custom firmware path on exit by writing a single space to the firmware_class.path parameter. This doesn't work because nothing strips this space from the value stored and fw_get_filesystem_firmware() only ignores zero-length paths. Instead, write a null byte.

[PATCH driver-core 1/2] test_firmware: Install all scripts

2018-04-04 Thread Ben Hutchings
List all the scripts invoked by fw_run_tests.sh, so that "make TARGETS=firmware install" keeps working. Fixes: 29a1c00ce1df8 ("test_firmware: add simple firmware firmware test ...") Fixes: b3cf21fae1fe0 ("test_firmware: test three firmware kernel configs ...") Signed-off-by: Ben Hutchings --- to

Re: [PATCH RFC v5] pidns: introduce syscall translate_pid

2018-04-04 Thread Nagarathnam Muthusamy
On 04/04/2018 12:11 PM, Konstantin Khlebnikov wrote: Each process have different pids, one for each pid namespace it belongs. When interaction happens within single pid-ns translation isn't required. More complicated scenarios needs special handling. For example: - reading pid-files or logs wr

Re: Control dependency between prior load in while condition and later store?

2018-04-04 Thread Alan Stern
On Wed, 4 Apr 2018, Daniel Jordan wrote: > A question for memory-barriers.txt aficionados. > > Is there a control dependency between the prior load of 'a' and the > later store of 'c'?: > >while (READ_ONCE(a)); >WRITE_ONCE(c, 1); I would say that yes, there is. > I have my doubts beca

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