[PATCH 2/5] firmware: fix capturing errors on fw_cache_init() on early init

2017-11-20 Thread Luis R. Rodriguez
register_pm_notifier() can technically fail, caputure this. Note that register_syscore_ops() cannot fail given it just adds an element to a linked list. This has been broken since v3.7. Chances of this failing however are slim. To improve code readability move the code folded under CONFIG_PM_SLEEP

[PATCH 5/5] test_firmware: fix setting old custom fw path back on exit

2017-11-20 Thread Luis R. Rodriguez
The file /sys/module/firmware_class/parameters/path can be used to set a custom firmware path. The fw_filesystem.sh script creates a temporary directory to add a test firmware file to be used during testing, in order for this to work it uses the custom path syfs file and it was supposed to reset ba

Re: [PATCH] documentation/svga.txt: update outdated file

2017-11-20 Thread Jonathan Corbet
On Sun, 19 Nov 2017 10:02:20 -0800 Randy Dunlap wrote: > Drop CONFIG_VIDEO_400_HACK info completely. > Drop CONFIG_VIDEO_RETAIN and CONFIG_VIDEO_LOCAL completely. > Drop CONFIG_VIDEO_COMPACT and CONFIG_VIDEO_VESA info completely. > Drop CONFIG_VIDEO_SVGA info since it has been removed. > Drop cha

[PATCH 3/5] firmware: provide helpers for registering the syfs loader

2017-11-20 Thread Luis R. Rodriguez
This makes init / exit much easier to read, and we can later reuse this code on other errors not captured yet. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers/base/firmwa

[PATCH 4/5] firmware: fix detecting error on register_reboot_notifier()

2017-11-20 Thread Luis R. Rodriguez
register_reboot_notifier() can fail, detect this and address this failure. This has been broken since v3.11, however the chances of this failing here is really low. Fixes: fe304143b0c3d ("firmware: Avoid deadlock of usermodehelper lock at shutdown") Signed-off-by: Luis R. Rodriguez --- drivers/

[PATCH 1/5] firmware: add helper to unregister pm ops

2017-11-20 Thread Luis R. Rodriguez
This will be used later to unfold on error on init. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 4b57cf5bc81d..149413a376c

Re: [RFC PATCH v3 for 4.15 08/24] Provide cpu_opv system call

2017-11-20 Thread Thomas Gleixner
On Mon, 20 Nov 2017, Mathieu Desnoyers wrote: > - On Nov 16, 2017, at 6:26 PM, Thomas Gleixner t...@linutronix.de wrote: > >> +#define NR_PINNED_PAGES_ON_STACK 8 > > > > 8 pinned pages on stack? Which stack? > > The common cases need to touch few pages, and we can keep the > pointers in an a

Re: [PATCH v3 10/18] powerpc/vas, nx-842: Define and use chip_to_vas_id()

2017-11-20 Thread Josh Boyer
On Tue, Nov 7, 2017 at 9:23 PM, Sukadev Bhattiprolu wrote: > Define a helper, chip_to_vas_id() to map a given chip id to corresponding > vas id. > > Normally, callers of vas_rx_win_open() and vas_tx_win_open() want the VAS > window to be on the same chip where the calling thread is executing. Thes

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-20 Thread Daniel Lezcano
On 20/11/2017 08:05, Quan Xu wrote: [ ... ] But the irq_timings stuff is heading into the same direction, with a more complex prediction logic which should tell you pretty good how long that idle period is going to be and in case of an interrupt heavy workload this >

Re: [PATCH v4 5/9] drivers: base: cacheinfo: arm64: Add support for ACPI based firmware tables

2017-11-20 Thread Jeremy Linton
On 11/20/2017 10:56 AM, Sudeep Holla wrote: (trimming) *case there's no explicit cache node or the cache node itself in the *device tree + * @firmware_node: Shared with of_node. When not using DT, this may contain + * pointers to other firmware based values. Particularly ACPI/

Re: [RFC PATCH] tpm: don't return -EINVAL if TPM command validation fails

2017-11-20 Thread Jason Gunthorpe
On Mon, Nov 20, 2017 at 04:14:41PM +, Roberts, William C wrote: > That's policy, and shouldn't be hardcoded in the kernel. Let the DAC > permission model And LSMs sort that out. Of course this is what was done, there are two cdevs, one with full access to the TPM and one that runs through the

Re: [RFC PATCH v3 for 4.15 08/24] Provide cpu_opv system call

2017-11-20 Thread Thomas Gleixner
On Mon, 20 Nov 2017, Thomas Gleixner wrote: > On Mon, 20 Nov 2017, Mathieu Desnoyers wrote: > > >> + * The reason why we require all pointer offsets to be calculated by > > >> + * user-space beforehand is because we need to use get_user_pages_fast() > > >> + * to first pin all pages touched by each

