[PATCH 2/2] pinctrl: sprd: Add Spreadtrum pin control driver

2017-05-26 Thread Baolin Wang
This patch adds the pin control driver for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang --- drivers/pinctrl/Kconfig|1 + drivers/pinctrl/Makefile |1 + drivers/pinctrl/sprd/Kconfig | 17 +

[PATCH 2/2] pinctrl: sprd: Add Spreadtrum pin control driver

2017-05-26 Thread Baolin Wang
This patch adds the pin control driver for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang --- drivers/pinctrl/Kconfig|1 + drivers/pinctrl/Makefile |1 + drivers/pinctrl/sprd/Kconfig | 17 + drivers/pinctrl/sprd/Makefile

[PATCH 1/2] DT: pinctrl: Add binding documentation for Spreadtrum pin controller

2017-05-26 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC9860 pin controller device. Signed-off-by: Baolin Wang --- .../devicetree/bindings/pinctrl/sprd,pinctrl.txt | 31 .../bindings/pinctrl/sprd,sc9860-pinctrl.txt | 26

[PATCH 1/2] DT: pinctrl: Add binding documentation for Spreadtrum pin controller

2017-05-26 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC9860 pin controller device. Signed-off-by: Baolin Wang --- .../devicetree/bindings/pinctrl/sprd,pinctrl.txt | 31 .../bindings/pinctrl/sprd,sc9860-pinctrl.txt | 26 2 files changed, 57

Re: [PATCH v1 1/1] intel_telemetry_debugfs: fix oops found while load/unload module test

2017-05-26 Thread Darren Hart
On Sat, May 27, 2017 at 08:17:39AM -0700, priyalee.kushw...@intel.com wrote: > From: Priyalee Kushwaha > > This fix oops found while testing load/unload test of > intel_telemetry_debugfs module. Module_init uses register_pm_notifier > for PM callbacks, but

Re: [PATCH v1 1/1] intel_telemetry_debugfs: fix oops found while load/unload module test

2017-05-26 Thread Darren Hart
On Sat, May 27, 2017 at 08:17:39AM -0700, priyalee.kushw...@intel.com wrote: > From: Priyalee Kushwaha > > This fix oops found while testing load/unload test of > intel_telemetry_debugfs module. Module_init uses register_pm_notifier > for PM callbacks, but unregister_pm_notifier was missing from

Re: [PATCHv4] usb: typec: Add a sysfs node to manage port type

2017-05-26 Thread Greg Kroah-Hartman
On Fri, May 26, 2017 at 01:42:57PM -0700, Badhri Jagan Sridharan wrote: > User space applications in some cases have the need to enforce a > specific port type(DFP/UFP/DRP). This change allows userspace to > attempt setting the desired port type. Low level drivers can > however reject the request

Re: [PATCHv4] usb: typec: Add a sysfs node to manage port type

2017-05-26 Thread Greg Kroah-Hartman
On Fri, May 26, 2017 at 01:42:57PM -0700, Badhri Jagan Sridharan wrote: > User space applications in some cases have the need to enforce a > specific port type(DFP/UFP/DRP). This change allows userspace to > attempt setting the desired port type. Low level drivers can > however reject the request

drivers/hwmon/aspeed-pwm-tacho.c:337:21: error: variable 'aspeed_pwm_tacho_regmap_config' has initializer but incomplete type

