[PATCH 4.14 37/63] mtd: spi-nor: intel-spi: Avoid crossing 4K address boundary on read/write

2019-05-20 Thread Greg Kroah-Hartman
From: Alexander Sverdlin commit 2b75ebeea6f4937d4d05ec4982c471cef9a29b7f upstream. It was observed that reads crossing 4K address boundary are failing. This limitation is mentioned in Intel documents: Intel(R) 9 Series Chipset Family Platform Controller Hub (PCH) Datasheet: "5.26.3 Flash Acce

[PATCH 4.14 30/63] ASoC: RT5677-SPI: Disable 16Bit SPI Transfers

2019-05-20 Thread Greg Kroah-Hartman
From: Curtis Malainey commit a46eb523220e242affb9a6bc9bb8efc05f4f7459 upstream. The current algorithm allows 3 types of transfers, 16bit, 32bit and burst. According to Realtek, 16bit transfers have a special restriction in that it is restricted to the memory region of 0x1802 ~ 0x18021000. Th

[PATCH 4.14 24/63] crypto: arm/aes-neonbs - dont access already-freed walk.iv

2019-05-20 Thread Greg Kroah-Hartman
From: Eric Biggers commit 767f015ea0b7ab9d60432ff6cd06b664fd71f50f upstream. If the user-provided IV needs to be aligned to the algorithm's alignmask, then skcipher_walk_virt() copies the IV into a new aligned buffer walk.iv. But skcipher_walk_virt() can fail afterwards, and then if the caller

[PATCH 4.14 26/63] ALSA: hda/hdmi - Read the pin sense from register when repolling

2019-05-20 Thread Greg Kroah-Hartman
From: Hui Wang commit 8c2e6728c2bf95765b724e07d0278ae97cd1ee0d upstream. The driver will check the monitor presence when resuming from suspend, starting poll or interrupt triggers. In these 3 situations, the jack_dirty will be set to 1 first, then the hda_jack.c reads the pin_sense from register

[PATCH 4.14 14/63] arm64: Clear OSDLR_EL1 on CPU boot

2019-05-20 Thread Greg Kroah-Hartman
From: Jean-Philippe Brucker commit 6fda41bf12615ee7c3ddac88155099b1a8cf8d00 upstream. Some firmwares may reboot CPUs with OS Double Lock set. Make sure that it is unlocked, in order to use debug exceptions. Cc: Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon Signed-off-by: Gr

[PATCH 4.14 09/63] ARM: dts: exynos: Fix interrupt for shared EINTs on Exynos5260

2019-05-20 Thread Greg Kroah-Hartman
From: Stuart Menefy commit b7ed69d67ff0788d8463e599dd5dd1b45c701a7e upstream. Fix the interrupt information for the GPIO lines with a shared EINT interrupt. Fixes: 16d7ff2642e7 ("ARM: dts: add dts files for exynos5260 SoC") Cc: sta...@vger.kernel.org Signed-off-by: Stuart Menefy Signed-off-by:

[PATCH 4.14 00/63] 4.14.121-stable review

2019-05-20 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.121 release. There are 63 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Wed 22 May 2019 11:50:54 AM UTC. Anything re

[PATCH 4.14 23/63] crypto: rockchip - update IV buffer to contain the next IV

