[PATCH v6 05/13] selftests/resctrl: Add built in benchmark

2019-02-07 Thread Fenghua Yu
From: Sai Praneeth Prakhya Built-in benchmark fill_buf generates stressful memory bandwidth and cache traffic. Later it will be used as a default benchmark by various resctrl tests such as MBA (Memory Bandwidth Allocation) and MBM (Memory Bandwidth Monitoring) tests. Signed-off-by: Sai

[PATCH v6 09/13] selftests/resctrl: Add Cache Allocation Technology (CAT) selftest

2019-02-07 Thread Fenghua Yu
From: Arshiya Hayatkhan Pathan Cache Allocation Technology (CAT) selftest allocates a portion of last level cache and starts a benchmark to read each cache line in this portion of cache. Measure the cache misses in perf and the misses should be equal to the number of cache lines in this portion

Re: [PATCH 1/1] net: dsa: b53: Fix for failure when irq is not defined in dt

2019-02-07 Thread Florian Fainelli
On 2/7/19 4:01 PM, Arun Parameswaran wrote: > Fixes the issues with non BCM58XX chips in the b53 driver > failing, when the irq is not specified in the device tree. > > Removed the check for BCM58XX in b53_srab_prepare_irq(), > so the 'port->irq' will be set to '-EXIO' if the irq is not >

Re: [PATCH v11 15/16] tpm: take TPM chip power gating out of tpm_transmit()

2019-02-07 Thread Jerry Snitselaar
On Thu Feb 07 19, Stefan Berger wrote: On 2/5/19 5:47 PM, Jarkko Sakkinen wrote: Call tpm_chip_start() and tpm_chip_stop() in * tpm_try_get_ops() and tpm_put_ops() * tpm_chip_register() * tpm2_del_space() And remove these calls from tpm_transmit(). The core reason for this change is that in

Re: [PATCH 0/1] Start conversion of PowerPC docs

2019-02-07 Thread Jonathan Corbet
On Thu, 7 Feb 2019 17:03:15 +1100 "Tobin C. Harding" wrote: > As discussed at LCA here is the start to the docs conversion for PowerPC > to RST. > > This applies cleanly on top of the mainline (5.20-rc5) and Jon's tree > (docs-next branch). > > I'm guessing it should go in through the PowerPC

[PATCH 1/1] net: dsa: b53: Fix for failure when irq is not defined in dt

