[PATCH V9 11/15] mmc: core: Export mmc_start_request()

2017-09-22 Thread Adrian Hunter
Export mmc_start_request() so that the block driver can use it. Signed-off-by: Adrian Hunter --- drivers/mmc/core/core.c | 3 ++- drivers/mmc/core/core.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 10d7101164e4..ea

[PATCH V9 08/15] mmc: block: Factor out mmc_setup_queue()

2017-09-22 Thread Adrian Hunter
Factor out some common code that will also be used with blk-mq. Signed-off-by: Adrian Hunter --- drivers/mmc/core/queue.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index f74f9e

[PATCH V9 06/15] mmc: block: Use local variables in mmc_blk_data_prep()

2017-09-22 Thread Adrian Hunter
Use local variables in mmc_blk_data_prep() in preparation for adding CQE support which doesn't use the output variables. Signed-off-by: Adrian Hunter --- drivers/mmc/core/block.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/core/

[PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-09-22 Thread Adrian Hunter
Add CQE support to the block driver, including: - optionally using DCMD for flush requests - "manually" issuing discard requests - issuing read / write requests to the CQE - supporting block-layer timeouts - handling recovery - supporting re-tuning CQE offers 25% - 50% bett

[PATCH V9 14/15] mmc: cqhci: support for command queue enabled host

2017-09-22 Thread Adrian Hunter
From: Venkat Gopalakrishnan This patch adds CMDQ support for command-queue compatible hosts. Command queue is added in eMMC-5.1 specification. This enables the controller to process upto 32 requests at a time. Adrian Hunter contributed renaming to cqhci, recovery, suspend and resume, cqhci_off,

[PATCH V9 12/15] mmc: core: Export mmc_retune_hold_now() and mmc_retune_release()

2017-09-22 Thread Adrian Hunter
Export mmc_retune_hold_now() and mmc_retune_release() so they can be used by the block driver. Signed-off-by: Adrian Hunter --- drivers/mmc/core/host.c | 7 +-- drivers/mmc/core/host.h | 7 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/core/host.c b/drive

[PATCH V9 15/15] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-09-22 Thread Adrian Hunter
Add CQHCI initialization and implement CQHCI operations for Intel GLK. Signed-off-by: Adrian Hunter --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-pci-core.c | 155 +- 2 files changed, 155 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH V9 09/15] mmc: core: Add parameter use_blk_mq

2017-09-22 Thread Adrian Hunter
Until mmc has blk-mq support fully implemented and tested, add a parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT is selected. Signed-off-by: Adrian Hunter --- drivers/mmc/Kconfig | 11 +++ drivers/mmc/core/core.c | 7 +++ drivers/mmc/core/core.h |

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-22 Thread Martijn Coenen
On Fri, Sep 22, 2017 at 11:12 AM, Arnd Bergmann wrote: > How would waiting help? Once P drops support for v7, all P userspaces (including containerized ones) need to be v8. After a while, the number of non-Android userspaces < P with v7 would become practically zero. But it's really hard to draw

[PATCH V9 10/15] mmc: core: Export mmc_start_bkops()

2017-09-22 Thread Adrian Hunter
Export mmc_start_bkops() so that the block driver can use it. Signed-off-by: Adrian Hunter --- drivers/mmc/core/mmc_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index a6b0a232f24a..908e4db03535 100644 --- a/drivers/mmc/core/mmc

Re: [PATCH 1/2] pinctrl: Allow a device to indicate when to force a state

2017-09-22 Thread Charles Keepax
On Wed, Sep 20, 2017 at 06:04:20PM -0700, Florian Fainelli wrote: > It may happen that a device needs to force applying a state, e.g: > because it only defines one state of pin states (default) but loses > power/register contents when entering low power modes. Add a > pinctrl_dev::flags bitmask to

Re: Contribution to Linux Kernel.

2017-09-22 Thread Javier Romero
Hello Kamil, Thanks for your suggestions. I'll check those links to learn how can I start contributing. Best Regards, Javier Romero El 22/09/17 a las 07:02, Kamil Konieczny escribió: On 21.09.2017 23:16, Javier Romero wrote: My name is Javier, live in Argentina, and work as a Linux Serve

Re: [PATCH v8 0/5] Synopsys Designware HDMI Video Capture Controller + PHY

2017-09-22 Thread Hans Verkuil
Hi Jose, I'm going to mark this patch series as 'Changes Requested' since it depends on Sakari's subnotifier work. Once that is accepted I assume you'll make a v9 on top and then this can hopefully be merged. Regards, Hans On 10/07/17 17:46, Jose Abreu wrote: > The Synopsys Designware