Re: [PATCH 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

2017-11-20 Thread Will Deacon
On Fri, Nov 17, 2017 at 04:19:35PM -0800, Stephen Boyd wrote: > On 11/17, Will Deacon wrote: > > Hi all, > > > > This patch series implements something along the lines of KAISER for arm64: > > > > https://gruss.cc/files/kaiser.pdf > > > > although I wrote this from scratch because the paper ha

Re: [RFC PATCH] tpm: don't return -EINVAL if TPM command validation fails

2017-11-20 Thread Jason Gunthorpe
On Mon, Nov 20, 2017 at 10:26:01AM +0100, Javier Martinez Canillas wrote: > I thought the TPM spaces was about exposing a virtualized TPM that didn't > have the limitation of only allowing to store a small set of transient > objects (so user-space didn't have to deal with the handles flushing and

Re: [PATCH 14/18] arm64: erratum: Work around Falkor erratum #E1003 in trampoline code

2017-11-20 Thread Will Deacon
On Fri, Nov 17, 2017 at 04:27:14PM -0800, Stephen Boyd wrote: > On 11/17, Will Deacon wrote: > > We rely on an atomic swizzling of TTBR1 when transitioning from the entry > > trampoline to the kernel proper on an exception. We can't rely on this > > atomicity in the face of Falkor erratum #E1003, s

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-20 Thread Will Deacon
Hi Sami, On Thu, Nov 16, 2017 at 12:17:01PM -0800, Sami Tolvanen wrote: > On Thu, Nov 16, 2017 at 11:13:07AM -0800, Paul E. McKenney wrote: > > Ah, if "this patch set" meant "adding LTO", I stand corrected and I > > apologize for my confusion. > > Again, I'm not proposing for LTO to be enabled by

[PATCH net,stable] net: qmi_wwan: add Quectel BG96 2c7c:0296

2017-11-20 Thread Sebastian Sjoholm
Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development board (EVB). The USB id is added to qmi_wwan.c to allow QMI communication with the BG96. Signed-off-by: Sebastian Sjoholm --- drivers/net/usb/qmi_wwan

Re: [PATCH] Documentation: fix profile= options in kernel-parameters.txt

2017-11-20 Thread Jonathan Corbet
On Sun, 19 Nov 2017 21:08:11 -0800 Randy Dunlap wrote: > From: Randy Dunlap > > Correctly the formatting of several additions to the profile= option > that have been added by using and listing the choices > for it. Applied, thanks. jon

Re: [PATCH 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

2017-11-20 Thread Will Deacon
Hi Ard, Cheers for having a look. On Sat, Nov 18, 2017 at 03:25:06PM +, Ard Biesheuvel wrote: > On 17 November 2017 at 18:21, Will Deacon wrote: > > This patch series implements something along the lines of KAISER for arm64: > > Very nice! I am quite pleased, because this makes KASLR much m

Re: [PATCH] rdma: Add Jason as a co-maintainer

2017-11-20 Thread Jason Gunthorpe
On Mon, Nov 20, 2017 at 06:10:16PM +0200, Leon Romanovsky wrote: > On Thu, Nov 16, 2017 at 01:44:00PM -0700, Jason Gunthorpe wrote: > > As was discussed in September and October, add Jason along with > > Doug to have a team maintainership model for the RDMA subystem. > > > > Mellanox Technologies w

Re: [PATCH 1/2] Documentation: add Sorting section to kernel-api

2017-11-20 Thread Jonathan Corbet
On Wed, 15 Nov 2017 19:19:19 -0800 Randy Dunlap wrote: > Add sort() and list_sort() to the kernel API documentation in a > new "Sorting" section. Neither of these patches applies to current docs-next. Seems they conflict with the math functions docs that somebody added...:) Not hard to fix up,

Re: [PATCH v4 5/9] drivers: base: cacheinfo: arm64: Add support for ACPI based firmware tables

2017-11-20 Thread Sudeep Holla
On 20/11/17 18:02, Jeremy Linton wrote: > On 11/20/2017 10:56 AM, Sudeep Holla wrote: > > (trimming) > >>> *case there's no explicit cache node or the cache node >>> itself in the *device tree + * @firmware_node: Shared with >>> of_node. When not using DT, this may contain + *pointe

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Sun, 19 Nov 2017, Guenter Roeck wrote: > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > On 11/19/2017 12:36 PM, Nicolas Pitre wrote: > > > > On Sat, 18 Nov 2017, Guenter Roeck wrote: > > > > > On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pi

[PATCH] cpupower: Combine two condition checks into one statement in get_cpu_topology()

2017-11-20 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 20 Nov 2017 19:10:14 +0100 The same assignments were used in an if branch of two separate statements. * Merge their condition checks into a single statement instead. * Adjust the indentation there. This issue was detected by using the Coccinelle software. Signe

Re: [PATCH 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

2017-11-20 Thread Ard Biesheuvel
On 20 November 2017 at 18:06, Will Deacon wrote: > Hi Ard, > > Cheers for having a look. > > On Sat, Nov 18, 2017 at 03:25:06PM +, Ard Biesheuvel wrote: >> On 17 November 2017 at 18:21, Will Deacon wrote: >> > This patch series implements something along the lines of KAISER for arm64: >> >> V

Re: [PATCH 4.14 00/31] 4.14.1-stable review

2017-11-20 Thread Guenter Roeck
On Sun, Nov 19, 2017 at 03:59:34PM +0100, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.14.1 release. > There are 31 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.

[PATCH v2 02/23] firmware: rename struct firmware_buf to struct fw_priv

2017-11-20 Thread Luis R. Rodriguez
This reflects much better what this is used for. It also puts emphasis on the fact we can and should be able to extend this data structure as we see fit internally as its the opaque private pointer on struct firmware. As we rename the data structure, also rename a few functions that use it to refl

[PATCH v2 23/23] firmware: cleanup - group and document up private firmware parameters

2017-11-20 Thread Luis R. Rodriguez
The firmware API has a slew of private options available, which can sometimes be hard to understand. When new functionality is introduced we also tend to have modify a slew of internal helpers. Just stuff all common private requirements into its own data structure and move features into properly d

[PATCH v2 22/23] test_firmware: test the 3 firmware kernel configs using debugfs

2017-11-20 Thread Luis R. Rodriguez
This enables support to test the three different kernel configurations by using the new firmware debugfs facility. We can now test all known kernel configs with one kernel build and one run. If you're on an old kernel and either don't have /proc/config.gz (CONFIG_IKCONFIG_PROC) or haven't enabled

[PATCH v2 20/23] firmware: add debug facility to emulate disabling sysfs fallback

2017-11-20 Thread Luis R. Rodriguez
One can build a kernel without CONFIG_FW_LOADER_USER_HELPER being enabled, but testing it requires a unique kernel configuration most folks do not enable. This makes it hard to test. Provide a debugfs facility to enable us to emulate such kernels. Signed-off-by: Luis R. Rodriguez --- drivers/ba

[PATCH v2 21/23] test_firmware: add a library for shared helpers

2017-11-20 Thread Luis R. Rodriguez
Both fw_fallback.sh and fw_filesystem.sh share a common set of boiler plate setup and tests. We can share these in a common place. While at it, move both test to use /bin/bash. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 69 ++--- tools/testi

[PATCH v2 18/23] firmware: enable to split firmware_class into separate target files

2017-11-20 Thread Luis R. Rodriguez
The firmware loader code has grown quite a bit over the years. The practice of stuffing everything we need into one file makes the code hard to follow. In order to split the firmware loader code into different components we must pick a module name and a first object target file. We must keep the f

[PATCH v2 14/23] test_firmware: wrap basic sysfs fallback tests into helper

2017-11-20 Thread Luis R. Rodriguez
These cannot run on all kernel builds. This will help us later skip this test on kernel configs where non-applicable. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 78 + 1 file changed, 41 insertions(+), 37 deletions(-) diff --git

[PATCH v2 19/23] firmware: add debug facility to emulate forcing sysfs fallback

2017-11-20 Thread Luis R. Rodriguez
The CONFIG_FW_LOADER_USER_HELPER_FALLBACK kernel config is not enabled my major distros, however its known to be enabled on some Android kernels. Testing the firmware API properly then means to test at least two different kernel configurations. Since CONFIG_FW_LOADER_USER_HELPER_FALLBACK only does

[PATCH v2 12/23] firmware: replace #ifdef over FW_OPT_FALLBACK with function checks

2017-11-20 Thread Luis R. Rodriguez
Its not easy to follow the logic behind making FW_OPT_FALLBACK map to an existing flag only if a kernel configuration option was set. Its much easier to retpresent what was intended with function helpers which make it clear that if CONFIG_FW_LOADER_USER_HELPER_FALLBACK is set we force running the f

Re: [PATCH][v4] uprobes/x86: emulate push insns for uprobe on x86

2017-11-20 Thread Yonghong Song
On 11/20/17 8:41 AM, Oleg Nesterov wrote: On 11/17, Yonghong Song wrote: On 11/17/17 9:25 AM, Oleg Nesterov wrote: On 11/15, Yonghong Song wrote: v3 -> v4: . Revert most of v3 change as 32bit emulation is not really working on x86_64 platform as among other issues, function emulate

[PATCH v2 17/23] test_firmware: replace syfs fallback check with kconfig_has helper

2017-11-20 Thread Luis R. Rodriguez
Now that we have a kconfig checker just use that instead of relying on testing a sysfs directory being present, since our requirements are spelled out. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

[PATCH v2 16/23] test_firmware: enable custom fallback testing on limited kernel configs

2017-11-20 Thread Luis R. Rodriguez
When a kernel is not built with: CONFIG_HAS_FW_LOADER_USER_HELPER_FALLBACK=y We don't currently enable testing fw_fallback.sh. For kernels that still enable the fallback mechanism, its possible to use the async request firmware API call request_firmware_nowait() using the custom interface to use

[PATCH v2 13/23] test_firmware: wrap sysfs timeout test into helper

2017-11-20 Thread Luis R. Rodriguez
This cannot run on all kernel builds. This will help us later skip this test on kernel configs where non-applicable. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 69 + 1 file changed, 37 insertions(+), 32 deletions(-) diff --git

[PATCH v2 15/23] test_firmware: wrap custom sysfs load tests into helper

2017-11-20 Thread Luis R. Rodriguez
These can run on certain kernel configs. This will allow us later to enable these tests under the right kernel configurations. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 43 - 1 file changed, 28 insertions(+), 15 deletions(-) d

[PATCH v2 09/23] firmware: use static inline for to_fw_priv()

2017-11-20 Thread Luis R. Rodriguez
This lets us type check the callers. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index dcc1281789e4..4f64410fe7e6 100644 --- a/drivers/base

Re: [PATCH 1/2] mm,vmscan: Kill global shrinker lock.

2017-11-20 Thread Paul E. McKenney
On Mon, Nov 20, 2017 at 07:56:28PM +0900, Tetsuo Handa wrote: > Christoph Hellwig wrote: > > On Mon, Nov 20, 2017 at 10:42:37AM +0100, Michal Hocko wrote: > > > The patch has been dropped because allnoconfig failed to compile back > > > then > > > http://lkml.kernel.org/r/CAP=VYLr0rPWi1aeuk4w1On9C

Re: [PATCH net,stable] net: qmi_wwan: add Quectel BG96 2c7c:0296

2017-11-20 Thread Bjørn Mork
Sebastian Sjoholm writes: > Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both > CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development > board (EVB). The USB id is added to qmi_wwan.c to allow QMI > communication with the BG96. > > Signed-off-by: Sebastian

[PATCH v2 11/23] firmware: provide helper for FW_OPT_USERHELPER

2017-11-20 Thread Luis R. Rodriguez
The macro FW_OPT_USERHELPER is only currently defined when CONFIG_FW_LOADER_USER_HELPER is set. This is handled via an ifdef around CONFIG_FW_LOADER_USER_HELPER. This makes reading and understanding use FW_OPT_USERHELPER a bit convoluted. Instead wrap the functionality implemented behind CONFIG_FW

[PATCH v2 03/23] firmware: rename struct fw_priv->fw_id to fw_name

2017-11-20 Thread Luis R. Rodriguez
This makes it clear exactly what the field is for. With fw_id it was not clear to a reader if this was some sort of private concoction of some sort. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(

[PATCH v2 10/23] firmware: add helper to copy built-in data to pre-alloc buffer

2017-11-20 Thread Luis R. Rodriguez
This makes it clearer that the parameters passed are only used for the preallocated buffer option, ie, when a caller uses: request_firmware_into_buf() Otherwise this code won't run. We flip the logic just so the actual prellocated buf code is not indented. Signed-off-by: Luis R. Rodrigue

[PATCH v2 08/23] firmware: rename sysfs state checks with sysfs prefix

2017-11-20 Thread Luis R. Rodriguez
Doing this makes it clearer the states are only to be used in the context of the sysfs fallback loading interface. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/base/firmware_c

[PATCH v2 07/23] firmware: use static inlines for state machine checking

2017-11-20 Thread Luis R. Rodriguez
This will allow us to do proper typechecking on users both of values passed and return types expected. While at it, change the parameter passed to be the struct fw_priv, so we can move around the state machine variable as we see fit with these helpers. Signed-off-by: Luis R. Rodriguez --- drive

[PATCH] USB: option: add Quectel BG96 2c7c:0296

2017-11-20 Thread Sebastian Sjoholm
Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development board (EVB). The USB id is added to option.c to allow DIAG,GPS,AT and modem communication with the BG96. Signed-off-by: Sebastian Sjoholm --- drivers/

[PATCH v2 06/23] firmware: remove unused __fw_state_is_done()

2017-11-20 Thread Luis R. Rodriguez
After commit e44565f62a ("firmware: fix batched requests - wake all waiters") where we moved away from swait to old wait with a completion we also stopped using __fw_state_is_done(). Since this is longer used kill it. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 5 -

[GIT PULL] update jfs git tree in MAINTAINERS

2017-11-20 Thread Dave Kleikamp
The following changes since commit c8a0739b185d11d6e2ca7ad9f5835841d1cfc765: Merge tag 'ntb-4.15' of git://github.com/jonmason/ntb (2017-11-19 20:41:53 -1000) are available in the Git repository at: git://github.com/kleikamp/linux-shaggy.git tags/jfs-4.15-2 for you to fetch changes up to 8

[PATCH v2 05/23] firmware: remove duplicate fw_state_aborted()

2017-11-20 Thread Luis R. Rodriguez
The macro is defined twice without need. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 4041548d1a81..485bb18cee1d 100644 --- a/drivers/base/firmware_class

[PATCH v2 04/23] firmware: move core data structures to the top of file

2017-11-20 Thread Luis R. Rodriguez
Move main core data structures used internally for firmware to the top of the file. This will allow us to use them earlier later in helpers as we extend their use. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 190 +- 1 file changed,

[PATCH v2 00/23] firmware: cleanup for v4.16

2017-11-20 Thread Luis R. Rodriguez
Here's a series of cleanups for the firmware loader for consideration for v4.16, *after* the traditional yearly American turkey massacre. This depends on the few fixes I just posted for consideration for v4.15 [0]. While discussing the cleanup patch I posted last for the firmware API [1], Greg sug

[PATCH v2 01/23] firmware: rename struct firmware_priv to struct fw_sysfs

2017-11-20 Thread Luis R. Rodriguez
The struct firmware_priv is only used for the sysfs fallback mechanism, rename it to make emphasis of this. This will also enable us to use the name later for something much more meaninful. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 98 +-

Re: [RFC] Improving udelay/ndelay on platforms where that is possible

2017-11-20 Thread Russell King - ARM Linux
On Mon, Nov 20, 2017 at 09:38:46AM -0800, Doug Anderson wrote: > Hi, > > On Thu, Nov 16, 2017 at 3:22 PM, Russell King - ARM Linux > wrote: > > On Thu, Nov 16, 2017 at 02:15:02PM -0800, Doug Anderson wrote: > >> Hi, > >> > >> On Thu, Nov 16, 2017 at 1:05 PM, Marc Gonzalez > >> wrote: > >> > On 1

[PATCH v2 00/31] Replacing net_mutex with rw_semaphore

2017-11-20 Thread Kirill Tkhai
Hi, there is the second version of patchset introducing net_sem instead of net_mutex. The patchset adds net_sem in addition to net_mutex and allows pernet_operations to be async. This flag means, the pernet_operations methods are safe to be executed with any othor pernet_operations (un)initializin

[PATCH v2 01/31] net: Assign net to net_namespace_list in setup_net()

2017-11-20 Thread Kirill Tkhai
This patch merges two repeating pieces of code in one, and they will live in setup_net() now. It acts as cleanup even despite init_net_initialized assignment is reordered with the linking of net now. This variable is need for proc_net_init() called from: start_kernel()->proc_root_init()->proc_net

[PATCH v2 02/31] net: Cleanup copy_net_ns()

2017-11-20 Thread Kirill Tkhai
Line up destructors actions in the revers order to constructors. Next patches will add more actions, and this will be comfortable, if there is the such order. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) d

[PATCH v2 03/31] net: Introduce net_sem for protection of pernet_list

2017-11-20 Thread Kirill Tkhai
Curently mutex is used to protect pernet operations list. It makes cleanup_net() to execute ->exit methods of the same operations set, which was used on the time of ->init, even after net namespace is unlinked from net_namespace_list. But the problem is it's need to synchronize_rcu() after net is

[PATCH v2 05/31] net: Allow pernet_operations to be executed in parallel

2017-11-20 Thread Kirill Tkhai
This adds new pernet_operations::async flag to indicate operations, which ->init(), ->exit() and ->exit_batch() methods are allowed to be executed in parallel with the methods of any other pernet_operations. When there are only asynchronous pernet_operations in the system, net_mutex won't be taken

[PATCH v2 06/31] net: Convert proc_net_ns_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from before initcalls. proc_net_ns_ops::proc_net_ns_init()/proc_net_ns_exit() register pernet net->proc_net and ->proc_net_stat. Constructors and destructors of another pernet_operations are not interested in foreign net's proc_net and proc_n

[PATCH v2 04/31] net: Move mutex_unlock() in cleanup_net() up

2017-11-20 Thread Kirill Tkhai
net_sem protects from pernet_list changing, while ops_free_list() makes simple kfree(), and it can't race with other pernet_operations callbacks. So we may release net_mutex earlier then it was. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |3 ++- 1 file changed, 2 insertions(+)

[PATCH v2 10/31] net: Convert nf_log_net_ops

2017-11-20 Thread Kirill Tkhai
The pernet_operations would have had a problem in parallel execution with others, if init_net had been able to released. But it's not, and the rest is safe for that. There is memory allocation, which nobody else interested in, and sysctl registration. So, we make it async. Signed-off-by: Kirill Tk

Re: [PATCH for 4.4-stable] KVM: x86: fix singlestepping over syscall

2017-11-20 Thread Paolo Bonzini
On 20/11/2017 10:55, David Hildenbrand wrote: > This looks good to me. > > General question: how do we treat KVM single stepping and concurrent TF > in the guest? IOW, shouldn't the "else" rather be a check for ctxt->tf ? > (or is that handled later on e.g. in user space?) At this time, not very

[PATCH v2 11/31] net: Convert net_inuse_ops

2017-11-20 Thread Kirill Tkhai
net_inuse_ops methods expose statistics in /proc. No one from the rest of pernet_subsys or pernet_device lists does not touch net::core::inuse. So, it's safe to make net_inuse_ops async. Signed-off-by: Kirill Tkhai --- net/core/sock.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/c

[PATCH v2 07/31] net: Convert net_ns_ops methods

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from pure initcalls. net_ns_ops::net_ns_net_init/net_ns_net_init, methods use only ida_simple_* functions, which are not need a synchronization. So, net_ns_ops methods are able to be executed in parallel with methods of other pernet operation

[PATCH v2 09/31] net: Convert netfilter_net_ops

2017-11-20 Thread Kirill Tkhai
Methods netfilter_net_init() and netfilter_net_exit() initialize net::nf::hooks and change net-related proc directory of net. Another pernet_operations are not interested in forein net::nf::hooks or proc entries, so it's safe to be execute them in parallel with methods of other pernet operations.

[PATCH v2 14/31] net: Convert rtnetlink_net_ops

2017-11-20 Thread Kirill Tkhai
rtnetlink_net_init() and rtnetlink_net_exit() create and destroy netlink socket. It looks like, another pernet_operations are not interested in foreiner net::rtnl, so rtnetlink_net_ops may be safely made async. Signed-off-by: Kirill Tkhai --- net/core/rtnetlink.c |1 + 1 file changed, 1 inse

[PATCH v2 13/31] net: Convert netlink_net_ops

2017-11-20 Thread Kirill Tkhai
The methods of netlink_net_ops create and destroy "netlink" file, which are not interesting for foreigh pernet_operations. So, netlink_net_ops may safely be made async. Signed-off-by: Kirill Tkhai --- net/netlink/af_netlink.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/netlink/af_

[PATCH v2 15/31] net: Convert audit_net_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from postcore initcalls. audit_net_init() creates netlink socket, while audit_net_exit() destroys it. The rest of the pernet_list are not interested in the socket, so we make audit_net_ops async. Signed-off-by: Kirill Tkhai --- kernel/audit

[PATCH v2 12/31] net: Convert net_defaults_ops

2017-11-20 Thread Kirill Tkhai
net_defaults_ops introduces only net_defaults_init_net method, and it acts on net::core::sysctl_somaxconn, which is not interesting for the rest of pernet_subsys and pernet_device lists. Then, make it async. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |1 + 1 file changed, 1 ins

[PATCH] mmc: sdhci-msm: Optionally wait for signal level changes

2017-11-20 Thread Bjorn Andersson
Not all instances of the SDCC core supports changing signal voltage and as such will not generate a power interrupt when the software attempts to change the voltage. This results in probing the eMMC on some devices to take over 2 minutes. Check that the SWITCHABLE_SIGNAL_VOLTAGE bit in MCI_GENERIC

[GIT PULL] DeviceTree fixes for 4.15

2017-11-20 Thread Rob Herring
Linus, Please pull DT fixes for 4.15. Rob The following changes since commit aa25e446ce76c37bfd75ac06598c316af94e9a26: dt-bindings: usb: add #phy-cells to usb-nop-xceiv (2017-11-13 16:50:01 -0600) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/robh/l

[PATCH v2 18/31] net: Convert pernet_subsys ops, registered via net_dev_init()

2017-11-20 Thread Kirill Tkhai
There are: 1)dev_proc_ops and dev_mc_net_ops, which create and destroy pernet proc file and not interested to another net namespaces; 2)netdev_net_ops, which creates pernet hash, which is not touched by another pernet_operations. So, make them async. Signed-off-by: Kirill Tkhai --- net/core/dev

