Re: [BUGFIX PATCH] kprobes/x86: Fix to set RWX bits correctly before releasing trampoline

2017-06-01 Thread Luis R. Rodriguez
On Sat, May 27, 2017 at 06:46:12PM -0700, Jessica Yu wrote: > +++ Masami Hiramatsu [26/05/17 09:24 +0900]: > > On Thu, 25 May 2017 19:24:26 +0200 > > "Luis R. Rodriguez" wrote: > > > > > On Thu, May 25, 2017 at 07:38:17PM +0900, Masami Hiramatsu wrote:

[PATCH v2] fs: warn in case userspace lied about modprobe return

2017-06-01 Thread Luis R. Rodriguez
ce these issues are painful to debug complain when we know userspace has outright lied to us. [0] http://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/libkmod/libkmod-module.c?id=fd44a98ae2eb5eb32161088954ab21e58e19dfc4 Suggested-by: Rusty Russell Cc: Jessica Yu Signed-off-by: Luis R. R

Re: [PATCH] fs: warn in case userspace lied about modprobe return

2017-06-01 Thread Luis R. Rodriguez
On Sat, May 27, 2017 at 07:01:45PM -0700, Jessica Yu wrote: > +++ Luis R. Rodriguez [25/05/17 17:44 -0700]: > > kmod <= v19 was broken -- it could return 0 to modprobe calls, > > incorrectly assuming that a kernel module was built-in, whereas in > > reality the module

Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-26 Thread Luis R. Rodriguez
On Fri, May 26, 2017 at 10:23:03PM +0200, Fuzzey, Martin wrote: > On 26 May 2017 at 21:40, Luis R. Rodriguez wrote: > > > > No no, this is not how the fallback system works. > > The sysfs file I was talking about is *not* the sysfs file involved in > the firmware l

[PATCH v3 4/4] kmod: throttle kmod thread limit

2017-05-26 Thread Luis R. Rodriguez
s the following run time to run both tests: time ./kmod.sh -t 0008 real0m12.364s user0m0.704s sys 0m5.373s time ./kmod.sh -t 0009 real0m47.638s user0m1.033s sys 0m5.425s Signed-off-by: Luis R. Rodriguez --- kernel/kmod.c| 16 +++-

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-26 Thread Luis R. Rodriguez
On Fri, May 26, 2017 at 04:05:43PM -0500, Li, Yi wrote: > hi Luis > > > On 5/25/2017 5:43 PM, Luis R. Rodriguez wrote: > > On Thu, May 25, 2017 at 3:30 PM, Li, Yi wrote: > > > This patch is for "disabling the cache" for streaming and iwlwifi case, >

[PATCH v3 1/4] module: use list_for_each_entry_rcu() on find_module_all()

2017-05-26 Thread Luis R. Rodriguez
The module list has been using RCU in a lot of other calls for a while now, we just overlooked changing this one over to use RCU. Signed-off-by: Luis R. Rodriguez --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index

[PATCH v3 2/4] kmod: reduce atomic operations on kmod_concurrent and simplify

2017-05-26 Thread Luis R. Rodriguez
er in boot through an init call by simply sticking to 50 as the kmod_concurrent_max. The assumption here is a system with modules must at least have ~16 MiB of RAM. Suggested-by: Petr Mladek Suggested-by: Dmitry Torokhov Signed-off-by: Luis R. Rodriguez --- kernel/kmod.c

Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-26 Thread Luis R. Rodriguez
On Fri, May 26, 2017 at 2:26 PM, Dmitry Torokhov wrote: > On Fri, May 26, 2017 at 12:46 PM, Luis R. Rodriguez wrote: >> On Fri, May 26, 2017 at 06:09:29AM -0500, Eric W. Biederman wrote: >>> "Fuzzey, Martin" writes: >>> >>>> Maybe SIGCHLD sh

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-26 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 10:35 AM, Catalin Marinas wrote: > On Fri, May 19, 2017 at 05:40:16PM +0200, Luis R. Rodriguez wrote: >> If the following is a legit forced way to get query the kernel to ask it >> who owns a page then perhaps this technique can be used in the future to &g

[PATCH v3 0/4] kmod: help make deterministic

2017-05-26 Thread Luis R. Rodriguez
ger depends on any other patches, the series is independent. As usual the series is available on my linux-next 20170526-kmod-only branch which is based on next-20170526. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20170526-kmod-only Luis Luis R. Rodriguez

[PATCH v3 3/4] kmod: add test driver to stress test the module loader

2017-05-26 Thread Luis R. Rodriguez
ore memory to load a module with a lot of dependencies. Because of 3) and 4) we will easily run into out of memory failures with certain tests. For instance test 0006 fails on qemu with 1024 MiB of RAM. It panics a box after reaping all userspace processes and still not having enough memory to reap.

Re: [PATCH v2 4/5] kmod: add helpers for getting kmod limit

2017-05-26 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 05:56:51PM -0700, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 05:16:29PM -0700, Luis R. Rodriguez wrote: > > This adds helpers for getting access to the kmod limit from > > userspace. This knob should help userspace more gracefully and > > det

