[PATCH v4 1/2] iio: potentiometer: add a driver for Maxim 5432-5435

2019-07-31 Thread Martin Kaiser
Add a driver for the Maxim Integrated MAX5432-MAX5435 family of digital potentiometers. These potentiometers are connected via I2C and have 32 wiper positions. Supported functionality - set the volatile wiper position - read the potentiometer scale Datasheet: https://datasheets.maximintegrated.c

[PATCH v4 2/2] dt-bindings: iio: potentiometer: add max5432.yaml binding

2019-07-31 Thread Martin Kaiser
Add a binding for the Maxim Integrated MAX5432-MAX5435 family of digital potentiometers. Signed-off-by: Martin Kaiser --- changes in v4 - fix the dt bindings - replace ic20 with i2c - document the reg property - add additionalProperties and required changes in v3 - split dt bindings a

Re: [PATCH v6 32/57] perf: Remove dev_err() usage after platform_get_irq()

2019-07-31 Thread Stephen Boyd
Quoting Will Deacon (2019-07-31 01:40:57) > On Tue, Jul 30, 2019 at 11:15:32AM -0700, Stephen Boyd wrote: > > Cc: Mark Rutland > > Cc: linux-arm-ker...@lists.infradead.org > > Cc: Greg Kroah-Hartman > > Signed-off-by: Stephen Boyd > > Acked-by: Will Deacon > > Please let me know if you'd rath

[PATCH -next] staging: rtl8723bs: remove set but not used variable 'FirstConnect'

2019-07-31 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/odm.c: In function 'odm_RSSIMonitorCheckCE': drivers/staging/rtl8723bs/hal/odm.c:1258:7: warning: variable 'FirstConnect' set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: YueHaibing

Re: [PATCH v3 02/14] mbox: qcom: add APCS child device for QCS404

2019-07-31 Thread Jorge Ramirez
On 7/11/19 16:44, Bjorn Andersson wrote: > On Tue 25 Jun 09:47 PDT 2019, Jorge Ramirez-Ortiz wrote: > >> There is clock controller functionality in the APCS hardware block of >> qcs404 devices similar to msm8916. >> >> Co-developed-by: Niklas Cassel >> Signed-off-by: Niklas Cassel >> Signed-off-

[PATCH v3] ARM: dts: vf610-bk4: Fix qspi node description

2019-07-31 Thread Lukasz Majewski
Before this change the device tree description of qspi node for second memory on BK4 board was wrong (applicable to old, removed fsl-quadspi.c driver). As a result this memory was not recognized correctly when used with the new spi-fsl-qspi.c driver. >From the dt-bindings: "Required SPI slave no

Re: [PATCH v2 0/7] perf, intel: Add support for PEBS output to Intel PT

2019-07-31 Thread Alexander Shishkin
Alexander Shishkin writes: > Hi Peter, No, please disregard this one, it has brainfarts. Thanks, -- Alex

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 15:42:53, David Hildenbrand wrote: > On 31.07.19 15:25, Michal Hocko wrote: [...] > > I know we have documented this as an ABI and it is really _sad_ that > > this ABI didn't get through normal scrutiny any user visible interface > > should go through but these are sins of the past.

Re: [PATCH v3] sched/core: Don't use dying mm as active_mm of kthreads

2019-07-31 Thread Waiman Long
On 7/31/19 9:48 AM, Rik van Riel wrote: > On Tue, 2019-07-30 at 17:01 -0400, Waiman Long wrote: >> On 7/29/19 8:26 PM, Rik van Riel wrote: >>> On Mon, 2019-07-29 at 17:42 -0400, Waiman Long wrote: >>> What I have found is that a long running process on a mostly idle system with many

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 16:04:10, David Hildenbrand wrote: > On 31.07.19 15:42, David Hildenbrand wrote: [...] > > Powerpc userspace queries it: > > https://groups.google.com/forum/#!msg/powerpc-utils-devel/dKjZCqpTxus/AwkstV2ABwAJ > > FWIW, powerpc-utils also uses the "removable" property - which means >

Re: [PATCH v6 28/57] pcie-gadget-spear: Remove dev_err() usage after platform_get_irq()

2019-07-31 Thread Stephen Boyd
Quoting Arnd Bergmann (2019-07-30 11:29:45) > On Tue, Jul 30, 2019 at 8:16 PM Stephen Boyd wrote: > > > > We don't need dev_err() messages when platform_get_irq() fails now that > > platform_get_irq() prints an error message itself when something goes > > wrong. Let's remove these prints with a si

Re: [PATCH v1] drivers/acpi/scan.c: Document why we don't need the device_hotplug_lock

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 15:53:06, David Hildenbrand wrote: > Let's document why the lock is not needed in acpi_scan_init(), right now > this is not really obvious. > > Cc: Rafael J. Wysocki > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Andrew Morton > Signed-off-by: David Hildenbrand Acked-by: Micha

Re: [PATCH] scripts/gdb: Handle split debug

2019-07-31 Thread Stephen Boyd
Quoting Douglas Anderson (2019-07-30 16:40:52) > Some systems (like Chrome OS) may use "split debug" for kernel > modules. That means that the debug symbols are in a different file > than the main elf file. Let's handle that by also searching for debug > symbols that end in ".ko.debug". > > Sign