[PATCH v2 19/31] net: Convert fib_* pernet_operations, registered via subsys_initcall

2017-11-20 Thread Kirill Tkhai
Both of them create and initialize lists, which are not touched by another foreing pernet_operations. Signed-off-by: Kirill Tkhai --- net/core/fib_notifier.c |1 + net/core/fib_rules.c|1 + 2 files changed, 2 insertions(+) diff --git a/net/core/fib_notifier.c b/net/core/fib_notifier

[PATCH v2 20/31] net: Convert subsys_initcall() registered pernet_operations from net/sched

2017-11-20 Thread Kirill Tkhai
psched_net_ops only creates and destroyes /proc entry, and safe to be executed in parallel with any foreigh pernet_operations. tcf_action_net_ops initializes and destructs tcf_action_net::egdev_ht, which is not touched by foreign pernet_operations. So, make them async. Signed-off-by: Kirill Tkha

[PATCH v2 21/31] net: Convert genl_pernet_ops

2017-11-20 Thread Kirill Tkhai
This pernet_operations create and destroy net::genl_sock. Foreign pernet_operations don't touch it. Signed-off-by: Kirill Tkhai --- net/netlink/genetlink.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index d444daf1ac04..a66fad4c5ffa 10

[PATCH v2 22/31] net: Convert wext_pernet_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations initialize and purge net::wext_nlevents queue, and are not touched by foreign pernet_operations. Mark them async. Signed-off-by: Kirill Tkhai --- net/wireless/wext-core.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/wext-core.c b/net/wireless/wext-