Re: [PATCH v2 2/5] kmod: reduce atomic operations on kmod_concurrent

2017-05-26 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 06:11:00PM -0700, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 05:16:27PM -0700, Luis R. Rodriguez wrote: > > When checking if we want to allow a kmod thread to kick off we increment, > > then read to see if we should enable a thread. If we were o

Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-26 Thread Luis R. Rodriguez
On Fri, May 26, 2017 at 06:09:29AM -0500, Eric W. Biederman wrote: > "Fuzzey, Martin" writes: > Maybe SIGCHLD shouldn't interrupt firmware loading? > > > > I don't think there's a way of doing that without disabling all > > signals (ie using the non interruptible wait variants). > > It used t

Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-26 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 10:28:38AM +0200, Fuzzey, Martin wrote: > On 25 May 2017 at 06:13, Andy Lutomirski wrote: > >>> > >>> Can you give a simple example of what's going on and why it matters? > >>> > > > Here is the use case in which I ran into this problem. > > I have a driver which does re

[PATCH] fs: warn in case userspace lied about modprobe return

2017-05-25 Thread Luis R. Rodriguez
ce these issues are painful to debug complain when we know userspace has outright lied to us. [0] http://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/libkmod/libkmod-module.c?id=fd44a98ae2eb5eb32161088954ab21e58e19dfc4 Suggested-by: Rusty Russell Cc: Jessica Yu Signed-off-by: Luis R. R

[PATCH v2 3/5] kmod: add test driver to stress test the module loader

2017-05-25 Thread Luis R. Rodriguez
ore memory to load a module with a lot of dependencies. Because of 3) and 4) we will easily run into out of memory failures with certain tests. For instance test 0006 fails on qemu with 1024 MiB of RAM. It panics a box after reaping all userspace processes and still not having enough memory to reap.

[PATCH v2 2/5] kmod: reduce atomic operations on kmod_concurrent

2017-05-25 Thread Luis R. Rodriguez
CPU2 atomic_dec_if_positive() atomic_dec_if_positive() atomic_inc() atomic_inc() Suggested-by: Petr Mladek Signed-off-by: Luis R. Rodriguez --- include/linux/kmod.h | 2 ++ init/main.c | 1 + kernel/kmod.c

[PATCH v2 4/5] kmod: add helpers for getting kmod limit

2017-05-25 Thread Luis R. Rodriguez
This adds helpers for getting access to the kmod limit from userspace. This knob should help userspace more gracefully and deterministically handle module loading. Cc: Tom Gundersen Cc: Petr Mladek Signed-off-by: Luis R. Rodriguez --- Documentation/sysctl/kernel.txt | 20

[PATCH v2 5/5] kmod: throttle kmod thread limit

2017-05-25 Thread Luis R. Rodriguez
s the following run time to run both tests: time kmod.sh -t 0008 real0m14.066s user0m1.403s sys 0m5.837s time kmod.sh -t 0009 real0m53.928s user0m1.271s sys 0m7.343s Signed-off-by: Luis R. Rodriguez --- kernel/kmod.c| 15 +-- tools/te

[PATCH v2 1/5] module: use list_for_each_entry_rcu() on find_module_all()

2017-05-25 Thread Luis R. Rodriguez
The module list has been using RCU in a lot of other calls for a while now, we just overlooked changing this one over to use RCU. Signed-off-by: Luis R. Rodriguez --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index

[PATCH v2 0/5] kmod: help make deterministic

2017-05-25 Thread Luis R. Rodriguez
/1495234558.7848.122.ca...@linux.intel.com [4] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20170525-kmod-throttle Luis Luis R. Rodriguez (5): module: use list_for_each_entry_rcu() on find_module_all() kmod: reduce atomic operations on kmod_concurrent kmod

[PATCH 1/6] test_sysctl: add dedicated proc sysctl test driver

2017-05-25 Thread Luis R. Rodriguez
t the existing scripts to use it. This will make it easier for further tests to be added. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez --- lib/Kconfig.debug | 11 +++ lib/Makefile| 1 + lib/test_sys

[PATCH 2/6] test_sysctl: add generic script to expand on tests

2017-05-25 Thread Luis R. Rodriguez
of times, say we want to run a test case 100 times: ./sysctl.sh -c 0001 100 To run a test case only once, for example: ./sysctl.sh -s 0002 The default settings are specified at the top of sysctl.sh. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/sysctl/Makefile | 3

[PATCH 3/6] test_sysctl: test against PAGE_SIZE for int

2017-05-25 Thread Luis R. Rodriguez
shell reset_vals() with a reset to values we know are set at init on the driver. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/sysctl/sysctl.sh | 65 1 file changed, 65 insertions(+) diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools

[PATCH 0/6] sysctl: add dedicated stress test driver

2017-05-25 Thread Luis R. Rodriguez
ps://lkml.kernel.org/r/CA+55aFyhxcvD+q7tp+-yrSFDKfR0mOHgyEAe=f_94aklsou...@mail.gmail.com [1] https://lkml.kernel.org/r/1495234558.7848.122.ca...@linux.intel.com Luis Luis R. Rodriguez (6): test_sysctl: add dedicated proc sysctl test driver test_sysctl: add generic script to expand on tests