2019-05-20 Thread Greg Kroah-Hartman
From: Zhang Zhijie commit f0cfd57b43fec65761ca61d3892b983a71515f23 upstream. The Kernel Crypto API request output the next IV data to IV buffer for CBC implementation. So the last block data of ciphertext should be copid into assigned IV buffer. Reported-by: Eric Biggers Fixes: 433cd2c617bf ("

Re: [PATCH 2/3 v5] add a new template field buf to contain the buffer

2019-05-20 Thread Roberto Sassu
On 5/18/2019 1:32 AM, prakhar srivastava wrote: On Tue, May 14, 2019 at 6:22 AM Roberto Sassu wrote: On 5/14/2019 7:07 AM, prakhar srivastava wrote: On Mon, May 13, 2019 at 6:48 AM Roberto Sassu wrote: On 5/11/2019 12:37 AM, Prakhar Srivastava wrote: From: Prakhar Srivastava The buffer(

Re: [PATCH v1] device property: Add helpers to count items in an array

2019-05-20 Thread Sakari Ailus
Hi Andy, On Mon, May 20, 2019 at 03:38:48PM +0300, Andy Shevchenko wrote: > The usual pattern to allocate the necessary space for an array of properties > is > to count them fist using: s/fist/first/ With that, Acked-by: Sakari Ailus > > count = device_property_read_uXX_array(dev, propnam

[PATCH 4.14 06/63] x86/speculation/mds: Revert CPU buffer clear on double fault exit

2019-05-20 Thread Greg Kroah-Hartman
From: Andy Lutomirski commit 88640e1dcd089879530a49a8d212d1814678dfe7 upstream. The double fault ESPFIX path doesn't return to user mode at all -- it returns back to the kernel by simulating a #GP fault. prepare_exit_to_usermode() will run on the way out of general_protection before running user

[PATCH 4.14 36/63] mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values

2019-05-20 Thread Greg Kroah-Hartman
From: Dmitry Osipenko commit ea611d1cc180fbb56982c83cd5142a2b34881f5c upstream. The FPS_PERIOD_MAX_US definitions are swapped for MAX20024 and MAX77620, fix it. Cc: stable Signed-off-by: Dmitry Osipenko Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- include/linux/mfd/max77

[PATCH 4.14 04/63] PCI: hv: Add hv_pci_remove_slots() when we unload the driver

2019-05-20 Thread Greg Kroah-Hartman
[ Upstream commit 15becc2b56c6eda3d9bf5ae993bafd5661c1fad1 ] When we unload the pci-hyperv host controller driver, the host does not send us a PCI_EJECT message. In this case we also need to make sure the sysfs PCI slot directory is removed, otherwise a command on a slot file eg: "cat /sys/bus/p

[PATCH 4.14 05/63] PCI: hv: Add pci_destroy_slot() in pci_devices_present_work(), if necessary

2019-05-20 Thread Greg Kroah-Hartman
[ Upstream commit 340d455699400f2c2c0f9b3f703ade3085cdb501 ] When we hot-remove a device, usually the host sends us a PCI_EJECT message, and a PCI_BUS_RELATIONS message with bus_rel->device_count == 0. When we execute the quick hot-add/hot-remove test, the host may not send us the PCI_EJECT messa

[PATCH 4.14 03/63] PCI: hv: Fix a memory leak in hv_eject_device_work()

2019-05-20 Thread Greg Kroah-Hartman
[ Upstream commit 05f151a73ec2b23ffbff706e5203e729a995cdc2 ] When a device is created in new_pcichild_device(), hpdev->refs is set to 2 (i.e. the initial value of 1 plus the get_pcichild()). When we hot remove the device from the host, in a Linux VM we first call hv_pci_eject_device(), which incr

[PATCH 4.14 12/63] power: supply: axp288_charger: Fix unchecked return value

2019-05-20 Thread Greg Kroah-Hartman
From: Gustavo A. R. Silva commit c3422ad5f84a66739ec6a37251ca27638c85b6be upstream. Currently there is no check on platform_get_irq() return value in case it fails, hence never actually reporting any errors and causing unexpected behavior when using such value as argument for function regmap_irq

[PATCH 4.9 20/44] ASoC: max98090: Fix restore of DAPM Muxes

2019-05-20 Thread Greg Kroah-Hartman
From: Jon Hunter commit ecb2795c08bc825ebd604997e5be440b060c5b18 upstream. The max98090 driver defines 3 DAPM muxes; one for the right line output (LINMOD Mux), one for the left headphone mixer source (MIXHPLSEL Mux) and one for the right headphone mixer source (MIXHPRSEL Mux). The same bit is u

Re: [PATCH V2 0/4] Prevent vhost kthread from hogging CPU

2019-05-20 Thread Michael S. Tsirkin
On Fri, May 17, 2019 at 12:29:48AM -0400, Jason Wang wrote: > Hi: > > This series try to prevent a guest triggerable CPU hogging through > vhost kthread. This is done by introducing and checking the weight > after each requrest. The patch has been tested with reproducer of > vsock and virtio-net.

[PATCH 4.9 41/44] ext4: zero out the unused memory region in the extent tree block

2019-05-20 Thread Greg Kroah-Hartman
From: Sriram Rajagopalan commit 592acbf16821288ecdc4192c47e3774a4c48bb64 upstream. This commit zeroes out the unused memory region in the buffer_head corresponding to the extent metablock after writing the extent header and the corresponding extent node entries. This is done to prevent random u

Re: [PATCH 1/4] NTB: ntb_perf: Increased the number of message retries to 1000

2019-05-20 Thread Sanjay R Mehta
On 3/20/2019 11:20 PM, Jon Mason wrote: > On Fri, Feb 15, 2019 at 09:20:07AM +, Mehta, Sanju wrote: >> From: Sanjay R Mehta >> >> while waiting for the peer ntb_perf to initialize scratchpad >> registers, local side ntb_perf might have already exhausted the >> maximum number of retries which

[PATCH 4.9 38/44] fib_rules: fix error in backport of e9919a24d302 ("fib_rules: return 0...")

2019-05-20 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman When commit e9919a24d302 ("fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied") was backported to 4.9.y, it changed the logic a bit as err should have been reset before exiting the test, like it happens in the original logic. If this

[PATCH 4.9 31/44] bcache: fix a race between cache register and cacheset unregister

2019-05-20 Thread Greg Kroah-Hartman
From: Liang Chen commit a4b732a248d12cbdb46999daf0bf288c011335eb upstream. There is a race between cache device register and cache set unregister. For an already registered cache device, register_bcache will call bch_is_open to iterate through all cachesets and check every cache there. The race

[PATCH 4.9 02/44] locking/rwsem: Prevent decrement of reader count before increment

2019-05-20 Thread Greg Kroah-Hartman
[ Upstream commit a9e9bcb45b1525ba7aea26ed9441e8632aeeda58 ] During my rwsem testing, it was found that after a down_read(), the reader count may occasionally become 0 or even negative. Consequently, a writer may steal the lock at that time and execute with the reader in parallel thus breaking the

Re: [PATCH v2 26/30] fuse: Add logic to free up a memory range

2019-05-20 Thread Vivek Goyal
On Sun, May 19, 2019 at 03:48:05PM +0800, Eric Ren wrote: > Hi, > > @@ -1784,8 +1822,23 @@ static int fuse_iomap_begin(struct inode *inode, > > loff_t pos, loff_t length, > > if (pos >= i_size_read(inode)) > > goto iomap_hole; > > > > - alloc_d

[PATCH 4.9 07/44] ARM: exynos: Fix a leaked reference by adding missing of_node_put

2019-05-20 Thread Greg Kroah-Hartman
From: Wen Yang commit 629266bf7229cd6a550075f5961f95607b823b59 upstream. The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with warnings like: arch/arm/mach-exynos/firmware.c:201

[PATCH 4.9 00/44] 4.9.178-stable review

2019-05-20 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.178 release. There are 44 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Wed 22 May 2019 11:50:58 AM UTC. Anything rec

Re: [PATCH] svm/avic: Do not send AVIC doorbell to self

2019-05-20 Thread Paolo Bonzini
On 03/05/19 15:38, Suthikulpanit, Suravee wrote: > AVIC doorbell is used to notify a running vCPU that interrupts > has been injected into the vCPU AVIC backing page. Current logic > checks only if a VCPU is running before sending a doorbell. > However, the doorbell is not necessary if the destinat

Re: [PATCH] checkpatch: add test for empty line after Fixes statement

2019-05-20 Thread Joe Perches
On Mon, 2019-05-20 at 15:42 +0300, Michal Kalderon wrote: > Check that there is no empty line after a fixes statement why?

Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb

2019-05-20 Thread Oliver Neukum
On Mo, 2019-05-20 at 12:47 +0200, Nicolas Saenz Julienne wrote: > + * For more information on the firmware interface check: > + * https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface > + */ > +struct bcm2835_firmware_prop { > + u32 id; > + u32 val; > + u32 disab

Re: [PATCH v2] svm/avic: Allow avic_vcpu_load logic to support host APIC ID 255

2019-05-20 Thread Paolo Bonzini
On 14/05/19 17:49, Suthikulpanit, Suravee wrote: > Current logic does not allow VCPU to be loaded onto CPU with > APIC ID 255. This should be allowed since the host physical APIC ID > field in the AVIC Physical APIC table entry is an 8-bit value, > and APIC ID 255 is valid in system with x2APIC ena

Re: [RFC PATCH v2 13/17] sched: Add core wide task selection and scheduling.

2019-05-20 Thread Phil Auld
On Sat, May 18, 2019 at 11:37:56PM +0800 Aubrey Li wrote: > On Wed, Apr 24, 2019 at 12:18 AM Vineeth Remanan Pillai > wrote: > > > > From: Peter Zijlstra (Intel) > > > > Instead of only selecting a local task, select a task for all SMT > > siblings for every reschedule on the core (irrespective w

Re: [RFC PATCH 1/4] ftrace: Expose flags used for ftrace_replace_code()

2019-05-20 Thread Steven Rostedt
On Sat, 18 May 2019 00:32:45 +0530 "Naveen N. Rao" wrote: > Since ftrace_replace_code() is a __weak function and can be overridden, > we need to expose the flags that can be set. So, move the flags enum to > the header file. > > Signed-off-by: Naveen N. Rao Reviewed-by: Steven Rostedt (VMware)

Re: [PATCH v2 1/2] eeprom: at24: use devm_i2c_new_dummy_device()

2019-05-20 Thread Wolfram Sang
On Mon, May 20, 2019 at 09:10:41AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Now that it's upstream, use the resource managed version > of i2c_new_dummy_device(). > > Signed-off-by: Bartosz Golaszewski Looks good now (not tested, though): Reviewed-by: Wolfram Sang Th

Re: [RFC PATCH 2/4] x86/ftrace: Fix use of flags in ftrace_replace_code()

2019-05-20 Thread Steven Rostedt
On Sat, 18 May 2019 00:32:46 +0530 "Naveen N. Rao" wrote: > In commit a0572f687fb3c ("ftrace: Allow ftrace_replace_code() to be > schedulable), the generic ftrace_replace_code() function was modified to > accept a flags argument in place of a single 'enable' flag. However, the > x86 version of th

[PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support

2019-05-20 Thread Jerome Brunet
Add network support to the g12a SoC family This is series is based on 5.2-rc1 and the patches I already sent last week. If this is not convient for you, please let me know, I'll rebase. Also, you will need to get the clk tag "clk-meson-5.3-1-fixes" (to get the update MPLL50M id) from clk-meson [0

[PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions

2019-05-20 Thread Jerome Brunet
Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds Signed-off-by: Jerome Brunet --- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 + 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlog

[PATCH v2 5/5] arm64: dts: meson: sei510: add network support

2019-05-20 Thread Jerome Brunet
Enable the network interface of the SEI510 which use the internal PHY. Tested-by: Kevin Hilman Signed-off-by: Jerome Brunet --- arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/

[PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller

2019-05-20 Thread Jerome Brunet
Add the synopsys ethernet mac controller embedded in the g12a SoC family. Signed-off-by: Jerome Brunet --- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/aml

[PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer

2019-05-20 Thread Jerome Brunet
Add the g12a mdio multiplexer which allows to connect to either an external phy through the SoC pins or the internal 10/100 phy Signed-off-by: Jerome Brunet --- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 32 + 1 file changed, 32 insertions(+) diff --git a/arch/arm64/boot/

[PATCH v2 4/5] arm64: dts: meson: u200: add internal network

2019-05-20 Thread Jerome Brunet
The u200 is the main mother board for the S905D2. It can provide both the internal and external network. However, by default the resistance required for the external RGMII bus are not fitted, so enable the internal PHY. Signed-off-by: Jerome Brunet --- arch/arm64/boot/dts/amlogic/meson-g12a-u200

Re: [PATCH] checkpatch: add test for empty line after Fixes statement

2019-05-20 Thread Leon Romanovsky
On Mon, May 20, 2019 at 05:56:36AM -0700, Joe Perches wrote: > On Mon, 2019-05-20 at 15:42 +0300, Michal Kalderon wrote: > > Check that there is no empty line after a fixes statement > > why? It is common mistake for Gerrit users, they are removing their ChangeID crap with some wrong sed command w

RE: [EXT] Re: [PATCH] checkpatch: add test for empty line after Fixes statement

2019-05-20 Thread Michal Kalderon
> From: Joe Perches > Sent: Monday, May 20, 2019 3:57 PM > Subject: [EXT] Re: [PATCH] checkpatch: add test for empty line after Fixes > statement > > External Email > > -- > On Mon, 2019-05-20 at 15:42 +0300, Michal Kalderon wro

[PATCH 1/1] PCI/IOV: Fix VF0 cached config space size for other VFs

2019-05-20 Thread Hao Zheng
Set the pcie_cap field before getting the config space size for other VFs. Otherwise, the config space size of other VFs are error set to 256, while the size of VF0 is 4096. Signed-off-by: Hao Zheng Signed-off-by: Quan Xu --- drivers/pci/iov.c | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [PATCH] dt-bindings: Convert vendor prefixes to json-schema

2019-05-20 Thread Maxime Ripard
Hi Rob, On Fri, May 10, 2019 at 02:40:18PM -0500, Rob Herring wrote: > Convert the vendor prefix registry to a schema. This will enable checking > that new vendor prefixes are added (in addition to the less than perfect > checkpatch.pl check) and will also check against adding other prefixes > whi

Re: [PATCH 1/3] firmware: qcom_scm: Use proper types for dma mappings

2019-05-20 Thread Julien Grall
Hi Ian, On 20/05/2019 10:41, Ian Jackson wrote: Stephen Boyd writes ("[PATCH 1/3] firmware: qcom_scm: Use proper types for dma mappings"): We need to use the proper types and convert between physical addresses and dma addresses here to avoid mismatch warnings. This is especially important on s

Re: [PATCH] x86/kvm/pmu: Set AMD's virt PMU version to 1

2019-05-20 Thread Paolo Bonzini
On 08/05/19 19:14, Borislav Petkov wrote: > On Wed, May 08, 2019 at 05:08:44PM +, Lendacky, Thomas wrote: >> On 5/8/19 12:02 PM, Borislav Petkov wrote: >>> From: Borislav Petkov >>> >>> After commit: >>> >>> 672ff6cff80c ("KVM: x86: Raise #GP when guest vCPU do not support PMU") >> >> You sh

Re: [PATCH v4 3/3] i2c-ocores: sifive: add polling mode workaround for FU540-C000 SoC

2019-05-20 Thread Sagar Kadam
Hi Andrew, On Mon, May 20, 2019 at 6:11 PM Andrew Lunn wrote: > > > @@ -406,7 +416,7 @@ static int ocores_xfer(struct i2c_adapter *adap, > > { > > struct ocores_i2c *i2c = i2c_get_adapdata(adap); > > > > - if (i2c->flags & OCORES_FLAG_POLL) > > + if ((i2c->flags & (OCORES_FLAG_POLL

[PATCH RFC v8 01/10] namei: obey trailing magic-link DAC permissions

2019-05-20 Thread Aleksa Sarai
The ability for userspace to "re-open" file descriptors through /proc/self/fd has been a very useful tool for all sorts of usecases (container runtimes are one common example). However, the current interface for doing this has resulted in some pretty subtle security holes. Userspace can re-open a f

[PATCH RFC v8 02/10] procfs: switch magic-link modes to be more sane

2019-05-20 Thread Aleksa Sarai
Now that magic-link modes are obeyed for file re-opening purposes, some of the pre-existing magic-link modes need to be adjusted to be more semantically correct. The most blatant example of this is /proc/self/exe, which had a mode of a+rwx even though tautologically the file could never be opened

[PATCH RFC v8 00/10] namei: resolveat(2) path resolution restrictions

2019-05-20 Thread Aleksa Sarai
Patch changelog: v8: * Default to O_CLOEXEC to match other new fd-creation syscalls (users can always disable O_CLOEXEC afterwards). [Christian] * Implement magic-link restrictions based on their mode. This is done through a series of masks and is designed to avoid breaking

[PATCH RFC v8 03/10] open: O_EMPTYPATH: procfs-less file descriptor re-opening

2019-05-20 Thread Aleksa Sarai
Userspace has made use of /proc/self/fd very liberally to allow for descriptors to be re-opened. There are a wide variety of uses for this feature, but it has always required constructing a pathname and could not be done without procfs mounted. The obvious solution for this is to extend openat(2) t

[PATCH RFC v8 04/10] namei: split out nd->dfd handling to dirfd_path_init

2019-05-20 Thread Aleksa Sarai
Previously, path_init's handling of *at(dfd, ...) was only done once, but with LOOKUP_BENEATH (and LOOKUP_IN_ROOT) we have to parse the initial nd->path at different times (before or after absolute path handling) depending on whether we have been asked to scope resolution within a root. Signed-off

[PATCH RFC v8 06/10] namei: LOOKUP_IN_ROOT: chroot-like path resolution

2019-05-20 Thread Aleksa Sarai
The primary motivation for the need for this flag is container runtimes which have to interact with malicious root filesystems in the host namespaces. One of the first requirements for a container runtime to be secure against a malicious rootfs is that they correctly scope symlinks (that is, they s

[PATCH RFC v8 05/10] namei: O_BENEATH-style path resolution flags

2019-05-20 Thread Aleksa Sarai
Add the following flags to allow various restrictions on path resolution (these affect the *entire* resolution, rather than just the final path component -- as is the case with most other AT_* flags). The primary justification for these flags is to allow for programs to be far more strict about ho

Re: [EXT] Re: [PATCH] checkpatch: add test for empty line after Fixes statement

2019-05-20 Thread Joe Perches
On Mon, 2019-05-20 at 13:16 +, Michal Kalderon wrote: > > From: Joe Perches > > Sent: Monday, May 20, 2019 3:57 PM > > Subject: [EXT] Re: [PATCH] checkpatch: add test for empty line after Fixes > > statement > > > > External Email > > > > -

[PATCH RFC v8 09/10] kselftest: save-and-restore errno to allow for %m formatting

2019-05-20 Thread Aleksa Sarai
Previously, using "%m" in a ksft_* format string can result in strange output because the errno value wasn't saved before calling other libc functions. The solution is to simply save and restore the errno before we format the user-supplied format string. Signed-off-by: Aleksa Sarai --- tools/tes

[PATCH RFC v8 07/10] namei: aggressively check for nd->root escape on ".." resolution

2019-05-20 Thread Aleksa Sarai
This patch allows for LOOKUP_BENEATH and LOOKUP_IN_ROOT to safely permit ".." resolution (in the case of LOOKUP_BENEATH the resolution will still fail if ".." resolution would resolve a path outside of the root -- while LOOKUP_IN_ROOT will chroot(2)-style scope it). magic-link jumps are still disal

[PATCH RFC v8 08/10] namei: resolveat(2) syscall

2019-05-20 Thread Aleksa Sarai
The most obvious syscall to add support for the new LOOKUP_* scoping flags would be openat(2) (along with the required execveat(2) change included in this series). However, there are a few reasons to not do this: * The new LOOKUP_* flags are intended to be security features, and openat(2) will

[PATCH RFC v8 10/10] selftests: add resolveat(2) selftests

2019-05-20 Thread Aleksa Sarai
Test all of the various resolveat(2) flags, as well as how file descriptor re-opening works. A small stress-test of a symlink-rename attack is included to show that the protections against ".."-based attacks are sufficient. Signed-off-by: Aleksa Sarai --- tools/testing/selftests/Makefile

Re: [PATCH v1] device property: Add helpers to count items in an array

2019-05-20 Thread Heikki Krogerus
On Mon, May 20, 2019 at 03:38:48PM +0300, Andy Shevchenko wrote: > The usual pattern to allocate the necessary space for an array of properties > is > to count them fist using: > > count = device_property_read_uXX_array(dev, propname, NULL, 0); > > Introduce helpers device_property_count_uXX()

[PATCH 5/5] drm/meson: Output in YUV444 if sink supports it

2019-05-20 Thread Neil Armstrong
With the YUV420 handling, we can dynamically setup the HDMI output pixel format depending on the mode and connector info. So now, we can output in YUV444, which is the native video pipeline format, directly to the HDMI Sink if it's supported without necessarily involving the HDMI Controller CSC. S

Re: [PATCH v3 1/3] thermal: rockchip: fix up the tsadc pinctrl setting error

2019-05-20 Thread Enric Balletbo Serra
Hi all, As pointed by [1] and [2] this commit, that now is upstream, breaks veyron (rk3288) and kevin (rk3399) boards. The problem is especially critical for veyron boards because they don't boot anymore. I didn't look deep at the problem but I have some concerns about this patch, see below. [1]

[PATCH] kvm: selftests: avoid type punning

2019-05-20 Thread Paolo Bonzini
Avoid warnings from -Wstrict-aliasing by using memcpy. Signed-off-by: Paolo Bonzini --- tools/testing/selftests/kvm/lib/ucall.c| 2 +- tools/testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/too

[PATCH] KVM: x86: do not spam dmesg with VMCS/VMCB dumps

2019-05-20 Thread Paolo Bonzini
Userspace can easily set up invalid processor state in such a way that dmesg will be filled with VMCS or VMCB dumps. Disable this by default using a module parameter. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/svm.c | 9 - arch/x86/kvm/vmx/vmx.c | 26 +++---

[PATCH] Bluetooth: btbcm: Add entry for BCM4359C0 UART bluetooth

2019-05-20 Thread Neil Armstrong
The BCM4359C0 BT/Wi-Fi compo chip needs an entry to be discovered by the btbcm driver. Tested using an AP6398S module from Ampak. Signed-off-by: Neil Armstrong --- drivers/bluetooth/btbcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c

Re: [PATCH] kvm: selftests: avoid type punning

2019-05-20 Thread Thomas Huth
On 20/05/2019 15.38, Paolo Bonzini wrote: > Avoid warnings from -Wstrict-aliasing by using memcpy. > > Signed-off-by: Paolo Bonzini > --- > tools/testing/selftests/kvm/lib/ucall.c| 2 +- > tools/testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c | 2 +- > 2 files ch

[PATCH 1/2] ARC: [plat-hsdk]: Add missing multicast filter bins number to GMAC node

2019-05-20 Thread Jose Abreu
GMAC controller on HSDK boards supports 256 Hash Table size so we need to add the multicast filter bins property. This allows for the Hash filter to work properly using stmmac driver. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: Rob Herring Cc: Mark Rutland Cc: Vineet Gupta Cc: Eugeniy Paltse

[PATCH 1/1] iommu/vt-d: Remove unnecessary rcu_read_locks

2019-05-20 Thread Lukasz Odzioba
We use RCU's for rarely updated lists like iommus, rmrr, atsr units. I'm not sure why domain_remove_dev_info() in domain_exit() was surrounded by rcu_read_lock. Lock was present before refactoring in d160aca527, but it was related to rcu list, not domain_remove_dev_info function. dmar_remove_one_

[PATCH 0/2] ARC: [plat-hsdk]: GMAC DT Bindings Improvements

2019-05-20 Thread Jose Abreu
Add two missing bindings. Cc: Joao Pinto Cc: Rob Herring Cc: Mark Rutland Cc: Vineet Gupta Cc: Eugeniy Paltsev Cc: Alexey Brodkin Jose Abreu (2): ARC: [plat-hsdk]: Add missing multicast filter bins number to GMAC node ARC: [plat-hsdk]: Add missing FIFO size entry in GMAC node arch

[PATCH 2/2] ARC: [plat-hsdk]: Add missing FIFO size entry in GMAC node

2019-05-20 Thread Jose Abreu
Add the binding for RX/TX fifo size of GMAC node. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: Rob Herring Cc: Mark Rutland Cc: Vineet Gupta Cc: Eugeniy Paltsev Cc: Alexey Brodkin --- arch/arc/boot/dts/hsdk.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arc/boot/dts/hsdk.d

[PATCH] arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support

2019-05-20 Thread Neil Armstrong
Enable the network interface of the X96 Mac using an external Realtek RTL8211F gigabit PHY, needing the same broken-eee properties as the previous Amlogic SoC generations. Signed-off-by: Neil Armstrong --- .../boot/dts/amlogic/meson-g12a-x96-max.dts | 22 +++ 1 file changed, 22

Re: [RFC PATCH 2/4] x86/ftrace: Fix use of flags in ftrace_replace_code()

2019-05-20 Thread Steven Rostedt
On Mon, 20 May 2019 09:13:20 -0400 Steven Rostedt wrote: > > I haven't yet tested this patch on x86, but this looked wrong so sending > > this as a RFC. > > This code has been through a bit of updates, and I need to go through > and clean it up. I'll have to take a look and convert "int" to

Re: [PATCH] tools: gpio: Add include/linux/gpio.h to .gitignore

2019-05-20 Thread Bartosz Golaszewski
niedz., 12 maj 2019 o 07:38 Kelsey Skunberg napisaƂ(a): > > File include/linux/gpio.h is generated after building > tools/testing/selftests > > Add gpio.h to .gitignore to help clean up working tree status. > > Signed-off-by: Kelsey Skunberg > --- > tools/gpio/.gitignore | 2 +- > 1 file changed

Re: [PATCH v1] device property: Add helpers to count items in an array

2019-05-20 Thread Andy Shevchenko
On Mon, May 20, 2019 at 04:37:58PM +0300, Heikki Krogerus wrote: > On Mon, May 20, 2019 at 03:38:48PM +0300, Andy Shevchenko wrote: > > The usual pattern to allocate the necessary space for an array of > > properties is > > to count them fist using: > > > > count = device_property_read_uXX_arra

[PATCH 1/3] arm64: dts: meson: g12a: add drive-strength hdmi ddc pins

2019-05-20 Thread Neil Armstrong
With the default boot settings, the DDC drive strength is too weak, set the driver-strengh to 4mA to avoid errors on the DDC line. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g

[PATCH 2/3] arm64: dts: meson: g12a: add drive strength for eth pins

2019-05-20 Thread Neil Armstrong
With the X96 Max board using an external Gigabit Ethernet PHY, add the same driver strength to the Ethernet pins as the vendor tree. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/mes

[PATCH 3/3] arm64: dts: meson: g12a: Add hwrng node

2019-05-20 Thread Neil Armstrong
The Amlogic G12A has the hwrng module in an unknown "EFUSE" bus. The hwrng is not enabled on the vendor G12A DTs, but is enabled on next generation SM1 SoC family sharing the exact same memory mapping. Let's add the "EFUSE" bus and the hwrng node. This hwrng has been checked with the rng-tools r

[PATCH v2] scsi: libsas: no need to join wide port again in sas_ex_discover_dev()

2019-05-20 Thread Jason Yan
Since we are processing events synchronously now, the second call of sas_ex_join_wide_port() in sas_ex_discover_dev() is not needed. There will be no races with other works in disco workqueue. So remove the second sas_ex_join_wide_port(). I did not change the return value of 'res' to error when di

[PATCH 0/3] arm64: dts: meson: g12a: add drive strength and hwrng

2019-05-20 Thread Neil Armstrong
This patchset adds : - drive strength for the HDMI DDC and Ethernet pads - HWRNG node Dependencies: - None Neil Armstrong (3): arm64: dts: meson: g12a: add drive-strength hdmi ddc pins arm64: dts: meson: g12a: add drive strength for eth pins arm64: dts: meson: g12a: Add hwrng node arch/a

Re: [alsa-devel] [PATCH] ASoC: Intel: bytcr_5640.c:Refactored if statement and removed buffer

2019-05-20 Thread Pierre-Louis Bossart
On 5/20/19 3:37 AM, Hans de Goede wrote: Hi all, On 19-05-19 19:57, nariman wrote: From: Nariman Etemadi in function snd_byt_rt5640_mc_probe and removed buffer yt_rt5640_codec_aif_name & byt_rt5640_cpu_dai_name Signed-off-by: Nariman Etemadi Series (all 4 patches) look good to me: R

[PATCH v2] device property: Add helpers to count items in an array

2019-05-20 Thread Andy Shevchenko
The usual pattern to allocate the necessary space for an array of properties is to count them first by calling: count = device_property_read_uXX_array(dev, propname, NULL, 0); if (count < 0) return count; Introduce helpers device_property_count_uXX() to count items by supplying hard c

Re: [PATCH] drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read

2019-05-20 Thread Thomas Hellstrom
Thanks, Murray, I'll include in the next vmwgfx-fixes pull request. On Mon, 2019-05-20 at 21:57 +1200, Murray McAllister wrote: > If SVGA_3D_CMD_DX_SET_SHADER is called with a shader ID > of SVGA3D_INVALID_ID, and a shader type of > SVGA3D_SHADERTYPE_INVALID, the calculated binding.shader_slot >

Re: [EXT] Re: [PATCH] checkpatch: add test for empty line after Fixes statement

2019-05-20 Thread Leon Romanovsky
On Mon, May 20, 2019 at 06:34:49AM -0700, Joe Perches wrote: > On Mon, 2019-05-20 at 13:16 +, Michal Kalderon wrote: > > > From: Joe Perches > > > Sent: Monday, May 20, 2019 3:57 PM > > > Subject: [EXT] Re: [PATCH] checkpatch: add test for empty line after Fixes > > > statement > > > > > > Ext

Re: [PATCH v2] scsi: libsas: no need to join wide port again in sas_ex_discover_dev()

2019-05-20 Thread John Garry
On 20/05/2019 15:06, Jason Yan wrote: Since we are processing events synchronously now, the second call of sas_ex_join_wide_port() in sas_ex_discover_dev() is not needed. There will be no races with other works in disco workqueue. So remove the second sas_ex_join_wide_port(). I did not change th

[PATCH 2/8] net: qualcomm: rmnet: kill RMNET_MAP_GET_*() accessor macros

2019-05-20 Thread Alex Elder
The following macros, defined in "rmnet_map.h", assume a socket buffer is provided as an argument without any real indication this is the case. RMNET_MAP_GET_MUX_ID() RMNET_MAP_GET_CD_BIT() RMNET_MAP_GET_PAD() RMNET_MAP_GET_CMD_START() RMNET_MAP_GET_LENGTH() What they hide is pr

[PATCH 1/8] net: qualcomm: rmnet: fix struct rmnet_map_header

2019-05-20 Thread Alex Elder
The C bit-fields in the first byte of the rmnet_map_header structure are defined in the wrong order. The first byte should be formatted this way: +--- reserved_bit | +- cd_bit | | v v +---+-+-+ | pad_len

[PATCH 3/8] net: qualcomm: rmnet: use field masks instead of C bit-fields

2019-05-20 Thread Alex Elder
Using C bitfields (e.g. int foo : 3) is not portable. So stop using them for the command/data flag and the pad length fields in the rmnet_map structure. Instead, use the functions defined in along with field mask constants to extract or assign values within an integral structure member of a know

[PATCH 5/8] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer

2019-05-20 Thread Alex Elder
Replace the use of C bit-fields in the rmnet_map_dl_csum_trailer structure with a single integral field, using field masks to encode or get at sub-field values. Signed-off-by: Alex Elder --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 6 -- drivers/net/ethernet/qualcomm/rmnet/rmne

[PATCH 0/8] net: introduce "include/linux/if_rmnet.h"

2019-05-20 Thread Alex Elder
The main objective of this series was originally to define a single public header file containing a few structure definitions that are currently defined privately for the Qualcomm "rmnet" driver. In review, Arnd Bergmann said that before making them public, the structures should avoid using C bit-

[PATCH 4/8] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header

2019-05-20 Thread Alex Elder
Replace the use of C bit-fields in the rmnet_map_ul_csum_header structure with a single integral structure member, and use field masks to encode or get values within that member. Note that the previous C bit-fields were defined with CPU local endianness. Their values were computed and then forecf

[PATCH 8/8] net: introduce "include/linux/if_rmnet.h"

2019-05-20 Thread Alex Elder
The IPA driver requires some (but not all) symbols defined in "drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h". Create a new public header file "include/linux/if_rmnet.h" and move the needed definitions there. Signed-off-by: Alex Elder --- .../ethernet/qualcomm/rmnet/rmnet_handlers.c | 1 +

[PATCH 7/8] net: qualcomm: rmnet: mark endianness of struct rmnet_map_dl_csum_trailer fields

2019-05-20 Thread Alex Elder
Two 16-bit fields (csum_start_offset and csum_length) in the rmnet_map_dl_csum_trailer structure are currently defined to have type u16. But they are in fact big endian values, so should be properly represented as __be16 values. No existing code actually references these fields (they're ignored b

[PATCH 6/8] net: qualcomm: rmnet: get rid of a variable in rmnet_map_ipv4_ul_csum_header()

2019-05-20 Thread Alex Elder
The value passed as an argument to rmnet_map_ipv4_ul_csum_header() is always an IPv4 header. Just have the type of the argument reflect that rather than obscuring that with a void pointer. Rename it to be consistent with rmnet_map_ipv6_ul_csum_header(). Signed-off-by: Alex Elder --- drivers/ne

Re: test VIDIOC_G/S_PARM: FAIL on stable 4.14, 4.9 and 4.4

2019-05-20 Thread Naresh Kamboju
Hi Hans, On Mon, 13 May 2019 at 19:08, Hans Verkuil wrote: > > On 5/13/19 3:32 PM, Naresh Kamboju wrote: > > Do you see test VIDIOC_G/S_PARM: FAIL on stable 4.14, 4.9 and 4.4 > > kernel branches ? > > Probably related to commit 8a7c5594c0202 (media: v4l2-ioctl: clear fields in > s_parm). I have

Re: [PATCH 01/22] perf intel-pt: Fix itrace defaults for perf script

2019-05-20 Thread Sasha Levin
Hi, [This is an automated email] This commit has been processed because it contains a "Fixes:" tag, fixing commit: 90e457f7be08 perf tools: Add Intel PT support. The bot has tested the following trees: v5.1.3, v5.0.17, v4.19.44, v4.14.120, v4.9.177, v4.4.180. v5.1.3: Build OK! v5.0.17: Build O

Re: net: atm: Spectre v1 fix introduced bug in bcb964012d1b in -stable

2019-05-20 Thread Greg KH
On Mon, May 20, 2019 at 02:40:14PM +0200, Pavel Machek wrote: > > In lecd_attach, if arg is < 0, it was treated as 0. Spectre v1 fix > changed that. Bug does not exist in mainline AFAICT. > > Signed-off-by: Pavel Machek > # for 4.19.y > > diff --git a/net/atm/lec.c b/net/atm/lec.c > index ad4f8

[PATCH] clocksource: timer-meson6: update with SPDX Licence identifier

2019-05-20 Thread Neil Armstrong
Signed-off-by: Neil Armstrong --- drivers/clocksource/timer-meson6.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-meson6.c b/drivers/clocksource/timer-meson6.c index 84bd9479c3f8..9e8b467c71da 100644 --- a/drivers/clocksource/timer-meson6.c ++

[PATCH v2 1/7] mm: Add process_vm_mmap() syscall declaration

2019-05-20 Thread Kirill Tkhai
Similar to process_vm_readv() and process_vm_writev(), add declarations of a new syscall, which will allow to map memory from or to another process. Signed-off-by: Kirill Tkhai --- arch/x86/entry/syscalls/syscall_32.tbl |1 + arch/x86/entry/syscalls/syscall_64.tbl |2 ++ include/linux/sy

[PATCH v2 4/7] mm: Export round_hint_to_min()

2019-05-20 Thread Kirill Tkhai
Signed-off-by: Kirill Tkhai --- include/linux/mman.h | 14 ++ mm/mmap.c| 13 - 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/linux/mman.h b/include/linux/mman.h index 4b08e9c9c538..69feb3144c12 100644 --- a/include/linux/mman.h ++

[PATCH v7 0/1] iommu: enhance IOMMU dma mode build options

2019-05-20 Thread Zhen Lei
v6 --> v7: 1. Fix some text editing errors v5 --> v6: 1. give up adding boot option iommu.dma_mode v4 --> v5: As Hanjun and Thomas Gleixner's suggestion: 1. Keep the old ARCH specific boot options no change. 2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change. v4: As Robin Murphy's s

<    4   5   6   7   8   9   10   11   12   13   >