Re: [PATCH v3] platform/chrome: cros_ec_spi: Transfer messages at high priority

2019-04-03 Thread Matthias Kaehlcke
On Wed, Apr 03, 2019 at 02:08:40PM -0700, Doug Anderson wrote: > Hi, > > On Wed, Apr 3, 2019 at 2:04 PM Matthias Kaehlcke wrote: > > > +static int cros_ec_xfer_high_pri(struct cros_ec_device *ec_dev, > > > > nit: the fact that a high priority workqueue is used is an > > implementation detail, sin

Re: [RFC PATCH v2 09/14] xarray: Implement migration function for objects

2019-04-03 Thread Tobin C. Harding
On Wed, Apr 03, 2019 at 10:23:26AM -0700, Matthew Wilcox wrote: > On Wed, Apr 03, 2019 at 03:21:22PM +1100, Tobin C. Harding wrote: > > +void xa_object_migrate(struct xa_node *node, int numa_node) > > +{ > > + struct xarray *xa = READ_ONCE(node->array); > > + void __rcu **slot; > > + struct x

Re: [PATCHv1 7/7] vfio/mdev: Fix race conditions with mdev device life cycle APIs

2019-04-03 Thread Alex Williamson
On Tue, 26 Mar 2019 22:45:45 -0500 Parav Pandit wrote: > Below race condition and call trace exist with current device life cycle > sequence. > > 1. In following sequence, child devices created while removing mdev parent > device can be left out, or it may lead to race of removing half > initial

[PATCH v4 2/2] platform/chrome: Add Wilco EC keyboard backlight LEDs support

2019-04-03 Thread Nick Crews
The EC is in charge of controlling the keyboard backlight on the Wilco platform. We expose a standard LED class device at /sys/class/leds/chromeos::kbd_backlight. This driver is modeled after the standard Chrome OS keyboard backlight driver at drivers/platform/chrome/cros_kbd_led_backlight.c Some

[PATCH v4 1/2] platform/chrome: wilco_ec: Standardize mailbox interface

2019-04-03 Thread Nick Crews
The current API for the wilco EC mailbox interface is bad. It assumes that most messages sent to the EC follow a similar structure, with a command byte in MBOX[0], followed by a junk byte, followed by actual data. This doesn't happen in several cases, such as setting the RTC time, using the raw de

Re: [PATCH v2 0/2] platform/chrome: Add support for host sleep event command v1

2019-04-03 Thread Evan Green
Oops, I missed a piece of Guenter's feedback. Will post a v3 momentarily. Apologies for the spam. -Evan

Re: [PATCH 1/2] ASoC: rt5677: allow multiple interrupt sources

2019-04-03 Thread Fletcher Woodruff
On Mon, Apr 1, 2019 at 11:02 PM Mark Brown wrote: > regmap-irq should support active high/low, and if it doesn't it can't be > a unique thing that only this device wants to implement so the common > code should be improved. The rt5677 driver needs its own irq regardless for hotword detection. If

[PATCH v6 16/20] x86/clearcpuid: Support multiple clearcpuid options

2019-04-03 Thread Fenghua Yu
Currently only one kernel option "clearcpuid=" can be picked up by kernel during boot time. In some cases, user may want to clear a few cpu caps. This may be useful to replace endless (new) kernel options like nosmep, nosmap, etc. Add support of multiple clearcpuid options to allow user to clear

[PATCH v6 17/20] x86/clearcpuid: Support feature flag string in kernel option clearcpuid

2019-04-03 Thread Fenghua Yu
The kernel option clearcpuid currently only takes feature bit which can be changed from kernel to kernel. Extend clearcpuid to use cap flag string, which is defined in x86_cap_flags[] and won't be changed from kernel to kernel. And user can easily get the cap flag string from /proc/cpuinfo. Signe

[PATCH v6 14/20] x86/split_lock: Add a sysfs interface to enable/disable split lock detection during run time

2019-04-03 Thread Fenghua Yu
The interface /sys/device/system/cpu/split_lock_detect is added to allow user to control split lock detection and show current split lock detection setting. Writing 1 to the file enables split lock detection and writing 0 disables split lock detection. Split lock detection is enabled or disabled o

Re: [PATCH] perf annotate: Fix build on 32 bit for BPF annotation

2019-04-03 Thread Song Liu
> On Apr 3, 2019, at 12:44 PM, Thadeu Lima de Souza Cascardo > wrote: > > Commit 6987561c9e86 ("perf annotate: Enable annotation of BPF programs") adds > support for BPF programs annotations but the new code does not build on > 32-bit. > > Fixes: 6987561c9e86 ("perf annotate: Enable annotat

[PATCH v3 0/2] platform/chrome: Add support for host sleep event command v1

2019-04-03 Thread Evan Green
The Chrome OS EC has an updated set of parameters for the host sleep event command. With the new parameters, the host can indicate a timeout along with suspend messages. Specifically S0ix suspend messages are supported now, though the host command format isn't specific to S0ix. When the EC sees an

[PATCH v3 1/2] mfd: cros_ec: Add host_sleep_event_v1 command

2019-04-03 Thread Evan Green
Introduce the command and response structures for the second revision of the host sleep event. These structures are part of a new EC change that enables detection of failure to enter S0ix. The EC waits a kernel-specified timeout (or a default amount of time) for the S0_SLP pin to change, and wakes

[PATCH v3 2/2] platform/chrome: Add support for v1 of host sleep event

2019-04-03 Thread Evan Green
Add support in code for the new forms of the host sleep event. Detects the presence of this version of the command at runtime, and use whichever form the EC supports. At this time, always request the default timeout, and only report the failing response via a WARN_ONCE(). Future versions could acce

Re: [PATCH 1/2] input: keyboard: imx: no need to control interrupt status in event check

2019-04-03 Thread dmitry.torok...@gmail.com
Hi Anson, On Fri, Mar 29, 2019 at 07:00:43AM +, Anson Huang wrote: > There is no need to enable release interrupt and disable depress > interrupt in event check, as a timer is setup for checking these > events rather than interrupts. But won't using release interrupt allow signalling key rele

Re: [BUG] perf: intel_pt won't display kernel function

2019-04-03 Thread Song Liu
> On Apr 3, 2019, at 11:59 AM, Song Liu wrote: > > > >> On Apr 3, 2019, at 11:55 AM, Song Liu wrote: >> >> >> >>> On Apr 3, 2019, at 11:50 AM, Arnaldo Carvalho de Melo >>> wrote: >>> >>> Em Wed, Apr 03, 2019 at 04:27:56PM +, Song Liu escreveu: > On Apr 3, 2019, at

Re: [PATCH v5 2/7] slob: Respect list_head abstraction layer

2019-04-03 Thread Roman Gushchin
On Thu, Apr 04, 2019 at 08:03:27AM +1100, Tobin C. Harding wrote: > On Wed, Apr 03, 2019 at 06:00:30PM +, Roman Gushchin wrote: > > On Wed, Apr 03, 2019 at 10:05:40AM +1100, Tobin C. Harding wrote: > > > Currently we reach inside the list_head. This is a violation of the > > > layer of abstrac

RE: [PATCH] platform/x86: dell-laptop: fix rfkill functionality

2019-04-03 Thread Mario.Limonciello
> -Original Message- > From: Darren Hart > Sent: Wednesday, April 3, 2019 3:24 PM > To: Limonciello, Mario > Cc: Andy Shevchenko; LKML; platform-driver-...@vger.kernel.org > Subject: Re: [PATCH] platform/x86: dell-laptop: fix rfkill functionality > > > [EXTERNAL EMAIL] > > On Wed, Mar 2

Re: [PATCHv1] fpga: mgr: add FPGA configuration log

2019-04-03 Thread Alan Tull
On Wed, Apr 3, 2019 at 3:08 PM Moritz Fischer wrote: > > On Wed, Apr 03, 2019 at 01:37:51PM -0500, Alan Tull wrote: > > > > > > it's state, not status for most fpga manager drivers. It should > > > return 'operating' if everything went well. > > Yeah, sorry :) > > > > It seems like there's a poss

[PATCH] ACPI: PM: Print debug messages when enabling GPEs for wakeup

2019-04-03 Thread Rafael J. Wysocki
From: Rafael J. Wysocki In sufficiently complicated GPE configurations it is hard to determine which GPE could be the source of system wakeup from a sleep state, so make __acpi_device_wakeup_enable() print that information to the kernel log if debugging is enabled. Signed-off-by: Rafael J. Wysoc

Re: [PATCH] platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer

2019-04-03 Thread Darren Hart
On Sat, Mar 30, 2019 at 12:17:12AM +, Colin King wrote: > From: Colin Ian King > > Currently the kfree of output.pointer can be potentially freeing > an uninitalized pointer in the case where out_data is NULL. Fix this > by reworking the case where out_data is not-null to perform the > ACPI s

RE: [PATCH v1 1/4] dt-bindings: arm64: add compatible for LX2160A

2019-04-03 Thread Leo Li
> -Original Message- > From: Vabhav Sharma > Sent: Wednesday, April 3, 2019 3:28 AM > To: robh...@kernel.org; mark.rutl...@arm.com > Cc: Leo Li ; Meenakshi Aggarwal > ; Andy Tang ; > devicet...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH v1 1/4] dt-bindings: arm64

Re: [PATCH] axxia-i2c: use auto cmd for last message

2019-04-03 Thread Adamski, Krzysztof (Nokia - PL/Wroclaw)
On Wed, Apr 03, 2019 at 10:54:02PM +0200, Wolfram Sang wrote: >Hi, > >On Thu, Mar 28, 2019 at 11:19:45AM +, Adamski, Krzysztof (Nokia - >PL/Wroclaw) wrote: >> Some recent commits to this driver were trying to make sure the TSS >> interrupt is not generated on busy system due to 25ms timer expi

Re: [PATCH] platform/x86: dell-laptop: fix rfkill functionality

2019-04-03 Thread Darren Hart
On Wed, Apr 03, 2019 at 09:54:27PM +, mario.limoncie...@dell.com wrote: > > -Original Message- > > From: Darren Hart > > Sent: Wednesday, April 3, 2019 3:24 PM > > To: Limonciello, Mario > > Cc: Andy Shevchenko; LKML; platform-driver-...@vger.kernel.org > > Subject: Re: [PATCH] platfor

Re: [PATCH] platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer

2019-04-03 Thread Colin Ian King
On 03/04/2019 23:02, Darren Hart wrote: > On Sat, Mar 30, 2019 at 12:17:12AM +, Colin King wrote: >> From: Colin Ian King >> >> Currently the kfree of output.pointer can be potentially freeing >> an uninitalized pointer in the case where out_data is NULL. Fix this >> by reworking the case wher

Re: [PATCH v5 2/7] slob: Respect list_head abstraction layer

2019-04-03 Thread Tobin C. Harding
On Wed, Apr 03, 2019 at 09:23:28PM +, Roman Gushchin wrote: > On Thu, Apr 04, 2019 at 08:03:27AM +1100, Tobin C. Harding wrote: > > On Wed, Apr 03, 2019 at 06:00:30PM +, Roman Gushchin wrote: > > > On Wed, Apr 03, 2019 at 10:05:40AM +1100, Tobin C. Harding wrote: > > > > Currently we reach

Re: [PATCH V2] input: keyboard: snvs: initialize necessary driver data before enabling IRQ

2019-04-03 Thread dmitry.torok...@gmail.com
On Wed, Mar 27, 2019 at 06:07:06AM +, Anson Huang wrote: > SNVS IRQ is requested before necessary driver data initialized, > if there is a pending IRQ during driver probe phase, kernel > NULL pointer panic will occur in IRQ handler. To avoid such > scenario, just initialize necessary driver dat

Re: [PATCH] input: keyboard: snvs: use dev_pm_set_wake_irq() to simplify code

2019-04-03 Thread dmitry.torok...@gmail.com
On Wed, Mar 27, 2019 at 06:08:05AM +, Anson Huang wrote: > With calling dev_pm_set_wake_irq() to set SNVS ON/OFF button > as wakeup source for suspend, generic wake irq mechanism > will automatically enable it as wakeup source when suspend, > then the enable_irq_wake()/disable_irq_wake() can be

Re: [PATCH v6 0/9] iProc I2C slave mode and NIC mode

2019-04-03 Thread Florian Fainelli
On 4/3/19 1:44 PM, Wolfram Sang wrote: > On Tue, Apr 02, 2019 at 06:18:21PM -0700, Ray Jui wrote: >> This patch series adds the following support to the iProc I2C driver: >> - Increase maximum read transfer size to 255 bytes >> - I2C slave mode >> - Polling mode >> - NIC I2C mode >> >> This patch s

Re: [PATCH] platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer

2019-04-03 Thread Darren Hart
On Wed, Apr 03, 2019 at 11:05:12PM +0100, Colin Ian King wrote: > On 03/04/2019 23:02, Darren Hart wrote: > > On Sat, Mar 30, 2019 at 12:17:12AM +, Colin King wrote: > >> From: Colin Ian King > >> > >> Currently the kfree of output.pointer can be potentially freeing > >> an uninitalized pointe

Re: [PATCH] i2c: isch: Remove unnecessary acpi.h include

2019-04-03 Thread Bjorn Helgaas
On Wed, Apr 3, 2019 at 3:57 PM Wolfram Sang wrote: > > On Mon, Apr 01, 2019 at 02:37:19PM -0500, Bjorn Helgaas wrote: > > On Mon, Apr 1, 2019 at 9:08 AM Wolfram Sang wrote: > > > > > > > > > > > From: Bjorn Helgaas > > > > > > > > > > 54fb4a05af0a ("i2c: Check for ACPI resource conflicts") inclu

Re: [PATCH] platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer

2019-04-03 Thread Colin Ian King
On 03/04/2019 23:26, Darren Hart wrote: > On Wed, Apr 03, 2019 at 11:05:12PM +0100, Colin Ian King wrote: >> On 03/04/2019 23:02, Darren Hart wrote: >>> On Sat, Mar 30, 2019 at 12:17:12AM +, Colin King wrote: From: Colin Ian King Currently the kfree of output.pointer can be pote

[PATCH v2] Staging: rtlwifi: Remove unwanted parentheses

2019-04-03 Thread Madhumitha Prabakaran
Remove unwanted parentheses and use !! idiom in place of ternary operator to make code simple and more understandable. Signed-off-by: Madhumitha Prabakaran --- Changes in v2: - Changed commit log - Replaced ternary operator with !! idiom - Modified a BIT operator --- drivers/staging/rtlwifi/cor

[PATCH v2] mfd: cros_ec: check for NULL transfer function

2019-04-03 Thread egranata
From: Enrico Granata As new transfer mechanisms are added to the EC codebase, they may not support v2 of the EC protocol. If the v3 initial handshake transfer fails, the kernel will try and call cmd_xfer as a fallback. If v2 is not supported, cmd_xfer will be NULL, and the code will end up causi

Re: [PATCH] Staging: rtlwifi: Remove unwanted parentheses

2019-04-03 Thread Madhumthia Prabakaran
On Wed, Apr 03, 2019 at 07:21:45PM +0300, Dan Carpenter wrote: > On Wed, Apr 03, 2019 at 07:18:03PM +0300, Dan Carpenter wrote: > > data_bit = (data & BIT(i)) ? 1 : 0; > > I quite like the !! idiom also... > > data_bit = !!(data & BIT(i)); Thanks for reviewing it. >

Re: [PATCH 1/7] thermal/drivers/core: Remove the module Kconfig's option

2019-04-03 Thread Paul Burton
Hi Daniel, On Tue, Apr 02, 2019 at 06:12:44PM +0200, Daniel Lezcano wrote: > The module support for the thermal subsystem makes little sense: > - some subsystems relying on it are not modules, thus forcing the >framework to be compiled in > - it is compiled in for almost every configs, the r

Re: [PATCH 2/2] ARM: dts: Add support for ZII i.MX7 RPU2 board

2019-04-03 Thread Fabio Estevam
Hi Andrey, This looks good. Only some minor comments: On Wed, Mar 27, 2019 at 3:41 AM Andrey Smirnov wrote: > --- /dev/null > +++ b/arch/arm/boot/dts/imx7d-zii-rpu2.dts > @@ -0,0 +1,936 @@ > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > + Shawn mentioned on a prior submission of mine that thi

Re: [PATCH v19,RESEND 24/27] x86/vdso: Add __vdso_sgx_enter_enclave() to wrap SGX enclave transitions

2019-04-03 Thread Sean Christopherson
On Thu, Mar 28, 2019 at 12:18:40PM -0700, Andy Lutomirski wrote: > Finally, why does the vDSO code bother checking whether the leaf is valid? To sanity check the input to ensure the caller is attempting to enter an enclave, i.e. the function is named __vdso_sgx_enter_enclave(), not __vsgx_enclu().

[PATCH] cgroup: remove extra cgroup_migrate_finish() call

2019-04-03 Thread Shakeel Butt
The callers of cgroup_migrate_prepare_dst() correctly call cgroup_migrate_finish() for success and failure cases both. No need to call it in cgroup_migrate_prepare_dst() in failure case. Signed-off-by: Shakeel Butt --- kernel/cgroup/cgroup.c | 5 + 1 file changed, 1 insertion(+), 4 deletions

Re: [PATCH v7 4/4] Input: goodix - Add GT5663 CTP support

2019-04-03 Thread Dmitry Torokhov
On Thu, Mar 21, 2019 at 01:51:04PM +0530, Jagan Teki wrote: > GT5663 is capacitive touch controller with customized smart > wakeup gestures. > > Add support for it by adding compatible and supported chip data. > > The chip data on GT5663 is similar to GT1151, like > - config data register has 0x8

Re: [PATCH v7 2/4] Input: goodix - Add regulators suppot

2019-04-03 Thread Dmitry Torokhov
Hi Jagan, On Thu, Mar 21, 2019 at 01:51:02PM +0530, Jagan Teki wrote: > Goodix CTP controllers require AVDD28, VDDIO regulators for power-on > sequence. > > The delay between these regualtor operations as per Power-on Timing > from datasheet[1] is 0 (T1 >= 0 usec). > > So, enable and disable the

Re: [PATCH net-next] MIPS: generic: Add switchdev, pinctrl and fit to ocelot_defconfig

2019-04-03 Thread Paul Burton
Hi Horatiu, On Wed, Apr 03, 2019 at 05:27:36PM +0200, Horatiu Vultur wrote: > diff --git a/arch/mips/configs/generic/board-ocelot.config > b/arch/mips/configs/generic/board-ocelot.config > index f607888..3215741 100644 > --- a/arch/mips/configs/generic/board-ocelot.config > +++ b/arch/mips/config

[PATCH v2] locking/lockdep: Zap lock classes even with lock debugging disabled

2019-04-03 Thread Bart Van Assche
Commit a0b0fd53e1e6 ("locking/lockdep: Free lock classes that are no longer in use") changed the behavior of lockdep_free_key_range() from unconditionally zapping lock classes into only zapping lock classes if debug_lock == true. Not zapping lock classes if debug_lock == false leaves dangling point

Re: [PATCH 4/4] leds: lm3532: Introduce the lm3532 LED driver

2019-04-03 Thread Tony Lindgren
* Tony Lindgren [190403 13:06]: > * Sebastian Reichel [190329 05:36]: > > Hi, > > > > On Mon, Mar 25, 2019 at 11:01:18AM -0500, Dan Murphy wrote: > > > On 3/25/19 9:54 AM, Tony Lindgren wrote: > > > > * Dan Murphy [190325 12:36]: > > > >> On 3/22/19 5:16 PM, Tony Lindgren wrote: > > > >>> I can

Re: [PATCH 14/17] fpga: dfl: fme: add thermal management support

2019-04-03 Thread Wu Hao
On Wed, Apr 03, 2019 at 11:09:09AM -0700, Moritz Fischer wrote: > Hi Hao, > > On Thu, Apr 04, 2019 at 12:31:47AM +0800, Wu Hao wrote: > > On Tue, Apr 02, 2019 at 07:59:25AM -0700, Moritz Fischer wrote: > > > Hi Wu, > > > > > > On Mon, Mar 25, 2019 at 11:07:41AM +0800, Wu Hao wrote: > > > > This p

Re: [RFC PATCH 0/7] Early task context tracking

2019-04-03 Thread Andy Lutomirski
> On Apr 2, 2019, at 2:03 PM, Daniel Bristot de Oliveira > wrote: > > Note: do not take it too seriously, it is just a proof of concept. > > Some time ago, while using perf to check the automaton model, I noticed > that perf was losing events. The same was reproducible with ftrace. > > See: https

RE: [PATCHv1 7/7] vfio/mdev: Fix race conditions with mdev device life cycle APIs

2019-04-03 Thread Parav Pandit
> -Original Message- > From: Alex Williamson > Sent: Wednesday, April 3, 2019 4:27 PM > To: Parav Pandit > Cc: k...@vger.kernel.org; linux-kernel@vger.kernel.org; > kwankh...@nvidia.com; c...@nvidia.com > Subject: Re: [PATCHv1 7/7] vfio/mdev: Fix race conditions with mdev device > life

Re: [PATCH 2/4] ARM: dts: omap4-droid4: Update backlight dt properties

2019-04-03 Thread Tony Lindgren
Hi, * Dan Murphy [190321 14:29]: > Update the properties for the lm3532 device node for droid4. > With this change the backlight LED string and the keypad > LED strings will be controlled separately. We also need the following incremental change to prevent panel-dsi-cm trying to use of_find_back

Re: [patch 15/14] x86/dumpstack/64: Speedup in_exception_stack()

2019-04-03 Thread Andy Lutomirski
On Wed, Apr 3, 2019 at 12:42 PM Thomas Gleixner wrote: > > On Wed, 3 Apr 2019, Thomas Gleixner wrote: > > On Tue, 2 Apr 2019, Andy Lutomirski wrote: > > > > On Apr 2, 2019, at 1:29 PM, Thomas Gleixner wrote: > > > >>> How about a much better fix: make the DB stack be the same size as all > > > >>

Re: [PATCH 1/4] dt: lm3532: Add lm3532 dt doc and update ti_lmu doc

2019-04-03 Thread Tony Lindgren
* Dan Murphy [190321 14:29]: > Add the lm3532 device tree documentation. > Remove lm3532 device tree reference from the ti_lmu devicetree > documentation. > > With the addition of the dedicated lm3532 documentation the device > can be removed from the ti_lmu.txt. > > The reason for this is that

Re: [PATCH 3/4] mfd: ti-lmu: Remove LM3532 backlight driver references

2019-04-03 Thread Tony Lindgren
* Dan Murphy [190321 14:29]: > Remove the LM3532 backlight driver references from the ti-lmu > code as dedicated driver support is available. Acked-by: Tony Lindgren

Re: [PATCH 4/4] leds: lm3532: Introduce the lm3532 LED driver

2019-04-03 Thread Tony Lindgren
* Dan Murphy [190321 14:29]: > Introduce the Texas Instruments LM3532 White LED driver. > The driver supports ALS configurability or manual brightness > control. > > The driver also supports associating LED strings with specific > control banks in a group or as individually controlled strings. I

Re: [PATCH] kernel/sysctl.c: fix out of bounds access in fs.file-max

2019-04-03 Thread Matteo Croce
On Wed, Apr 3, 2019 at 7:41 PM Kees Cook wrote: > > On Thu, Mar 28, 2019 at 6:03 AM Matteo Croce wrote: > > > > fs.file-max sysctl uses proc_doulongvec_minmax() as proc handler, which > > accesses *extra1 and *extra2 as unsigned long, but commit 32a5ad9c2285 > > ("sysctl: handle overflow for file

Re: linux-next: build failure after merge of the ipmi tree

2019-04-03 Thread Paul E. McKenney
On Wed, Apr 03, 2019 at 04:12:12PM -0500, Corey Minyard wrote: > On Wed, Apr 03, 2019 at 03:27:29PM -0500, Corey Minyard wrote: > > On Wed, Apr 03, 2019 at 02:33:23PM +1100, Stephen Rothwell wrote: > > > Hi Corey, > > > > > > After merging the ipmi tree, today's linux-next build (x86_64 > > > allm

[PATCH v3] platform/chrome: Add Wilco EC Event Handling

2019-04-03 Thread Nick Crews
The Wilco Embedded Controller can create custom events that are not handled as standard ACPI objects. These events can contain information about changes in EC controlled features, such as errors and events in the dock or display. For example, an event is triggered if the dock is plugged into a disp

[PATCH V32 03/27] Restrict /dev/{mem,kmem,port} when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Matthew Garrett Allowing users to read and write to core kernel memory makes it possible for the kernel to be subverted, avoiding module loading restrictions, and also to steal cryptographic information. Disallow /dev/mem and /dev/kmem from being opened this when the kernel has been locked

[PATCH V32 08/27] hibernate: Disable when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Josh Boyer There is currently no way to verify the resume image when returning from hibernate. This might compromise the signed modules trust model, so until we can work with signed hibernate images we disable it when the kernel is locked down. Signed-off-by: Josh Boyer Signed-off-by: Da

[PATCH V32 06/27] kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE

2019-04-03 Thread Matthew Garrett
From: Jiri Bohac This is a preparatory patch for kexec_file_load() lockdown. A locked down kernel needs to prevent unsigned kernel images from being loaded with kexec_file_load(). Currently, the only way to force the signature verification is compiling with KEXEC_VERIFY_SIG. This prevents load

[PATCH V32 0/27] Lockdown patches for 5.2

2019-04-03 Thread Matthew Garrett
Fairly minimal changes since the last set: tracefs is restricted at Steven's suggestion (but could do with a once-over, I'm very much not a vfs person), debugfs is back to Dave's original implementation. I've also fixed up a malformed patch that resulted from me getting confused during rebase, and

[PATCH V32 11/27] x86: Lock down IO port access when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Matthew Garrett IO port access would permit users to gain access to PCI configuration registers, which in turn (on a lot of hardware) give access to MMIO register space. This would potentially permit root to trigger arbitrary DMA, so lock it down by default. This also implicitly locks down

[PATCH V32 01/27] Add the ability to lock down access to the running kernel image

2019-04-03 Thread Matthew Garrett
From: David Howells Provide a single call to allow kernel code to determine whether the system should be locked down, thereby disallowing various accesses that might allow the running kernel image to be changed including the loading of modules that aren't validly signed with a key we recognise, f

[PATCH V32 02/27] Enforce module signatures if the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: David Howells If the kernel is locked down, require that all modules have valid signatures that we can verify. I have adjusted the errors generated: (1) If there's no signature (ENODATA) or we can't check it (ENOPKG, ENOKEY), then: (a) If signatures are enforced then EKEYREJEC

[PATCH V32 13/27] ACPI: Limit access to custom_method when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Matthew Garrett custom_method effectively allows arbitrary access to system memory, making it possible for an attacker to circumvent restrictions on module loading. Disable it if the kernel is locked down. Signed-off-by: Matthew Garrett Signed-off-by: David Howells cc: linux-a...@vger.ke

[PATCH V32 12/27] x86/msr: Restrict MSR access when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Matthew Garrett Writing to MSRs should not be allowed if the kernel is locked down, since it could lead to execution of arbitrary code in kernel mode. Based on a patch by Kees Cook. Signed-off-by: Matthew Garrett Signed-off-by: David Howells Acked-by: Kees Cook Reviewed-by: Thomas Glei

[PATCH V32 18/27] Lock down module params that specify hardware parameters (eg. ioport)

2019-04-03 Thread Matthew Garrett
From: David Howells Provided an annotation for module parameters that specify hardware parameters (such as io ports, iomem addresses, irqs, dma channels, fixed dma buffers and other types). Suggested-by: Alan Cox Signed-off-by: David Howells Signed-off-by: Matthew Garrett --- kernel/params.c

[PATCH V32 16/27] Prohibit PCMCIA CIS storage when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: David Howells Prohibit replacement of the PCMCIA Card Information Structure when the kernel is locked down. Suggested-by: Dominik Brodowski Signed-off-by: David Howells Signed-off-by: Matthew Garrett --- drivers/pcmcia/cistpl.c | 4 1 file changed, 4 insertions(+) diff --git a/dr

[PATCH V32 15/27] acpi: Disable ACPI table override if the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Linn Crosetto >From the kernel documentation (initrd_table_override.txt): If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible to override nearly any ACPI table provided by the BIOS with an instrumented, modified one. When lockdown is enabled, the kernel should d

[PATCH V32 19/27] x86/mmiotrace: Lock down the testmmiotrace module

2019-04-03 Thread Matthew Garrett
From: David Howells The testmmiotrace module shouldn't be permitted when the kernel is locked down as it can be used to arbitrarily read and write MMIO space. This is a runtime check rather than buildtime in order to allow configurations where the same kernel may be run in both locked down or per

[PATCH V32 20/27] Lock down /proc/kcore

2019-04-03 Thread Matthew Garrett
From: David Howells Disallow access to /proc/kcore when the kernel is locked down to prevent access to cryptographic data. This is limited to lockdown confidentiality mode and is still permitted in integrity mode. Signed-off-by: David Howells Signed-off-by: Matthew Garrett --- fs/proc/kcore.c

[PATCH V32 26/27] debugfs: Restrict debugfs when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: David Howells Disallow opening of debugfs files that might be used to muck around when the kernel is locked down as various drivers give raw access to hardware through debugfs. Given the effort of auditing all 2000 or so files and manually fixing each one as necessary, I've chosen to apply

[PATCH V32 23/27] Lock down perf when in confidentiality mode

2019-04-03 Thread Matthew Garrett
From: David Howells Disallow the use of certain perf facilities that might allow userspace to access kernel data. Signed-off-by: David Howells Signed-off-by: Matthew Garrett Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo --- kernel/events/core.c | 6 ++ 1 file changed,

[PATCH V32 27/27] tracefs: Restrict tracefs when the kernel is locked down

2019-04-03 Thread Matthew Garrett
Tracefs may release more information about the kernel than desirable, so restrict it when the kernel is locked down in confidentiality mode by preventing open(). Signed-off-by: Matthew Garrett Cc: Steven Rostedt --- fs/tracefs/inode.c | 40 +++- 1 file change

[PATCH V32 21/27] Lock down tracing and perf kprobes when in confidentiality mode

2019-04-03 Thread Matthew Garrett
From: David Howells Disallow the creation of perf and ftrace kprobes when the kernel is locked down in confidentiality mode by preventing their registration. This prevents kprobes from being used to access kernel memory to steal crypto data, but continues to allow the use of kprobes from signed m

[PATCH V32 17/27] Lock down TIOCSSERIAL

2019-04-03 Thread Matthew Garrett
From: David Howells Lock down TIOCSSERIAL as that can be used to change the ioport and irq settings on a serial port. This only appears to be an issue for the serial drivers that use the core serial code. All other drivers seem to either ignore attempts to change port/irq or give an error. Rep

[PATCH V32 25/27] lockdown: Print current->comm in restriction messages

2019-04-03 Thread Matthew Garrett
Print the content of current->comm in messages generated by lockdown to indicate a restriction that was hit. This makes it a bit easier to find out what caused the message. The message now patterned something like: Lockdown: : is restricted; see man kernel_lockdown.7 Signed-off-by: Dav

[PATCH V32 14/27] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down

2019-04-03 Thread Matthew Garrett
From: Josh Boyer This option allows userspace to pass the RSDP address to the kernel, which makes it possible for a user to modify the workings of hardware . Reject the option when the kernel is locked down. Signed-off-by: Josh Boyer Signed-off-by: David Howells Signed-off-by: Matthew Garrett

[PATCH V32 24/27] kexec: Allow kexec_file() with appropriate IMA policy when locked down

2019-04-03 Thread Matthew Garrett
Systems in lockdown mode should block the kexec of untrusted kernels. For x86 and ARM we can ensure that a kernel is trustworthy by validating a PE signature, but this isn't possible on other architectures. On those platforms we can use IMA digital signatures instead. Add a function to determine wh

[PATCH V32 09/27] uswsusp: Disable when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Matthew Garrett uswsusp allows a user process to dump and then restore kernel state, which makes it possible to modify the running kernel. Disable this if the kernel is locked down. Signed-off-by: David Howells Signed-off-by: Matthew Garrett cc: linux...@vger.kernel.org Cc: pa...@ucw.cz

[PATCH V32 10/27] PCI: Lock down BAR access when the kernel is locked down

2019-04-03 Thread Matthew Garrett
From: Matthew Garrett Any hardware that can potentially generate DMA has to be locked down in order to avoid it being possible for an attacker to modify kernel code, allowing them to circumvent disabled module loading or module signing. Default to paranoid - in future we can potentially relax thi

[PATCH] dt-bindings: clock: sifive: add FU540-C000 PRCI clock constants

2019-04-03 Thread Paul Walmsley
Add preprocessor macros for the important PRCI output clocks that are needed by both the FU540 PRCI driver and DT data. Details are available in the FU540 manual in Chapter 7 of https://static.dev.sifive.com/FU540-C000-v1.0.pdf Signed-off-by: Paul Walmsley Cc: Wesley Terpstra Cc: Rob Herrin

Re: [PATCH AUTOSEL 5.0 209/262] regulator: mcp16502: Include linux/gpio/consumer.h to fix build error

2019-04-03 Thread Sasha Levin
On Wed, Mar 27, 2019 at 07:32:11PM +, Mark Brown wrote: On Wed, Mar 27, 2019 at 02:01:04PM -0400, Sasha Levin wrote: From: Axel Lin [ Upstream commit f3c6a1a194317f3a31ee2b2067bb0a41de64bc8b ] Fix below build error: drivers/regulator/mcp16502.c: In function ‘mcp16502_gpio_set_mode’: drive

Re: [PATCH AUTOSEL 5.0 152/262] x86/kprobes: Prohibit probing on IRQ handlers directly

2019-04-03 Thread Sasha Levin
On Thu, Mar 28, 2019 at 09:51:19AM +0900, Masami Hiramatsu wrote: Hi Sasha, Could you drop this? This prevents probing too much functions, and we will drop it from upstream. Anyway, commit a50480cb6d61 ("kprobes/x86: Blacklist non-attachable interrupt functions") fixes same issue. So please pick

Re: [PATCH 1/2] platform/x86: intel_pmc_core: Convert to a platform_driver

2019-04-03 Thread Rajat Jain
On Fri, Mar 29, 2019 at 8:53 AM Srinivas Pandruvada wrote: > > On Thu, 2019-03-28 at 22:29 -0700, Rajat Jain wrote: > > Hi Srinivas, > > > > > > [...] > > > So if everyone here thinks we should completely switch to using > > > > the > > > > ACPI HID "INT33A1" for attaching to the device, sure, we

Re: [PATCH 1/2] edac: sifive: Add DT documentation for SiFive L2 cache Controller

2019-04-03 Thread Rob Herring
On Fri, Mar 29, 2019 at 3:24 PM Borislav Petkov wrote: > > On Fri, Mar 29, 2019 at 02:41:05PM -0500, Rob Herring wrote: > > DT dictates aligning with what the h/w looks like which has little to > > do with OS driver design. > > Ok, then, where does this goal for doing a driver or compilation unit

Re: [PATCH 1/2] edac: sifive: Add DT documentation for SiFive L2 cache Controller

2019-04-03 Thread Rob Herring
On Mon, Apr 1, 2019 at 11:36 AM James Morse wrote: > > Hi Rob, > > On 29/03/2019 14:11, Rob Herring wrote: > > On Thu, Mar 28, 2019 at 1:47 PM James Morse wrote: > >> On 28/03/2019 13:16, Rob Herring wrote: > >>> On Tue, Mar 12, 2019 at 02:51:00PM +0530, Yash Shah wrote: > DT documentation f

[PATCH] staging: comedi: Fix spelling mistake

2019-04-03 Thread Hariprasad Kelam
changes interupts --> interrupts to fix warning reported by checkpatch tool Signed-off-by: Hariprasad Kelam --- drivers/staging/comedi/drivers/dt2811.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/dt2811.c b/drivers/staging/comedi/drivers/dt

Re: [PATCH 1/8] dt-bindings: stm32: add bindings for ML-AHB interconnect

2019-04-03 Thread Rob Herring
On Fri, Mar 29, 2019 at 10:59 AM Fabien DESSENNE wrote: > > Hi Rob, > > Let me clarify the context and the reason of the proposed approach. > > The remoteproc framework deals with 'carveout' memory regions. > From the remoteproc_core.c: > > * Some remote processors will ask us to allocate them

RE: [PATCH 1/2] input: keyboard: imx: no need to control interrupt status in event check

2019-04-03 Thread Anson Huang
Hi, Dmitry Best Regards! Anson Huang > -Original Message- > From: dmitry.torok...@gmail.com [mailto:dmitry.torok...@gmail.com] > Sent: 2019年4月4日 5:49 > To: Anson Huang > Cc: shawn...@kernel.org; s.ha...@pengutronix.de; > ker...@pengutronix.de; feste...@gmail.com; linux-in...@vger.kernel.

RE: [PATCH] platform/x86: dell-smbios-base: Fix use after free on failure of dell_smbios_init()

2019-04-03 Thread Mario.Limonciello
> -Original Message- > From: Darren Hart > Sent: Wednesday, April 3, 2019 3:16 PM > To: Steven Rostedt; Limonciello, Mario > Cc: LKML; platform-driver-...@vger.kernel.org; Andy Shevchenko; Pali Rohár; > Tom > Zanussi > Subject: Re: [PATCH] platform/x86: dell-smbios-base: Fix use after fre

Re: [PATCH V32 19/27] x86/mmiotrace: Lock down the testmmiotrace module

2019-04-03 Thread Steven Rostedt
On Wed, 3 Apr 2019 17:32:41 -0700 Matthew Garrett wrote: > From: David Howells > > The testmmiotrace module shouldn't be permitted when the kernel is locked > down as it can be used to arbitrarily read and write MMIO space. This is > a runtime check rather than buildtime in order to allow conf

[GIT PULL] Kselftest update for Linux 5.1-rc4

2019-04-03 Thread shuah
Hi Linus, Please pull the following Kselftest update for Linux 5.1-rc4 This Kselftest update for Linux 5.1-rc4 consists of fixes to rseq, cgroup, and efivarfs tests. diff is attached. thanks, -- Shuah The following changes sinc

[for-next][PATCH 18/19] sched/fair: do not expose some tracepoints to user if CONFIG_SCHEDSTATS is not set

2019-04-03 Thread Steven Rostedt
From: Yafang Shao The tracepoints trace_sched_stat_{iowait, blocked, wait, sleep} should be not exposed to user if CONFIG_SCHEDSTATS is not set. Link: http://lkml.kernel.org/r/1553602391-11926-3-git-send-email-laoar.s...@gmail.com Acked-by: Peter Zijlstra (Intel) Signed-off-by: Yafang Shao S

[for-next][PATCH 19/19] rcu: validate arguments for rcu tracepoints

2019-04-03 Thread Steven Rostedt
From: Yafang Shao When CONFIG_RCU_TRACE is not set, all these tracepoints are defined as do-nothing macro. We'd better make those inline functions that take proper arguments. As RCU_TRACE() is defined as do-nothing marco as well when CONFIG_RCU_TRACE is not set, so we can clean it up. Link: ht

[for-next][PATCH 06/19] tracing: Use tracing error_log with trace event filters

2019-04-03 Thread Steven Rostedt
From: Tom Zanussi Use tracing_log_err() from the new tracing error_log mechanism to send filter parse errors to tracing/error_log. With this change, users will be able to see filter errors by looking at tracing/error_log. The same errors will also be available in the filter file, as expected.

[for-next][PATCH 10/19] tracing: Have the error logs show up in the proper instances

2019-04-03 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" As each instance has their own error_log file, it makes more sense that the instances show the errors of their own instead of all error_logs having the same data. Make it that the errors show up in the instance error_log file that the error happens in. If no instan

[for-next][PATCH 04/19] tracing: Save the last hist commands associated event name

2019-04-03 Thread Steven Rostedt
From: Tom Zanussi In preparation for making use of the new trace error log, save the subsystem and event name associated with the last hist command - it will be passed as the location param in the event_log_err() calls. Link: http://lkml.kernel.org/r/eb0fd1362be8f39facb86c83eecf441b7a5876f8.155

[for-next][PATCH 03/19] tracing: Add tracing error log

2019-04-03 Thread Steven Rostedt
From: Tom Zanussi Introduce a new ftrace file, tracing/error_log, for ftrace commands to log errors. This is useful for allowing more complex commands such as hist trigger and kprobe_event commands to point out specifically where something may have gone wrong without forcing them to resort to mo

[for-next][PATCH 01/19] ring-buffer: Fix ring buffer size in rb_write_something()

2019-04-03 Thread Steven Rostedt
From: YueHaibing 'cnt' should be used to calculate ring buffer size rather than data->cnt Link: http://lkml.kernel.org/r/1537704693-184237-1-git-send-email-yuehaib...@huawei.com Signed-off-by: YueHaibing Signed-off-by: Steven Rostedt (VMware) --- kernel/trace/ring_buffer.c | 2 +- 1 file ch

[for-next][PATCH 15/19] tracing: Add tracing/error_log Documentation

2019-04-03 Thread Steven Rostedt
From: Tom Zanussi Move most of the hist trigger extended error documentation to ftrace.rst and expand on it to fully document tracing/error_log. Link: http://lkml.kernel.org/r/c5d53c8f643ef6844d6ad8d0200c116936730b01.1554072478.git.tom.zanu...@linux.intel.com Acked-by: Masami Hiramatsu Acked-

[for-next][PATCH 12/19] selftests/ftrace: Move kprobe/uprobe check_error() to test.d/functions

2019-04-03 Thread Steven Rostedt
From: Tom Zanussi The k/uprobe_sytax_errors test case defines a check_error() function used to run a command and check the position of the caret in the output. This would be useful for other ftrace facilities too, so move it to test.d/functions for use by anyone. In the process, rename it to ft

<    3   4   5   6   7   8   9   10   >