[PATCH v2 25/31] net: Convert unix_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations are just create and destroy /proc and sysctl entries, and are not touched by foreign pernet_operations. So, we are able to make them async. Signed-off-by: Kirill Tkhai --- net/unix/af_unix.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/unix/af_unix.c b/net/

[PATCH v2 23/31] net: Convert sysctl_core_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations register and destroy sysctl directory, and it's not interested for foreign pernet_operations. Signed-off-by: Kirill Tkhai --- net/core/sysctl_net_core.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index cb

[PATCH v2 26/31] net: Convert packet_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations just create and destroy /proc entry, and another operations do not touch it. Also, nobody else are interested in foreign net::packet::sklist. Signed-off-by: Kirill Tkhai --- net/packet/af_packet.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/packet/af_packe

[PATCH v2 27/31] net: Convert ipv4_sysctl_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations create and destroy sysctl, which are not touched by anybody else. Signed-off-by: Kirill Tkhai --- net/ipv4/sysctl_net_ipv4.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 93e172118a94..89683d868b37 100

[PATCH v2 29/31] net: Convert loopback_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations have only init() method. It allocates memory for net_device, calls register_netdev() and assigns net::loopback_dev. register_netdev() is allowed be used without additional locks, as it's synchronized on rtnl_lock(). There are many examples of using this functon directly fro