2017-05-26 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c86daad2c25bfd4a33d48b7691afaa96d9c5ab46 commit: 2d7a548a3eff382da5cd743670693b7657327714 drivers: hwmon: Support for ASPEED PWM/Fan tach date: 7 weeks ago config: x86_64-randconfig-n0-05271314 (attached

drivers/hwmon/aspeed-pwm-tacho.c:337:21: error: variable 'aspeed_pwm_tacho_regmap_config' has initializer but incomplete type

2017-05-26 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c86daad2c25bfd4a33d48b7691afaa96d9c5ab46 commit: 2d7a548a3eff382da5cd743670693b7657327714 drivers: hwmon: Support for ASPEED PWM/Fan tach date: 7 weeks ago config: x86_64-randconfig-n0-05271314 (attached

[PATCH 16/16] platform/x86: dell-wmi: Convert to the WMI bus infrastructure

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Move some initialization out of _init and into _probe. Update signatures and logic to use the wmi bus and device structures. Signed-off-by: Andy Lutomirski [dvhart: drop deprecated sparse_keymap_free, order declarations, add commit msg]

[PATCH 16/16] platform/x86: dell-wmi: Convert to the WMI bus infrastructure

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Move some initialization out of _init and into _probe. Update signatures and logic to use the wmi bus and device structures. Signed-off-by: Andy Lutomirski [dvhart: drop deprecated sparse_keymap_free, order declarations, add commit msg] Cc: Andy Lutomirski Cc: Mario

[PATCH 15/16] platform/x86: wmi-mof: New driver to expose embedded WMI MOF metadata

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Quite a few laptops (and maybe servers?) have embedded WMI MOF metadata. I think that Samba has tools to interpret it, but there is currently no interface to get the data in the first place. In most cases, the MOF can be read out of the DSDT, but that is

[PATCH 15/16] platform/x86: wmi-mof: New driver to expose embedded WMI MOF metadata

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Quite a few laptops (and maybe servers?) have embedded WMI MOF metadata. I think that Samba has tools to interpret it, but there is currently no interface to get the data in the first place. In most cases, the MOF can be read out of the DSDT, but that is non-compliant and

[PATCH 01/16] platform/x86: wmi: Drop "Mapper (un)loaded" messages

2017-05-26 Thread Darren Hart
From: Andy Lutomirski WMI is just a driver. There is no need to announce when it is loaded. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc:

[PATCH 01/16] platform/x86: wmi: Drop "Mapper (un)loaded" messages

2017-05-26 Thread Darren Hart
From: Andy Lutomirski WMI is just a driver. There is no need to announce when it is loaded. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: Rafael Wysocki Cc: linux-kernel@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc:

[PATCH 04/16] platform/x86: wmi: Track wmi devices per ACPI device

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Currently we free all devices when we detach from any ACPI node. Instead, keep track of which node WMI devices are attached to and free them only as needed. While we are at it, match up notifications with the device they came from correctly. This will make

[PATCH 04/16] platform/x86: wmi: Track wmi devices per ACPI device

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Currently we free all devices when we detach from any ACPI node. Instead, keep track of which node WMI devices are attached to and free them only as needed. While we are at it, match up notifications with the device they came from correctly. This will make our behavior

[PATCH 05/16] platform/x86: wmi: Turn WMI into a bus driver

2017-05-26 Thread Darren Hart
From: Andy Lutomirski WMI is logically a bus: the WMI driver binds to an ACPI node (or more than one), and each instance of the WMI driver enumerates its children and hopes that drivers will attach to the children that are useful. This patch gives WMI a driver model bus type

[PATCH 05/16] platform/x86: wmi: Turn WMI into a bus driver

2017-05-26 Thread Darren Hart
From: Andy Lutomirski WMI is logically a bus: the WMI driver binds to an ACPI node (or more than one), and each instance of the WMI driver enumerates its children and hopes that drivers will attach to the children that are useful. This patch gives WMI a driver model bus type and the ability to

[PATCH 06/16] platform/x86: wmi: Fix error handling when creating devices

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We have two memory leaks. If guid_already_parsed returned true, we leak the wmi_block. If wmi_create_device failed, we leak the device. Simplify the logic and fix both of them. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski

[PATCH 06/16] platform/x86: wmi: Fix error handling when creating devices

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We have two memory leaks. If guid_already_parsed returned true, we leak the wmi_block. If wmi_create_device failed, we leak the device. Simplify the logic and fix both of them. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc:

[PATCH 09/16] platform/x86: wmi: Instantiate all devices before adding them

2017-05-26 Thread Darren Hart
From: Andy Lutomirski At some point, we will want sub-drivers to get references to other devices on the same WMI bus. This change is needed to avoid races. This ends up simplifying the setup code and fixing some leaks, too. Signed-off-by: Andy Lutomirski Cc:

[PATCH 10/16] platform/x86: wmi: Incorporate acpi_install_notify_handler

2017-05-26 Thread Darren Hart
From: Andy Lutomirski As a platform driver, acpi_driver.notify will not be available, so use acpi_install_notify_handler as we will be converting to a platform driver. This gives event drivers a simple way to handle events. It also seems closer to what the Windows docs suggest

[PATCH 09/16] platform/x86: wmi: Instantiate all devices before adding them

2017-05-26 Thread Darren Hart
From: Andy Lutomirski At some point, we will want sub-drivers to get references to other devices on the same WMI bus. This change is needed to avoid races. This ends up simplifying the setup code and fixing some leaks, too. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario

[PATCH 10/16] platform/x86: wmi: Incorporate acpi_install_notify_handler

2017-05-26 Thread Darren Hart
From: Andy Lutomirski As a platform driver, acpi_driver.notify will not be available, so use acpi_install_notify_handler as we will be converting to a platform driver. This gives event drivers a simple way to handle events. It also seems closer to what the Windows docs suggest that Windows

[PATCH 00/16] Convert WMI to a proper bus

2017-05-26 Thread Darren Hart
From: "Darren Hart (VMware)" This series is based on the original work of Andy Lutomirski [1]. I have made minor edits, and in one instance, squashed two patches in which the latter undid the former. This series converts WMI [2] into a proper bus,

[PATCH 00/16] Convert WMI to a proper bus

2017-05-26 Thread Darren Hart
From: "Darren Hart (VMware)" This series is based on the original work of Andy Lutomirski [1]. I have made minor edits, and in one instance, squashed two patches in which the latter undid the former. This series converts WMI [2] into a proper bus, adds some useful information via sysfs, and

[PATCH 08/16] platform/x86: wmi: Probe data objects for read and write capabilities

2017-05-26 Thread Darren Hart
From: Andy Lutomirski The Dell XPS 13 9350 has one RW data object, one RO data object, and one totally inaccessible data object. Check for the existence of the accessor methods and report in sysfs. The docs also permit WQxx getters for single-instance objects to take no

[PATCH 08/16] platform/x86: wmi: Probe data objects for read and write capabilities

2017-05-26 Thread Darren Hart
From: Andy Lutomirski The Dell XPS 13 9350 has one RW data object, one RO data object, and one totally inaccessible data object. Check for the existence of the accessor methods and report in sysfs. The docs also permit WQxx getters for single-instance objects to take no parameters. Probe for

[PATCH 11/16] platform/x86: wmi: Add a new interface to read block data

2017-05-26 Thread Darren Hart
From: Andy Lutomirski wmi_query_block is unnecessarily indirect. Add a straightforward method for wmi bus drivers to use to read block data. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello

[PATCH 11/16] platform/x86: wmi: Add a new interface to read block data

2017-05-26 Thread Darren Hart
From: Andy Lutomirski wmi_query_block is unnecessarily indirect. Add a straightforward method for wmi bus drivers to use to read block data. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: Rafael Wysocki Cc: linux-kernel@vger.kernel.org Cc:

[PATCH 12/16] platform/x86: wmi: Bind the platform device, not the ACPI node

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We already have the PNP glue to instantiate platform devices for the ACPI devices that WMI drives. WMI should therefore attach to the platform device, not the ACPI node. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski

[PATCH 12/16] platform/x86: wmi: Bind the platform device, not the ACPI node

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We already have the PNP glue to instantiate platform devices for the ACPI devices that WMI drives. WMI should therefore attach to the platform device, not the ACPI node. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: Rafael

[PATCH 13/16] platform/x86: wmi: Add an interface for subdrivers to access sibling devices

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Some subdrivers need to access sibling devices. This gives them a clean way to do so. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár

[PATCH 13/16] platform/x86: wmi: Add an interface for subdrivers to access sibling devices

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Some subdrivers need to access sibling devices. This gives them a clean way to do so. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: Rafael Wysocki Cc: linux-kernel@vger.kernel.org Cc: platform-driver-...@vger.kernel.org

[PATCH 14/16] platform/x86: wmi: Require query for data blocks, rename writable to setable

2017-05-26 Thread Darren Hart
From: "Darren Hart (VMware)" The Microsoft WMI documentation requires all data blocks to implement the Query Control Method (WQxx). If we encounter a data block not implementing this control method, issue a warning, and ignore the data block. Remove the "readable" attribute

[PATCH 03/16] platform/x86: wmi: Clean up acpi_wmi_add

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Rearrange acpi_wmi_add to use Linux's error handling conventions. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: Rafael

[PATCH 14/16] platform/x86: wmi: Require query for data blocks, rename writable to setable

2017-05-26 Thread Darren Hart
From: "Darren Hart (VMware)" The Microsoft WMI documentation requires all data blocks to implement the Query Control Method (WQxx). If we encounter a data block not implementing this control method, issue a warning, and ignore the data block. Remove the "readable" attribute as all data blocks

[PATCH 03/16] platform/x86: wmi: Clean up acpi_wmi_add

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Rearrange acpi_wmi_add to use Linux's error handling conventions. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: Rafael Wysocki Cc: linux-kernel@vger.kernel.org Cc: platform-driver-...@vger.kernel.org Cc:

[PATCH 07/16] platform/x86: wmi: Split devices into types and add basic sysfs attributes

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Divide the "data", "method" and "event" types. All devices get "instance_count" and "expensive" attributes, data and method devices get "object_id" attributes, and event devices get "notify_id" attributes. Signed-off-by: Andy Lutomirski

[PATCH 07/16] platform/x86: wmi: Split devices into types and add basic sysfs attributes

2017-05-26 Thread Darren Hart
From: Andy Lutomirski Divide the "data", "method" and "event" types. All devices get "instance_count" and "expensive" attributes, data and method devices get "object_id" attributes, and event devices get "notify_id" attributes. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario

[PATCH 02/16] platform/x86: wmi: Pass the acpi_device through to parse_wdg

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We will need the device to convert to a bus architecture and bind WMI to the platform device. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár

[PATCH 02/16] platform/x86: wmi: Pass the acpi_device through to parse_wdg

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We will need the device to convert to a bus architecture and bind WMI to the platform device. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: Rafael Wysocki Cc: linux-kernel@vger.kernel.org Cc:

[PATCH] platform/x86: dell-wmi: Add a comment explaining the 0xb2 magic number

2017-05-26 Thread Darren Hart
From: Andy Lutomirski The hotkey table is 0xb2, add a comment for clarity. Suggested-by: Darren Hart Signed-off-by: Andy Lutomirski Cc: Matthew Garrett Cc: "Pali Rohár" Cc: Andy Shevchenko

[PATCH] platform/x86: dell-wmi: Add a comment explaining the 0xb2 magic number

2017-05-26 Thread Darren Hart
From: Andy Lutomirski The hotkey table is 0xb2, add a comment for clarity. Suggested-by: Darren Hart Signed-off-by: Andy Lutomirski Cc: Matthew Garrett Cc: "Pali Rohár" Cc: Andy Shevchenko Signed-off-by: Darren Hart (VMware) --- drivers/platform/x86/dell-wmi.c | 1 + 1 file changed, 1

[PATCH] platform/x86: dell-rbtn: Improve explanation about DELLABC6

2017-05-26 Thread Darren Hart
From: Andy Lutomirski According to Mario at Dell, the DELLABC6 device should not be used on a Linux system. It also conflicts with Intel-HID and its interactions with Network Manager. Document that we are aware of the device, but that we are intentionally ignoring it.

[PATCH] platform/x86: dell-rbtn: Improve explanation about DELLABC6

2017-05-26 Thread Darren Hart
From: Andy Lutomirski According to Mario at Dell, the DELLABC6 device should not be used on a Linux system. It also conflicts with Intel-HID and its interactions with Network Manager. Document that we are aware of the device, but that we are intentionally ignoring it. Signed-off-by: Andy

[PATCH] platform/x86: dell-wmi: Add a better description for "stealth mode"

2017-05-26 Thread Darren Hart
From: Andy Lutomirski This is based on Mario's explanation and observation of my laptop. Suggested-by: "Pali Rohár" Signed-off-by: Andy Lutomirski Cc: Mario Limonciello Cc: Matthew Garrett

[PATCH] platform/x86: dell-wmi: Add a better description for "stealth mode"

2017-05-26 Thread Darren Hart
From: Andy Lutomirski This is based on Mario's explanation and observation of my laptop. Suggested-by: "Pali Rohár" Signed-off-by: Andy Lutomirski Cc: Mario Limonciello Cc: Matthew Garrett Cc: Andy Shevchenko Signed-off-by: Darren Hart (VMware) --- drivers/platform/x86/dell-wmi.c | 7

[PATCH] staging/lustre/lov: remove set_fs() call from lov_getstripe()

2017-05-26 Thread Oleg Drokin
lov_getstripe() calls set_fs(KERNEL_DS) so that it can handle a struct lov_user_md pointer from user- or kernel-space. This changes the behavior of copy_from_user() on SPARC and may result in a misaligned access exception which in turn oopses the kernel. In fact the relevant argument to

[PATCH] staging/lustre/lov: remove set_fs() call from lov_getstripe()

2017-05-26 Thread Oleg Drokin
lov_getstripe() calls set_fs(KERNEL_DS) so that it can handle a struct lov_user_md pointer from user- or kernel-space. This changes the behavior of copy_from_user() on SPARC and may result in a misaligned access exception which in turn oopses the kernel. In fact the relevant argument to

Re: [PATCH] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread jeffy
Hi Thomas, On 05/26/2017 09:20 PM, Thomas Gleixner wrote: On Fri, 26 May 2017, Jeffy Chen wrote: If irq is already disabled and masked, we would hit a unbalanced irq shutdown/disable/mask when freeing it. Errr? What exactly is unbalanced? None of the called functions has any counter or

[PATCH v2] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread Jeffy Chen
If a irq is already disabled & masked, free_irq may cause a unbalanced irq shutdown/disable/mask, for example: devm_request_irq->irq_startup->irq_enable disable_irq <-- disabled and masked devm_free_irq->irq_shutdown <-- try to disable it

Re: [PATCH] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread jeffy
Hi Thomas, On 05/26/2017 09:20 PM, Thomas Gleixner wrote: On Fri, 26 May 2017, Jeffy Chen wrote: If irq is already disabled and masked, we would hit a unbalanced irq shutdown/disable/mask when freeing it. Errr? What exactly is unbalanced? None of the called functions has any counter or

[PATCH v2] genirq: Check irq disabled & masked states in irq_shutdown

2017-05-26 Thread Jeffy Chen
If a irq is already disabled & masked, free_irq may cause a unbalanced irq shutdown/disable/mask, for example: devm_request_irq->irq_startup->irq_enable disable_irq <-- disabled and masked devm_free_irq->irq_shutdown <-- try to disable it

[PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings

2017-05-26 Thread Julia Lawall
Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Andrew Lunn Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- It's a minor issue, but since there is no

[PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings

2017-05-26 Thread Julia Lawall
Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Andrew Lunn Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- It's a minor issue, but since there is no error, the code is a bit misleading. tree:

Re: [PATCH 5/5] Add a sysrq option to exit secure boot mode

2017-05-26 Thread joeyli
Hi, On Wed, May 24, 2017 at 03:46:03PM +0100, David Howells wrote: > From: Kyle McMartin > > Make sysrq+x exit secure boot mode on x86_64, thereby allowing the running > kernel image to be modified. This lifts the lockdown. > > Signed-off-by: Kyle McMartin >

Re: [PATCH 5/5] Add a sysrq option to exit secure boot mode

2017-05-26 Thread joeyli
Hi, On Wed, May 24, 2017 at 03:46:03PM +0100, David Howells wrote: > From: Kyle McMartin > > Make sysrq+x exit secure boot mode on x86_64, thereby allowing the running > kernel image to be modified. This lifts the lockdown. > > Signed-off-by: Kyle McMartin > Signed-off-by: David Howells >

Re: [RFC][PATCH] time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD

2017-05-26 Thread John Stultz
On Thu, May 25, 2017 at 5:03 AM, Paul Mackerras wrote: > On Mon, May 22, 2017 at 12:06:04PM -0700, John Stultz wrote: >> >> Basically long ago, timekeeping was handled (roughly) like: >> >> clock_gettime(): >> now = tk->clock->read() >> offset_ns = ((now -

Re: [RFC][PATCH] time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD

2017-05-26 Thread John Stultz
On Thu, May 25, 2017 at 5:03 AM, Paul Mackerras wrote: > On Mon, May 22, 2017 at 12:06:04PM -0700, John Stultz wrote: >> >> Basically long ago, timekeeping was handled (roughly) like: >> >> clock_gettime(): >> now = tk->clock->read() >> offset_ns = ((now - tk->cycle_last) *

Re: [PATCH v3 1/1] partitions/msdos: FreeBSD UFS2 file systems are not recognized

2017-05-26 Thread Joe Perches
On Fri, 2017-05-26 at 20:20 -0700, Richard Narron wrote: > Under the /block/partitions directory the c programs have about 13 uses > of memcmp() and 6 uses of strcmp(). Nearly all of the memcmp uses with strings kernel wide use the equivalent of memcmp(foo, "bar", strlen("bar"));

Re: [PATCH v3 1/1] partitions/msdos: FreeBSD UFS2 file systems are not recognized

2017-05-26 Thread Joe Perches
On Fri, 2017-05-26 at 20:20 -0700, Richard Narron wrote: > Under the /block/partitions directory the c programs have about 13 uses > of memcmp() and 6 uses of strcmp(). Nearly all of the memcmp uses with strings kernel wide use the equivalent of memcmp(foo, "bar", strlen("bar"));

Re: [PATCH v7 04/26] x86/mpx: Do not use SIB.index if its value is 100b and ModRM.mod is not 11b

2017-05-26 Thread Ricardo Neri
On Wed, 2017-05-24 at 15:37 +0200, Borislav Petkov wrote: > On Fri, May 05, 2017 at 11:17:02AM -0700, Ricardo Neri wrote: > > Section 2.2.1.2 of the Intel 64 and IA-32 Architectures Software > > Developer's Manual volume 2A states that when ModRM.mod !=11b and > > ModRM.rm = 100b indexed

Re: [PATCH v7 04/26] x86/mpx: Do not use SIB.index if its value is 100b and ModRM.mod is not 11b

2017-05-26 Thread Ricardo Neri
On Wed, 2017-05-24 at 15:37 +0200, Borislav Petkov wrote: > On Fri, May 05, 2017 at 11:17:02AM -0700, Ricardo Neri wrote: > > Section 2.2.1.2 of the Intel 64 and IA-32 Architectures Software > > Developer's Manual volume 2A states that when ModRM.mod !=11b and > > ModRM.rm = 100b indexed

Re: [PATCH v7 00/26] x86: Enable User-Mode Instruction Prevention

2017-05-26 Thread Neri, Ricardo
Hi again Ingo, Thomas, On Wed, 2017-05-17 at 11:42 -0700, Ricardo Neri wrote: > Hi Ingo, Thomas, > > On Fri, 2017-05-05 at 11:16 -0700, Ricardo Neri wrote: > > This is v7 of this series. The six previous submissions can be found > > here [1], here [2], here[3], here[4], here[5] and here[6]. This

Re: [PATCH v7 00/26] x86: Enable User-Mode Instruction Prevention

2017-05-26 Thread Neri, Ricardo
Hi again Ingo, Thomas, On Wed, 2017-05-17 at 11:42 -0700, Ricardo Neri wrote: > Hi Ingo, Thomas, > > On Fri, 2017-05-05 at 11:16 -0700, Ricardo Neri wrote: > > This is v7 of this series. The six previous submissions can be found > > here [1], here [2], here[3], here[4], here[5] and here[6]. This

Re: [RFC 2/3] of: reserved_mem: Accessor for acquiring reserved_mem

2017-05-26 Thread Andy Gross
On Sat, Apr 22, 2017 at 10:35:18AM -0700, Bjorn Andersson wrote: > In some cases drivers referencing a reserved-memory region might want to > remap the entire region, but when defining the reserved-memory by "size" > the client driver has no means to know the associated base address of > the

Re: [PATCH v7 02/26] x86/mm: Relocate page fault error codes to traps.h

2017-05-26 Thread Ricardo Neri
On Sun, 2017-05-21 at 16:23 +0200, Borislav Petkov wrote: > On Fri, May 05, 2017 at 11:17:00AM -0700, Ricardo Neri wrote: > > Up to this point, only fault.c used the definitions of the page fault error > > codes. Thus, it made sense to keep them within such file. Other portions of > > code might

Re: [RFC 2/3] of: reserved_mem: Accessor for acquiring reserved_mem

2017-05-26 Thread Andy Gross
On Sat, Apr 22, 2017 at 10:35:18AM -0700, Bjorn Andersson wrote: > In some cases drivers referencing a reserved-memory region might want to > remap the entire region, but when defining the reserved-memory by "size" > the client driver has no means to know the associated base address of > the

Re: [PATCH v7 02/26] x86/mm: Relocate page fault error codes to traps.h

2017-05-26 Thread Ricardo Neri
On Sun, 2017-05-21 at 16:23 +0200, Borislav Petkov wrote: > On Fri, May 05, 2017 at 11:17:00AM -0700, Ricardo Neri wrote: > > Up to this point, only fault.c used the definitions of the page fault error > > codes. Thus, it made sense to keep them within such file. Other portions of > > code might

[RFC][PATCH 3/4] arm64: vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW

2017-05-26 Thread John Stultz
From: Will Deacon Commit 45a7905fc48f ("arm64: vdso: defer shifting of nanosecond component of timespec") fixed sub-ns inaccuracies in our vDSO clock_gettime implementation by deferring the right-shift of the nanoseconds components until after the timespec addition, which

[RFC][PATCH 3/4] arm64: vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW

2017-05-26 Thread John Stultz
From: Will Deacon Commit 45a7905fc48f ("arm64: vdso: defer shifting of nanosecond component of timespec") fixed sub-ns inaccuracies in our vDSO clock_gettime implementation by deferring the right-shift of the nanoseconds components until after the timespec addition, which operates on

[RFC][PATCH 2/4] time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting

2017-05-26 Thread John Stultz
Due to how the MONOTONIC_RAW accumulation logic was handled, there is the potential for a 1ns discontinuity when we do accumulations. This small discontinuity has for the most part gone un-noticed, but since ARM64 enabled CLOCK_MONOTONIC_RAW in their vDSO clock_gettime implementation, we've seen

[RFC][PATCH 0/4] Fixes for two recently found timekeeping bugs

2017-05-26 Thread John Stultz
As part of the Linaro Linux Kernel Functional Test (LKFT) effort, test failures from kselftest/timer's inconsistency-check were reported connected to CLOCK_MONOTONIC_RAW, on the HiKey platform. Digging in I found that an old issue with how sub-ns accounting is handled with the RAW time which was

[RFC][PATCH 1/4] time: Fix clock->read(clock) race around clocksource changes

2017-05-26 Thread John Stultz
In some testing on arm64 platforms, I was seeing null ptr crashes in the kselftest/timers clocksource-switch test. This was happening in a read function like: u64 clocksource_mmio_readl_down(struct clocksource *c) { return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask; } Where the

[RFC][PATCH 2/4] time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting

2017-05-26 Thread John Stultz
Due to how the MONOTONIC_RAW accumulation logic was handled, there is the potential for a 1ns discontinuity when we do accumulations. This small discontinuity has for the most part gone un-noticed, but since ARM64 enabled CLOCK_MONOTONIC_RAW in their vDSO clock_gettime implementation, we've seen

[RFC][PATCH 0/4] Fixes for two recently found timekeeping bugs

2017-05-26 Thread John Stultz
As part of the Linaro Linux Kernel Functional Test (LKFT) effort, test failures from kselftest/timer's inconsistency-check were reported connected to CLOCK_MONOTONIC_RAW, on the HiKey platform. Digging in I found that an old issue with how sub-ns accounting is handled with the RAW time which was

[RFC][PATCH 1/4] time: Fix clock->read(clock) race around clocksource changes

2017-05-26 Thread John Stultz
In some testing on arm64 platforms, I was seeing null ptr crashes in the kselftest/timers clocksource-switch test. This was happening in a read function like: u64 clocksource_mmio_readl_down(struct clocksource *c) { return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask; } Where the

[RFC][PATCH 4/4] time: Clean up CLOCK_MONOTONIC_RAW time handling

2017-05-26 Thread John Stultz
Now that we fixed the sub-ns handling for CLOCK_MONOTONIC_RAW, remove the duplicitive tk->raw_time.tv_nsec, which can be stored in tk->tkr_raw.xtime_nsec (similarly to how its handled for monotonic time). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav

[RFC][PATCH 4/4] time: Clean up CLOCK_MONOTONIC_RAW time handling

2017-05-26 Thread John Stultz
Now that we fixed the sub-ns handling for CLOCK_MONOTONIC_RAW, remove the duplicitive tk->raw_time.tv_nsec, which can be stored in tk->tkr_raw.xtime_nsec (similarly to how its handled for monotonic time). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit

[PATCH] usb: dwc2: resume root hub to handle disconnect of device

2017-05-26 Thread William Wu
When handle disconnect of the hcd during bus_suspend, hcd needs to resume its root hub, otherwise the root hub will not disconnect the existing devices under its port. This issue always happens when connecting with usb devices which support auto-suspend function (e.g. usb hub). Signed-off-by:

Re: [PATCH v3 1/1] partitions/msdos: FreeBSD UFS2 file systems are not recognized

2017-05-26 Thread Richard Narron
On Fri, 26 May 2017, Joe Perches wrote: (please keep replies on the list) On Fri, 2017-05-26 at 18:33 -0700, Richard Narron wrote: On Fri, 26 May 2017, Joe Perches wrote: On Fri, 2017-05-26 at 16:30 -0700, Richard Narron wrote: On Fri, 26 May 2017, Joe Perches wrote: On Fri, 2017-05-26 at

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-26 Thread Mike Christie
Thanks for the patch. On 05/26/2017 12:32 AM, Nicholas A. Bellinger wrote: > > - state = iscsi_target_sk_state_check(sk); > - write_unlock_bh(>sk_callback_lock); > - > - pr_debug("iscsi_target_sk_state_change: state: %d\n", state); > + orig_state_change(sk); > > -

[PATCH] usb: dwc2: resume root hub to handle disconnect of device

2017-05-26 Thread William Wu
When handle disconnect of the hcd during bus_suspend, hcd needs to resume its root hub, otherwise the root hub will not disconnect the existing devices under its port. This issue always happens when connecting with usb devices which support auto-suspend function (e.g. usb hub). Signed-off-by:

Re: [PATCH v3 1/1] partitions/msdos: FreeBSD UFS2 file systems are not recognized

2017-05-26 Thread Richard Narron
On Fri, 26 May 2017, Joe Perches wrote: (please keep replies on the list) On Fri, 2017-05-26 at 18:33 -0700, Richard Narron wrote: On Fri, 26 May 2017, Joe Perches wrote: On Fri, 2017-05-26 at 16:30 -0700, Richard Narron wrote: On Fri, 26 May 2017, Joe Perches wrote: On Fri, 2017-05-26 at

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-26 Thread Mike Christie
Thanks for the patch. On 05/26/2017 12:32 AM, Nicholas A. Bellinger wrote: > > - state = iscsi_target_sk_state_check(sk); > - write_unlock_bh(>sk_callback_lock); > - > - pr_debug("iscsi_target_sk_state_change: state: %d\n", state); > + orig_state_change(sk); > > -

Re: [PATCH 2/6] mfd: hi6421-pmic: move hi6421_regmap_config definition to header file

2017-05-26 Thread Guodong Xu
On Fri, May 26, 2017 at 4:33 PM, Arnd Bergmann wrote: > On Fri, May 26, 2017 at 8:35 AM, Guodong Xu wrote: >> Move hi6421_regmap_config definition from c code to common header: >> - include/linux/mfd/hi6421-pmic.h >> >> This is to improve code re-use for

Re: [PATCH 2/6] mfd: hi6421-pmic: move hi6421_regmap_config definition to header file

2017-05-26 Thread Guodong Xu
On Fri, May 26, 2017 at 4:33 PM, Arnd Bergmann wrote: > On Fri, May 26, 2017 at 8:35 AM, Guodong Xu wrote: >> Move hi6421_regmap_config definition from c code to common header: >> - include/linux/mfd/hi6421-pmic.h >> >> This is to improve code re-use for upcoming hi6421 series of MFD driver. >>

[PATCH 1/5] ftrace: Fix memory leak in ftrace_graph_release()

2017-05-26 Thread Steven Rostedt
From: Luis Henriques ftrace_hash is being kfree'ed in ftrace_graph_release(), however the ->buckets field is not. This results in a memory leak that is easily captured by kmemleak: unreferenced object 0x880038afe000 (size 8192): comm "trace-cmd", pid 238, jiffies

[PATCH 1/5] ftrace: Fix memory leak in ftrace_graph_release()

2017-05-26 Thread Steven Rostedt
From: Luis Henriques ftrace_hash is being kfree'ed in ftrace_graph_release(), however the ->buckets field is not. This results in a memory leak that is easily captured by kmemleak: unreferenced object 0x880038afe000 (size 8192): comm "trace-cmd", pid 238, jiffies 4294916898 (age 9.736s)

[PATCH 4/5] x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range()

2017-05-26 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" With function tracing starting in early bootup and having its trampoline pages being read only, a bug triggered with the following: kernel BUG at arch/x86/mm/pageattr.c:189! invalid opcode: [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm:

[PATCH 4/5] x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range()

2017-05-26 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" With function tracing starting in early bootup and having its trampoline pages being read only, a bug triggered with the following: kernel BUG at arch/x86/mm/pageattr.c:189! invalid opcode: [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted

[PATCH 0/5] [GIT PULL] ftrace/kprobes/x86: Memory Fix Edition

2017-05-26 Thread Steven Rostedt
Linus, There's been a few memory issues found with ftrace. One was simply a memory leak where not all was being freed that should have been in releasing a file pointer on set_graph_function. Then Thomas found that the ftrace trampolines were marked for read/write as well as execute. To shrink

[PATCH 0/5] [GIT PULL] ftrace/kprobes/x86: Memory Fix Edition

2017-05-26 Thread Steven Rostedt
Linus, There's been a few memory issues found with ftrace. One was simply a memory leak where not all was being freed that should have been in releasing a file pointer on set_graph_function. Then Thomas found that the ftrace trampolines were marked for read/write as well as execute. To shrink

[PATCH 3/5] selftests/ftrace: Add a testcase for many kprobe events

2017-05-26 Thread Steven Rostedt
From: Masami Hiramatsu Add a testcase to test kprobes via ftrace interface with many concurrent kprobe events. This tries to add many kprobe events (up to 256) on kernel functions. To avoid making ftrace-based kprobes (kprobes on fentry), it skips first N bytes (on x86 N=5,

[PATCH 3/5] selftests/ftrace: Add a testcase for many kprobe events

2017-05-26 Thread Steven Rostedt
From: Masami Hiramatsu Add a testcase to test kprobes via ftrace interface with many concurrent kprobe events. This tries to add many kprobe events (up to 256) on kernel functions. To avoid making ftrace-based kprobes (kprobes on fentry), it skips first N bytes (on x86 N=5, on ppc or arm N=4)

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

2017-05-26 Thread Steven Rostedt
From: Thomas Gleixner ftrace use module_alloc() to allocate trampoline pages. The mapping of module_alloc() is RWX, which makes sense as the memory is written to right after allocation. But nothing makes these pages RO after writing to them. Add proper set_memory_rw/ro()

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

2017-05-26 Thread Steven Rostedt
From: Thomas Gleixner ftrace use module_alloc() to allocate trampoline pages. The mapping of module_alloc() is RWX, which makes sense as the memory is written to right after allocation. But nothing makes these pages RO after writing to them. Add proper set_memory_rw/ro() calls to protect the

  1   2   3   4   5   6   7   8   9   10   >