Re: [PATCH net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-22 Thread Jiri Pirko
Thu, Sep 21, 2017 at 01:21:53PM CEST, linyunsh...@huawei.com wrote: >When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc >is used to tell hclge_dcb module to do the setup. >When using lldptool to configure DCB parameter, hclge_dcb module >call the client_ops->setup_tc to tell network

usb/sounds: slab-out-of-bounds read in snd_usb_create_streams

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). It seems that there's no check that control_header has enough space for uac1_ac_header_descriptor in snd_usb_create_streams().

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-22 Thread Peter Zijlstra
On Fri, Sep 22, 2017 at 09:33:05AM -0300, Marcelo Tosatti wrote: > > That is, running a RT guest and not having _all_ VCPUs being RT tasks on > > the host is absolutely and completely insane and broken. > > Can you explain why, please? You just explained it yourself. If the thread that needs to c

usb/media/dib0700: BUG in stk7070p_frontend_attach/symbol_put_addr

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). dib0700: stk7070p_frontend_attach: state->dib7000p_ops.i2c_enumeration failed. Cannot continue [ cut here ] kernel BUG at kernel/module

usb/media/zr364xx: GPF in zr364xx_vidioc_querycap/strlcpy

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). usb 1-1: new full-speed USB device number 2 using dummy_hcd gadgetfs: connected gadgetfs: disconnected gadgetfs: connected usb 1-1: config 225 has an invalid in

usb/media/stkwebcam: use-after-free in v4l2_ctrl_handler_free

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). == BUG: KASAN: use-after-free in v4l2_ctrl_handler_free+0x9e1/0x9f0 Read of size 8 at addr 8

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-22 Thread Peter Zijlstra
On Fri, Sep 22, 2017 at 09:36:39AM -0300, Marcelo Tosatti wrote: > On Fri, Sep 22, 2017 at 02:31:07PM +0200, Peter Zijlstra wrote: > > On Fri, Sep 22, 2017 at 09:16:40AM -0300, Marcelo Tosatti wrote: > > > On Fri, Sep 22, 2017 at 12:00:05PM +0200, Peter Zijlstra wrote: > > > > On Thu, Sep 21, 2017

Re: [PATCH] cgroup: cpuset: fix panic when offline a cpu

2017-09-22 Thread Waiman Long
On 09/22/2017 07:00 AM, shuw...@redhat.com wrote: > From: Shu Wang > > cgroup_migrate assumes mgctx tset.csets is pointing to > tset.src_csets at start, add tasks to tset.src_csets in > func cgroup_migrate_add_task, change test.csets to > tset.dst_csets in cgroup_migrate_execute. > > For offline a

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall\