cannot build with no-inline-functions

2019-07-31 Thread Mark Vegans
Hi *, I'm analyzing the linux kernel via phasar static analyzer framework, it basically takes as input an LLVM IR file. For debugging reasons, I would like to compile the kernel without inlined functions. I'm compiling the kernel by clang, so I tried to specify the following compiler flags: ``` -f

[PATCH v4] staging: rtl8192u: null check the kzalloc

2019-07-31 Thread Navid Emamdoost
In rtl8192_init_priv_variable allocation for priv->pFirmware may fail, so a null check is necessary.priv->pFirmware is accessed later in rtl8192_adapter_start. I added the check and made appropriate changes to propagate the errno to the caller. Signed-off-by: Navid Emamdoost --- Update v2: fixed

Re: [PATCH v3 2/3] augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro

2019-07-31 Thread Uladzislau Rezki
Hello, Michel. > > Hmmm, I had not thought about that. Agree that this can be useful - > there is already similar test code in rbtree_test.c and also > vma_compute_subtree_gap() in mmap.c, ... > > With patch 3/3 of this series, the RBCOMPUTE function (typically > generated through the RB_DECLARE

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 16:14, Michal Hocko wrote: > On Wed 31-07-19 15:42:53, David Hildenbrand wrote: >> On 31.07.19 15:25, Michal Hocko wrote: > [...] >>> I know we have documented this as an ABI and it is really _sad_ that >>> this ABI didn't get through normal scrutiny any user visible interface >>> shoul

Re: [PATCH] mailbox: zynqmp-ipi-mailbox: Add of_node_put() before goto

2019-07-31 Thread Michal Simek
On 31. 07. 19 15:06, Nishka Dasgupta wrote: > On 31/07/19 2:01 PM, Michal Simek wrote: >> On 09. 07. 19 19:28, Nishka Dasgupta wrote: >>> Each iteration of for_each_available_child_of_node puts the previous >>> node, but in the case of a goto from the middle of the loop, there is >>> no put, thus c

Re: microblaze HAVE_MEMBLOCK_NODE_MAP dependency (was Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA)

2019-07-31 Thread Mike Rapoport
On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote: > On Wed 31-07-19 15:26:32, Mike Rapoport wrote: > > On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote: > > > On Wed 31-07-19 14:14:22, Mike Rapoport wrote: > > > > On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote:

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 16:15, Michal Hocko wrote: > On Wed 31-07-19 16:04:10, David Hildenbrand wrote: >> On 31.07.19 15:42, David Hildenbrand wrote: > [...] >>> Powerpc userspace queries it: >>> https://groups.google.com/forum/#!msg/powerpc-utils-devel/dKjZCqpTxus/AwkstV2ABwAJ >> >> FWIW, powerpc-utils also

Re: [RT PATCH] sched/deadline: Make inactive timer run in hardirq context

2019-07-31 Thread Clark Williams
On Wed, 31 Jul 2019 12:37:15 +0200 Juri Lelli wrote: > SCHED_DEADLINE inactive timer needs to run in hardirq context (as > dl_task_timer already does). > > Make it HRTIMER_MODE_REL_HARD. > > Signed-off-by: Juri Lelli > --- > Hi, > > Both v4.19-rt and v5.2-rt need this. > > Mainline "sched: M

[PATCH] KVM: selftests: Update gitignore file for latest changes

2019-07-31 Thread Thomas Huth
The kvm_create_max_vcpus test has been moved to the main directory, and sync_regs_test is now available on s390x, too. Signed-off-by: Thomas Huth --- tools/testing/selftests/kvm/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/.gitignor

Re: [PATCH v6 18/57] i2c: Remove dev_err() usage after platform_get_irq()

2019-07-31 Thread Wolfram Sang
> -dev_err(...); What about pr_err, ...? > While we're here, remove braces on if statements that only have one > statement (manually). You can let cocci do this for you, too. From the top of my head: if (...) - { S - } with S being a statement and this rule depending on the matching rule.

Re: kernel BUG at net/rxrpc/local_object.c:LINE!

2019-07-31 Thread David Howells
Dmitry Vyukov wrote: > Re bisection, I don't know if there are some more subtle things as > play (you are in the better position to judge that), but bisection log > looks good, it tracked the target crash throughout and wasn't > distracted by any unrelated bugs, etc. So I don't see any obvious >

Re: [PATCH v3 08/14] clk: qcom: hfpll: CLK_IGNORE_UNUSED

2019-07-31 Thread Jorge Ramirez
On 7/11/19 17:16, Bjorn Andersson wrote: > On Tue 25 Jun 09:47 PDT 2019, Jorge Ramirez-Ortiz wrote: > >> When COMMON_CLK_DISABLED_UNUSED is set, in an effort to save power and >> to keep the software model of the clock in line with reality, the >> framework transverses the clock tree and disables

[PATCH v3 1/7] perf: Allow normal events to be sources of AUX data

2019-07-31 Thread Alexander Shishkin
In some cases, ordinary (non-AUX) events can generate data for AUX events. For example, PEBS events can come out as records in the Intel PT stream instead of their usual DS records, if configured to do so. One requirement for such events is to consistently schedule together, to ensure that the dat

[PATCH v3 0/7] perf, intel: Add support for PEBS output to Intel PT

2019-07-31 Thread Alexander Shishkin
Hi Peter, Fourth attempt at the PEBS-via-PT feature. The previous ones were [1], [2], [3]. This one addresses review comments in patches 1/7 and 2/7, the tooling patches are intact, but I'm including them anyway. The PEBS feature: output to Intel PT stream instead of the DS area. It's theoretical

[PATCH v3 2/7] perf/x86/intel: Support PEBS output to PT

2019-07-31 Thread Alexander Shishkin
If PEBS declares ability to output its data to Intel PT stream, use the aux_source attribute bit to enable PEBS data output to PT. This requires a PT event to be present and scheduled in the same context. Unlike the DS area, the kernel does not extract PEBS records from the PT stream to generate co

[PATCH v3 4/7] perf tools: Add itrace option 'o' to synthesize aux-source events

2019-07-31 Thread Alexander Shishkin
From: Adrian Hunter Add itrace option 'o' to synthesize events recorded in the AUX area due to the use of perf record's aux-source config term. Signed-off-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- tools/perf/Documentation/itrace.txt | 2 ++ tools/perf/util/auxtrace.c |

[PATCH v3 7/7] perf intel-pt: Add brief documentation for PEBS via Intel PT

2019-07-31 Thread Alexander Shishkin
From: Adrian Hunter Document how to select PEBS via Intel PT and how to display synthesized PEBS samples. Signed-off-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- tools/perf/Documentation/intel-pt.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/perf/Do

[PATCH v3 5/7] perf intel-pt: Process options for PEBS event synthesis

2019-07-31 Thread Alexander Shishkin
From: Adrian Hunter Process synth_opts.other_events and attr.aux_source to set up for synthesizing PEBs via Intel PT events. Signed-off-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- tools/perf/arch/x86/util/intel-pt.c | 23 +++ tools/perf/util/intel-pt.c

[PATCH v3 6/7] perf tools: Add aux-source config term

2019-07-31 Thread Alexander Shishkin
From: Adrian Hunter Expose the aux_source attribute flag to the user to configure, by adding a config term 'aux-source'. For events that support it, selection of 'aux-source' causes the generation of AUX records instead of event records. This requires that an AUX area event is also provided. Sig

[PATCH v3 3/7] perf tools: Add aux_source attribute flag

2019-07-31 Thread Alexander Shishkin
From: Adrian Hunter Add aux_source attribute flag to match the kernel's perf_event.h file. Signed-off-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- tools/include/uapi/linux/perf_event.h | 3 ++- tools/perf/util/evsel.c | 1 + 2 files changed, 3 insertions(+), 1 deletio

Re: [PATCH v6 19/57] iio: Remove dev_err() usage after platform_get_irq()

2019-07-31 Thread Stephen Boyd
Quoting Phil Reid (2019-07-30 23:42:16) > G'day Stephen, > > A comment unrelated to your change. > > On 31/07/2019 02:15, Stephen Boyd wrote: > > > > diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c > > index 32f1c4a33b20..abe99856c823 100644 > > --- a/drivers/iio/adc/at

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 16:21:46, David Hildenbrand wrote: [...] > > Thinking about it some more, I believe that we can reasonably provide > > both APIs controlable by a command line parameter for backwards > > compatibility. It is the hotplug code to control sysfs APIs. E.g. > > create one sysfs entry pe

Re: [PATCH v2 08/20] ARM: dts: imx7-colibri: Add touch controllers

2019-07-31 Thread Philippe Schenker
On Wed, 2019-07-31 at 09:42 -0300, Fabio Estevam wrote: > On Wed, Jul 31, 2019 at 9:38 AM Philippe Schenker > wrote: > > Add atmel mxt multitouch controller and TouchRevolution multitouch > > You missed to updated the commit log ;-) Ah, shoot! :-) Thanks. I will send a v3 then, next week.

Re: [PATCH] selftests: kvm: Adding config fragments

2019-07-31 Thread Naresh Kamboju
On Wed, 31 Jul 2019 at 18:32, Paolo Bonzini wrote: > > On 31/07/19 12:55, Naresh Kamboju wrote: > > selftests kvm test cases need pre-required kernel configs for the test > > to get pass. > > > > Signed-off-by: Naresh Kamboju > > Most of these are selected by other items. CONFIG_KVM should be en

Re: ARM: multi_v7_defconfig: Enable SPI_STM32_QSPI support

2019-07-31 Thread Alexandre Torgue
On 7/31/19 3:21 PM, Olof Johansson wrote: On Wed, Jul 31, 2019 at 3:20 PM Olof Johansson wrote: Hi, On Wed, Jul 31, 2019 at 8:48 AM Alexandre Torgue wrote: Hi Olof On 7/30/19 7:36 PM, Olof Johansson wrote: Hi Patrice, If you cc s...@kernel.org on patches you want us to apply, you'll

Re: microblaze HAVE_MEMBLOCK_NODE_MAP dependency (was Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA)

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 17:21:29, Mike Rapoport wrote: > On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote: > > On Wed 31-07-19 15:26:32, Mike Rapoport wrote: > > > On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote: > > > > On Wed 31-07-19 14:14:22, Mike Rapoport wrote: > > > > > On W

Re: [PATCH v8 00/14] Rockchip ISP1 Driver

2019-07-31 Thread Helen Koike
On 7/31/19 1:55 AM, Hans Verkuil wrote: > On 7/31/19 6:33 AM, Hans Verkuil wrote: >> On 7/31/19 6:29 AM, Hans Verkuil wrote: >>> On 7/31/19 2:08 AM, Helen Koike wrote: On 7/30/19 5:50 PM, Helen Koike wrote: > > > On 7/30/19 5:15 PM, Hans Verkuil wrote: >> On 7/30/1

[PATCH v3] watchdog: pc87413: Rewriting of pc87413_wdt driver to use watchdog subsystem

2019-07-31 Thread Mark Balantzyan
This patch rewrites the pc87413_wdt driver to use the watchdog subsystem. In doing so, it also addresses a potential race condition owing from the swc_base_addr variable being used before being set. Signed-off-by: Mark Balantzyan --- drivers/watchdog/Kconfig | 1 + drivers/watchdog/pc87

Re: [PATCH v2 1/3] KVM: selftests: Split ucall.c into architecture specific files

2019-07-31 Thread Andrew Jones
On Wed, Jul 31, 2019 at 03:32:14PM +0200, Thomas Huth wrote: > The way we exit from a guest to userspace is very specific to the > architecture: On x86, we use PIO, on aarch64 we are using MMIO and on > s390x we're going to use an instruction instead. The possibility to > select a type via the ucal

Re: [PATCH 3/3] drm/bridge: Add NWL MIPI DSI host controller support

2019-07-31 Thread Fabio Estevam
Hi Guido, On Wed, Jul 31, 2019 at 11:35 AM Guido Günther wrote: > The idea is to have > > "%sabling platform clocks", enable ? "en" : "dis"); > > depending whether clocks are enabled/disabled. Yes, I understood the idea, but this would print: ensabling or dissabling :-) > > Same here. Ple

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 16:37, Michal Hocko wrote: > On Wed 31-07-19 16:21:46, David Hildenbrand wrote: > [...] >>> Thinking about it some more, I believe that we can reasonably provide >>> both APIs controlable by a command line parameter for backwards >>> compatibility. It is the hotplug code to control sysf

Re: [PATCH] Function stack size and its name mismatch in arm64

2019-07-31 Thread Mark Rutland
Hi, If you have a patch affecting arm64, please Cc LAKML and the arm64 maintainers. I've added them to this sub-thread. On Wed, Jul 31, 2019 at 05:04:37PM +0800, Jiping Ma wrote: > The PC of one the frame is matched to the next frame function, rather > than the function of his frame. As Steve sa

Re: kernel BUG at net/rxrpc/local_object.c:LINE!

2019-07-31 Thread Dmitry Vyukov
On Wed, Jul 31, 2019 at 4:30 PM David Howells wrote: > > Dmitry Vyukov wrote: > > > Re bisection, I don't know if there are some more subtle things as > > play (you are in the better position to judge that), but bisection log > > looks good, it tracked the target crash throughout and wasn't > > d

Re: [patch 2/4] fs/buffer: Move BH_Uptodate_Lock locking into wrapper functions

2019-07-31 Thread Jan Kara
On Tue 30-07-19 13:24:54, Thomas Gleixner wrote: > Bit spinlocks are problematic if PREEMPT_RT is enabled, because they > disable preemption, which is undesired for latency reasons and breaks when > regular spinlocks are taken within the bit_spinlock locked region because > regular spinlocks are co

Re: [patch 3/4] fs/buffer: Substitute BH_Uptodate_Lock for RT and bit spinlock debugging

2019-07-31 Thread Jan Kara
On Tue 30-07-19 13:24:55, Thomas Gleixner wrote: > Bit spinlocks are problematic if PREEMPT_RT is enabled. They disable > preemption, which is undesired for latency reasons and breaks when regular > spinlocks are taken within the bit_spinlock locked region because regular > spinlocks are converted

Re: [PATCH v6 18/57] i2c: Remove dev_err() usage after platform_get_irq()

2019-07-31 Thread Stephen Boyd
Quoting Wolfram Sang (2019-07-31 07:30:11) > > -dev_err(...); > > What about pr_err, ...? Sure. I haven't tried to find these ones or pr_warn(), etc. > > > While we're here, remove braces on if statements that only have one > > statement (manually). > > You can let cocci do this for you, too.

Re: [PATCH v2] mm: kmemleak: Use mempool allocations for kmemleak objects

2019-07-31 Thread Catalin Marinas
On Wed, Jul 31, 2019 at 08:02:30AM -0400, Qian Cai wrote: > On Jul 31, 2019, at 5:53 AM, Catalin Marinas wrote: > > On Tue, Jul 30, 2019 at 04:22:37PM -0400, Qian Cai wrote: > >> On Tue, 2019-07-30 at 12:57 -0700, Andrew Morton wrote: > >>> On Sat, 27 Jul 2019 14:23:33 +0100 Catalin Marinas > >>>

Re: [PATCH v2 0/3] KVM: selftests: Enable ucall and dirty_log_test on s390x

2019-07-31 Thread Andrew Jones
On Wed, Jul 31, 2019 at 03:32:13PM +0200, Thomas Huth wrote: > Implement the ucall() interface on s390x to be able to use the > dirty_log_test KVM selftest on s390x, too. > > v2: > - Split up ucall.c into architecture specific files > - Removed some #ifdef __s390x__ in the dirty_log patch > >

Re: [PATCH v2 07/20] ARM: dts: imx7-colibri: fix 1.8V/UHS support

2019-07-31 Thread Philippe Schenker
On Wed, 2019-07-31 at 09:56 -0300, Fabio Estevam wrote: > On Wed, Jul 31, 2019 at 9:38 AM Philippe Schenker > wrote: > > From: Stefan Agner > > > > Add pinmuxing and do not specify voltage restrictions in the > > module level device tree. > > It would be nice to explain the reason for doing thi

Re: [PATCH V2] IB/core: Add mitigation for Spectre V1

2019-07-31 Thread Doug Ledford
On Tue, 2019-07-30 at 21:39 -0700, Luck, Tony wrote: > Some processors may mispredict an array bounds check and > speculatively access memory that they should not. With > a user supplied array index we like to play things safe > by masking the value with the array size before it is > used as an ind

Re: [PATCH v2] mm: kmemleak: Use mempool allocations for kmemleak objects

2019-07-31 Thread Qian Cai
On Wed, 2019-07-31 at 15:48 +0100, Catalin Marinas wrote: > On Wed, Jul 31, 2019 at 08:02:30AM -0400, Qian Cai wrote: > > On Jul 31, 2019, at 5:53 AM, Catalin Marinas > > wrote: > > > On Tue, Jul 30, 2019 at 04:22:37PM -0400, Qian Cai wrote: > > > > On Tue, 2019-07-30 at 12:57 -0700, Andrew Morton

[PATCH] peak_usb: Fix info-leaks to USB devices

2019-07-31 Thread Tomas Bortoli
Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by: syzbot+d6a5a1a3657b596ef...@syzkaller.appspotmail.com Reported-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com --- Crash l

Re: [PATCH] arm64: Move TIF_* documentation to individual definitions

2019-07-31 Thread Mark Rutland
On Wed, Jul 31, 2019 at 03:35:20PM +0200, Geert Uytterhoeven wrote: > Some TIF_* flags are documented in the comment block at the top, some > next to their definitions, some in both places. > > Move all documentation to the individual definitions for consistency, > and for easy lookup. > > Signed

Re: [PATCH 09/14] sched,fair: refactor enqueue/dequeue_entity

2019-07-31 Thread Rik van Riel
On Wed, 2019-07-31 at 11:35 +0200, Peter Zijlstra wrote: > On Tue, Jul 30, 2019 at 11:36:17AM +0200, Peter Zijlstra wrote: > > On Mon, Jul 22, 2019 at 01:33:43PM -0400, Rik van Riel wrote: > > > +static bool > > > +enqueue_entity_groups(struct cfs_rq *cfs_rq, struct sched_entity > > > *se, int flag

[GIT PULL] tracing: Minor fixes for v5.3-rc2

2019-07-31 Thread Steven Rostedt
Linus, Two minor fixes: - Fix trace event header include guards, as several did not match the #define to the #ifdef - Remove a redundant test to ftrace_graph_notrace_addr() that was accidentally added. Please pull the latest trace-v5.3-rc2 tree, which can be found at: git://git.k

[PATCH 1/2 v3] locking/mutex: Make __mutex_owner static to mutex.c

2019-07-31 Thread Mukesh Ojha
__mutex_owner() should only be used by the mutex api's. So, to put this restiction let's move the __mutex_owner() function definition from linux/mutex.h to mutex.c file. There exist functions that uses __mutex_owner() like mutex_is_locked() and mutex_trylock_recursive(), So to keep legacy thing in

[PATCH 2/2 v3] locking/mutex: Use mutex flags macro instead of hard code

2019-07-31 Thread Mukesh Ojha
Use the mutex flag macro instead of hard code value inside __mutex_owner(). Signed-off-by: Mukesh Ojha --- Changes in v3: - no change. Changes in v2: - Framed the commit according the changes done in 1/2 of the patchset. kernel/locking/mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 del

Re: [PATCH v3] sched/core: Don't use dying mm as active_mm of kthreads

2019-07-31 Thread Rik van Riel
On Wed, 2019-07-31 at 10:15 -0400, Waiman Long wrote: > On 7/31/19 9:48 AM, Rik van Riel wrote: > > On Tue, 2019-07-30 at 17:01 -0400, Waiman Long wrote: > > > On 7/29/19 8:26 PM, Rik van Riel wrote: > > > > On Mon, 2019-07-29 at 17:42 -0400, Waiman Long wrote: > > > > > > > > > What I have found

[PATCHv2 02/59] mm: Add helpers to setup zero page mappings

2019-07-31 Thread Kirill A. Shutemov
When kernel sets up an encrypted page mapping, encryption KeyID is derived from a VMA. KeyID is going to be part of vma->vm_page_prot and it will be propagated transparently to page table entry on mk_pte(). But there is an exception: zero page is never encrypted and its mapping must use KeyID-0, r

[PATCHv2 14/59] x86/mm: Add hooks to allocate and free encrypted pages

2019-07-31 Thread Kirill A. Shutemov
Hook up into page allocator to allocate and free encrypted page properly. The hardware/CPU does not enforce coherency between mappings of the same physical page with different KeyIDs or encryption keys. We are responsible for cache management. Flush cache on allocating encrypted page and on retur

[PATCHv2 42/59] syscall/x86: Wire up a system call for MKTME encryption keys

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield encrypt_mprotect() is a new system call to support memory encryption. It takes the same parameters as legacy mprotect, plus an additional key serial number that is mapped to an encryption keyid. Signed-off-by: Alison Schofield Signed-off-by: Kirill A. Shutemov --- arch

[PATCHv2 44/59] mm: Add the encrypt_mprotect() system call for MKTME

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield Implement memory encryption for MKTME (Multi-Key Total Memory Encryption) with a new system call that is an extension of the legacy mprotect() system call. In encrypt_mprotect the caller must pass a handle to a previously allocated and programmed MKTME encryption key. The

[PATCHv2 51/59] x86/mm: Disable MKTME on incompatible platform configurations

2019-07-31 Thread Kirill A. Shutemov
Icelake Server requires additional check to make sure that MKTME usage is safe on Linux. Kernel needs a way to access encrypted memory. There can be different approaches to this: create a temporary mapping to access the page (using kmap() interface), modify kernel's direct mapping on allocation of

[PATCHv2 18/59] x86/mm: Calculate direct mapping size

2019-07-31 Thread Kirill A. Shutemov
The kernel needs to have a way to access encrypted memory. We have two option on how approach it: - Create temporary mappings every time kernel needs access to encrypted memory. That's basically brings highmem and its overhead back. - Create multiple direct mappings, one per-KeyID. In this s

[PATCHv2 50/59] x86/mm: Use common code for DMA memory encryption

2019-07-31 Thread Kirill A. Shutemov
From: Jacob Pan Replace sme_ code with x86 memory encryption common code such that Intel MKTME can be supported underneath generic DMA code. dma_to_phys() & phys_to_dma() results will be runtime modified by memory encryption code. Signed-off-by: Jacob Pan Signed-off-by: Kirill A. Shutemov ---

[PATCHv2 16/59] x86/mm: Rename CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING

2019-07-31 Thread Kirill A. Shutemov
Rename the option to CONFIG_MEMORY_PHYSICAL_PADDING. It will be used not only for KASLR. Signed-off-by: Kirill A. Shutemov --- arch/x86/Kconfig| 2 +- arch/x86/mm/kaslr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 222855cc

[PATCHv2 25/59] keys/mktme: Preparse the MKTME key payload

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield It is a requirement of the Kernel Keys subsystem to provide a preparse method that validates payloads before key instantiate methods are called. Verify that userspace provides valid MKTME options and prepare the payload for use at key instantiate time. Create a method to

[PATCHv2 15/59] x86/mm: Map zero pages into encrypted mappings correctly

2019-07-31 Thread Kirill A. Shutemov
Zero pages are never encrypted. Keep KeyID-0 for them. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/pgtable.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0bc530c4eb13..f0dd80a920a9 10

[PATCHv2 36/59] keys/mktme: Require ACPI HMAT to register the MKTME Key Service

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield The ACPI HMAT will be used by the MKTME key service to identify topologies that support the safe programming of encryption keys. Those decisions will happen at key creation time and during hotplug events. To enable this, we at least need to have the ACPI HMAT present at in

[PATCHv2 23/59] x86/pconfig: Set an activated algorithm in all MKTME commands

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield The Intel MKTME architecture specification requires an activated encryption algorithm for all command types. For commands that actually perform encryption, SET_KEY_DIRECT and SET_KEY_RANDOM, the user specifies the algorithm when requesting the key through the MKTME Key Ser

[PATCHv2 26/59] keys/mktme: Instantiate MKTME keys

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield Instantiate is a Kernel Key Service method invoked when a key is added (add_key, request_key) by the user. During instantiation, MKTME allocates an available hardware KeyID and maps it to the Userspace Key. Signed-off-by: Alison Schofield Signed-off-by: Kirill A. Shutemo

[PATCHv2 21/59] mm/page_ext: Export lookup_page_ext() symbol

2019-07-31 Thread Kirill A. Shutemov
page_keyid() is inline funcation that uses lookup_page_ext(). KVM is going to use page_keyid() and since KVM can be built as a module lookup_page_ext() has to be exported. Signed-off-by: Kirill A. Shutemov --- mm/page_ext.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_ext.c b/mm

[PATCHv2 12/59] x86/mm: Add a helper to retrieve KeyID for a page

2019-07-31 Thread Kirill A. Shutemov
page_ext allows to store additional per-page information without growing main struct page. The additional space can be requested at boot time. Store KeyID in bits 31:16 of extended page flags. These bits are unused. page_keyid() returns zero until page_ext is ready. page_ext initializer enables a

[PATCHv2 08/59] x86/mm: Introduce helpers to read number, shift and mask of KeyIDs

2019-07-31 Thread Kirill A. Shutemov
mktme_nr_keyids() returns the number of KeyIDs available for MKTME, excluding KeyID zero which used by TME. MKTME KeyIDs start from 1. mktme_keyid_shift() returns the shift of KeyID within physical address. mktme_keyid_mask() returns the mask to extract KeyID from physical address. Signed-off-by

[PATCHv2 13/59] x86/mm: Add a helper to retrieve KeyID for a VMA

2019-07-31 Thread Kirill A. Shutemov
We store KeyID in upper bits for vm_page_prot that match position of KeyID in PTE. vma_keyid() extracts KeyID from vm_page_prot. With KeyID in vm_page_prot we don't need to modify any page table helper to propagate the KeyID to page table entires. Signed-off-by: Kirill A. Shutemov --- arch/x86/

[PATCHv2 11/59] x86/mm: Detect MKTME early

2019-07-31 Thread Kirill A. Shutemov
We need to know the number of KeyIDs before page_ext is initialized. We are going to use page_ext to store KeyID and it would be handly to avoid page_ext allocation if there's no MKMTE in the system. page_ext initialization happens before full CPU initizliation is complete. Move detect_tme() call

[PATCHv2 09/59] x86/mm: Store bitmask of the encryption algorithms supported by MKTME

2019-07-31 Thread Kirill A. Shutemov
Store bitmask of the supported encryption algorithms in 'mktme_algs'. This will be used by key management service. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/mktme.h | 2 ++ arch/x86/kernel/cpu/intel.c | 6 +- arch/x86/mm/mktme.c | 2 ++ 3 files changed, 9 insertion

[PATCHv2 10/59] x86/mm: Preserve KeyID on pte_modify() and pgprot_modify()

2019-07-31 Thread Kirill A. Shutemov
An encrypted VMA will have KeyID stored in vma->vm_page_prot. This way we don't need to do anything special to setup encrypted page table entries and don't need to reserve space for KeyID in a VMA. This patch changes _PAGE_CHG_MASK to include KeyID bits. Otherwise they are going to be stripped fro

[PATCHv2 01/59] mm: Do no merge VMAs with different encryption KeyIDs

2019-07-31 Thread Kirill A. Shutemov
VMAs with different KeyID do not mix together. Only VMAs with the same KeyID are compatible. Signed-off-by: Kirill A. Shutemov --- fs/userfaultfd.c | 7 --- include/linux/mm.h | 9 - mm/madvise.c | 2 +- mm/mempolicy.c | 3 ++- mm/mlock.c | 2 +- mm/mmap.c

[PATCHv2 07/59] x86/mm: Mask out KeyID bits from page table entry pfn

2019-07-31 Thread Kirill A. Shutemov
MKTME claims several upper bits of the physical address in a page table entry to encode KeyID. It effectively shrinks number of bits for physical address. We should exclude KeyID bits from physical addresses. For instance, if CPU enumerates 52 physical address bits and number of bits claimed for K

[PATCHv2 05/59] mm/page_alloc: Handle allocation for encrypted memory

2019-07-31 Thread Kirill A. Shutemov
For encrypted memory, we need to allocate pages for a specific encryption KeyID. There are two cases when we need to allocate a page for encryption: - Allocation for an encrypted VMA; - Allocation for migration of encrypted page; The first case can be covered within alloc_page_vma(). We know

[PATCHv2 03/59] mm/ksm: Do not merge pages with different KeyIDs

2019-07-31 Thread Kirill A. Shutemov
KSM compares plain text. It might try to merge two pages that have the same plain text but different ciphertext and possibly different encryption keys. When the kernel encrypted the page, it promised that it would keep it encrypted with _that_ key. That makes it impossible to merge two pages enc

[PATCHv2 06/59] mm/khugepaged: Handle encrypted pages

2019-07-31 Thread Kirill A. Shutemov
For !NUMA khugepaged allocates page in advance, before we found a VMA for collapse. We don't yet know which KeyID to use for the allocation. The page is allocated with KeyID-0. Once we know that the VMA is suitable for collapsing, we prepare the page for KeyID we need, based on vma_keyid(). Signe

[PATCHv2 04/59] mm/page_alloc: Unify alloc_hugepage_vma()

2019-07-31 Thread Kirill A. Shutemov
We don't need to have separate implementations of alloc_hugepage_vma() for NUMA and non-NUMA. Using variant based on alloc_pages_vma() we would cover both cases. This is preparation patch for allocation encrypted pages. alloc_pages_vma() will handle allocation of encrypted pages. With this change

[PATCHv2 00/59] Intel MKTME enabling

2019-07-31 Thread Kirill A. Shutemov
= Intro = The patchset brings enabling of Intel Multi-Key Total Memory Encryption. It consists of changes into multiple subsystems: * Core MM: infrastructure for allocation pages, dealing with encrypted VMAs and providing API setup encrypted mappings. * arch/x86: feature enumeration, program

[PATCH v3 3/3] KVM: selftests: Enable dirty_log_test on s390x

2019-07-31 Thread Thomas Huth
To run the dirty_log_test on s390x, we have to make sure that we access the dirty log bitmap with little endian byte ordering and we have to properly align the memslot of the guest. Also all dirty bits of a segment are set once on s390x when one of the pages of a segment are written to for the firs

Re: [PATCH] [RFC] dmaengine: add fifo_size member

2019-07-31 Thread Vinod Koul
On 31-07-19, 10:48, Jon Hunter wrote: > > On 29/07/2019 07:10, Vinod Koul wrote: > > On 23-07-19, 11:24, Sameer Pujar wrote: > >> > >> On 7/19/2019 10:34 AM, Vinod Koul wrote: > >>> On 05-07-19, 11:45, Sameer Pujar wrote: > Hi Vinod, > > What are your final thoughts regarding this?

[PATCH v3] checkpatch: add several Kconfig default value tests

2019-07-31 Thread Miles Chen
This change adds 3 Kconfig default value tests. Repost patch v3 (Follow Joe's suggestion in v2) 1. discourage default n cases: e.g., default n 2. discourage default "[ynm]" cases: e.g., arch/powerpc/Kconfig: default "y" if PPC_POWERNV arch/powerpc/Kconfig: default "y" if PPC_POWERNV arch/powe

Re: Reminder: 99 open syzbot bugs in net subsystem

2019-07-31 Thread David Ahern
On 7/30/19 8:57 PM, Eric Biggers wrote: > syzbot finds a lot of security bugs, and security bugs are important. And the > bugs are still there regardless of whether they're reported by human or bot. > > Also, there *are* bugs being fixed because of these reminders; some subsystem > maintainers ha

[PATCHv2 30/59] keys/mktme: Program MKTME keys into the platform hardware

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield Finally, the keys are programmed into the hardware via each lead CPU. Every package has to be programmed successfully. There is no partial success allowed here. Here a retry scheme is included for two errors that may succeed on retry: MKTME_DEVICE_BUSY and MKTME_ENTROPY_ER

[PATCHv2 54/59] x86/mktme: Overview of Multi-Key Total Memory Encryption

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield Provide an overview of MKTME on Intel Platforms. Signed-off-by: Alison Schofield Signed-off-by: Kirill A. Shutemov --- Documentation/x86/index.rst| 1 + Documentation/x86/mktme/index.rst | 8 +++ Documentation/x86/mktme/mktme_overview.rst | 57

[PATCHv2 22/59] mm/rmap: Clear vma->anon_vma on unlink_anon_vmas()

2019-07-31 Thread Kirill A. Shutemov
If all pages in the VMA got unmapped there's no reason to link it into original anon VMA hierarchy: it cannot possibly share any pages with other VMA. Set vma->anon_vma to NULL on unlink_anon_vmas(). With the change VMA can be reused. The new anon VMA will be allocated on the first fault. Signed-

[PATCHv2 38/59] keys/mktme: Do not allow key creation in unsafe topologies

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield MKTME depends upon at least one online CPU capable of programming each memory controller in the platform. An unsafe topology for MKTME is a memory only package or a package with no online CPUs. Key creation with unsafe topologies will fail with EINVAL and a warning will be

[PATCH] media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()

2019-07-31 Thread Tomas Bortoli
The function at issue does not always initialize each byte allocated for 'b' and can therefore leak uninitialized memory to a USB device in the call to usb_bulk_msg() Use kzalloc() instead of kmalloc() Signed-off-by: Tomas Bortoli Reported-by: syzbot+0522702e9d6714237...@syzkaller.appspotmail.

[PATCHv2 57/59] x86/mktme: Document the MKTME Key Service API

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield Signed-off-by: Alison Schofield Signed-off-by: Kirill A. Shutemov --- Documentation/x86/mktme/index.rst | 1 + Documentation/x86/mktme/mktme_keys.rst | 61 ++ 2 files changed, 62 insertions(+) create mode 100644 Documentation/x86/mktme/mktm

[PATCHv2 46/59] mm: Restrict MKTME memory encryption to anonymous VMAs

2019-07-31 Thread Kirill A. Shutemov
From: Alison Schofield Memory encryption is only supported for mappings that are ANONYMOUS. Test the VMA's in an encrypt_mprotect() request to make sure they all meet that requirement before encrypting any. The encrypt_mprotect syscall will return -EINVAL and will not encrypt any VMA's if this c

Re: kernel BUG at net/rxrpc/local_object.c:LINE!

2019-07-31 Thread David Howells
Dmitry Vyukov wrote: > Please send a patch for testing that enables this tracing > unconditionally. This should have the same effect. There is no way to > hook into a middle of the automated process and arbitrary tune things. I don't know how to do that off hand. Do you have an example? Anyway

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