[PATCH 6/6] test_sysctl: test against int proc_dointvec() array support

2017-05-25 Thread Luis R. Rodriguez
Add a few initial respective tests for an array: o Echoing values separated by spaces works o Echoing only first elements will set first elements o Confirm PAGE_SIZE limit still applies even if an array is used Signed-off-by: Luis R. Rodriguez --- lib/test_sysctl.c

[PATCH 5/6] test_sysctl: add simple proc_douintvec() case

2017-05-25 Thread Luis R. Rodriguez
Test against a simple proc_douintvec() case. While at it, add a test against UINT_MAX. Make sure UINT_MAX works, and UINT_MAX+1 will fail and that negative values are not accepted. Signed-off-by: Luis R. Rodriguez --- lib/test_sysctl.c| 11 ++ tools/testing/selftests

[PATCH 4/6] test_sysctl: add simple proc_dointvec() case

2017-05-25 Thread Luis R. Rodriguez
Test against a simple proc_dointvec() case. While at it, add a test against INT_MAX. Make sure INT_MAX works, and INT_MAX+1 will fail. Also test negative values work. Signed-off-by: Luis R. Rodriguez --- lib/test_sysctl.c| 11 ++ tools/testing/selftests/sysctl

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 1:14 PM, Pavel Machek wrote: > Hi! > >> > > So that yields: >> > > >> > > * This program is free software; you can redistribute it and/or modify >> > > it >> > > * under the terms of the GNU General Public License as published by the >> > > Free >> > > * Software Found

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 3:30 PM, Li, Yi wrote: > This patch is for "disabling the cache" for streaming and iwlwifi case, > adding the test to verify the cache function should be a separate patch, > right? I can look more into the cache part. How can we know cache was disabled without first testin

Re: [PATCH 1/6] kmod: add dynamic max concurrent thread count

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 12:01 PM, Luis R. Rodriguez wrote: > On Thu, May 25, 2017 at 11:26 AM, Dmitry Torokhov > wrote: >> On Thu, May 25, 2017 at 08:06:03PM +0200, Luis R. Rodriguez wrote: >>> On Thu, May 25, 2017 at 10:38:40AM -0700, Luis R. Rodriguez wrote: >>> &

Re: [PATCH 1/6] kmod: add dynamic max concurrent thread count

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 11:26 AM, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 08:06:03PM +0200, Luis R. Rodriguez wrote: >> On Thu, May 25, 2017 at 10:38:40AM -0700, Luis R. Rodriguez wrote: >> > On Thu, May 25, 2017 at 10:30 AM, Dmitry Torokhov >> > > There i