2017-09-22 Thread Peter Zijlstra
On Fri, Sep 22, 2017 at 09:40:05AM -0300, Marcelo Tosatti wrote: > Are you arguing its invalid for the following application to execute on > housekeeping vcpu of a realtime system: > > void main(void) > { > > submit_IO(); > do { >computation(); > } while (!interrupted()); >

Re: [PATCH 2/2] pinctrl: single: Allow indicating loss of pin states during low-power

2017-09-22 Thread Linus Walleij
On Thu, Sep 21, 2017 at 3:04 AM, Florian Fainelli wrote: > Some platforms (e.g: Broadcom STB: BMIPS_GENERIC/ARCH_BRCMSTB) will lose > their register contents when entering their lower power state. In such a > case, the pinctrl-single driver that is used will not be able to restore > the power sta

[PATCH] [media] hdpvr: Fix an error handling path in hdpvr_probe()

2017-09-22 Thread Arvind Yadav
Here, hdpvr_register_videodev() is responsible for setup and register a video device. Also defining and initializing a worker. hdpvr_register_videodev() is calling by hdpvr_probe at last. So No need to flash any work here. Unregister v4l2, free buffers and memory. If hdpvr_probe() will fail. Signe

Re: usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-22 Thread Arvind Yadav
Hi Andrey, On Friday 22 September 2017 05:16 PM, Andrey Konovalov wrote: On Fri, Sep 22, 2017 at 9:41 AM, Arvind Yadav wrote: Hi, I have a doubt. Why we are calling flush_work in hdpvr_probe for every failure. We are flushing work which is not defined yet. Here, hdpvr_register_videodev() is

Re: [PATCH 2/7] fs: kill 'nr_pages' argument from wakeup_flusher_threads()

2017-09-22 Thread Jan Kara
On Wed 20-09-17 09:32:57, Jens Axboe wrote: > Everybody is passing in 0 now, let's get rid of the argument. > > Signed-off-by: Jens Axboe Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/buffer.c

Re: [PATCH 4/7] page-writeback: pass in '0' for nr_pages writeback in laptop mode

2017-09-22 Thread Jan Kara
On Wed 20-09-17 09:32:59, Jens Axboe wrote: > Laptop mode really wants to writeback the number of dirty > pages and inodes. Instead of calculating this in the caller, > just pass in 0 and let wakeup_flusher_threads() handle it. > > Use the new wakeup_flusher_threads_bdi() instead of rolling > our

Re: [PATCH] [media] hdpvr: Fix an error handling path in hdpvr_probe()

2017-09-22 Thread Andrey Konovalov
On Fri, Sep 22, 2017 at 3:07 PM, Arvind Yadav wrote: > Here, hdpvr_register_videodev() is responsible for setup and > register a video device. Also defining and initializing a worker. > hdpvr_register_videodev() is calling by hdpvr_probe at last. > So No need to flash any work here. > Unregister v

Re: [PATCH 6/7] fs-writeback: move nr_pages == 0 logic to one location

2017-09-22 Thread Jan Kara
On Wed 20-09-17 09:33:01, Jens Axboe wrote: > Now that we have no external callers of wb_start_writeback(), we > can shuffle the passing in of 'nr_pages'. Everybody passes in 0 > at this point, so just kill the argument and move the dirty > count retrieval to that function. > > Acked-by: Johannes

Re: usb/media/hdpvr: trying to register non-static key in hdpvr_probe

2017-09-22 Thread Andrey Konovalov
On Fri, Sep 22, 2017 at 3:09 PM, Arvind Yadav wrote: > Hi Andrey, > > > On Friday 22 September 2017 05:16 PM, Andrey Konovalov wrote: >> >> On Fri, Sep 22, 2017 at 9:41 AM, Arvind Yadav >> wrote: >>> >>> Hi, >>> >>> I have a doubt. Why we are calling flush_work in hdpvr_probe for every >>> failur

Re: usb/sounds: slab-out-of-bounds read in snd_usb_create_streams

2017-09-22 Thread Takashi Iwai
On Fri, 22 Sep 2017 14:56:06 +0200, Andrey Konovalov wrote: > > Hi! > > I've got the following report while fuzzing the kernel with syzkaller. > > On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). > > It seems that there's no check that control_header has enough space > for uac1_ac_h

Re: [PATCH 1/2] pinctrl: Allow a device to indicate when to force a state

2017-09-22 Thread Charles Keepax
On Fri, Sep 22, 2017 at 01:55:22PM +0200, Linus Walleij wrote: > On Thu, Sep 21, 2017 at 3:04 AM, Florian Fainelli > wrote: > > > It may happen that a device needs to force applying a state, e.g: > > because it only defines one state of pin states (default) but loses > > power/register contents

[PATCH v3 3/5] fw_cfg: do DMA read operation

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Modify fw_cfg_read_blob() to use DMA if the device supports it. Return errors, because the operation may fail. This is a proof-of-concept patch with some FIXME. It uses yield() to wait for the memory to be cleared. Help on how to improve this is welcome. We may also want

[PATCH v3 0/5] fw_cfg: add DMA operations & etc/vmcoreinfo support

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series brings DMA operations support to the fw_cfg kernel module and provide "etc/vmcoreinfo" support. At the current iteration of "[Qemu-devel] [PATCH v6 0/7] KASLR kernel dump support" patch series, a "etc/vmcoreinfo" entry is added with qemu -device vmcoreinf

[PATCH v3 1/5] fw_cfg: fix the command line module name

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- drivers/firmware/qemu_fw_cfg.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c index 0e2011636fbb..5cfe39f7a45f 100644 --- a/drivers/firmware/

[PATCH v3 4/5] fw_cfg: write vmcoreinfo details

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau If the "etc/vmcoreinfo" file is present, write the addr/size of the vmcoreinfo ELF note. Signed-off-by: Marc-André Lureau --- drivers/firmware/qemu_fw_cfg.c | 80 +- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/dr

[PATCH v3 5/5] RFC: fw_cfg: add DMA write operation in sysfs

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Since qemu 2.9, DMA write operations are allowed. However, usage of this interface from kernel or user-space is strongly discouraged by the maintainers. This patch is meant for experimentations for now. Signed-off-by: Marc-André Lureau --- drivers/firmware/qemu_fw_cfg.c

[PATCH v3 2/5] fw_cfg: add DMA register

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Add an optional kernel module (or command line) parameter using the following syntax: [qemu_fw_cfg.]ioport=@[::[:]] or [qemu_fw_cfg.]mmio=@[::[:]] and initializes the register address using given or default offset. Signed-off-by: Marc-André Lureau --- dr

Re: [PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops

2017-09-22 Thread Linus Walleij
On Thu, Sep 14, 2017 at 4:37 AM, Masahiro Yamada wrote: > This driver implements .alloc() hook, so .map() is not used. > > Signed-off-by: Masahiro Yamada Patch applied with David's Tested-by. Yours, Linus Walleij

[GIT PULL] Ceph fixes for 4.14-rc2

2017-09-22 Thread Ilya Dryomov
Hi Linus, The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e: Linux 4.14-rc1 (2017-09-16 15:47:51 -0700) are available in the git repository at: https://github.com/ceph/ceph-client.git tags/ceph-for-4.14-rc2 for you to fetch changes up to 717e6f2893eb35ce6728c3cacd

Re: [PATCH V8 08/14] mmc: core: Add parameter use_blk_mq

2017-09-22 Thread Adrian Hunter
On 21/09/17 12:47, Ulf Hansson wrote: > On 13 September 2017 at 13:40, Adrian Hunter wrote: >> Until mmc has blk-mq support fully implemented and tested, add a >> parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT >> is selected. >> >> Signed-off-by: Adrian Hunter >> --- >

Re: [PATCH] pinctrl: intel: Mask interrupts on driver probe

2017-09-22 Thread Linus Walleij
On Fri, Sep 22, 2017 at 7:47 AM, Mika Westerberg wrote: > On Thu, Sep 21, 2017 at 02:20:03PM -0500, Kyle Roeschley wrote: >> Powering off the system on Apollo Lake does not clear the interrupt >> enable registers for the GPIOs. To avoid an interrupt storm on driver >> probe, clear all interrupt en

[PATCH][V2] e1000: avoid null pointer dereference on invalid stat type

2017-09-22 Thread Colin King
From: Colin Ian King Currently if the stat type is invalid then data[i] is being set either by dereferencing a null pointer p, or it is reading from an incorrect previous location if we had a valid stat type previously. Fix this by nullify pointer p if a stat type is invalid and only setting dat

Re: [PATCH V6 1/3] dma-mapping: Introduce device_is_coherent() as ahelper

2017-09-22 Thread Robin Murphy
On 22/09/17 03:13, 陈华才 wrote: > Hi, Robin, > > Before 2.6.36 dma_get_cache_alignment is arch-dependent, and it is unified in > commit 4565f0170dfc849b3629c27d7 ("dma-mapping: unify dma_get_cache_alignment > implementations"). Should we revert to the old implementation? Not quite - I mean instea

[PATCH v4 2/3] ipv4: Namespaceify tcp_fastopen_key knob

2017-09-22 Thread Haishuang Yan
Different namespace application might require different tcp_fastopen_key independently of the host. David Miller pointed out there is a leak without releasing the context of tcp_fastopen_key during netns teardown. So add the release action in exit_batch path. Tested: 1. Container namespace: # cat

[PATCH v4 3/3] ipv4: Namespaceify tcp_fastopen_blackhole_timeout knob

2017-09-22 Thread Haishuang Yan
Different namespace application might require different time period in second to disable Fastopen on active TCP sockets. Tested: Simulate following similar situation that the server's data gets dropped after 3WHS. C syn-data ---> S C <--- syn/ack - S C ack > S S (accept & wri

[PATCH v4 1/3] ipv4: Namespaceify tcp_fastopen knob

2017-09-22 Thread Haishuang Yan
Different namespace application might require enable TCP Fast Open feature independently of the host. This patch series continues making more of the TCP Fast Open related sysctl knobs be per net-namespace. Reported-by: Luca BRUNO Signed-off-by: Haishuang Yan --- Change since v4: * Fix potent

[PATCH] [media] stk-webcam: Fix use after free on disconnect

2017-09-22 Thread Dan Carpenter
We free the stk_camera device too early. It's allocate first in probe and it should be freed last in stk_camera_disconnect(). Reported-by: Andrey Konovalov Signed-off-by: Dan Carpenter --- Not tested but these bug reports seem surprisingly straight forward. Thanks Andrey! diff --git a/drivers/

Re: [PATCH V6 1/3] dma-mapping: Introduce device_is_coherent() as ahelper

2017-09-22 Thread Christoph Hellwig
On Fri, Sep 22, 2017 at 02:44:51PM +0100, Robin Murphy wrote: > Not quite - I mean instead of adding an ops->device_is_coherent callback > (which cannot really have a safe fallback value either way) and trying > to enforce that dma_get_cache_alignment() should be the only valid > caller, just add a

Re: usb/sounds: slab-out-of-bounds read in snd_usb_create_streams

2017-09-22 Thread Andrey Konovalov
On Fri, Sep 22, 2017 at 3:19 PM, Takashi Iwai wrote: > On Fri, 22 Sep 2017 14:56:06 +0200, > Andrey Konovalov wrote: >> >> Hi! >> >> I've got the following report while fuzzing the kernel with syzkaller. >> >> On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). >> >> It seems that there's

Re: [PATCH 1/2] pinctrl: Allow a device to indicate when to force a state

2017-09-22 Thread Linus Walleij
On Fri, Sep 22, 2017 at 3:20 PM, Charles Keepax wrote: > On Fri, Sep 22, 2017 at 01:55:22PM +0200, Linus Walleij wrote: >> Next point, this commit from Baolin: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/Documentation/devicetree/bindings/pinctrl/pinctrl-binding

Re: [PATCH V8 08/14] mmc: core: Add parameter use_blk_mq

2017-09-22 Thread Linus Walleij
On Fri, Sep 22, 2017 at 3:30 PM, Adrian Hunter wrote: > On 21/09/17 12:47, Ulf Hansson wrote: >> I asume the goal of adding this option is to enable us to move slowly >> forward. In general that might be a good idea, however for this >> particular case I am not sure. >> >> The main reason is simp

Re: [PATCH v2 08/11] staging: typec: tcpm: Set mux to device mode when configured as such

2017-09-22 Thread Hans de Goede
Hi, On 09/11/2017 12:56 AM, Guenter Roeck wrote: On 09/05/2017 09:42 AM, Hans de Goede wrote: Setting the mux to TYPEC_MUX_NONE, TCPC_USB_SWITCH_DISCONNECT when the data-role is device is not correct. Plenty of devices support operating as USB device through a (separate) USB device controller.

Re: [PATCH v2 1/6] gpu: host1x: Enable Tegra186 syncpoint protection

2017-09-22 Thread Mikko Perttunen
On 09/05/2017 04:33 PM, Dmitry Osipenko wrote: On 05.09.2017 11:10, Mikko Perttunen wrote: ... >> diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c index 8447a56c41ca..0161da331702 100644 --- a/drivers/gpu/host1x/hw/channel_hw.c +++ b/drivers/gpu/host1x/hw/ch

Re: [PATCH V9 01/15] mmc: core: Remove unnecessary host claim

2017-09-22 Thread Linus Walleij
On Fri, Sep 22, 2017 at 2:36 PM, Adrian Hunter wrote: > Callers already have the host claimed, so remove the unnecessary > calls to mmc_claim_host() and mmc_release_host(). > > Signed-off-by: Adrian Hunter Good catch. Reviewed-by: Linus Walleij Yours, Linus Walleij

[PATCH] brcm80211: make const array ucode_ofdm_rates static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const array ucode_ofdm_rates on the stack, instead make it static. Makes the object code smaller by 100 bytes: Before: textdata bss dec hex filename 39482 564 0 400469c6e phy_cmn.o After textdata bss dec

[GIT PULL] PCI fixes for v4.14

2017-09-22 Thread Bjorn Helgaas
PCI fixes: - fix endpoint "end of test" interrupt issue (introduced in v4.14-rc1) (John Keeping) - fix MIPS use-after-free map_irq() issue (introduced in v4.14-rc1) (Lorenzo Pieralisi) N.B. The MIPS tree contains 8eba3651f1da ("MIPS: PCI: fix pcibios_map_irq section mismatch"), a s

Re: [PATCH] pinctrl: intel: Mask interrupts on driver probe

2017-09-22 Thread Kyle Roeschley
On Fri, Sep 22, 2017 at 08:47:12AM +0300, Mika Westerberg wrote: > On Thu, Sep 21, 2017 at 02:20:03PM -0500, Kyle Roeschley wrote: > > Powering off the system on Apollo Lake does not clear the interrupt > > enable registers for the GPIOs. To avoid an interrupt storm on driver > > probe, clear all i

Re: [PATCH] mmc: core: Wait for Vdd to settle on card power off

2017-09-22 Thread Kyle Roeschley
On Fri, Sep 22, 2017 at 11:38:40AM +0200, Ulf Hansson wrote: > On 21 September 2017 at 19:47, Kyle Roeschley wrote: > > The SD spec version 6.0 section 6.4.1.5 requires that Vdd must be > > lowered to less than 0.5V for a minimum of 1 ms when powering off a > > card. Increase our wait to 10 ms so

Re: [PATCH] perf tools: allow overriding MAX_NR_CPUS at compile time

2017-09-22 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 22, 2017 at 01:20:43PM +0200, Christophe Leroy escreveu: > After update of kernel, perf tool doesn't run anymore on my > 32MB RAM powerpc board, but still runs on a 128MB RAM board: > > ~# strace perf > execve("/usr/sbin/perf", ["perf"], [/* 12 vars */]) = -1 ENOMEM (Cannot > allocate

[PATCH] i40e: make const array patterns static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const array patterns on the stack, instead make it static. Makes the object code smaller by over 60 bytes: Before: textdata bss dec hex filename 1953 496 02449 991 i40e_diag.o After: textdata bss dec

Re: [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf

2017-09-22 Thread Catalin Marinas
On Fri, Sep 22, 2017 at 11:54:06AM +0100, Will Deacon wrote: > On Wed, Sep 20, 2017 at 12:26:38PM +0530, Arvind Yadav wrote: > > Free memory region, if arm_pmu_acpi_probe is not successful. > > > > Signed-off-by: Arvind Yadav > > --- > > drivers/perf/arm_pmu_acpi.c | 1 + > > 1 file changed, 1 i

Re: [RFC][PATCH] sched: Cleanup task->state printing

2017-09-22 Thread Steven Rostedt
On Fri, 22 Sep 2017 13:54:30 +0200 Peter Zijlstra wrote: > I should probably split this thing into a bunch of patches :/ Yes please. Convert form dec to hex in one patch and one patch only. Because I'm not sure if you meant to change numbers or not. > /* Used in tsk->state again: */ > -#defi

Re: [PATCH 4/4] Replace printf with fprintf for all the output functions

2017-09-22 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 22, 2017 at 11:03:04AM +0200, Jiri Olsa escreveu: > On Mon, Sep 18, 2017 at 01:55:22PM +0800, yuzhoujian wrote: > > SNIP > > > static void process_event(struct perf_script *script, > > @@ -1389,21 +1389,30 @@ static void process_event(struct perf_script > > *script, > > struct p

Re: [PATCH 2/4] Makes all those related functions receive the FILE pointer

2017-09-22 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 22, 2017 at 11:03:12AM +0200, Jiri Olsa escreveu: > On Mon, Sep 18, 2017 at 01:55:20PM +0800, yuzhoujian wrote: > > SNIP > > > out_put: > > addr_location__put(&al); > > @@ -1605,6 +1617,7 @@ static int process_comm_event(struct perf_tool *tool, > > struct perf_session *sessio

Re: [PATCH 2/4] Makes all those related functions receive the FILE pointer

2017-09-22 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 22, 2017 at 11:03:19AM +0200, Jiri Olsa escreveu: > On Mon, Sep 18, 2017 at 01:55:20PM +0800, yuzhoujian wrote: > > Signed-off-by: yuzhoujian > > +++ b/tools/perf/builtin-script.c > > @@ -486,8 +486,8 @@ static int perf_session__check_output_opt(struct > > perf_session *session) > >

Re: usb/sounds: slab-out-of-bounds read in snd_usb_create_streams

2017-09-22 Thread Takashi Iwai
On Fri, 22 Sep 2017 15:55:17 +0200, Andrey Konovalov wrote: > > On Fri, Sep 22, 2017 at 3:19 PM, Takashi Iwai wrote: > > On Fri, 22 Sep 2017 14:56:06 +0200, > > Andrey Konovalov wrote: > >> > >> Hi! > >> > >> I've got the following report while fuzzing the kernel with syzkaller. > >> > >> On comm

Re: [PATCH 3/4] Add the fp_selection_helper function to set the file pointer for the related functions

2017-09-22 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 22, 2017 at 11:03:27AM +0200, Jiri Olsa escreveu: > On Mon, Sep 18, 2017 at 01:55:21PM +0800, yuzhoujian wrote: > > Signed-off-by: yuzhoujian > > --- > > tools/perf/builtin-script.c | 24 > > 1 file changed, 16 insertions(+), 8 deletions(-) > > > > diff --git

Re: [PATCH V6 00/18] blk-throttle: add .low limit

2017-09-22 Thread Paolo Valente
> Il giorno 05 set 2017, alle ore 23:02, Shaohua Li ha > scritto: > > On Thu, Aug 31, 2017 at 09:24:23AM +0200, Paolo VALENTE wrote: >> >>> Il giorno 15 gen 2017, alle ore 04:42, Shaohua Li ha scritto: >>> >>> Hi, >>> >>> cgroup still lacks a good iocontroller. CFQ works well for hard disk,

[PATCH 0/5] exec: binfmt_misc: fix use-after-free, kill iname[BINPRM_BUF_SIZE]

2017-09-22 Thread Oleg Nesterov
Note: 5/5 depends on -extern int bprm_change_interp(char *interp, struct linux_binprm *bprm); +extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm); change in [PATCH] exec: load_script: kill the onstack interp[BINPRM_BUF_SIZE] array https

[PATCH 1/5] exec: binfmt_misc: don't nullify Node->dentry in kill_node()

2017-09-22 Thread Oleg Nesterov
kill_node() nullifies/checks Node->dentry to avoid double free. This complicates the next changes and this is very confusing: - we do not need to check dentry != NULL under entries_lock, kill_node() is always called under inode_lock(d_inode(root)) and we rely on this inode_lock() anyway, witho

[PATCH] hwmon: (w83793): make const array watchdog_minors static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const array watchdog_minors on the stack, instead make it static. Makes the object code smaller by over 350 bytes: Before: textdata bss dec hex filename 48019 38144 256 86419 15193 drivers/hwmon/w83793.o After: textdata

[PATCH 3/5] exec: binfmt_misc: remove the confusing e->interp_file != NULL checks

2017-09-22 Thread Oleg Nesterov
If MISC_FMT_OPEN_FILE flag is set e->interp_file must be valid or we have a bug which should not be silently ignored. Signed-off-by: Oleg Nesterov --- fs/binfmt_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 040ed26..45809

[PATCH 4/5] exec: binfmt_misc: fix race between load_misc_binary() and kill_node()

2017-09-22 Thread Oleg Nesterov
load_misc_binary() makes a local copy of fmt->interpreter under entries_lock to avoid the race with kill_node() but this is not enough; the whole Node can be freed after we drop entries_lock, not only the ->interpreter string. Add dget/dput(fmt->dentry) to ensure bm_evict_inode() can't destroy/fre

[PATCH 5/5] exec: binfmt_misc: kill the onstack iname[BINPRM_BUF_SIZE] array

2017-09-22 Thread Oleg Nesterov
After the previous change "fmt" can't go away, we can kill iname/iname_addr and use fmt->interpreter. Signed-off-by: Oleg Nesterov --- fs/binfmt_misc.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index e59d006..b5188d5 10

[PATCH 2/5] exec: binfmt_misc: shift filp_close(interp_file) from kill_node() to bm_evict_inode()

2017-09-22 Thread Oleg Nesterov
to ensure that load_misc_binary() can't use the partially destroyed Node, see also the next patch. The current logic looks wrong in any case, once we close interp_file it doesn't make any sense to delay kfree(inode->i_private), this Node is no longer valid. Even if the MISC_FMT_OPEN_FILE/interp_fi

Re: [PATCH] selftests: timers: set-timer-lat: Fix hang when testing unsupported alarms

2017-09-22 Thread Shuah Khan
Hi John/Greg, On 09/21/2017 01:45 PM, Shuah Khan wrote: > When timer_create() fails on a bootime or realtime clock, setup_timer() > returns 0 as if timer has been set. Callers wait forever for the timer > to expire. > > This hang is seen on a system that doesn't have support for: > > CLOCK_REALT

Re: [PATCH] selftests: timers: set-timer-lat: fix hang when std out/err are redirected

2017-09-22 Thread Shuah Khan
Hi John/Greg, On 09/21/2017 02:10 PM, Shuah Khan wrote: > do_timer_oneshot() uses select() as a timer with FD_SETSIZE and readfs > is cleared with FD_ZERO without FD_SET. > > When stdout and stderr are redirected, the test hangs in select forever. > Fix the problem calling select() with readfds e

[GIT PULL 00/44] perf/core improvements and fixes

2017-09-22 Thread Arnaldo Carvalho de Melo
0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.15-20170922 for you to fetch changes up to 0a7c74eae307894c6c95316c382f118aef8481e8: perf tools: Provide mutex wrappers for pthreads rwlocks (2017-09-21 13:28

[PATCH 02/44] perf tools: Support weak groups in 'perf stat'

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Setting up groups can be complicated due to the complicated scheduling restrictions of different PMUs. User tools usually don't understand all these restrictions. Still in many cases it is useful to set up groups and they work most of the time. However if the group is set up wr

[PATCH 05/44] perf stat: Print generic metric header even for failed expressions

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Print the generic metric header even when the expression evaluation failed. Otherwise an expression that fails on the first collections due to division by zero may suddenly reappear later without an header. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel

[PATCH 15/44] perf tools: Add python-clean target

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa To be able to cleanup only python related binaries. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908084621.31595-3-jo...@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 8 +

[PATCH 13/44] perf record: Support direct --user-regs arguments

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen USER_REGS can currently only collected implicitely with call graph recording. Sometimes it is useful to see them separately, and filter them. Add a new --user-regs option to record that is similar to --intr-regs, but acts on user regs. Signed-off-by: Andi Kleen Cc: Jiri Olsa L

[PATCH 16/44] perf ui progress: Add ui specific init function

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Adding ui specific init function allowing to setup the progress bar width based on current screen scales. Adding TUI init function to get more grained update of the progress bar. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.k

[PATCH 07/44] perf stat: Support JSON metrics in perf stat

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Add generic support for standalone metrics specified in JSON files to perf stat. A metric is a formula that uses multiple events to compute a higher level result (e.g. IPC). Previously metrics were always tied to an event and automatically enabled with that event. But now change

[PATCH 06/44] perf pmu: Extract function to get JSON alias map

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Extract the code to get the per cpu JSON alias into a separate function for reuse. No behavior changes. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-6-a...@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/p

[PATCH 08/44] perf list: Add metric groups to perf list

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Add code to perf list to print metric groups, and metrics that don't have an event name. The metricgroup code collects the eventgroups and events into a rblist, and then prints them according to the configured filters. The metricgroups are printed by default, but can be limited

[PATCH 10/44] perf stat: Support duration_time for metrics

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Some of the metrics formulas (like GFLOPs) need to know how long the measurement period is. Support an internal event called duration_time, which reports time in second. It maps to the dummy event, but is special cased for statistics to report the walltime duration. So far it is

[PATCH 12/44] perf stat: Update walltime_nsecs_stats in interval mode

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Some metrics (like GFLOPs) need walltime_nsecs_stats for each interval. Compute it for each interval instead of only at the end. Pointed out by Jiri. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-12-a...@firstfloor.org Signe

[PATCH 19/44] perf config: Write a config file just once

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Taeung Song Currently set_config() can be repeatedly called for each input config on the below case: $ perf config kmem.default=slab report.children=false ... But it's a waste, so only once write a config file gathering all given config key=value pairs. Signed-off-by: Taeung Song Cc:

[PATCH 20/44] perf config: Allow creating empty config set for config file autogeneration

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Taeung Song When there isn't a config file (e.g. ~/.perfconfig) or it has nothing, the config set wasn't created. If the config set does not exist, a config file can't be autogenerated. So allow creating a empty config set in the above case, then we can support the config file autogenerat

[PATCH 18/44] perf tools: Use scandir() to replace readdir()

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Kan Liang In perf_event__synthesize_threads() perf goes through all proc files serially by readdir. scandir() does a snapshoot of /proc, which is multithreading friendly. It's possible that some threads which are added during event synthesize. But the number of lost threads should be smal

[PATCH 17/44] perf ui progress: Add size info into progress bar

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Adding the size values '[current/total]' into progress bar, to show more detailed progress of data reading. Adding new ui_progress__init_size function to specify we want to display the size. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namh

[PATCH 14/44] perf script: Support user regs

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Teach perf script to print user regs. % perf record --user-regs=ip,sp ... % perf script -F ip,sym,uregs ... 9e060c24 native_write_msr ABI:2SP:0x7ffd0ea06c38 IP:0x7fe77f55b637 9e060c24 native_write_msr ABI:2SP:0x7ffd0ea06c38 IP:0x7fe77f

[PATCH 11/44] perf stat: Hide internal duration_time counter

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Some perf stat metrics use an internal "duration_time" metric. It is not correctly printed however. So hide it during output to avoid confusing users with 0 counts. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-11-a...@firstf

[PATCH 09/44] perf stat: Don't use ctx for saved values lookup

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen We don't need to use ctx to look up events for saved values. The context is already part of the evsel pointer, which is the primary key. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-9-a...@firstfloor.org Signed-off-by: Arna

[PATCH 03/44] perf vendor events: Support metric_group and no event name in JSON parser

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Some enhancements to the JSON parser to prepare for metrics support - Parse the new MetricGroup field - Support JSON events with no event name, that have only MetricName. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-3-a...@

Re: [Intel-wired-lan] [PATCH][V2] e1000: avoid null pointer dereference on invalid stat type

2017-09-22 Thread Alexander Duyck
On Fri, Sep 22, 2017 at 6:41 AM, Colin King wrote: > From: Colin Ian King > > Currently if the stat type is invalid then data[i] is being set > either by dereferencing a null pointer p, or it is reading from > an incorrect previous location if we had a valid stat type > previously. Fix this by n

[PATCH 04/44] perf stat: Factor out generic metric printing

2017-09-22 Thread Arnaldo Carvalho de Melo
From: Andi Kleen The 'perf stat' shadow metric printing already supports generic metrics. Factor out the code doing that into a separate function that can be re-used in a later patch. No behavior changes. v2: Fix indentation Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.ker

[PATCH 01/44] perf sched timehist: Add pid and tid options

2017-09-22 Thread Arnaldo Carvalho de Melo
From: David Ahern Add options to only show event for specific pid(s) and tid(s). Signed-off-by: David Ahern Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1504288152-19690-1-git-send-email-dsah...@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/perf-sched.txt

<    1   2   3   4   5   6   7   8   >