[PATCH v2 30/31] net: Convert default_device_ops

2017-11-20 Thread Kirill Tkhai
These pernet operations consist of exit() and exit_batch() methods. default_device_exit() moves not-local and virtual devices to init_net. There is nothing exiting, because this may happen in any time on a working system, and rtnl_lock() and synchronize_net() protect us from all cases of external

[PATCH v2 28/31] net: Convert addrconf_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations (un)register sysctl, which are not touched by anybody else. So, it's safe to make them async. Signed-off-by: Kirill Tkhai --- net/ipv6/addrconf.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a0ae1c9d37df..fb7cf120

[PATCH v2 31/31] net: Convert diag_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet operations just create and destroy netlink socket. The socket is pernet and else operations don't touch it. Signed-off-by: Kirill Tkhai --- net/core/sock_diag.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c index 217f4e3b82f6..220

Re: [RFC PATCH v3 for 4.15 08/24] Provide cpu_opv system call

2017-11-20 Thread Mathieu Desnoyers
- On Nov 20, 2017, at 12:48 PM, Thomas Gleixner t...@linutronix.de wrote: > On Mon, 20 Nov 2017, Mathieu Desnoyers wrote: >> - On Nov 16, 2017, at 6:26 PM, Thomas Gleixner t...@linutronix.de wrote: >> >> +#define NR_PINNED_PAGES_ON_STACK 8 >> > >> > 8 pinned pages on stack? Which stack? >