Re: [PATCH 1/6] kmod: add dynamic max concurrent thread count

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 10:38:40AM -0700, Luis R. Rodriguez wrote: > On Thu, May 25, 2017 at 10:30 AM, Dmitry Torokhov > > There is > > no slippery slope for systems to move away, no need to backport > > anything. We seem to agree that a better solution is possible (t

Re: [PATCH V2] x86/ftrace: Make sure that ftrace trampolines are not RWX

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 10:57:51AM +0200, Thomas Gleixner wrote: > ftrace use module_alloc() to allocate trampoline pages. The mapping of > module_alloc() is RWX, which makes sense as the memory is written to right > after allocation. But nothing makes these pages RO after writing to them. > > Add

Re: [PATCH 1/6] kmod: add dynamic max concurrent thread count

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 10:30 AM, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 09:50:15AM -0700, Luis R. Rodriguez wrote: >> On Thu, May 25, 2017 at 9:38 AM, Dmitry Torokhov >> wrote: >> > On Thu, May 25, 2017 at 06:22:01PM +0200, Luis R. Rodriguez wrote: >> &g

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 07:05:18PM +0200, Pavel Machek wrote: > Hi! > > > >> Alright, this makes sense. > > >> > > >> As noted though there are a few "or" clauses, which upstream file > > >> is a good template to use for copyleft-next ? > > > > > > There seems to be a few "or" clauses. For instanc

Re: [BUGFIX PATCH] kprobes/x86: Fix to set RWX bits correctly before releasing trampoline

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 07:38:17PM +0900, Masami Hiramatsu wrote: > Fix kprobes to set(recover) RWX bits correctly on trampoline > buffer before releasing it. Releasing readonly page to > module_memfree() crash the kernel. > > Without this fix, if kprobes user register a bunch of kprobes > in func

Re: [PATCH 1/6] kmod: add dynamic max concurrent thread count

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 9:38 AM, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 06:22:01PM +0200, Luis R. Rodriguez wrote: >> On Fri, May 19, 2017 at 02:58:29PM -0700, Dmitry Torokhov wrote: >> > On Fri, May 19, 2017 at 02:45:29PM -0700, Luis R. Rodriguez wrote: >> >

Re: [PATCH 1/6] kmod: add dynamic max concurrent thread count

2017-05-25 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 02:58:29PM -0700, Dmitry Torokhov wrote: > On Fri, May 19, 2017 at 02:45:29PM -0700, Luis R. Rodriguez wrote: > > On May 19, 2017 1:45 PM, "Dmitry Torokhov" > > wrote: > > > > On Thu, May 18, 2017 at 08:24:39PM -0700, Luis R. Rodriguez

Re: [PATCH 5/6] kmod: preempt on kmod_umh_threads_get()

2017-05-25 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 01:19:31PM +0200, Petr Mladek wrote: > On Wed 2017-05-24 19:27:38, Dmitry Torokhov wrote: > > On Thu, May 25, 2017 at 03:00:17AM +0200, Luis R. Rodriguez wrote: > > > On Wed, May 24, 2017 at 05:45:37PM -0700, Dmitry Torokhov wrote: > > > > On T

Re: [PATCH 5/6] kmod: preempt on kmod_umh_threads_get()

2017-05-24 Thread Luis R. Rodriguez
On Wed, May 24, 2017 at 05:45:37PM -0700, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 02:14:52AM +0200, Luis R. Rodriguez wrote: > > On Fri, May 19, 2017 at 03:27:12PM -0700, Dmitry Torokhov wrote: > > > On Thu, May 18, 2017 at 08:24:43PM -0700, Luis R. Rodriguez wrote: &g

Re: [PATCH 5/6] kmod: preempt on kmod_umh_threads_get()

2017-05-24 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 03:27:12PM -0700, Dmitry Torokhov wrote: > On Thu, May 18, 2017 at 08:24:43PM -0700, Luis R. Rodriguez wrote: > > In theory it is possible multiple concurrent threads will try to > > kmod_umh_threads_get() and as such atomic_inc(&kmod_concurrent) a

Re: [PATCH] x86/ftrace: Make sure that ftrace trampolines are not RWX

2017-05-24 Thread Luis R. Rodriguez
before freeing again. > > I applied this patch, and it appears to fix the bug for me. > > Signed-off-by: Steven Rostedt (VMware) Awesome, this also cures my panic: mcgrof@piggy ~/linux-next (git::20170524-fixwarn)$ sudo tools/testing/selftests/ftrace/ftracetest ... # of passed: 45 # of failed: 0 # of unresolved: 0 # of untested: 0 # of unsupported: 0 # of xfailed: 0 # of undefined(test bug): 0 So the combination of both: Tested-by: Luis R. Rodriguez Luis

[PATCH] MAINTAINERS: give proc sysctl some maintainer love

2017-05-24 Thread Luis R. Rodriguez
We poke at proc sysctl enough that really we should declare it maintained. We'll just be Cc'd and sending updates / ACK'ing changes through akpm's tree. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez --- MAINTAINERS | 11 +++ 1 file changed, 11 inserti

Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-24 Thread Luis R. Rodriguez
On Wed, May 24, 2017 at 3:00 PM, Andy Lutomirski wrote: > On Wed, May 24, 2017 at 2:40 PM, Luis R. Rodriguez wrote: >> From: Martin Fuzzey >> >> Commit 0cb64249ca500 ("firmware_loader: abort request if wait_for_completion >> is interrupted") added via 4.

[PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-24 Thread Luis R. Rodriguez
S so that handlers can whether or not to restart write calls. Signed-off-by: Martin Fuzzey Cc: stable # 4.0 Acked-by: Luis R. Rodriguez [mcgrof: gave the commit log some serious love] Signed-off-by: Luis R. Rodriguez --- For those following drivers/base/firmware_class.c development -- I'v

Re: [PATCH] firmware: request_firmware() should propagate -ERESTARTSYS

2017-05-24 Thread Luis R. Rodriguez
On Tue, May 23, 2017 at 09:55:33PM +0200, Luis R. Rodriguez wrote: > On Tue, May 23, 2017 at 04:32:49PM +0200, Martin Fuzzey wrote: > > On 23/05/17 15:31, Greg Kroah-Hartman wrote: > > > On Tue, May 23, 2017 at 03:16:07PM +0200, Martin Fuzzey wrote: > > > > When -ER

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-24 Thread Luis R. Rodriguez
On Wed, May 24, 2017 at 09:03:57PM +0200, Luis R. Rodriguez wrote: > __fw_lookup_buf() really should be > renamed to something that reflects this is a cache lookup. Actually I take this back, other than the cache, note that when we fw_lookup_and_allocate_buf() we first __fw_lookup_buf()

Re: [PATCH] x86/ftrace: Make sure that ftrace trampolines are not RWX

2017-05-24 Thread Luis R. Rodriguez
On Wed, May 24, 2017 at 08:53:00PM +0200, Thomas Gleixner wrote: > On Wed, 24 May 2017, Luis R. Rodriguez wrote: > > [ 440.548057] CPU: 2 PID: 1765 Comm: ftracetest Tainted: GE > > 4.12.0-rc1-next-20170519+ #155 > > Can you please try that patch against plain

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-24 Thread Luis R. Rodriguez
On Sat, May 20, 2017 at 01:46:56AM -0500, yi1...@linux.intel.com wrote: > From: Yi Li > > Changes in v2: > > - Rebase to Luis R. Rodriguez's 20170501-driver-data-try2 > branch > - Expose DRIVER_DATA_REQ_NO_CACHE flag to public > driver_data_req_params structure, so upper drivers ca

Re: [PATCH] x86/ftrace: Make sure that ftrace trampolines are not RWX

2017-05-24 Thread Luis R. Rodriguez
On Wed, May 24, 2017 at 01:47:28PM -0400, Steven Rostedt wrote: > OK, it crashed on one of my tests. I removed the patch and it boots > fine, and crashes when I add it back. > > Here's the crash: > > Running tests on all trace events: > Testing all events: OK > Testing ftrace filter: OK > trace_k

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-24 Thread Luis R. Rodriguez
On Tue, May 23, 2017 at 04:48:50PM +0200, Luis R. Rodriguez wrote: > On Sat, May 20, 2017 at 11:38:50AM +0900, Masami Hiramatsu wrote: > > Hi Luis, > > > > On Fri, 19 May 2017 19:28:54 +0200 > > "Luis R. Rodriguez" wrote

Re: [PATCH] mm: kmemleak: Treat vm_struct as alternative reference to vmalloc'ed objects

2017-05-24 Thread Luis R. Rodriguez
On Wed, May 24, 2017 at 9:57 AM, Catalin Marinas wrote: > On Tue, May 23, 2017 at 10:37:00PM +0200, Luis R. Rodriguez wrote: >> On Mon, May 22, 2017 at 06:35:14PM +0100, Catalin Marinas wrote: >> > Kmemleak requires that vmalloc'ed objects have a minimum reference coun

Re: [PATCH] mm: kmemleak: Treat vm_struct as alternative reference to vmalloc'ed objects

2017-05-23 Thread Luis R. Rodriguez
included in this patch to change the type > of kmemleak_object.flags to unsigned int (previously unsigned long). > > Reported-by: "Luis R. Rodriguez" Tested-by: Luis R. Rodriguez > diff --git a/mm/kmemleak.c b/mm/kmemleak.c > index 20036d4f9f13..11ab654502fd 100644 >

Re: [PATCH] firmware: request_firmware() should propagate -ERESTARTSYS

2017-05-23 Thread Luis R. Rodriguez
echanism -- syfs write call, sysfs .store(), and Android sends a SIGCHLD to fail the write call -- in such cases the fact that we failed due to a signal is lost. Fix this and ensure we propagate -ERESTARTSYS so that handlers can whether or not to restart write calls. Signed-off-by: Martin Fuzzey Cc

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-23 Thread Luis R. Rodriguez
On Sat, May 20, 2017 at 11:38:50AM +0900, Masami Hiramatsu wrote: > Hi Luis, > > On Fri, 19 May 2017 19:28:54 +0200 > "Luis R. Rodriguez" wrote: > > > On Fri, May 19, 2017 at 05:40:16PM +0200, Luis R. Rodriguez wrote: > > > On Fri, May 19, 2017 at 0

[PATCH v8 1/5] firmware: add extensible driver data params

2017-05-19 Thread Luis R. Rodriguez
code more appropriately unde CONFIG_FW_LOADER_USER_HELPER_FALLBACK. This commit should introduces no functional changes (TM). Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 331 -- include/linux/driver_data.h | 88 +++ 2 fil

[PATCH v8 3/5] test: add new driver_data load tester

2017-05-19 Thread Luis R. Rodriguez
kernel API. This gives us the flexibility to build test case from userspace with less kernel changes. Signed-off-by: Luis R. Rodriguez --- MAINTAINERS |1 + lib/Kconfig.debug | 12 + lib/Makefile

[PATCH v8 5/5] iwlwifi: convert to use driver data API

2017-05-19 Thread Luis R. Rodriguez
The driver data API provides support for looking for firmware from a specific set of API ranges, so just use that. Since we free the firmware on the callback immediately after consuming it, this also takes avantage of that feature. Signed-off-by: Luis R. Rodriguez --- drivers/net/wireless/intel

[PATCH v8 0/5] firmware: add driver data API

2017-05-19 Thread Luis R. Rodriguez
[3] https://lkml.kernel.org/r/20170502083107.23418-1-mcg...@kernel.org [4] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20170519-driver-data Luis R. Rodriguez (5): firmware: add extensible driver data params firmware: add extensible driver data API test: add new driv

[PATCH v8 2/5] firmware: add extensible driver data API

2017-05-19 Thread Luis R. Rodriguez
ronous requests through the same two basic set of APIs. - A firmware API framework is provided to enable daisy chaining a series of requests for firmware on a range of supported APIs. Signed-off-by: Luis R. Rodriguez --- MAINTAINERS | 3 +- drivers/base/firmwar

[PATCH v8 4/5] firmware: document the extensible driver data API

2017-05-19 Thread Luis R. Rodriguez
This documents the driver data API. Signed-off-by: Luis R. Rodriguez --- Documentation/driver-api/firmware/driver_data.rst | 167 + Documentation/driver-api/firmware/index.rst| 1 + Documentation/driver-api/firmware/introduction.rst | 16 ++ .../driver-api

Re: [PATCH v6 3/5] test: add new driver_data load tester

2017-05-19 Thread Luis R. Rodriguez
On Wed, May 17, 2017 at 05:45:22PM -0500, Li, Yi wrote: > hi Luis > > > On 5/11/2017 12:11 PM, Luis R. Rodriguez wrote: > > On Thu, May 11, 2017 at 07:46:27PM +0900, AKASHI Takahiro wrote: > > > Luis, > > > > > > On Fri, Apr 28, 2017 at 03:45:35AM +0

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-19 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 10:59 AM, Luis R. Rodriguez wrote: > On Fri, May 19, 2017 at 05:09:20PM +0200, Luis R. Rodriguez wrote: >> On Fri, May 19, 2017 at 12:31:50PM +0100, Alan Cox wrote: >> > > I really cannot see how you might have an attorney who wants ink on >>

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-19 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 05:09:20PM +0200, Luis R. Rodriguez wrote: > On Fri, May 19, 2017 at 12:31:50PM +0100, Alan Cox wrote: > > > I really cannot see how you might have an attorney who wants ink on > > > 2A but not 1A. > > > I really cannot see how you might hav

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-19 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 05:40:16PM +0200, Luis R. Rodriguez wrote: > On Fri, May 19, 2017 at 05:08:02AM +0200, Luis R. Rodriguez wrote: > > On Fri, May 19, 2017 at 02:44:14AM +0200, Luis R. Rodriguez wrote: > > > On Wed, May 17, 2017 at 10:53:06AM -0700, Kees Cook wrote: >

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-19 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 05:08:02AM +0200, Luis R. Rodriguez wrote: > On Fri, May 19, 2017 at 02:44:14AM +0200, Luis R. Rodriguez wrote: > > On Wed, May 17, 2017 at 10:53:06AM -0700, Kees Cook wrote: > > > On Wed, May 17, 2017 at 9:40 AM, Luis R. Rodriguez > > > wr

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-19 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 12:31:50PM +0100, Alan Cox wrote: > > I really cannot see how you might have an attorney who wants ink on > > 2A but not 1A. > > I really cannot see how you might have an attorney who wants ink on > > 2B but not 1B. > > Because their job is to protect their whomsoever they

[PATCH v3 0/5] sysctl: few fixes

2017-05-18 Thread Luis R. Rodriguez
d that off for another series. Luis R. Rodriguez (5): sysctl: fix lax sysctl_check_table() sanity check sysctl: kdoc'ify sysctl_writes_strict sysctl: fold sysctl_writes_strict checks into helper sysctl: simplify unsigned int support sysctl: add unsigned int range support fs/pro

[PATCH v3 2/5] sysctl: kdoc'ify sysctl_writes_strict

2017-05-18 Thread Luis R. Rodriguez
Document the different sysctl_writes_strict modes in code. Signed-off-by: Luis R. Rodriguez --- kernel/sysctl.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 4dfba1a76cc3..02725178694a 100644 --- a

[PATCH v3 1/5] sysctl: fix lax sysctl_check_table() sanity check

2017-05-18 Thread Luis R. Rodriguez
ious checks. We keep iterating on the table even if an error is found so we can complain for all errors found in one shot. This works as -EINVAL is always returned on error anyway, and the check for error is any non-zero value. Fixes: 7c60c48f58a7 ("sysctl: Improve the sysctl sanity checks&quo

[PATCH v3 5/5] sysctl: add unsigned int range support

2017-05-18 Thread Luis R. Rodriguez
: Heinrich Schuchardt Cc: Kees Cook Cc: "David S. Miller" Cc: Ingo Molnar Cc: Andrew Morton Cc: Linus Torvalds Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez --- fs/proc/proc_sysctl.c | 4 ++- include/linux/sysctl.h | 3 +++ kernel/sysctl.c

[PATCH v3 4/5] sysctl: simplify unsigned int support

2017-05-18 Thread Luis R. Rodriguez
es Cook Cc: "David S. Miller" Cc: Ingo Molnar Cc: Andrew Morton Cc: Linus Torvalds Suggested-by: Alexey Dobriyan Fixes: e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields") Signed-off-by: Luis R. Rodriguez --- fs

[PATCH v3 3/5] sysctl: fold sysctl_writes_strict checks into helper

2017-05-18 Thread Luis R. Rodriguez
The mode sysctl_writes_strict positional checks keep being copy and pasted as we add new proc handlers. Just add a helper to avoid code duplication. Suggested-by: Kees Cook Signed-off-by: Luis R. Rodriguez --- kernel/sysctl.c | 56 1

[PATCH 1/6] kmod: add dynamic max concurrent thread count

2017-05-18 Thread Luis R. Rodriguez
parameter: max_modprobes. [0] https://git.kernel.org/cgit/linux/kernel/git/history/history.git/commit/?id=ab1c4ec7410f6ec64e1511d1a7d850fc99c09b44 [1] https://github.com/mcgrof/test_request_module Signed-off-by: Luis R. Rodriguez --- Documentation/admin-guide/kernel-parameters.txt | 7 include/li

[PATCH 4/6] kmod: return -EBUSY if modprobe limit is reached

2017-05-18 Thread Luis R. Rodriguez
Running out of our modprobe limit is not a memory limit but a system specific established limitation set to avoid a possible recursive issue with modprobe. This gives userspace a better idea of what happened if we can't load a module, it could use this to wait and try again. Signed-off-by: L

[PATCH 5/6] kmod: preempt on kmod_umh_threads_get()

2017-05-18 Thread Luis R. Rodriguez
his a bit. Preemption is not needed when we kmod_umh_threads_put(). Signed-off-by: Luis R. Rodriguez --- kernel/kmod.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/kernel/kmod.c b/kernel/kmod.c index 563600fc9bb1..7ea11dbc7564 100644 --- a/kern

[PATCH 3/6] kmod: provide wrappers for kmod_concurrent inc/dec

2017-05-18 Thread Luis R. Rodriguez
kmod_concurrent is used as an atomic counter for enabling the allowed limit of modprobe calls, provide wrappers for it to enable this to be expanded on more easily. This will be done later. Signed-off-by: Luis R. Rodriguez --- kernel/kmod.c | 25 +++-- 1 file changed, 19

[PATCH 0/6] kmod: few simple enhancements

2017-05-18 Thread Luis R. Rodriguez
;ll also hold off on introducing. I believe these are pretty straight forward, but please let me know if there are any questions. In this re-spin I've dropped the kref / refcount proposals given its just overkill for what we need here. Luis R. Rodriguez (6): kmod: add dynamic max concurrent t

[PATCH 2/6] module: use list_for_each_entry_rcu() on find_module_all()

2017-05-18 Thread Luis R. Rodriguez
The module list has been using RCU in a lot of other calls for a while now, we just overlooked changing this one over to use RCU. Signed-off-by: Luis R. Rodriguez --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index

[PATCH 6/6] kmod: use simplified rate limit printk

2017-05-18 Thread Luis R. Rodriguez
Just use the simplified rate limit printk when the max modprobe limit is reached, while at it throw out a bone should the error be triggered. Reviewed-by: Petr Mladek Signed-off-by: Luis R. Rodriguez --- kernel/kmod.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-18 Thread Luis R. Rodriguez
On Fri, May 19, 2017 at 02:44:14AM +0200, Luis R. Rodriguez wrote: > On Wed, May 17, 2017 at 10:53:06AM -0700, Kees Cook wrote: > > On Wed, May 17, 2017 at 9:40 AM, Luis R. Rodriguez > > wrote: > > > Yes, but I had killed that boot session again, so upon my next boot

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-18 Thread Luis R. Rodriguez
On Wed, May 17, 2017 at 10:53:06AM -0700, Kees Cook wrote: > On Wed, May 17, 2017 at 9:40 AM, Luis R. Rodriguez wrote: > > Yes, but I had killed that boot session again, so upon my next boot > > I had a different layout, the ASLR gap was much larger: >

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-18 Thread Luis R. Rodriguez
On Thu, May 18, 2017 at 4:08 PM, David Lang wrote: > On Fri, 19 May 2017, Luis R. Rodriguez wrote: > >> On Thu, May 18, 2017 at 06:12:05PM -0400, Theodore Ts'o wrote: >>> >>> Sorry, I guess I wasn't clear enough. So there are two major cases, >>&g

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-18 Thread Luis R. Rodriguez
On Thu, May 18, 2017 at 06:12:05PM -0400, Theodore Ts'o wrote: > Sorry, I guess I wasn't clear enough. So there are two major cases, > with three sub-cases for each. > > 1) The driver is dual-licensed GPLv2 and copyleft-next > >1A) The developer only wants to use the driver, without making

Re: [RFC 04/10] kmod: provide wrappers for kmod_concurrent inc/dec

2017-05-17 Thread Luis R. Rodriguez
On Tue, May 16, 2017 at 08:02:17PM +0200, Luis R. Rodriguez wrote: > On Wed, Jan 11, 2017 at 09:08:57PM +0100, Luis R. Rodriguez wrote: > > On Tue, Jan 10, 2017 at 07:57:10PM +0100, Luis R. Rodriguez wrote: > > > On Fri, Dec 16, 2016 at 09:05:00AM +0100, Luis R. Rodriguez wro

Re: [copyleft-next] Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-17 Thread Luis R. Rodriguez
On Wed, May 17, 2017 at 12:55:02PM -0400, Theodore Ts'o wrote: > On Wed, May 17, 2017 at 01:27:02AM +0200, Luis R. Rodriguez wrote: > > > > I have done the work though, however I can understand this might mean others > > down the chain might need to burn some ink on thi

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-17 Thread Luis R. Rodriguez
On Mon, May 15, 2017 at 05:12:18PM -0700, Kees Cook wrote: > On Mon, May 15, 2017 at 4:45 PM, Luis R. Rodriguez wrote: > > On Mon, May 15, 2017 at 3:57 PM, Kees Cook wrote: > >> On Mon, May 15, 2017 at 3:15 PM, Luis R. Rodriguez > >> wrote: > >>> On Tue,

Re: [PATCH v6 3/5] test: add new driver_data load tester

2017-05-17 Thread Luis R. Rodriguez
On Wed, May 17, 2017 at 06:08:36PM +0900, AKASHI Takahiro wrote: > On Fri, May 12, 2017 at 05:59:23PM +0200, Luis R. Rodriguez wrote: > > On Fri, May 12, 2017 at 09:28:47AM +0900, AKASHI Takahiro wrote: > > > On Thu, May 11, 2017 at 11:32:30AM -0700, Luis R. Rodriguez wrote: >

Re: [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data

2017-05-16 Thread Luis R. Rodriguez
On Tue, May 16, 2017 at 10:41:08AM +0200, Arend Van Spriel wrote: > On 16-5-2017 1:13, Luis R. Rodriguez wrote: > > On Fri, May 12, 2017 at 11:02:26PM +0200, Arend Van Spriel wrote: > >> try again.. replacing email address from Michał > >> On 12-5-2017 22:55, Arend Van

Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2017-05-16 Thread Luis R. Rodriguez
On Mon, May 15, 2017 at 04:18:14PM +0100, Alan Cox wrote: > > such "or" language can be a bit confusing.  My understanding is such "or" > > language is really is only necessary or helpful for when you have some sort > > of incompatible licenses, and that's not the case here. > > The problem is tha

Re: [PATCH v2 5/9] test_sysctl: add generic script to expand on tests

2017-05-16 Thread Luis R. Rodriguez
On Mon, Feb 13, 2017 at 12:30:22PM -0800, Kees Cook wrote: > On Fri, Feb 10, 2017 at 4:36 PM, Luis R. Rodriguez wrote: > > This adds a generic script to let us more easily add more tests > > cases. Since we really have only two types of tests cases just > > fold them into th

Re: [PATCH v2 7/9] test_sysctl: add simple proc_dointvec() case

2017-05-16 Thread Luis R. Rodriguez
On Mon, Feb 13, 2017 at 02:00:13PM -0800, Kees Cook wrote: > On Fri, Feb 10, 2017 at 4:36 PM, Luis R. Rodriguez wrote: > > diff --git a/tools/testing/selftests/sysctl/sysctl.sh > > b/tools/testing/selftests/sysctl/sysctl.sh > > index 14b9d875db42..45fd2ee5739c 100755 &g

Re: [PATCH v2 9/9] test_sysctl: test against int proc_dointvec() array support

2017-05-16 Thread Luis R. Rodriguez
On Mon, Feb 13, 2017 at 02:07:53PM -0800, Kees Cook wrote: > On Fri, Feb 10, 2017 at 4:36 PM, Luis R. Rodriguez wrote: > > diff --git a/tools/testing/selftests/sysctl/sysctl.sh > > b/tools/testing/selftests/sysctl/sysctl.sh > > index eedfba6f0a57..963d572155b1 100755 &g

Re: [PATCH v2 2/9] sysctl: add proper unsigned int support

2017-05-16 Thread Luis R. Rodriguez
On Mon, Feb 13, 2017 at 12:19:51PM -0800, Kees Cook wrote: > On Fri, Feb 10, 2017 at 4:36 PM, Luis R. Rodriguez wrote: > > --- > > fs/proc/proc_sysctl.c | 15 + > > kernel/sysctl.c | 161 > > -- > > 2 fi

Re: [RFC 04/10] kmod: provide wrappers for kmod_concurrent inc/dec

2017-05-16 Thread Luis R. Rodriguez
On Wed, Jan 11, 2017 at 09:08:57PM +0100, Luis R. Rodriguez wrote: > On Tue, Jan 10, 2017 at 07:57:10PM +0100, Luis R. Rodriguez wrote: > > On Fri, Dec 16, 2016 at 09:05:00AM +0100, Luis R. Rodriguez wrote: > > > On Thu, Dec 15, 2016 at 01:46:25PM +0100, Petr Mladek wrote: >

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-15 Thread Luis R. Rodriguez
On Mon, May 15, 2017 at 3:57 PM, Kees Cook wrote: > On Mon, May 15, 2017 at 3:15 PM, Luis R. Rodriguez wrote: >> On Tue, May 16, 2017 at 12:06:50AM +0200, Luis R. Rodriguez wrote: >>> Using QEMU emulator version 2.7.94 (v2.8.0-rc4-dirty) >>> >>> I will try upd

Re: next-20170515: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:236 note_page+0x630/0x7e0

2017-05-15 Thread Luis R. Rodriguez
On Mon, May 15, 2017 at 3:15 PM, Luis R. Rodriguez wrote: > On Tue, May 16, 2017 at 12:06:50AM +0200, Luis R. Rodriguez wrote: >> Using QEMU emulator version 2.7.94 (v2.8.0-rc4-dirty) >> >> I will try updating my distro package for qemu and see if perhaps its this >>

<    3   4   5   6   7   8   9   10   11   12   >