Re: [PATCH v5 14/32] x86/mm/64: Enable vmapped stacks

2016-07-14 Thread Ingo Molnar
* Andy Lutomirski wrote: > If you think it makes sense, I can split out a bunch of the x86 and mm > preparatory patches and, if it reorders cleanly and still works, the > THREAD_INFO_IN_TASK thing. Those could plausibly go in 4.7. Would > you like me to see how that goes? (I'll verify that

[tip:x86/headers] x86/xen: Audit and remove any unnecessary uses of module.h

2016-07-14 Thread tip-bot for Paul Gortmaker
Commit-ID: 7a2463dcacee3f2f36c78418c201756372eeea6b Gitweb: http://git.kernel.org/tip/7a2463dcacee3f2f36c78418c201756372eeea6b Author: Paul Gortmaker AuthorDate: Wed, 13 Jul 2016 20:18:59 -0400 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 15:06:59 +0200 x86/xen: Audit and remove

[tip:x86/headers] x86/lib: Audit and remove any unnecessary uses of module.h

2016-07-14 Thread tip-bot for Paul Gortmaker
Commit-ID: e683014c2113d374b8716a7c938803c2f578efd5 Gitweb: http://git.kernel.org/tip/e683014c2113d374b8716a7c938803c2f578efd5 Author: Paul Gortmaker AuthorDate: Wed, 13 Jul 2016 20:18:57 -0400 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 15:06:58 +0200 x86/lib: Audit and remove

[tip:x86/headers] x86/platform: Audit and remove any unnecessary uses of module.h

2016-07-14 Thread tip-bot for Paul Gortmaker
Commit-ID: cc3ae7b0af27118994c1e491382b253be3b762bf Gitweb: http://git.kernel.org/tip/cc3ae7b0af27118994c1e491382b253be3b762bf Author: Paul Gortmaker AuthorDate: Wed, 13 Jul 2016 20:18:58 -0400 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 15:06:59 +0200 x86/platform: Audit and r

[tip:x86/headers] x86/kvm: Audit and remove any unnecessary uses of module.h

2016-07-14 Thread tip-bot for Paul Gortmaker
Commit-ID: 1767e931e3c3024b1f0d115082179191f5d652c2 Gitweb: http://git.kernel.org/tip/1767e931e3c3024b1f0d115082179191f5d652c2 Author: Paul Gortmaker AuthorDate: Wed, 13 Jul 2016 20:19:00 -0400 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 15:07:00 +0200 x86/kvm: Audit and remove

Re: [PATCH 0/8] x86: audit and remove needless module.h includes

2016-07-14 Thread Paul Gortmaker
[Re: [PATCH 0/8] x86: audit and remove needless module.h includes] On 14/07/2016 (Thu 20:39) Ingo Molnar wrote: > > * Paul Gortmaker wrote: > > > > I'll continue testing with the setup_percpu.c change left out. > > > > Let me know if you want a resend or if you want to just add the > > asm/de

[tip:x86/headers] x86: Audit and remove any remaining unnecessary uses of module.h

2016-07-14 Thread tip-bot for Paul Gortmaker
Commit-ID: eb008eb6f8b689853d6e9f4ae3ff56ea734e4319 Gitweb: http://git.kernel.org/tip/eb008eb6f8b689853d6e9f4ae3ff56ea734e4319 Author: Paul Gortmaker AuthorDate: Wed, 13 Jul 2016 20:19:01 -0400 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 15:07:00 +0200 x86: Audit and remove any

Re: [PATCH 3/5] nsfs: add ioctl to get an owning user namespace for ns file descriptor

2016-07-14 Thread W. Trevor King
On Thu, Jul 14, 2016 at 11:20:17AM -0700, Andrey Vagin wrote: > +int open_related_ns(struct ns_common *ns, > +struct ns_common *(*get_ns)(struct ns_common *ns)) > +{ > + struct path path = {}; > + struct file *f; > + void *err; > + int fd; > + > + fd = get_unuse

Re: [PATCH] x86/reboot: Add Dell Optiplex 7450 AIO reboot quirk

2016-07-14 Thread Ingo Molnar
* Alex Hung wrote: > Hi Ingo, > > I agree with you but it can affect a lot of systems according to > 163ea310b68bdde89b1ac633fbf8c0db290d3f86. > > Do you think we should invert 163ea310 instead? Reverting 163ea310 sounds like a bad idea, considering how old the commit is. Ok, I guess we shou

[RFC][PATCH] proc: Relax /proc//timerslack_ns capability requirements

2016-07-14 Thread John Stultz
When an interface to allow a task to change another tasks timerslack was first proposed, it was suggested that something greater then CAP_SYS_NICE would be needed, as a task could be delayed further then what normally could be done with nice adjustments. So CAP_SYS_PTRACE was adopted instead for w

Re: [RFC][PATCH] proc: Relax /proc//timerslack_ns capability requirements

2016-07-14 Thread Kees Cook
On Thu, Jul 14, 2016 at 11:50 AM, John Stultz wrote: > When an interface to allow a task to change another tasks > timerslack was first proposed, it was suggested that something > greater then CAP_SYS_NICE would be needed, as a task could be > delayed further then what normally could be done with

Re: [PATCH v2 0/5] Add support for EPT execute only for nested hypervisors

2016-07-14 Thread Bandan Das
Paolo Bonzini writes: > On 14/07/2016 19:38, Bandan Das wrote: >> Paolo Bonzini writes: >> >>> On 13/07/2016 17:47, Bandan Das wrote: >> I wanted to keep it the former way because "PT_PRESENT_MASK is equal to >> VMX_EPT_READABLE_MASK" >> is an assumption all throughout. I wanted to

Re: [RFC][PATCH] proc: Relax /proc//timerslack_ns capability requirements

2016-07-14 Thread John Stultz
On Thu, Jul 14, 2016 at 11:52 AM, Kees Cook wrote: > On Thu, Jul 14, 2016 at 11:50 AM, John Stultz wrote: >> >> For ABI preservation, it still allows CAP_SYS_PTRACE tasks to >> access/modify timerslack values, but I'm fine with removing >> this if others agree. > > Is anything actually using this

Boat Owners Database

2016-07-14 Thread Tracy Foster
Hi, Just emailing you today to see if you'd be interested in our "Boat Owners Database" from USA. We also have data for Contact Name (First and Last), Address, City, State, Zip, County, Opt-in Email Address, Boat use, Boat length, Boat Propulsion, Boat Fuel, Boat Hull Material, Boat Make, Bo

Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob

2016-07-14 Thread Peter Zijlstra
On Thu, Jul 14, 2016 at 08:43:51PM +0200, Oleg Nesterov wrote: > On 07/14, Peter Zijlstra wrote: > > > > The current percpu-rwsem read side is entirely free of serializing > > instructions at the cost of having a synchronize_sched() in the write > > path. > > > > The latency of the synchronize_sche

Re: [PATCH 0/8] x86: audit and remove needless module.h includes

2016-07-14 Thread Ingo Molnar
* Paul Gortmaker wrote: > [Re: [PATCH 0/8] x86: audit and remove needless module.h includes] On > 14/07/2016 (Thu 20:39) Ingo Molnar wrote: > > > > > * Paul Gortmaker wrote: > > > > > > I'll continue testing with the setup_percpu.c change left out. > > > > > > Let me know if you want a res

[GIT PULL] scheduler fix

2016-07-14 Thread Ingo Molnar
Linus, Please pull the latest sched-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-urgent-for-linus # HEAD: d60585c5766e9620d5d83e2b25dc042c7bdada2c sched/core: Correct off by one bug in load migration calculation Fix a CPU hotplug relate

RE: [PATCH v3 5/8] thunderbolt: Communication with the ICM (firmware)

2016-07-14 Thread Rosen, Rami
Hi, Amir, >This patch is the communication with the FW. >The network functionality is added in the next patches in the series >and with it, more messages from FW. >Indeed this function always returns true in this patch, >but while writing it, I predicted that the network functionality will >use

[PATCH for -mm] signal: Consolidate {TS,TLF}_RESTORE_SIGMASK code

2016-07-14 Thread Andy Lutomirski
In general, there's no need for the "restore sigmask" flag to live in ti->flags. alpha, ia64, microblaze, powerpc, sh, sparc (64-bit only), tile, and x86 use essentially identical alternative implementations, placing the flag in ti->status. Replace those optimized implementations with an equally

Re: [PATCH 2/5] kernel: add a helper to get an owning user namespace for a namespace

2016-07-14 Thread W. Trevor King
On Thu, Jul 14, 2016 at 11:20:16AM -0700, Andrey Vagin wrote: > +struct ns_common *ns_get_owner(struct ns_common *ns) > +{ > + const struct cred *cred = current_cred(); > + struct user_namespace *user_ns, *p; > + > + user_ns = p = ns->user_ns; > + if (user_ns == NULL) { /* ns is ini

Re: [PATCH v5 01/32] bluetooth: Switch SMP to crypto_cipher_encrypt_one()

2016-07-14 Thread Andy Lutomirski
On Mon, Jul 11, 2016 at 1:53 PM, Andy Lutomirski wrote: > SMP does ECB crypto on stack buffers. This is complicated and > fragile, and it will not work if the stack is virtually allocated. > > Switch to the crypto_cipher interface, which is simpler and safer. Hi Dave- It looks like we're delayi

[PATCH 4/4] printk: When dumping regs, show the stack, not thread_info

2016-07-14 Thread Andy Lutomirski
We currently show: task: ti: task.ti: " "ti" and "task.ti" are redundant, and neither is actually what we want to show, which the the base of the thread stack. Change the display to show the stack pointer explicitly. Signed-off-by: Andy Lutomirski --- kernel/printk/printk.c | 5 ++--- 1

[PATCH 3/4] kdb: Use task_cpu() instead of task_thread_info()->cpu

2016-07-14 Thread Andy Lutomirski
We'll need this cleanup to make the cpu field in thread_info be optional. Cc: Jason Wessel Signed-off-by: Andy Lutomirski --- include/linux/kdb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kdb.h b/include/linux/kdb.h index a19bcf9e762e..410decacff8f 100644

[PATCH 0/4] Virtually mapped stack prep for -mm

2016-07-14 Thread Andy Lutomirski
Hi akpm- We're delaying virtually mapped stacks to 4.9. These four patches are simple and seem like -mm material. Could you apply them for 4.8 so we can get the easy core bits in place? Thanks, Andy Andy Lutomirski (4): mm: Track NR_KERNEL_STACK in KiB instead of number of stacks mm: Fix m

[PATCH 2/4] mm: Fix memcg stack accounting for sub-page stacks

2016-07-14 Thread Andy Lutomirski
We should account for stacks regardless of stack size, and we need to account in sub-page units if THREAD_SIZE < PAGE_SIZE. Change the units to kilobytes and Move it into account_kernel_stack(). Fixes: 12580e4b54ba8 ("mm: memcontrol: report kernel stack usage in cgroup2 memory.stat") Cc: Vladimi

[PATCH 1/4] mm: Track NR_KERNEL_STACK in KiB instead of number of stacks

2016-07-14 Thread Andy Lutomirski
Currently, NR_KERNEL_STACK tracks the number of kernel stacks in a zone. This only makes sense if each kernel stack exists entirely in one zone, and allowing vmapped stacks could break this assumption. Since frv has THREAD_SIZE < PAGE_SIZE, we need to track kernel stack allocations in a unit that

RE: vmcore not getting created on linux-4.7

2016-07-14 Thread Steve Wise
> > > > Updating to 1.6.0 of makedumpfile didn't help. :( > > > > Does anyone else have suggestions on how to debug this? From my original > post, the dump kernel just reboots and I'm not sure why. Where can I add > printks to gather more info on why the dump kernel gives on on the dump? Seems

Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob

2016-07-14 Thread Peter Zijlstra
On Thu, Jul 14, 2016 at 08:43:51PM +0200, Oleg Nesterov wrote: > > Oh well... I personally do not think this is what we want... Can't > we just add the stupid rcu_sync_enter() into cgroup_init() at least > for now? Yes, this means the unnecessary .sync() at boot time, but > it will go away after c

Re: [PATCH v2 01/11] mm: Implement stack frame object validation

2016-07-14 Thread Josh Poimboeuf
On Thu, Jul 14, 2016 at 11:10:18AM -0700, Kees Cook wrote: > On Wed, Jul 13, 2016 at 10:48 PM, Josh Poimboeuf wrote: > > On Wed, Jul 13, 2016 at 03:04:26PM -0700, Kees Cook wrote: > >> On Wed, Jul 13, 2016 at 3:01 PM, Andy Lutomirski > >> wrote: > >> > On Wed, Jul 13, 2016 at 2:55 PM, Kees Cook

Re: [PATCH 1/4] mm: Track NR_KERNEL_STACK in KiB instead of number of stacks

2016-07-14 Thread Johannes Weiner
On Thu, Jul 14, 2016 at 12:14:10PM -0700, Andy Lutomirski wrote: > Currently, NR_KERNEL_STACK tracks the number of kernel stacks in a > zone. This only makes sense if each kernel stack exists entirely in > one zone, and allowing vmapped stacks could break this assumption. > > Since frv has THREAD

Critical regression in 4.7-rcX

2016-07-14 Thread Larry Finger
To anyone keeping track of regressions in kernel 4.7, I call your attention to https://bugs.freedesktop.org/show_bug.cgi?id=96675. This bug causes driver i915 to fail to connect to the display, and results in a blank screen as soon as the kernel is loaded. The only way to operate with kernel 4

Re: [PATCH 2/4] mm: Fix memcg stack accounting for sub-page stacks

2016-07-14 Thread Johannes Weiner
On Thu, Jul 14, 2016 at 12:14:11PM -0700, Andy Lutomirski wrote: > We should account for stacks regardless of stack size, and we need > to account in sub-page units if THREAD_SIZE < PAGE_SIZE. Change the > units to kilobytes and Move it into account_kernel_stack(). > > Fixes: 12580e4b54ba8 ("mm:

Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob

2016-07-14 Thread Paul E. McKenney
On Thu, Jul 14, 2016 at 09:20:18PM +0200, Peter Zijlstra wrote: > On Thu, Jul 14, 2016 at 08:43:51PM +0200, Oleg Nesterov wrote: > > > > Oh well... I personally do not think this is what we want... Can't > > we just add the stupid rcu_sync_enter() into cgroup_init() at least > > for now? Yes, this

Re: [PATCH] Add compat_sys_preadv64v2/compat_sys_pwritev64v2

2016-07-14 Thread H.J. Lu
On Thu, Jul 14, 2016 at 12:01 PM, Ingo Molnar wrote: > > * H.J. Lu wrote: > >> Add compat_sys_preadv64v2 and compat_sys_pwritev64v2 so that 64-bit offset >> is passed in one 64-bit register on x32, similar to compat_sys_preadv64 >> and compat_sys_pwritev64. >> >> Signed-off-by: H.J. Lu > >> From

Re: [PATCH v2] coresight: Use local coresight_desc instances

2016-07-14 Thread Mathieu Poirier
On 13 July 2016 at 10:40, Suzuki K Poulose wrote: > Each coresight device prepares a description for coresight_register() > in struct coresight_desc. Once we register the device, the description is > useless and can be freed. The coresight_desc is small enough (48bytes on > 64bit)i to be allocated

Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob

2016-07-14 Thread Peter Zijlstra
On Thu, Jul 14, 2016 at 12:29:59PM -0700, Paul E. McKenney wrote: > On Thu, Jul 14, 2016 at 09:20:18PM +0200, Peter Zijlstra wrote: > > /** > > + * rcu_sync_sabotage() - Sabotage a fresh rcu_sync instance > > + * @rsp: Pointer to rcu_sync structure to be sabotaged > > + * > > + * Must be called af

Re: Severe performance regression w/ 4.4+ on Android due to cgroup locking changes

2016-07-14 Thread Peter Zijlstra
On Thu, Jul 14, 2016 at 08:36:09PM +0200, Peter Zijlstra wrote: > On Thu, Jul 14, 2016 at 08:09:52PM +0200, Oleg Nesterov wrote: > > On 07/14, Peter Zijlstra wrote: > > > > > > The below is a compile tested only first draft so far. I'll go give it > > > some runtime next. > > > > So I will wait fo

Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob

2016-07-14 Thread Paul E. McKenney
On Thu, Jul 14, 2016 at 09:38:00PM +0200, Peter Zijlstra wrote: > On Thu, Jul 14, 2016 at 12:29:59PM -0700, Paul E. McKenney wrote: > > On Thu, Jul 14, 2016 at 09:20:18PM +0200, Peter Zijlstra wrote: > > > /** > > > + * rcu_sync_sabotage() - Sabotage a fresh rcu_sync instance > > > + * @rsp: Point

Re: [RFC][PATCH] proc: Relax /proc//timerslack_ns capability requirements

2016-07-14 Thread Nick Kralevich
On Thu, Jul 14, 2016 at 11:50 AM, John Stultz wrote: > When an interface to allow a task to change another tasks > timerslack was first proposed, it was suggested that something > greater then CAP_SYS_NICE would be needed, as a task could be > delayed further then what normally could be done with

Re: [PATCH] security: Use IS_ENABLED() instead of checking for built-in or module

2016-07-14 Thread Paul Moore
On Thu, Jul 14, 2016 at 12:30 PM, Casey Schaufler wrote: > On 7/14/2016 9:20 AM, Javier Martinez Canillas wrote: >> Hello Casey, >> >> On 07/14/2016 12:17 PM, Casey Schaufler wrote: >>> On 7/14/2016 9:00 AM, Javier Martinez Canillas wrote: The IS_ENABLED() macro checks if a Kconfig symbol has

[PATCH] media: Doc add missing documentation for samsung,exynos4212-jpeg

2016-07-14 Thread Shuah Khan
Add add missing documentation for samsung,exynos4212-jpeg codec, reorder entries to improve readability and make it easier to add new entries. Signed-off-by: Shuah Khan --- Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH] media: s5p-jpeg add missing blank lines after declarations

2016-07-14 Thread Shuah Khan
Missing blank lines after declarations are making it hard to read the code. Fix them and also fix other checkpatch warnings at the same time. Signed-off-by: Shuah Khan --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v23 13/22] vfs: Cache richacl in struct inode

2016-07-14 Thread Andreas Gruenbacher
On Wed, Jul 6, 2016 at 8:57 PM, Jeff Layton wrote: > On Thu, 2016-06-30 at 15:47 +0200, Andreas Gruenbacher wrote: >> Cache richacls in struct inode so that this doesn't have to be done >> individually in each filesystem. This is similar to POSIX ACLs. >> >> Signed-off-by: Andreas Gruenbacher >>

Re: [PATCH] rtc: ds1307: fix century bit support

2016-07-14 Thread Arnaud Ebalard
Hi Alexandre, Alexandre Belloni writes: > Add an option to properly support the century bit of ds1337 and compatibles > and ds1340. > Because the driver had a bug until now, it is not possible to switch users > to the fixed code directly as RTCs in the field will wrongly have the > century bit s

Re: [PATCH 2/3] rtc: ds1307: add Intersil ISL12057 support

2016-07-14 Thread Arnaud Ebalard
Alexandre Belloni writes: > Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported > by the ds1307 driver. > > Signed-off-by: Alexandre Belloni > --- > drivers/rtc/Kconfig | 8 > drivers/rtc/rtc-ds1307.c | 6 ++ > 2 files changed, 10 insertions(+), 4 delet

Re: [PATCH 1/3] Documentation: dt: Intersil isl12057 is not a trivial device

2016-07-14 Thread Arnaud Ebalard
Hello, Alexandre Belloni writes: > The ISL12057 has a documentation file, remove it from trivial-devices.txt > > Signed-off-by: Alexandre Belloni > --- > Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/Documentation/devicetree/b

[PATCH v2] ARM: dts: NSP: Correct RAM amount for BCM958625HR board

2016-07-14 Thread Jon Mason
The BCM958625HR board has 2GB of RAM available. Increase the amount from 512MB to 2GB and add the device type to the memory entry. Fixes: 9a4865d42fe5 ("ARM: dts: NSP: Specify RAM amount for BCM958625HR board") Signed-off-by: Jon Mason --- arch/arm/boot/dts/bcm958625hr.dts | 3 ++- 1 file chang

Re: [PATCH 0/3] rtc: remove intersil isl12057

2016-07-14 Thread Arnaud Ebalard
Hi Alexandre, Alexandre Belloni writes: > This is the series I intend to apply once you confirm my previous patch > is working. For previous patch and that series, once the typos are fixed: Acked-by: Arnaud Ebalard Thanks for spotting the duplication and your work. Cheers, a+ > > Alexandr

[PATCH v4] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-07-14 Thread Ricardo Ribalda Delgado
Xilinx Spartan-3AN FPGAs contain an In-System Flash where they keep their configuration data and (optionally) some user data. The protocol of this flash follows most of the spi-nor standard. With the following differences: - Page size might not be a power of two. - The address calculation (defaul

Re: [PATCH 3.12 00/88] 3.12.62-stable review

2016-07-14 Thread Guenter Roeck
On Thu, Jul 14, 2016 at 10:16:06AM +0200, Jiri Slaby wrote: > This is the start of the stable review cycle for the 3.12.62 release. > There are 88 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > R

Re: [RESEND PATCH v3] mtd: spi-nor: Add support for S3AN spi-nor devices

2016-07-14 Thread Ricardo Ribalda Delgado
Hi Brian: On Thu, Jul 14, 2016 at 8:07 PM, Brian Norris wrote:) > > > This still doesn't apply to l2-mtd.git / linux-next.git. If I get time, > I'll see how easily I can fix that up myself. v3 was from May 11. I have just updated a V4 rebased over l2-mtd/master. Thanks -- Ricardo Ribalda

Re: [PATCH 2/2] proc: Add /proc//timerslack_ns interface

2016-07-14 Thread Serge E. Hallyn
Quoting Kees Cook (keesc...@chromium.org): > On Thu, Jul 14, 2016 at 10:49 AM, Serge E. Hallyn wrote: > > Kees, you said adding a capability is hard - can you expound on that? > > Best I can find at the moment was discussion around CAP_COMPROMISE_KERNEL: > http://thread.gmane.org/gmane.linux.kern

Re: [PATCH] virtio-net: Remove more stack DMA

2016-07-14 Thread Andy Lutomirski
On Tue, Jul 12, 2016 at 10:40 AM, David Miller wrote: > From: Andy Lutomirski > Date: Mon, 11 Jul 2016 14:30:28 -0700 > >> DaveM, is it okay for this to go in via -tip? > > Sure. Looks like the series that depends on this is getting delayed to 4.9. Could you queue this patch for net-next instead

Re: [PATCH -v4 2/2] printk: Add kernel parameter to control writes to /dev/kmsg

2016-07-14 Thread Andrew Morton
On Fri, 8 Jul 2016 11:18:50 +0200 Borislav Petkov wrote: > From: Borislav Petkov > > Add a "printk.devkmsg" kernel command line parameter which controls how > userspace writes into /dev/kmsg. It has three options: > > * ratelimit - ratelimit logging from userspace. > * on - unlimited logging

[PATCH 11/11] x86/smp: Remove unnecessary initialization of thread_info::cpu

2016-07-14 Thread Andy Lutomirski
It's statically initialized to zero -- no need to dynamically initialize it to zero as well. Signed-off-by: Andy Lutomirski --- arch/x86/kernel/smpboot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index fafe8b923cac..0e91dbeca2fd 1006

[PATCH 06/11] x86/mm/64: In vmalloc_fault(), use CR3 instead of current->active_mm

2016-07-14 Thread Andy Lutomirski
If we get a vmalloc fault while current->active_mm->pgd doesn't match CR3, we'll crash without this change. I've seen this failure mode on heavily instrumented kernels with virtually mapped stacks. Signed-off-by: Andy Lutomirski --- arch/x86/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: System freezes after OOM

2016-07-14 Thread David Rientjes
On Thu, 14 Jul 2016, Mikulas Patocka wrote: > > schedule > > schedule_timeout > > io_schedule_timeout > > mempool_alloc > > __split_and_process_bio > > dm_request > > generic_make_request > > submit_bio > > mpage_readpages > > ext4_readpages > > __do_page_cache_readahead > > ra_submit > > filemap_

[PATCH 01/11] x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()

2016-07-14 Thread Andy Lutomirski
From: Ingo Molnar So when memory hotplug removes a piece of physical memory from pagetable mappings, it also frees the underlying PGD entry. This complicates PGD management, so don't do this. We can keep the PGD mapped and the PUD table all clear - it's only a single 4K page per 512 GB of memory

[PATCH 04/11] x86/dumpstack: Try harder to get a call trace on stack overflow

2016-07-14 Thread Andy Lutomirski
If we overflow the stack, print_context_stack will abort. Detect this case and rewind back into the valid part of the stack so that we can trace it. Reviewed-by: Josh Poimboeuf Signed-off-by: Andy Lutomirski --- arch/x86/kernel/dumpstack.c | 10 +- 1 file changed, 9 insertions(+), 1 de

[PATCH 10/11] x86/smp: Remove stack_smp_processor_id()

2016-07-14 Thread Andy Lutomirski
It serves no purpose -- raw_smp_processor_id() works fine. This change will be needed to move thread_info off the stack. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/cpu.h | 1 - arch/x86/include/asm/smp.h | 6 -- arch/x86/kernel/cpu/common.c | 2 +- 3 files changed, 1 insert

[PATCH 07/11] x86/dumpstack: When OOPSing, rewind the stack before do_exit()

2016-07-14 Thread Andy Lutomirski
If we call do_exit() with a clean stack, we greatly reduce the risk of recursive oopses due to stack overflow in do_exit, and we allow do_exit to work even if we OOPS from an IST stack. The latter gives us a much better chance of surviving long enough after we detect a stack overflow to write out

[PATCH 09/11] x86: Move addr_limit to thread_struct

2016-07-14 Thread Andy Lutomirski
thread_info is a legacy mess. To prepare for its partial removal, move addr_limit out. As an added benefit, this way is simpler. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/checksum_32.h | 3 +-- arch/x86/include/asm/processor.h | 17 ++--- arch/x86/include/asm/threa

[PATCH 05/11] x86/dumpstack/64: Handle faults when printing the "Stack:" part of an OOPS

2016-07-14 Thread Andy Lutomirski
If we overflow the stack into a guard page, we'll recursively fault when trying to dump the contents of the guard page. Use probe_kernel_address so we can recover if this happens. Reviewed-by: Josh Poimboeuf Signed-off-by: Andy Lutomirski --- arch/x86/kernel/dumpstack_64.c | 12 ++-- 1

[PATCH 08/11] x86: Move uaccess_err and sig_on_uaccess_err to thread_struct

2016-07-14 Thread Andy Lutomirski
thread_info is a legacy mess. To prepare for its partial removal, move the uaccess control fields out -- they're straightforward. Signed-off-by: Andy Lutomirski --- arch/x86/entry/vsyscall/vsyscall_64.c | 6 +++--- arch/x86/include/asm/processor.h | 3 +++ arch/x86/include/asm/thread_info.

[PATCH 02/11] x86/cpa: In populate_pgd, don't set the pgd entry until it's populated

2016-07-14 Thread Andy Lutomirski
This avoids pointless races in which another CPU or task might see a partially populated global pgd entry. These races should normally be harmless, but, if another CPU propagates the entry via vmalloc_fault and then populate_pgd fails (due to memory allocation failure, for example), this prevents

[PATCH 00/11] x86: misc prep patches for virtually mapped stacks

2016-07-14 Thread Andy Lutomirski
Hi Ingo- Here are eleven miscellaneous, mostly standalone x86 patches that I pulled from the virtually mapped stack patch set. They're based on 4.7-rc6, and I imagine they apply cleanly on most or all -tip branches. Once these land, I'll see if the THREAD_INFO_IN_TASK stuff splits out cleanly as

[PATCH 03/11] x86/mm: Remove kernel_unmap_pages_in_pgd() and efi_cleanup_page_tables()

2016-07-14 Thread Andy Lutomirski
kernel_unmap_pages_in_pgd() is dangerous: if a pgd entry in init_mm.pgd were to be cleared, callers would need to ensure that the pgd entry hadn't been propagated to any other pgd. Its only caller was efi_cleanup_page_tables(), and that, in turn, was unused, so just delete both functions. This le

Re: System freezes after OOM

2016-07-14 Thread David Rientjes
On Thu, 14 Jul 2016, Tetsuo Handa wrote: > David Rientjes wrote: > > On Wed, 13 Jul 2016, Mikulas Patocka wrote: > > > > > What are the real problems that f9054c70d28bc214b2857cf8db8269f4f45a5e23 > > > tries to fix? > > > > > > > It prevents the whole system from livelocking due to an oom kill

Re: [PATCH -v4 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-14 Thread Andrew Morton
On Fri, 8 Jul 2016 11:18:49 +0200 Borislav Petkov wrote: > From: Borislav Petkov > > Extend the ratelimiting facility to print the amount of suppressed lines > when it is being released. Why? What's driving this? What are the benefits to our users? Are there any downsides or back-compatibi

Re: [PATCH v5 01/32] bluetooth: Switch SMP to crypto_cipher_encrypt_one()

2016-07-14 Thread Marcel Holtmann
Hi Andy, >> SMP does ECB crypto on stack buffers. This is complicated and >> fragile, and it will not work if the stack is virtually allocated. >> >> Switch to the crypto_cipher interface, which is simpler and safer. > > Hi Dave- > > It looks like we're delaying virtually mapped stacks to 4.9.

Re: [PATCH v23 18/22] richacl: xattr mapping functions

2016-07-14 Thread Andreas Gruenbacher
On Tue, Jul 12, 2016 at 2:02 PM, Jeff Layton wrote: > On Thu, 2016-06-30 at 15:47 +0200, Andreas Gruenbacher wrote: >> Map between "system.richacl" xattrs and the in-kernel representation. >> >> Signed-off-by: Andreas Gruenbacher >> --- >> fs/Makefile| 2 +- >> fs/richa

Re: [PATCH v7 4/9] acpi/arm64: Add GTDT table parse driver

2016-07-14 Thread Paul Gortmaker
On Wed, Jul 13, 2016 at 1:53 PM, wrote: > From: Fu Wei > > This patch adds support for parsing arch timer in GTDT, > provides some kernel APIs to parse all the PPIs and > always-on info in GTDT and export them. > > By this driver, we can simplify arm_arch_timer drivers, and > separate the ACPI G

Re: System freezes after OOM

2016-07-14 Thread David Rientjes
On Thu, 14 Jul 2016, Michal Hocko wrote: > > It prevents the whole system from livelocking due to an oom killed process > > stalling forever waiting for mempool_alloc() to return. No other threads > > may be oom killed while waiting for it to exit. > > But it is true that the patch has uninten

Re: [PATCH -v4 2/2] printk: Add kernel parameter to control writes to /dev/kmsg

2016-07-14 Thread Steven Rostedt
On Thu, 14 Jul 2016 13:23:23 -0700 Andrew Morton wrote: > On Fri, 8 Jul 2016 11:18:50 +0200 Borislav Petkov wrote: > > > From: Borislav Petkov > > > > Add a "printk.devkmsg" kernel command line parameter which controls how > > userspace writes into /dev/kmsg. It has three options: > > > > *

Re: [PATCH v5 01/32] bluetooth: Switch SMP to crypto_cipher_encrypt_one()

2016-07-14 Thread David Miller
From: Andy Lutomirski Date: Thu, 14 Jul 2016 12:10:45 -0700 > On Mon, Jul 11, 2016 at 1:53 PM, Andy Lutomirski wrote: >> SMP does ECB crypto on stack buffers. This is complicated and >> fragile, and it will not work if the stack is virtually allocated. >> >> Switch to the crypto_cipher interfac

Re: [PATCH] virtio-net: Remove more stack DMA

2016-07-14 Thread David Miller
From: Andy Lutomirski Date: Thu, 14 Jul 2016 13:21:46 -0700 > On Tue, Jul 12, 2016 at 10:40 AM, David Miller wrote: >> From: Andy Lutomirski >> Date: Mon, 11 Jul 2016 14:30:28 -0700 >> >>> DaveM, is it okay for this to go in via -tip? >> >> Sure. > > Looks like the series that depends on this

Re: [RFC 1/3] watchdog: change watchdog_need_worker logic

2016-07-14 Thread Guenter Roeck
On Thu, Jul 14, 2016 at 11:16:26AM +0200, Rasmus Villemoes wrote: > If the driver indicates that the watchdog is running, the framework > should feed it until userspace opens the device, regardless of whether > the driver has set max_hw_heartbeat_ms. > > This patch only affects the case where wdd-

Re: [PATCH v18 6/6] ARM: socfpga: fpga bridge driver support

2016-07-14 Thread Paul Gortmaker
On Tue, Jul 12, 2016 at 3:36 PM, Alan Tull wrote: > Supports Altera SOCFPGA bridges: > * fpga2sdram > * fpga2hps > * hps2fpga > * lwhps2fpga > > Allows enabling/disabling the bridges through the FPGA > Bridge Framework API functions. > > The fpga2sdram driver only supports enabling and disabli

[PATCH v13 00/12] support "task_isolation" mode

2016-07-14 Thread Chris Metcalf
Here is a respin of the task-isolation patch set. This primarily reflects feedback from Frederic and Peter Z. Changes since v12: - Rebased on v4.7-rc7. - New default "strict" model for task isolation - tasks exit the kernel from the initial prctl() to userspace, and can only legally exit by

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

2016-07-14 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 v13 03/12] lru_add_drain_all: factor out lru_add_drain_needed

2016-07-14 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 v13 04/12] task_isolation: add initial support

2016-07-14 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 v13 07/12] arm64: factor work_pending state machine to C

2016-07-14 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 v13 02/12] vmstat: add vmstat_idle function

2016-07-14 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

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

2016-07-14 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

[PATCH v13 11/12] task_isolation: support CONFIG_TASK_ISOLATION_ALL

2016-07-14 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 v13 08/12] arch/arm64: enable task isolation functionality

2016-07-14 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 v13 06/12] arch/x86: enable task isolation functionality

2016-07-14 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 v13 09/12] arch/tile: enable task isolation functionality

2016-07-14 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

[PATCH v6 0/4] improvements to the nmi_backtrace code

2016-07-14 Thread Chris Metcalf
This is a straight rebasing of the v5 series onto v4.7-rc7, plus I now show Aaron Tomlin's ack for patch 2/4, and review of patch 1/4. >From the version 1 cover letter: This patch series modifies the trigger_xxx_backtrace() NMI-based remote backtracing code to make it more flexible, and makes

[PATCH v6 2/4] nmi_backtrace: do a local dump_stack() instead of a self-NMI

2016-07-14 Thread Chris Metcalf
Currently on arm there is code that checks whether it should call dump_stack() explicitly, to avoid trying to raise an NMI when the current context is not preemptible by the backtrace IPI. Similarly, the forthcoming arch/tile support uses an IPI mechanism that does not support generating an NMI to

[PATCH v6 1/4] nmi_backtrace: add more trigger_*_cpu_backtrace() methods

2016-07-14 Thread Chris Metcalf
Currently you can only request a backtrace of either all cpus, or all cpus but yourself. It can also be helpful to request a remote backtrace of a single cpu, and since we want that, the logical extension is to support a cpumask as the underlying primitive. This change modifies the existing lib/n

[PATCH v13 05/12] task_isolation: track asynchronous interrupts

2016-07-14 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 v6 3/4] arch/tile: adopt the new nmi_backtrace framework

2016-07-14 Thread Chris Metcalf
Previously tile was rolling its own method of capturing backtrace data in the NMI handlers, but it was relying on running printk() from the NMI handler, which is not always safe. So adopt the nmi_backtrace model (with the new cpumask extension) instead. So we can call the nmi_backtrace code direc

[PATCH v13 01/12] vmstat: add quiet_vmstat_sync function

2016-07-14 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

Re: [PATCH 2/4] mm: Fix memcg stack accounting for sub-page stacks

2016-07-14 Thread Andrew Morton
On Thu, 14 Jul 2016 12:14:11 -0700 Andy Lutomirski wrote: > We should account for stacks regardless of stack size, and we need > to account in sub-page units if THREAD_SIZE < PAGE_SIZE. Change the > units to kilobytes and Move it into account_kernel_stack(). I queued this patch after http://ozl

Re: [PATCH v18 4/6] fpga: add fpga bridge framework

2016-07-14 Thread Paul Gortmaker
On Tue, Jul 12, 2016 at 3:36 PM, Alan Tull wrote: > This framework adds API functions for enabling/ > disabling FPGA bridges under kernel control. > > This allows the Linux kernel to disable FPGA bridges > during FPGA reprogramming and to enable FPGA bridges > when FPGA reprogramming is done. Thi

[PATCH v6 4/4] nmi_backtrace: generate one-line reports for idle cpus

2016-07-14 Thread Chris Metcalf
When doing an nmi backtrace of many cores, most of which are idle, the output is a little overwhelming and very uninformative. Suppress messages for cpus that are idling when they are interrupted and just emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN". We do this by grouping all

Re: [PATCH] security: Use IS_ENABLED() instead of checking for built-in or module

2016-07-14 Thread Casey Schaufler
On 7/14/2016 12:57 PM, Paul Moore wrote: > On Thu, Jul 14, 2016 at 12:30 PM, Casey Schaufler > wrote: >> On 7/14/2016 9:20 AM, Javier Martinez Canillas wrote: >>> Hello Casey, >>> >>> On 07/14/2016 12:17 PM, Casey Schaufler wrote: On 7/14/2016 9:00 AM, Javier Martinez Canillas wrote: > Th

Re: [PATCH v23 20/22] vfs: Add richacl permission checking

2016-07-14 Thread Andreas Gruenbacher
On Tue, Jul 12, 2016 at 2:13 PM, Jeff Layton wrote: > On Thu, 2016-06-30 at 15:47 +0200, Andreas Gruenbacher wrote: >> Hook the richacl permission checking function into the vfs. >> >> Signed-off-by: Andreas Gruenbacher >> --- >> fs/namei.c | 54 ++

<    2   3   4   5   6   7   8   9   10   >