[PATCH v2 24/31] net: Convert pernet_subsys, registered from inet_init()

2017-11-20 Thread Kirill Tkhai
arp_net_ops just addr/removes /proc entry. devinet_ops allocates and frees duplicate of init_net tables and (un)registers sysctl entries. fib_net_ops allocates and frees pernet tables, creates/destroys netlink socket and (un)initializes /proc entries. Foreign pernet_operations do not touch them.

Re: [PATCH v3 05/16] iommu/vt-d: support flushing more TLB types

2017-11-20 Thread Jacob Pan
On Mon, 20 Nov 2017 14:20:31 + "Lukoshkov, Maksim" wrote: > On 11/17/2017 18:55, Jacob Pan wrote: > > +void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 > > pfsid, > > + u16 qdep, u64 addr, unsigned mask) > > +{ > > + struct qi_desc desc; > > + > > + pr_deb

[PATCH v2 17/31] net: Convert proto_net_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from subsys initcalls. It seems safe to be executed in parallel with others, as it's only creates/destoyes proc entry, which nobody else is not interested in. Signed-off-by: Kirill Tkhai --- net/core/sock.c |1 + 1 file changed, 1 inser

Re: [RFC PATCH v3 for 4.15 08/24] Provide cpu_opv system call

2017-11-20 Thread Mathieu Desnoyers
- On Nov 20, 2017, at 1:03 PM, Thomas Gleixner t...@linutronix.de wrote: > On Mon, 20 Nov 2017, Thomas Gleixner wrote: >> On Mon, 20 Nov 2017, Mathieu Desnoyers wrote: >> > >> + * The reason why we require all pointer offsets to be calculated by >> > >> + * user-space beforehand is because we

[PATCH v2 16/31] net: Convert uevent_net_ops

2017-11-20 Thread Kirill Tkhai
uevent_net_init() and uevent_net_exit() create and destroy netlink socket, and these actions serialized in netlink code. Parallel execution with other pernet_operations makes the socket disappear earlier from uevent_sock_list on ->exit. As userspace can't be interested in broadcast messages of dyi

Re: [PATCH] Check all .c files for bad kernel-doc comments

2017-11-20 Thread Matthew Wilcox
On Mon, Oct 30, 2017 at 12:40:20PM +0900, Masahiro Yamada wrote: > 2017-10-28 4:41 GMT+09:00 Matthew Wilcox : > > From: Matthew Wilcox > > > > Implement a '-none' output mode for kernel-doc which will only output > > warning messages, and suppresses the warning message about there being > > no ker

[PATCH v2 08/31] net: Convert sysctl_pernet_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from core initcalls. Methods sysctl_net_init() and sysctl_net_exit() initialize net::sysctls table of a namespace. pernet_operations::init()/exit() methods from the rest of the list do not touch net::sysctls of strangers, so it's safe to exec

Re: [v5 RESEND 02/17] mfd: madera: Add DT bindings for Cirrus Logic Madera codecs

2017-11-20 Thread Rob Herring
On Mon, Nov 20, 2017 at 02:10:36PM +, Richard Fitzgerald wrote: > From: Richard Fitzgerald > > Specification of the bindings for the parent MFD driver component > of the Cirrus Logic Madera codec drivers. > > Note that although the interrupt controller and GPIO are child > drivers their requ

Re: [PATCH] au0828: fix use-after-free at USB probing

2017-11-20 Thread Andrey Konovalov
On Fri, Nov 10, 2017 at 6:35 PM, Gustavo A. R. Silva wrote: > > Quoting Andrey Konovalov : > >> On Fri, Nov 10, 2017 at 1:21 AM, Gustavo A. R. Silva >> wrote: >>> >>> Hi Andrey, >>> >>> Could you please try this patch? >>> >>> Thank you Hi! Sorry for the delay. With this patch I still see the

Re: [v5 RESEND 07/17] regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs

2017-11-20 Thread Rob Herring
On Mon, Nov 20, 2017 at 02:10:41PM +, Richard Fitzgerald wrote: > From: Richard Fitzgerald > > This adds a new driver identity "madera-micsupp" and probe function > so that this driver can be used to control the micsupp regulator on > Cirrus Logic Madera codecs. > > Signed-off-by: Richard Fi

Re: [PATCH 00/16] Entry stuff, in decent shape now

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 9:07 AM, Andy Lutomirski wrote: > This sets up stack switching, including for SYSCALL. I think it's > in decent shape. > > - 32-bit kernels are failing the sigreturn_32 test. But they're also >failing without the patches, so I'm not sure this is a bug in the >se

Re: [RFC PATCH v3 for 4.15 08/24] Provide cpu_opv system call

2017-11-20 Thread Andi Kleen
> Having cpu_opv do a 4k memcpy allow it to handle scenarios where > rseq fails to progress. If anybody ever gets that right. It will be really hard to just test such a path. It also seems fairly theoretical to me. Do you even have a test case where the normal path stops making forward progress?

<    1   2   3   4   5   6   7   8   9   >