2019-02-07 Thread Arun Parameswaran
Fixes the issues with non BCM58XX chips in the b53 driver failing, when the irq is not specified in the device tree. Removed the check for BCM58XX in b53_srab_prepare_irq(), so the 'port->irq' will be set to '-EXIO' if the irq is not specified in the device tree. Fixes: 16994374a6fc ("net: dsa:

[PATCH] media: vimc: Remove unused but set variables

2019-02-07 Thread Lucas A. M. Magalhaes
Remove unused but set variables to clean up the code and avoid warning. Signed-off-by: Lucas A. M. Magalhães --- drivers/media/platform/vimc/vimc-sensor.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/media/platform/vimc/vimc-sensor.c

Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA

2019-02-07 Thread Dan Williams
On Thu, Feb 7, 2019 at 9:17 AM Jason Gunthorpe wrote: > > On Wed, Feb 06, 2019 at 10:00:28PM -0800, Dan Williams wrote: > > > > > If your argument is that "existing RDMA apps don't have a recall > > > > mechanism" then that's what they are going to need to implement to > > > > work with DAX+RDMA.

Re: [PATCH v6 02/27] x86: Use symbol name in jump table for PIE support

2019-02-07 Thread Thomas Garnier
On Thu, Feb 7, 2019 at 9:11 AM Borislav Petkov wrote: > > On Thu, Feb 07, 2019 at 09:04:45AM -0800, Thomas Garnier wrote: > > I assume that's an optimisation done by gcc later. > > So why is that change even needed? Where does it break? > > > The P modifier in the documentation does state that it

RE: Re: [PATCH] cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer

2019-02-07 Thread Sobon, Przemyslaw
Hi Ikegami, I have seen a case myself where a value was written, chip changed state to "ready" but when I was reading the value was incorrect. This can happen as result of intermittent issue with flash. It is hard to fall into scenario when testing on limited number of devices but with large

Re: [PATCH 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-07 Thread Steven Rostedt
On Thu, 7 Feb 2019 18:39:02 -0500 Joel Fernandes wrote: > > > + > > > +spath="$(dirname "$(readlink -f "$0")")" > > > + > > > +rm -rf $1.tmp > > > +mkdir $1.tmp > > > + > > > +for f in "${@:2}"; > > > + do find "$f" ! -name "*.c" ! -name "*.o" ! -name "*.cmd" ! -name ".*"; > > > > I wonder if

Re: [PATCH net-next v2 07/10] net: phy: marvell10g: Add support for 2.5GBASET

2019-02-07 Thread Russell King - ARM Linux admin
On Thu, Feb 07, 2019 at 10:49:36AM +0100, Maxime Chevallier wrote: > The Marvell Alaska family of PHYs supports 2.5GBaseT and 5GBaseT modes, > as defined in the 802.3bz specification. > > When the link partner requests a 2.5GBASET link, the PHY will > reconfigure it's MII interface to 2500BASEX.

[PATCH] media: imx: Set capture compose rectangle in capture_device_set_format

2019-02-07 Thread Steve Longerbeam
From: Steve Longerbeam The capture compose rectangle was not getting updated when setting the source subdevice's source pad format. This causes the compose window to be zero (or not updated) at stream start unless the capture device format was set explicitly at the capture device node. Fix by

Re: [PATCH 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-07 Thread Joel Fernandes
Hi Steve, On Thu, Feb 07, 2019 at 05:52:39PM -0500, Steven Rostedt wrote: > On Thu, 7 Feb 2019 16:11:01 -0500 > "Joel Fernandes (Google)" wrote: > > > + > > +# Build a list of in-kernel headers for building kernel modules > > +# Any other files will be stored in IKH_EXTRA variable. > >

Re: [PATCH net-next 5/7] net: phy: marvell10g: Force reading of 2.5/5G PMA extended abilities

2019-02-07 Thread Russell King - ARM Linux admin
On Mon, Jan 28, 2019 at 03:26:21PM +0100, Maxime Chevallier wrote: > Hello Russell, > > On Mon, 21 Jan 2019 13:00:30 + > Russell King - ARM Linux admin wrote: > > >On Mon, Jan 21, 2019 at 01:29:45PM +0100, Maxime Chevallier wrote: > >> Hello Russell, > >> > >> On Mon, 21 Jan 2019 10:52:06

Re: [PATCH v11 08/16] tpm: clean up tpm_try_transmit() error handling flow

2019-02-07 Thread Stefan Berger
On 2/5/19 5:47 PM, Jarkko Sakkinen wrote: Move locking, locality handling and power management to tpm_transmit() in order to simplify the flow. Signed-off-by: Jarkko Sakkinen Reviewed-by: Stefan Berger Tested-by: Stefan Berger Reviewed-by: Jerry Snitselaar Reviewed-by: James Bottomley ---

Re: [PATCH 3/3] leaking_addresses: Expand tilde in output file name

2019-02-07 Thread Tycho Andersen
On Fri, Feb 08, 2019 at 09:50:26AM +1100, Tobin C. Harding wrote: > Currently if user passes an output file to the script via > --output-raw we do not handle expansion of tilde. > > Use perl function glob() to expand tilde in output file name. > > Signed-off-by: Tobin C. Harding > --- >

Re: [PATCH v2] KEYS: always initialize keyring_index_key::desc_len

2019-02-07 Thread Eric Biggers
On Thu, Jan 10, 2019 at 12:27:46PM -0800, Eric Biggers wrote: > On Wed, Nov 28, 2018 at 03:19:41PM -0800, Eric Biggers wrote: > > On Fri, Nov 02, 2018 at 06:58:54PM -0700, Eric Biggers wrote: > > > From: Eric Biggers > > > > > > syzbot hit the 'BUG_ON(index_key->desc_len == 0);' in

Re: [PATCH] KEYS: user: Align the payload buffer

2019-02-07 Thread Eric Biggers
On Mon, Jan 14, 2019 at 07:37:16PM -0800, Eric Biggers wrote: > From: Eric Biggers > > Align the payload of "user" and "logon" keys so that users of the > keyrings service can access it as a struct that requires more than > 2-byte alignment. fscrypt currently does this which results in the read

Re: [PATCH v11 15/16] tpm: take TPM chip power gating out of tpm_transmit()

2019-02-07 Thread Stefan Berger
On 2/5/19 5:47 PM, Jarkko Sakkinen wrote: Call tpm_chip_start() and tpm_chip_stop() in * tpm_try_get_ops() and tpm_put_ops() * tpm_chip_register() * tpm2_del_space() And remove these calls from tpm_transmit(). The core reason for this change is that in tpm_vtpm_proxy a locality change requires

Re: [PATCH 2/4] components: multiple components for a device

2019-02-07 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 12:28 AM Daniel Vetter wrote: > > Component framework is extended to support multiple components for > a struct device. These will be matched with different masters based on > its sub component value. > > We are introducing this, as I915 needs two different components >

Re: [PATCH v11 00/16] Remove nested TPM operations

2019-02-07 Thread Stefan Berger
On 2/7/19 4:29 PM, Jarkko Sakkinen wrote: On Thu, Feb 07, 2019 at 07:41:56PM +0100, Alexander Steffen wrote: On 06.02.2019 13:06, Jarkko Sakkinen wrote: On Wed, Feb 06, 2019 at 12:47:07AM +0200, Jarkko Sakkinen wrote: Make the changes necessary to detach TPM space code and TPM activation code

Re: [PATCH 01/18] MIPS: lantiq: pass struct device to DMA API functions

2019-02-07 Thread Paul Burton
Hi Christoph, On Fri, Feb 01, 2019 at 09:47:44AM +0100, Christoph Hellwig wrote: > The DMA API generally relies on a struct device to work properly, and > only barely works without one for legacy reasons. Pass the easily > available struct device from the platform_device to remedy this. > >

[PATCH 2/4] components: multiple components for a device

2019-02-07 Thread Daniel Vetter
Component framework is extended to support multiple components for a struct device. These will be matched with different masters based on its sub component value. We are introducing this, as I915 needs two different components with different subcomponent value, which will be matched to two

[PATCH 4/4] i915/snd_hdac: I915 subcomponent for the snd_hdac

2019-02-07 Thread Daniel Vetter
Since we need multiple components for I915 for different purposes (Audio & Mei_hdcp), we adopt the subcomponents methodology introduced by the previous patch (mentioned below). Author: Daniel Vetter Date: Mon Jan 28 17:08:20 2019 +0530 components: multiple

[PATCH 1/4] component: Add documentation

2019-02-07 Thread Daniel Vetter
While typing these I think doing an s/component_master/aggregate/ would be useful: - it's shorter :-) - I think component/aggregate is much more meaningful naming than component/puppetmaster or something like that. At least to my English ear "aggregate" emphasizes much more the "assemble a

Re: [PATCH] drm/v3d: Fix BO stats accounting for dma-buf-imported buffers.

2019-02-07 Thread Daniel Vetter
On Thu, Feb 07, 2019 at 03:26:13PM -0800, Eric Anholt wrote: > We always decrement at GEM free, so make sure we increment at GEM > creation for dma-bufs. Indeed. Reviewed-by: Daniel Vetter > > Signed-off-by: Eric Anholt > --- > drivers/gpu/drm/v3d/v3d_bo.c | 6 ++ > 1 file changed, 6

[PATCH 3/4] drm/doc: document recommended component helper usage

2019-02-07 Thread Daniel Vetter
Now that component has docs it's worth spending a few words and hyperlinks on recommended best practices in drm. Cc: Russell King - ARM Linux admin Signed-off-by: Daniel Vetter --- Documentation/driver-api/component.rst | 2 ++ Documentation/gpu/drm-internals.rst| 5 +

[PATCH] drm/v3d: Fix BO stats accounting for dma-buf-imported buffers.

2019-02-07 Thread Eric Anholt
We always decrement at GEM free, so make sure we increment at GEM creation for dma-bufs. Signed-off-by: Eric Anholt --- drivers/gpu/drm/v3d/v3d_bo.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c index

Re: [PATCH] lib/scatterlist: Provide a DMA page iterator

2019-02-07 Thread Sakari Ailus
On Fri, Jan 04, 2019 at 10:35:43PM +, Jason Gunthorpe wrote: > Commit 2db76d7c3c6d ("lib/scatterlist: sg_page_iter: support sg lists w/o > backing pages") introduced the sg_page_iter_dma_address() function without > providing a way to use it in the general case. If the sg_dma_len is not >

Re: [PATCH] riscv: Partially revert "Remove stat64 family from default syscall set"

2019-02-07 Thread Alistair Francis
On Thu, Feb 7, 2019 at 3:04 PM David Abdurachmanov wrote: > > On Thu, Feb 7, 2019 at 11:56 PM Alistair Francis > wrote: > > > > To fix systemd/sysVinit crashes enable __ARCH_WANT_STAT64. > > > > systemd failed to start with this error for 32-bit RISC-V: > > [2.833864] Run /sbin/init as init

Re: [PATCH] drm/sched: Always trace the dependencies we wait on, to fix a race.

2019-02-07 Thread Eric Anholt
"Koenig, Christian" writes: > Am 07.12.18 um 20:16 schrieb Eric Anholt: >> The entity->dependency can go away completely once we've called >> drm_sched_entity_add_dependency_cb() (if the cb is called before we >> get around to tracing). The tracepoint is more useful if we trace >> every

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Andy Lutomirski
> On Feb 7, 2019, at 2:53 PM, Linus Torvalds > wrote: > >> On Thu, Feb 7, 2019 at 1:24 PM Andy Lutomirski wrote: >> >> How bad would it be to set CR0.CD while fiddling with the page tables rather >> than masking the address? > > I would suggest against it. When you disable caching,

Re: [GIT PULL] KVM fixes for Linux 5.0-rc6

2019-02-07 Thread pr-tracker-bot
The pull request you sent on Thu, 7 Feb 2019 19:12:33 +0100: > https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e303a067ceede918fbf90ff3dc8affbb98bad4e8 Thank you! -- Deet-doot-dot, I am a bot.

Re: [GIT PULL] nfsd fixes for 5.0

2019-02-07 Thread pr-tracker-bot
The pull request you sent on Thu, 7 Feb 2019 16:44:42 -0500: > git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.0-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/ee6c0737a0253d6e79063f0a74c1101fdaad0812 Thank you! -- Deet-doot-dot, I am a bot.

Re: [GIT PULL] platform-drivers-x86 for 5.0-2

2019-02-07 Thread pr-tracker-bot
The pull request you sent on Thu, 7 Feb 2019 14:30:17 -0800: > git://git.infradead.org/linux-platform-drivers-x86.git > tags/platform-drivers-x86-v5.0-2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/74e96711e3379fc66630f2a1d184947f80cf2c48 Thank you! --

Re: [PATCH] riscv: Partially revert "Remove stat64 family from default syscall set"

2019-02-07 Thread David Abdurachmanov
On Thu, Feb 7, 2019 at 11:56 PM Alistair Francis wrote: > > To fix systemd/sysVinit crashes enable __ARCH_WANT_STAT64. > > systemd failed to start with this error for 32-bit RISC-V: > [2.833864] Run /sbin/init as init process > /sbin/init: error while loading shared libraries:

Re: [PATCH] Input: ps2-gpio - flush TX work when closing port

2019-02-07 Thread Sven Van Asbroeck
On Thu, Feb 7, 2019 at 5:27 PM Dmitry Torokhov wrote: > > + flush_work(>tx_work.work); Would cancel_work_sync() be better than flush_work() ?

Re: [PATCH] drm/vc4: Use struct_size() in kzalloc()

2019-02-07 Thread Gustavo A. R. Silva
On 2/7/19 4:59 PM, Eric Anholt wrote: > "Gustavo A. R. Silva" writes: > >> One of the more common cases of allocation size calculations is finding >> the size of a structure that has a zero-sized array at the end, along >> with memory for some number of elements for that array. For example:

Re: [PATCH] drm/vc4: Use struct_size() in kzalloc()

2019-02-07 Thread Eric Anholt
"Gustavo A. R. Silva" writes: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct foo { > int stuff; > void

Re: [PATCH 1/1] docs: powerpc: Convert to RST format

2019-02-07 Thread Randy Dunlap
On 2/6/19 10:03 PM, Tobin C. Harding wrote: > The PowerPC docs have yet to be converted to RST format. Let's kick it > off by doing all the files that _don't_ contain ASCII art. > > - Add SPDX license identifier to each new RST file. > > .. SPDX-License-Identifier: GPL-2.0 > > - User

Re: [PATCH v4 10/16] block: sed-opal: add ioctl for done-mark of shadow mbr

2019-02-07 Thread David Kozub
On Mon, 4 Feb 2019, Christoph Hellwig wrote: On Fri, Feb 01, 2019 at 09:50:17PM +0100, David Kozub wrote: From: Jonas Rabenstein Enable users to mark the shadow mbr as done without completely deactivating the shadow mbr feature. This may be useful on reboots, when the power to the disk is

[PATCH] riscv: Partially revert "Remove stat64 family from default syscall set"

2019-02-07 Thread Alistair Francis
To fix systemd/sysVinit crashes enable __ARCH_WANT_STAT64. systemd failed to start with this error for 32-bit RISC-V: [2.833864] Run /sbin/init as init process /sbin/init: error while loading shared libraries: libsystemd-shared-239.so: cannot stat shared object: Error 38 [2.933593]

sdhci-esdhc-imx/v5.0-rc5: i.MX50 system hangs when "per" clock is disabled

2019-02-07 Thread Jonathan Neuschäfer
Hi, I'm currently porting mainline Linux to an i.MX507-based board (preliminary DT here[1]). Recently I've enabled esdhc1 in the devicetree. However, as soon as the mmc driver (sdhci-esdhc-imx.c) disables clk_per in sdhci_esdhc_runtime_suspend[2], the whole system locks up in some way. Booting

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Linus Torvalds
On Thu, Feb 7, 2019 at 1:24 PM Andy Lutomirski wrote: > > How bad would it be to set CR0.CD while fiddling with the page tables rather > than masking the address? I would suggest against it. When you disable caching, things don't just go "slightly slower". Everything comes to a screeching halt,

Re: [PATCH 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-07 Thread Steven Rostedt
On Thu, 7 Feb 2019 16:11:01 -0500 "Joel Fernandes (Google)" wrote: > + > +# Build a list of in-kernel headers for building kernel modules > +# Any other files will be stored in IKH_EXTRA variable. > +ikh_file_list := include/ > +ikh_file_list += arch/$(ARCH)/Makefile > +ikh_file_list +=

[PATCH 3/3] leaking_addresses: Expand tilde in output file name

2019-02-07 Thread Tobin C. Harding
Currently if user passes an output file to the script via --output-raw we do not handle expansion of tilde. Use perl function glob() to expand tilde in output file name. Signed-off-by: Tobin C. Harding --- scripts/leaking_addresses.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 1/3] leaking_addresses: Fix calls to dprint

2019-02-07 Thread Tobin C. Harding
Currently calls to function dprint() are non uniform and at times incorrect. Use uniform _correct_ call to function dprint(). Signed-off-by: Tobin C. Harding --- scripts/leaking_addresses.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/leaking_addresses.pl

[PATCH 0/3] Minor bug fixes to leaking_addresses.pl

2019-02-07 Thread Tobin C. Harding
Hi, Here are a few minor fixes/improvements to scripts/leaking_addresses.pl Patch 1: Fixes places where I don't know how to Perl. Patch 2: Removes `--version` command line option, completely this time. Patch 3: Fix a bug in the command line options parsing. thanks, Tobin. Tobin C. Harding

[PATCH 2/3] leaking_addresses: Completely remove --version flag

2019-02-07 Thread Tobin C. Harding
Recently attempt to remove the '--version' flag was made, badly. I failed to remove mention of it from the help output. And also I failed to actually remove the flag from the options list. _Completely_ remove --version flag. Signed-off-by: Tobin C. Harding --- scripts/leaking_addresses.pl |

Re: [RFC v1 0/3] Address potential user-after-free on module unload

2019-02-07 Thread Dmitry Torokhov
On Thu, Feb 7, 2019 at 2:32 PM Sven Van Asbroeck wrote: > > On Thu, Feb 7, 2019 at 5:21 PM Dmitry Torokhov > wrote: > > > > > ./drivers//input/keyboard/matrix_keypad.c:512:1-18: missing clean-up > > > of INIT_WORK/INIT_DELAYED_WORK initialized here > > > > This is not as simple. > > > > PS If

[PATCH] Input: matrix_keypad - use flush_delayed_work()

2019-02-07 Thread Dmitry Torokhov
We should be using flush_delayed_work() instead of flush_work() in matrix_keypad_stop() to ensure that we are not missing work that is scheduled but not yet put in the workqueue (i.e. its delay timer has not expired yet). Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/matrix_keypad.c

Re: [PATCH] arch: riscv: fix logic error in parse_dtb

2019-02-07 Thread Atish Patra
On 2/7/19 6:44 AM, Andreas Schwab wrote: The function early_init_dt_scan returns true if a DTB was detected. Fixes: 8fd6e05c7463 ("arch: riscv: support kernel command line forcing when no DTB passed") Signed-off-by: Andreas Schwab --- arch/riscv/kernel/setup.c | 2 +- 1 file changed, 1

Kernel 5.0-rc5 regression with NAT, bisected to: netfilter: nat: remove l4proto->manip_pkt

2019-02-07 Thread Sander Eikelenboom
L.S., While trying out a 5.0-RC5 kernel I seem to have stumbled over a regression with NAT. (using an nftables firewall with NAT and connection tracking). Unfortunately it isn't too obvious since no errors are logged, but on clients it causes symptoms like firefox intermittently not being able

[GIT PULL] platform-drivers-x86 for 5.0-2

2019-02-07 Thread Darren Hart
Hi Linus, The following changes since commit 49a57857aeea06ca831043acbb0fa5e0f50602fd: Linux 5.0-rc3 (2019-01-21 13:14:44 +1300) are available in the Git repository at: git://git.infradead.org/linux-platform-drivers-x86.git tags/platform-drivers-x86-v5.0-2 for you to fetch changes up to

Re: [RFC v1 0/3] Address potential user-after-free on module unload

2019-02-07 Thread Sven Van Asbroeck
On Thu, Feb 7, 2019 at 5:21 PM Dmitry Torokhov wrote: > > > ./drivers//input/keyboard/matrix_keypad.c:512:1-18: missing clean-up > > of INIT_WORK/INIT_DELAYED_WORK initialized here > > This is not as simple. > PS If you change flush_work(>work.work); to flush_delayed_work(>work); then the

Re: [PATCH] Input: ps2-gpio - flush TX work when closing port

2019-02-07 Thread Dmitry Torokhov
On Thu, Feb 07, 2019 at 02:27:40PM -0800, Dmitry Torokhov wrote: > To ensure that TX work is not running after serio port has been torn down, > let's flush it when closing the port. > > Reported-by: Sven Van Asbroeck > Signed-off-by: Dmitry Torokhov > --- > drivers/input/serio/ps2-gpio.c | 1 +

Re: [RFC v1 0/3] Address potential user-after-free on module unload

2019-02-07 Thread Sven Van Asbroeck
On Thu, Feb 7, 2019 at 5:21 PM Dmitry Torokhov wrote: > > > ./drivers//input/keyboard/matrix_keypad.c:512:1-18: missing clean-up > > of INIT_WORK/INIT_DELAYED_WORK initialized here > > This is not as simple. [...] > So in effect we do not actually leak work > past driver remove(). That's

[PATCH] Input: ps2-gpio - flush TX work when closing port

2019-02-07 Thread Dmitry Torokhov
To ensure that TX work is not running after serio port has been torn down, let's flush it when closing the port. Reported-by: Sven Van Asbroeck Signed-off-by: Dmitry Torokhov --- drivers/input/serio/ps2-gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/serio/ps2-gpio.c

[PATCH v2] lib/scatterlist: Provide a DMA page iterator

2019-02-07 Thread Jason Gunthorpe
Commit 2db76d7c3c6d ("lib/scatterlist: sg_page_iter: support sg lists w/o backing pages") introduced the sg_page_iter_dma_address() function without providing a way to use it in the general case. If the sg_dma_len() is not equal to the sg length callers cannot safely use the

Re: [PATCH V15 3/6] i2c: tegra: fix maximum transfer size

2019-02-07 Thread Dmitry Osipenko
> 08.02.2019 1:16, Sowjanya Komatineni пишет:> >>> This is wrong, 65535 = 64 * 1024 - 1. >>> >>> Let's just use size-constants provided by kernel: >>> >>> static const struct i2c_adapter_quirks tegra_i2c_quirks = { >>> .flags = I2C_AQ_NO_ZERO_LEN, >>> .max_read_len = SZ_4K, >>>

linux-next: manual merge of the mips tree with the mips-fixes tree

2019-02-07 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the mips tree got a conflict in: arch/mips/include/asm/pgtable.h between commit: e02e07e3127d ("MIPS: Loongson: Introduce and use loongson_llsc_mb()") from the mips-fixes tree and commit: c7e2d71dda7a ("MIPS: Fix set_pte() for Netlogic XLR using

Re: [PATCH 5/5] genirq/affinity: remove support for allocating interrupt sets

2019-02-07 Thread Bjorn Helgaas
On Fri, Jan 25, 2019 at 05:53:47PM +0800, Ming Lei wrote: > Now allocating interrupt sets can be done via .setup_affinity() > easily, so remove the support for allocating interrupt sets. > > With this change, we don't need the limit of 'minvec == maxvec' > any more in

Re: [RFC v1 0/3] Address potential user-after-free on module unload

2019-02-07 Thread Dmitry Torokhov
Hi Sven, On Thu, Feb 7, 2019 at 1:49 PM Sven Van Asbroeck wrote: > > On Tue, Feb 5, 2019 at 9:57 AM Kees Cook wrote: > > > > Can a Coccinelle script get written to find module-use of the non-devm > > work init? > > Ok so I hacked together a Coccinelle script to find these > user-after-free

Re: [PATCH v5 1/3] mtd: rawnand: atmel: fix possible object reference leak

2019-02-07 Thread Miquel Raynal
Hi Wen, Wen Yang wrote on Thu, 7 Feb 2019 11:56:48 +: > of_find_device_by_node() takes a reference to the struct device > when it finds a match via get_device, there is no need to call > get_device() twice. > We also should make sure to drop the reference to the device > taken by

Re: [PATCH 2/5] genirq/affinity: allow driver to setup managed IRQ's affinity

2019-02-07 Thread Bjorn Helgaas
On Fri, Jan 25, 2019 at 05:53:44PM +0800, Ming Lei wrote: > This patch introduces callback of .setup_affinity into 'struct > irq_affinity', so that: > > 1) allow drivers to customize the affinity for managed IRQ, for > example, now NVMe has special requirement for read queues & poll > queues > >

Re: [PATCH] mtd: rawnand: denali_dt: remove single anonymous clock support

2019-02-07 Thread Miquel Raynal
Hi Dinh, Dinh Nguyen wrote on Thu, 7 Feb 2019 12:17:50 -0600: > On 2/5/19 7:18 AM, Miquel Raynal wrote: > > Hi Dinh, > > > > Boris Brezillon wrote on Thu, 31 Jan 2019 > > 18:26:44 +0100: > > > >> Hi Dinh, > >> > >> On Thu, 31 Jan 2019 11:24:16 -0600 > >> Dinh Nguyen wrote: > >> > >>> On

Re: Droid 4 modem support in kernel & ofono

2019-02-07 Thread Pavel Machek
Hi! > > Ok, so I got calls and smses somehow working in kernel ... which > > is really all I need. > > Nice :) > > I think the SIM card reading and writing should be doable > using dlci10 /dev/motmdm10 for AT+CRSM calls.. Might be. Sorry, this is outside of my area of interest, because LTE

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-07 Thread sathyanarayanan kuppuswamy
On 2/7/19 12:38 PM, Sinan Kaya wrote: On 2/7/2019 1:41 PM, sathyanarayanan.kuppusw...@linux.intel.com wrote: + * As per PCI spec, If page aligned request bit is set, it indicates + * the untranslated address is always aligned to a 4096 byte boundary. + */ +int pci_ats_page_aligned(struct

Re: [PATCH v2 1/2] loop: Report EOPNOTSUPP properly

2019-02-07 Thread Bart Van Assche
On Thu, 2019-02-07 at 12:57 -0800, Evan Green wrote: > Properly plumb out EOPNOTSUPP from loop driver operations, which may > get returned when for instance a discard operation is attempted but not > supported by the underlying block device. Before this change, everything > was reported in the log

Re: [PATCH V15 3/6] i2c: tegra: fix maximum transfer size

2019-02-07 Thread Dmitry Osipenko
08.02.2019 0:47, Sowjanya Komatineni пишет: > Tegra194 supports maximum 64K bytes transfer per packet. > Tegra186 and prior supports maximum 4K bytes transfer per packet. > This includes 12 bytes of packet header. > > This patch fixes max write length to account for packet header size > for

[PATCH 0/4] Improve kernel LLD support

2019-02-07 Thread ndesaulniers
This patch cleans up a few places in the Makefile to make way for landing LLD support in the kernel. There are still a few arch specific fixes that need to get upstreamed, but this core set of patches should be arch independent. Some very rough numbers: LLD is improving the overall build time of

Re: [PATCH 1/5] genirq/affinity: move allocation of 'node_to_cpumask' to irq_build_affinity_masks

2019-02-07 Thread Bjorn Helgaas
On Fri, Jan 25, 2019 at 05:53:43PM +0800, Ming Lei wrote: > 'node_to_cpumask' is just one temparay variable for > irq_build_affinity_masks(), > so move it into irq_build_affinity_masks(). > > No functioanl change. s/temparay/temporary/ s/functioanl/functional/ > Signed-off-by: Ming Lei Nice

[PATCH 2/4] Makefile: clang: choose GCC_TOOLCHAIN_DIR not on LD

2019-02-07 Thread ndesaulniers
This causes an issue when trying to build with `make LD=ld.lld` if ld.lld and the rest of your cross tools aren't in the same directory (ex. /usr/local/bin) (as is the case for Android's build system), as the GCC_TOOLCHAIN_DIR then gets set based on `which $(LD)` which will point where LLVM tools

[PATCH 3/4] Makefile: lld: tell clang to use lld

2019-02-07 Thread ndesaulniers
This is needed because clang doesn't select which linker to use based on $LD but rather -fuse-ld=$(LD). This is problematic especially for cc-ldoption, which checks for linker flag support via invoking the compiler, rather than the linker. Link: https://github.com/ClangBuiltLinux/linux/issues/342

[PATCH 4/4] Makefile: lld: set -O2 linker flag when linking with LLD

2019-02-07 Thread ndesaulniers
-O2 enables tail merging of string table strings. For arm64: 0.34% size improvement with lld -O2 over lld for vmlinux. 3.30% size improvement with lld -O2 over lld for Image.lz4-dtb. Link: https://github.com/ClangBuiltLinux/linux/issues/343 Suggested-by: Rui Ueyama Suggested-by: Nathan

[PATCH 1/4] init/Kconfig: add config support for detecting linker

2019-02-07 Thread ndesaulniers
Similar to how we differentiate between CONFIG_CC_IS_GCC and CONFIG_CC_IS_CLANG, add CONFIG_LD_IS_BFD, CONFIG_LD_IS_GOLD, and CONFIG_LD_IS_LLD. This simiplifies patches to Makefiles that need to do different things for different linkers. Cc: Nathan Chancellor Cc: Sami Tolvanen Signed-off-by:

[ANNOUNCE] kmod 26

2019-02-07 Thread Lucas De Marchi
kmod 26 is out: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-26.tar.xz https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-26.tar.sign Now we also have a new archive for the mailing list: https://lore.kernel.org/linux-modules/ - Improvements - Add

Re: [RFC v1 0/3] Address potential user-after-free on module unload

2019-02-07 Thread Sven Van Asbroeck
On Tue, Feb 5, 2019 at 9:57 AM Kees Cook wrote: > > Can a Coccinelle script get written to find module-use of the non-devm > work init? Ok so I hacked together a Coccinelle script to find these user-after-free issues, related to work left running when the device or module is removed. As far as

[PATCH V15 4/6] i2c: tegra: Add DMA support

2019-02-07 Thread Sowjanya Komatineni
This patch adds DMA support for Tegra I2C. Tegra I2C TX and RX FIFO depth is 8 words. PIO mode is used for transfer size of the max FIFO depth and DMA mode is used for transfer size higher than max FIFO depth to save CPU overhead. PIO mode needs full intervention of CPU to fill or empty FIFO's

[PATCH V15 6/6] i2c: tegra: add i2c interface timing support

2019-02-07 Thread Sowjanya Komatineni
This patch adds I2C interface timing registers support for proper bus rate configuration along with meeting the I2C spec setup and hold times based on the tuning performed on Tegra210, Tegra186 and Tegra194 platforms. I2C_INTERFACE_TIMING_0 register contains TLOW and THIGH field and Tegra I2C

[PATCH V15 1/6] i2c: tegra: sort all the include headers alphabetically

2019-02-07 Thread Sowjanya Komatineni
This patch sorts all the include headers alphabetically for the I2C Tegra driver. Acked-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni --- [V9/V10/V11/V12/V13/V14/V15] : Rebased to 5.0-rc4 [V3/V4/V5/V7/V8] : Removed unsued headers in tegra I2C [V2]

[PATCH V15 3/6] i2c: tegra: fix maximum transfer size

2019-02-07 Thread Sowjanya Komatineni
Tegra194 supports maximum 64K bytes transfer per packet. Tegra186 and prior supports maximum 4K bytes transfer per packet. This includes 12 bytes of packet header. This patch fixes max write length to account for packet header size for transfers. Signed-off-by: Sowjanya Komatineni --- [V15] :

[PATCH V15 5/6] i2c: tegra: update transfer timeout

2019-02-07 Thread Sowjanya Komatineni
Tegra194 allows max of 64K bytes and Tegra186 and prior allows max of 4K bytes of transfer per packet. one sec timeout is not enough for transfers more than 10K bytes at STD bus rate. This patch updates I2C transfer timeout based on the transfer size and I2C bus rate to allow enough time during

[PATCH V15 2/6] i2c: tegra: add bus clear Master Support

2019-02-07 Thread Sowjanya Komatineni
Bus clear feature of Tegra I2C controller helps to recover from bus hang when I2C master loses the bus arbitration due to the slave device holding SDA LOW continuously for some unknown reasons. Per I2C specification, the device that held the bus LOW should release it within 9 clock pulses.

[GIT PULL] nfsd fixes for 5.0

2019-02-07 Thread J. Bruce Fields
Please pull git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.0-1 for two small nfsd bugfixes for 5.0, for an RDMA bug and a file clone bug. --b. Chuck Lever (1): svcrdma: Remove max_sge check at connect time Trond Myklebust (1): nfsd: Fix error return values for

Re: [PATCH 03/32] timens: Introduce CLOCK_MONOTONIC offsets

2019-02-07 Thread Thomas Gleixner
On Wed, 6 Feb 2019, Dmitry Safonov wrote: > #include "timekeeping.h" > #include "posix-timers.h" > @@ -1041,6 +1042,9 @@ SYSCALL_DEFINE2(clock_gettime, const clockid_t, > which_clock, > > error = kc->clock_get(which_clock, _tp); > > + if (!error && kc->clock_timens_adjust) > +

Re: [PATCH 1/3] sched/wait: use freezable_schedule when possible

2019-02-07 Thread Hugo Lefeuvre
> Sure, add these test results to the patch as well showing reduced wakeups. > > I would say submit the freezable_schedule as a single separate patch > independent of the vsoc series since it can go in separately, and also > benefits other things than vsoc. > > Also CC Rafael (power maintainer)

Re: [PATCH v5] media: vimc: Add vimc-streamer for stream control

2019-02-07 Thread Hans Verkuil
Hi Lucas, On 2/7/19 9:48 PM, Lucas A. M. Magalhaes wrote: > Add a linear pipeline logic for the stream control. It's created by > walking backwards on the entity graph. When the stream starts it will > simply loop through the pipeline calling the respective process_frame > function of each

Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA

2019-02-07 Thread Tom Talpey
On 2/7/2019 11:57 AM, Ira Weiny wrote: On Thu, Feb 07, 2019 at 10:28:05AM -0500, Tom Talpey wrote: On 2/7/2019 10:04 AM, Chuck Lever wrote: On Feb 7, 2019, at 12:23 AM, Jason Gunthorpe wrote: On Thu, Feb 07, 2019 at 02:52:58PM +1100, Dave Chinner wrote: Requiring ODP capable hardware

Re: [PATCH v6 0/5] drm: minimize drmP.h dependencies

2019-02-07 Thread Daniel Vetter
On Sat, Jan 26, 2019 at 01:25:22PM +0100, Sam Ravnborg wrote: > Updated patchset, with merged patches removed, new patches added. > > > From the original mail: > > - drmP.h is now stripped down to include files > and forward declarations. > - All header files in

Re: [PATCH v1 1/1] iommu/vt-d: Enable PRI only if the device enables PASID.

2019-02-07 Thread sathyanarayanan kuppuswamy
On 2/7/19 1:15 PM, David Woodhouse wrote: On Thu, 2019-02-07 at 13:09 -0800, Raj, Ashok wrote: You are right.. they are completely orthogonal. We just don't have a way to handle the page-requests for request without PASID's. There are some of the vIOMMU work to pass the PRI to who owns the

[PATCH v2 2/2] staging/android: simplify handle_vsoc_cond_wait

2019-02-07 Thread Hugo Lefeuvre
simplify handle_vsoc_cond_wait (drivers/staging/android/vsoc.c) using newly added wait_event_freezable_hrtimeout helper and remove duplicate include. Signed-off-by: Hugo Lefeuvre --- Changes in v2: - Fix removal of necessary linux/freezer.h include. - Make commit message more precise about

Re: [PATCH v11 00/16] Remove nested TPM operations

2019-02-07 Thread Jarkko Sakkinen
On Thu, Feb 07, 2019 at 07:41:56PM +0100, Alexander Steffen wrote: > On 06.02.2019 13:06, Jarkko Sakkinen wrote: > > On Wed, Feb 06, 2019 at 12:47:07AM +0200, Jarkko Sakkinen wrote: > > > Make the changes necessary to detach TPM space code and TPM activation > > > code out of the tpm_transmit()

[PATCH v2 1/2] sched/wait: introduce wait_event_freezable_hrtimeout

2019-02-07 Thread Hugo Lefeuvre
introduce wait_event_freezable_hrtimeout, an interruptible and freezable version of wait_event_hrtimeout. This helper will allow for simplifications in staging/android/vsoc.c, among others. Signed-off-by: Hugo Lefeuvre --- Changes in v2: - No change. include/linux/wait.h | 25

[PATCH v2 0/2] sched/wait, staging/android: simplification of freeze related code

2019-02-07 Thread Hugo Lefeuvre
This patchset introduces a new wait_event_freezable_hrtimeout method to the wait api. wait_event_freezable_hrtimeout is then used to greatly simplify handle_vsoc_cond_wait in the android vsoc driver, reducing the size of the vsoc driver. Changes since v1 [1]: - Delete "[1/3] sched/wait: use

Re: [PATCH v2 8/9] PCI: dwc: Remove Keystone specific dw_pcie_host_ops

2019-02-07 Thread Bjorn Helgaas
On Thu, Feb 07, 2019 at 04:39:23PM +0530, Kishon Vijay Abraham I wrote: > Now that Keystone started using it's own msi_irq_chip, remove > Keystone specific callback function defined in dw_pcie_host_ops. s/it's/its/ s/callback function/callback functions/ > Signed-off-by: Kishon Vijay Abraham I

Re: [PATCH v1 1/1] iommu/vt-d: Enable PRI only if the device enables PASID.

2019-02-07 Thread Raj, Ashok
On Thu, Feb 07, 2019 at 09:15:24PM +, David Woodhouse wrote: > On Thu, 2019-02-07 at 13:09 -0800, Raj, Ashok wrote: > > You are right.. they are completely orthogonal. We just don't have > > a way to handle the page-requests for request without PASID's. > > > > There are some of the vIOMMU

Re: [RFC 4/5] arm64: dts: Add nodes for PCIe IP blocks

2019-02-07 Thread Andrey Smirnov
On Thu, Feb 7, 2019 at 6:27 AM Lucas Stach wrote: > > Am Donnerstag, den 31.01.2019, 12:43 -0800 schrieb Andrey Smirnov: > > Add nodes for two PCIe controllers found on i.MX8MQ. > > > > > Signed-off-by: Andrey Smirnov > > > Cc: Shawn Guo > > > Cc: Fabio Estevam > > > Cc: Chris Healy > > > Cc:

Re: [PATCH v3] tpm: Fix some name collisions with drivers/char/tpm.h

2019-02-07 Thread Jarkko Sakkinen
On Thu, Feb 07, 2019 at 04:31:58PM +, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: bf38b8710892 tpm/tpm_i2c_stm_st33: Split tpm_i2c_tpm_st33 in 2 > layers (core + phy). > > The bot has

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