[PATCH v2 8/9] serial: fsl_lpuart: set SER_RS485_DELAY_IN_USEC accordingly

2019-02-21 Thread Martin Kepplinger
Clear SER_RS485_DELAY_IN_USEC for userspace to get correct settings. Signed-off-by: Martin Kepplinger --- drivers/tty/serial/fsl_lpuart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index ea1c85e3b432..a63aa22e3a25 100644

[PATCH v2 3/9] serial: core: add rs485-rts-delay-us devicetree property for RS485

2019-02-21 Thread Martin Kepplinger
struct serial_rs485 now optionally holds the rts delay values in microseconds. Users can set these delays in their devicetree descriptions, so this adds the microseconds-option with the "rs485-rts-delay-us" boolean property. Signed-off-by: Martin Kepplinger --- Documentation/devicetree/bindings/

Re: [GIT PULL] GNSS updates for 5.1-rc1

2019-02-21 Thread Greg Kroah-Hartman
On Thu, Feb 21, 2019 at 05:31:26PM +0100, Johan Hovold wrote: > The following changes since commit 49a57857aeea06ca831043acbb0fa5e0f50602fd: > > Linux 5.0-rc3 (2019-01-21 13:14:44 +1300) > > are available in the Git repository at: > > https://git.kernel.org/pub/scm/linux/kernel/git/johan/gns

Re: [PATCH v2 08/26] userfaultfd: wp: add WP pagetable tracking to x86

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:14AM +0800, Peter Xu wrote: > From: Andrea Arcangeli > > Accurate userfaultfd WP tracking is possible by tracking exactly which > virtual memory ranges were writeprotected by userland. We can't relay > only on the RW bit of the mapped pagetable because that informati

Re: [PATCH v2 09/26] userfaultfd: wp: userfaultfd_pte/huge_pmd_wp() helpers

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:15AM +0800, Peter Xu wrote: > From: Andrea Arcangeli > > Implement helpers methods to invoke userfaultfd wp faults more > selectively: not only when a wp fault triggers on a vma with > vma->vm_flags VM_UFFD_WP set, but only if the _PAGE_UFFD_WP bit is set > in the pa

RE: [PATCH 4.9 04/20] net: Fix for_each_netdev_feature on Big endian

2019-02-21 Thread Mehrtens, Hauke
-Original Message- From: Greg Kroah-Hartman [mailto:gre...@linuxfoundation.org] Sent: Thursday, February 21, 2019 3:36 PM To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman ; sta...@vger.kernel.org; Mehrtens, Hauke ; David S. Miller Subject: [PATCH 4.9 04/20] net: Fix for_each_netd

RE: [PATCH V4 3/3] MAINTAINERS: Add Hyper-V IOMMU driver into Hyper-V CORE AND DRIVERS scope

2019-02-21 Thread Michael Kelley
From: lantianyu1...@gmail.com Sent: Monday, February 11, 2019 6:20 AM > > This patch is to add Hyper-V IOMMU driver file into Hyper-V CORE and > DRIVERS scope. > > Signed-off-by: Lan Tianyu > --- Reviewed-by: Michael Kelley

RE: [PATCH V4 2/3] HYPERV/IOMMU: Add Hyper-V stub IOMMU driver

2019-02-21 Thread Michael Kelley
From: lantianyu1...@gmail.com Sent: Monday, February 11, 2019 6:20 AM > + /* > + * Hyper-V doesn't provide irq remapping function for > + * IO-APIC and so IO-APIC only accepts 8-bit APIC ID. > + * Cpu's APIC ID is read from ACPI MADT table and APIC IDs > + * in the MADT ta

Re: [PATCH v2 10/26] userfaultfd: wp: add UFFDIO_COPY_MODE_WP

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:16AM +0800, Peter Xu wrote: > From: Andrea Arcangeli > > This allows UFFDIO_COPY to map pages wrprotected. > > Signed-off-by: Andrea Arcangeli > Signed-off-by: Peter Xu Minor nitpick down below, but in any case: Reviewed-by: Jérôme Glisse > --- > fs/userfault

Re: [PATCH RFC 3/5] sched/cpufreq: Fix incorrect RCU API usage

2019-02-21 Thread Paul E. McKenney
On Thu, Feb 21, 2019 at 12:13:11PM -0500, Joel Fernandes wrote: > On Thu, Feb 21, 2019 at 05:11:44PM +0100, Peter Zijlstra wrote: > > On Thu, Feb 21, 2019 at 07:52:18AM -0800, Paul E. McKenney wrote: > > > On Thu, Feb 21, 2019 at 04:31:17PM +0100, Peter Zijlstra wrote: > > > > On Thu, Feb 21, 2019

Re: [PATCH v2 11/26] mm: merge parameters for change_protection()

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:17AM +0800, Peter Xu wrote: > change_protection() was used by either the NUMA or mprotect() code, > there's one parameter for each of the callers (dirty_accountable and > prot_numa). Further, these parameters are passed along the calls: > > - change_protection_rang

Re: [PATCH v2] x86/asm: Pin sensitive CR4 bits

2019-02-21 Thread Sean Christopherson
On Wed, Feb 20, 2019 at 10:09:34AM -0800, Kees Cook wrote: > Several recent exploits have used direct calls to the native_write_cr4() > function to disable SMEP and SMAP before then continuing their exploits > using userspace memory access. This pins bits of cr4 so that they cannot > be changed thr

Re: [PATCH v8 0/7] freezer for cgroup v2

2019-02-21 Thread Tejun Heo
Hello, Oleg. On Thu, Feb 21, 2019 at 05:29:24PM +0100, Oleg Nesterov wrote: > But to me this is a reasonable trade-off because this way we do not add > additional complexity to the kernel. So, I really wanna avoid allowing userspace to cause D state sleeps. It's not impossible to work around but

Re: [PATCH v2] x86/asm: Pin sensitive CR4 bits

2019-02-21 Thread Kees Cook
On Thu, Feb 21, 2019 at 9:33 AM Sean Christopherson wrote: > On Wed, Feb 20, 2019 at 10:09:34AM -0800, Kees Cook wrote: > > + if (WARN_ONCE((val & cr4_pin) != cr4_pin, "cr4 bypass attempt?!\n")) > > Printing what bits diverged would be helpful in the unlikely event that the > WARN_ONCE trigger

Re: [PATCH] cpuidle: Add a predict callback for the governors

2019-02-21 Thread Daniel Lezcano
On 21/02/2019 17:18, Rafael J. Wysocki wrote: > On Thu, Feb 21, 2019 at 3:56 PM Daniel Lezcano > wrote: >> >> Predicting the next event on the current CPU is implemented in the >> idle state selection function, thus the selection logic and the >> prediction are tied together and it is hard to deco

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

2019-02-21 Thread Jason Gunthorpe
On Thu, Feb 21, 2019 at 11:47:16PM +1100, Stephen Rothwell wrote: > Hi Jason, > > On Wed, 13 Feb 2019 22:09:36 + Jason Gunthorpe wrote: > > > > I personally think it is not good to put major logic changes in merge > > commits, so I would prefer the #2 approach for this case. > > These are no

Re: [RFC PATCH net-next v3 15/21] ethtool: provide link settings and link modes in GET_SETTINGS request

2019-02-21 Thread Florian Fainelli
On 2/21/19 2:14 AM, Michal Kubecek wrote: > On Wed, Feb 20, 2019 at 07:14:50PM -0800, Florian Fainelli wrote: >> On 2/18/2019 10:22 AM, Michal Kubecek wrote: >>> +#define ETH_SETTINGS_IM_LINKINFO 0x01 >>> +#define ETH_SETTINGS_IM_LINKMODES 0x02 >>> + >>> +#define ETH_SETTINGS_IM_

Re: [PATCH v2 12/26] userfaultfd: wp: apply _PAGE_UFFD_WP bit

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:18AM +0800, Peter Xu wrote: > Firstly, introduce two new flags MM_CP_UFFD_WP[_RESOLVE] for > change_protection() when used with uffd-wp and make sure the two new > flags are exclusively used. Then, > > - For MM_CP_UFFD_WP: apply the _PAGE_UFFD_WP bit and remove _PA

Re: [PATCH v2 13/26] mm: export wp_page_copy()

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:19AM +0800, Peter Xu wrote: > Export this function for usages outside page fault handlers. > > Signed-off-by: Peter Xu Reviewed-by: Jérôme Glisse > --- > include/linux/mm.h | 2 ++ > mm/memory.c| 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) >

[PATCH] sysctl: add proc_do_large_bitmap test node

2019-02-21 Thread Eric Sandeen
Add a test node for proc_do_large_bitmap to the test_sysctl.c infrastructure. It's sized the same as the one existing user. Signed-off-by: Eric Sandeen --- diff --git a/lib/test_sysctl.c b/lib/test_sysctl.c index 3dd801c1c85b..1263be4ebfaf 100644 --- a/lib/test_sysctl.c +++ b/lib/test_sysctl.c

Re: [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers

2019-02-21 Thread Eric Sandeen
On 2/21/19 9:18 AM, Luis Chamberlain wrote: > On Wed, Feb 20, 2019 at 05:35:04PM -0600, Eric Sandeen wrote: >> Here's a pretty hacky test script to test this code via >> ip_local_reserved_ports > > Thanks Eric! > > So /proc/sys/net/ipv4/ip_local_reserved_ports is a production knob, and > if we wa

Re: [PATCH] MIPS: BCM63XX: provide DMA masks for ethernet devices

2019-02-21 Thread Florian Fainelli
On 2/21/19 1:56 AM, Jonas Gorski wrote: > The switch to the generic dma ops made dma masks mandatory, breaking > devices having them not set. In case of bcm63xx, it broke ethernet with > the following warning when trying to up the device: > > [2.633123] [ cut here ] > [

Re: [GIT PULL] Ceph fixes for 5.0-rc8

2019-02-21 Thread pr-tracker-bot
The pull request you sent on Thu, 21 Feb 2019 18:16:07 +0100: > https://github.com/ceph/ceph-client.git tags/ceph-for-5.0-rc8 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/8a61716ff2ab23eddd1f7a05a075a374e4d0c3d4 Thank you! -- Deet-doot-dot, I am a bot. https://kor

Re: [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers

2019-02-21 Thread Luis Chamberlain
On Thu, Feb 21, 2019 at 11:47:49AM -0600, Eric Sandeen wrote: > On 2/21/19 9:18 AM, Luis Chamberlain wrote: > > On Wed, Feb 20, 2019 at 05:35:04PM -0600, Eric Sandeen wrote: > >> Here's a pretty hacky test script to test this code via > >> ip_local_reserved_ports > > > > Thanks Eric! > > > > So /

[PATCH] regulator: da9063: Use struct_size() in devm_kzalloc()

2019-02-21 Thread Gustavo A. R. Silva
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; struct boo entry[]; }; size = sizeof(struct foo) + cou

Re: [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers

2019-02-21 Thread Eric Sandeen
On 2/21/19 11:52 AM, Luis Chamberlain wrote: > On Thu, Feb 21, 2019 at 11:47:49AM -0600, Eric Sandeen wrote: >> On 2/21/19 9:18 AM, Luis Chamberlain wrote: >>> On Wed, Feb 20, 2019 at 05:35:04PM -0600, Eric Sandeen wrote: Here's a pretty hacky test script to test this code via ip_local

Re: [PATCH v2 14/26] userfaultfd: wp: handle COW properly for uffd-wp

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:20AM +0800, Peter Xu wrote: > This allows uffd-wp to support write-protected pages for COW. > > For example, the uffd write-protected PTE could also be write-protected > by other usages like COW or zero pages. When that happens, we can't > simply set the write bit in

[PATCH] crypto: af_alg - use struct_size() in sock_kfree_s()

2019-02-21 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, change the following form: sizeof(*sgl) + sizeof(sgl->sg[0]) * (MAX_SGL_ENTS + 1) to : struct_size(sgl, sg, MAX

Re: [PATCH RFC v2 1/4] PCI: hotplug: Add support for disabling in-band presence

2019-02-21 Thread Alex_Gagniuc
On 2/21/19 1:20 AM, Lukas Wunner wrote: > > [EXTERNAL EMAIL] > > On Tue, Feb 19, 2019 at 07:20:27PM -0600, Alexandru Gagniuc wrote: >> @@ -846,6 +846,9 @@ struct controller *pcie_init(struct pcie_device *dev) >> if (pdev->is_thunderbolt) >> slot_cap |= PCI_EXP_SLTCAP_NCCS; >>

Re: [PATCH v2 15/26] userfaultfd: wp: drop _PAGE_UFFD_WP properly when fork

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:21AM +0800, Peter Xu wrote: > UFFD_EVENT_FORK support for uffd-wp should be already there, except > that we should clean the uffd-wp bit if uffd fork event is not > enabled. Detect that to avoid _PAGE_UFFD_WP being set even if the VMA > is not being tracked by VM_UFFD

Re: [PATCH] bpfilter: remove extra header search paths for bpfilter_umh

2019-02-21 Thread Guenter Roeck
On Fri, Feb 22, 2019 at 12:54:47AM +0900, Masahiro Yamada wrote: > On Thu, Feb 21, 2019 at 11:46 PM Guenter Roeck wrote: > > > > On Thu, Jan 31, 2019 at 12:15:35PM +0900, Masahiro Yamada wrote: > > > Currently, the header search paths -Itools/include and > > > -Itools/include/uapi are not used. Le

Re: [PATCH v2 16/26] userfaultfd: wp: add pmd_swp_*uffd_wp() helpers

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:22AM +0800, Peter Xu wrote: > Adding these missing helpers for uffd-wp operations with pmd > swap/migration entries. > > Signed-off-by: Peter Xu Reviewed-by: Jérôme Glisse > --- > arch/x86/include/asm/pgtable.h | 15 +++ > include/asm-generic/pgta

[PATCH v3] x86/asm: Pin sensitive CR4 bits

2019-02-21 Thread Kees Cook
Several recent exploits have used direct calls to the native_write_cr4() function to disable SMEP and SMAP before then continuing their exploits using userspace memory access. This pins bits of cr4 so that they cannot be changed through a common function. This is not intended to be general ROP prot

Re: [PATCH v2 17/26] userfaultfd: wp: support swap and page migration

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:23AM +0800, Peter Xu wrote: > For either swap and page migration, we all use the bit 2 of the entry to > identify whether this entry is uffd write-protected. It plays a similar > role as the existing soft dirty bit in swap entries but only for keeping > the uffd-wp tr

Re: [PATCH 3.18 00/13] 3.18.136-stable review

2019-02-21 Thread kernelci.org bot
stable-rc/linux-3.18.y boot: 46 boots: 0 failed, 44 passed with 2 offline (v3.18.135-14-ge5aba7843b9c) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-3.18.y/kernel/v3.18.135-14-ge5aba7843b9c/ Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-3.18

Re: [PATCH v2 18/26] khugepaged: skip collapse if uffd-wp detected

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:24AM +0800, Peter Xu wrote: > Don't collapse the huge PMD if there is any userfault write protected > small PTEs. The problem is that the write protection is in small page > granularity and there's no way to keep all these write protection > information if the small p

Re: [PATCH 4.4 00/20] 4.4.176-stable review

2019-02-21 Thread kernelci.org bot
stable-rc/linux-4.4.y boot: 83 boots: 2 failed, 79 passed with 2 offline (v4.4.175-20-ge21af95e85ac) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-4.4.y/kernel/v4.4.175-20-ge21af95e85ac/ Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-4.4.y/ke

Re: [PATCH v2 19/26] userfaultfd: introduce helper vma_find_uffd

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:25AM +0800, Peter Xu wrote: > We've have multiple (and more coming) places that would like to find a > userfault enabled VMA from a mm struct that covers a specific memory > range. This patch introduce the helper for it, meanwhile apply it to > the code. > > Suggeste

[PATCH 2/2] sound: hdmi-codec: propagate physical_width

2019-02-21 Thread Sven Van Asbroeck
Infrastructure patch which allows the tda998x patch to build. This patch will be submitted for review if/when the tda998x patch gets accepted. Signed-off-by: Sven Van Asbroeck --- include/sound/hdmi-codec.h| 1 + sound/soc/codecs/hdmi-codec.c | 1 + 2 files changed, 2 insertions(+) diff --

[PATCH 1/2] drm/i2c: tda998x: adjust CTS_N audio pre-divider calculation

2019-02-21 Thread Sven Van Asbroeck
My cpu dai driving the tda998x in master mode outputs SNDRV_PCM_FORMAT_S24_LE, i2s left justified, two channels: [SNDRV_PCM_FORMAT_S24_LE] = { .width = 24, .phys = 32, .le = 1, .signd = 1, .silence = {}, }, This format has a sample width of 24 bits,

Re: [PATCH 4.9 00/20] 4.9.160-stable review

2019-02-21 Thread kernelci.org bot
stable-rc/linux-4.9.y boot: 94 boots: 0 failed, 92 passed with 2 offline (v4.9.159-21-g53ba7e5fc78e) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-4.9.y/kernel/v4.9.159-21-g53ba7e5fc78e/ Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-4.9.y/ke

Re: [PATCH v4 2/2] media: cedrus: Add H264 decoding support

2019-02-21 Thread Jernej Škrabec
Hi, Dne sreda, 20. februar 2019 ob 18:50:54 CET je Jernej Škrabec napisal(a): > Hi! > > I really wanted to do another review on previous series but got distracted > by analyzing one particulary troublesome H264 sample. It still doesn't work > correctly, so I would ask you if you can test it with

[PATCH] nvmet: disable direct I/O when unavailable

2019-02-21 Thread Johannes Thumshirn
Some file-systems, like tmpfs, do not support direct IO, but file-backed namespaces default to using direct IO. If direct IO is unavailable fall back to using buffered IO for the file-backed namespace. This might not ultimately be a solution for production environments but for test environments it

Re: [PATCH v2 20/26] userfaultfd: wp: support write protection for userfault vma range

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:26AM +0800, Peter Xu wrote: > From: Shaohua Li > > Add API to enable/disable writeprotect a vma range. Unlike mprotect, > this doesn't split/merge vmas. > > Cc: Andrea Arcangeli > Cc: Rik van Riel > Cc: Kirill A. Shutemov > Cc: Mel Gorman > Cc: Hugh Dickins > C

Re: [PATCH v2 21/26] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:27AM +0800, Peter Xu wrote: > From: Andrea Arcangeli > > v1: From: Shaohua Li > > v2: cleanups, remove a branch. > > [peterx writes up the commit message, as below...] > > This patch introduces the new uffd-wp APIs for userspace. > > Firstly, we'll allow to do U

Re: [RFC][PATCH 15/16] sched: Trivial forced-newidle balancer

2019-02-21 Thread Valentin Schneider
On 21/02/2019 16:47, Peter Zijlstra wrote: [...] >>> IIUC, we're trying to find/steal tasks matching the core_cookie from other >>> rqs because dst has been cookie-forced-idle. >>> >>> If the p we find isn't running, what's the meaning of core_occupation? >>> I would have expected it to be 0, but w

Re: [PATCH RFC 02/39] KVM: x86/xen: intercept xen hypercalls if enabled

2019-02-21 Thread Sean Christopherson
On Wed, Feb 20, 2019 at 08:15:32PM +, Joao Martins wrote: > Add a new exit reason for emulator to handle Xen hypercalls. > Albeit these are injected only if guest has initialized the Xen > hypercall page - the hypercall is just a convenience but one > that is done by pretty much all guests. Hen

Re: [PATCH v2 22/26] userfaultfd: wp: enabled write protection in userfaultfd API

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:28AM +0800, Peter Xu wrote: > From: Shaohua Li > > Now it's safe to enable write protection in userfaultfd API > > Cc: Andrea Arcangeli > Cc: Pavel Emelyanov > Cc: Rik van Riel > Cc: Kirill A. Shutemov > Cc: Mel Gorman > Cc: Hugh Dickins > Cc: Johannes Weiner

Re: [PATCH -next] platform/chrome: Fix off-by-one error in wilco_ec/debugfs.c

2019-02-21 Thread Dan Carpenter
On Wed, Feb 20, 2019 at 03:15:18PM -0700, Nick Crews wrote: > Fixing something after it's already in the tree was a new > process for me, so I tried to copy other people's examples. Please > let me know if there's anything else I should do something different > next time. I seldom mention how much

[PATCH] ipmi_si: Fix crash when using hard-coded device

2019-02-21 Thread minyard
From: Corey Minyard When excuting a command like: modprobe ipmi_si ports=0xffc0e3 type=bt The system would get an oops. The trouble here is that ipmi_si_hardcode_find_bmc() is called before ipmi_si_platform_init(), but initialization of the hard-coded device creates an IPMI platform device, wh

Re: [PATCH v2 23/26] userfaultfd: wp: don't wake up when doing write protect

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:29AM +0800, Peter Xu wrote: > It does not make sense to try to wake up any waiting thread when we're > write-protecting a memory region. Only wake up when resolving a write > protected page fault. > > Signed-off-by: Peter Xu I am bit confuse here, see below. > ---

[PATCH 1/2] test_firmware: remove some dead code

2019-02-21 Thread Dan Carpenter
The test_fw_config->reqs allocation succeeded so these addresses can't be NULL. Also on the second error path, we forgot to set "rc = -ENOMEM;". Signed-off-by: Dan Carpenter --- lib/test_firmware.c | 9 - 1 file changed, 9 deletions(-) diff --git a/lib/test_firmware.c b/lib/test_firmwa

Re: [PATCH v2 24/26] userfaultfd: wp: UFFDIO_REGISTER_MODE_WP documentation update

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:30AM +0800, Peter Xu wrote: > From: Martin Cracauer > > Adds documentation about the write protection support. > > Signed-off-by: Andrea Arcangeli > [peterx: rewrite in rst format; fixups here and there] > Signed-off-by: Peter Xu Reviewed-by: Jérôme Glisse > --

[PATCH 2/2] test_firmware: silence underflow warning in test_dev_config_update_u8()

2019-02-21 Thread Dan Carpenter
We put an upper bound on "new" but we don't check for negatives. In this case the underflow doesn't matter very much, but we may as well make the static checker happy. Signed-off-by: Dan Carpenter --- lib/test_firmware.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/

Re: [PATCH] sysctl: add proc_do_large_bitmap test node

2019-02-21 Thread Kees Cook
On Thu, Feb 21, 2019 at 9:45 AM Eric Sandeen wrote: > > Add a test node for proc_do_large_bitmap to the test_sysctl.c > infrastructure. It's sized the same as the one existing user. > > Signed-off-by: Eric Sandeen Acked-by: Kees Cook -Kees > --- > > diff --git a/lib/test_sysctl.c b/lib/test_

Re: [PATCH RFC v2 4/4] PCI: hotplug: Add quirk For Dell nvme pcie switches

2019-02-21 Thread Alex_Gagniuc
On 2/21/19 1:57 AM, Lukas Wunner wrote: > > [EXTERNAL EMAIL] > > On Tue, Feb 19, 2019 at 07:20:30PM -0600, Alexandru Gagniuc wrote: >> --- a/drivers/pci/hotplug/pciehp_hpc.c >> +++ b/drivers/pci/hotplug/pciehp_hpc.c >> @@ -952,3 +952,23 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, >> 0x0

[PATCH] test_sysctl: add proc_do_large_bitmap test function

2019-02-21 Thread Eric Sandeen
Add test to build up bitmap range string and test the bitmap proc handler. Signed-off-by: Eric Sandeen --- nb: test_modprobe & load_req_mod fail for me before we ever get to this test, but commenting them out, my test runs as expected. I'm new to this script, so careful review would be wise. ;)

Re: [PATCH] drm/bochs: Fix the ID mismatch error

2019-02-21 Thread Alistair Francis
On Thu, Feb 21, 2019 at 3:52 AM kra...@redhat.com wrote: > > On Thu, Feb 21, 2019 at 12:33:03AM +, Alistair Francis wrote: > > When running RISC-V QEMU with the Bochs device attached via PCIe the > > probe of the Bochs device fails with: > > [drm:bochs_hw_init] *ERROR* ID mismatch > > > >

Re: [PATCH 00/12] QorIQ TMU multi-sensor and HWMON support

2019-02-21 Thread Andrey Smirnov
On Wed, Feb 20, 2019 at 4:52 PM Eduardo Valentin wrote: > > Hey Andrey > > On Mon, Feb 18, 2019 at 11:11:29AM -0800, Andrey Smirnov wrote: > > Everyone: > > > > This series contains patches adding support for HWMON integration, > > multi-sensor support as well as a small fix and general improvemen

Re: [PATCH v2 1/2] scsi: replace GFP_ATOMIC with GFP_KERNEL for allocations in scsi_scan.c

2019-02-21 Thread Bart Van Assche
On Thu, 2019-02-21 at 10:18 +0100, Benjamin Block wrote: > Looking at the code of scsi_alloc_sdev(), and all the calling contexts, > there seems to be no reason to use GFP_ATMOIC here. All the different > call-contexts use a mutex at some point, and nothing in between that > requires no sleeping, a

Re: [PATCH v2 05/11] mfd: pm8xxx: disassociate old virq if hwirq mapping already exists

2019-02-21 Thread Stephen Boyd
Quoting Brian Masney (2019-02-15 16:23:59) > On Fri, Feb 15, 2019 at 01:28:02PM -0800, Stephen Boyd wrote: > > Quoting Brian Masney (2019-02-15 05:47:33) > > > On Thu, Feb 14, 2019 at 09:51:26PM -0800, Stephen Boyd wrote: > > > > > diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c

Re: [RFC][PATCH 00/16] sched: Core scheduling

2019-02-21 Thread Subhra Mazumdar
On 2/21/19 6:03 AM, Peter Zijlstra wrote: On Wed, Feb 20, 2019 at 06:53:08PM -0800, Subhra Mazumdar wrote: On 2/18/19 9:49 AM, Linus Torvalds wrote: On Mon, Feb 18, 2019 at 9:40 AM Peter Zijlstra wrote: However; whichever way around you turn this cookie; it is expensive and nasty. Do you (

Re: [LSF/MM TOPIC] FS, MM, and stable trees

2019-02-21 Thread Theodore Y. Ts'o
On Thu, Feb 21, 2019 at 07:34:15AM -0800, Luis Chamberlain wrote: > On Sat, Feb 16, 2019 at 01:28:35PM -0500, Theodore Y. Ts'o wrote: > > The block/*, loop/* and scsi/* tests in blktests do seem to be in > > pretty good shape. The nvme, nvmeof, and srp tests are *definitely* > > not as mature. >

Re: [PATCH 12/12] thermal: qoriq: Add support for multiple thremal sites

2019-02-21 Thread Andrey Smirnov
On Wed, Feb 20, 2019 at 4:57 PM Eduardo Valentin wrote: > > On Mon, Feb 18, 2019 at 11:11:41AM -0800, Andrey Smirnov wrote: > > TMU IP block provides temerature measurement for up to 16 sites, > > current implementation of the driver however hardcodes a single site > > ID. Change the code so it wo

Re: [PATCH 2/2] test_firmware: silence underflow warning in test_dev_config_update_u8()

2019-02-21 Thread Andrew Morton
On Thu, 21 Feb 2019 21:38:26 +0300 Dan Carpenter wrote: > We put an upper bound on "new" but we don't check for negatives. U8_MAX has unsigned type, so `if (new > U8_MAX)' does check for negative. > In > this case the underflow doesn't matter very much, but we may as well > make the static che

Re: [PATCH] x86/fpu: Parse comma separated list passed in clearcpuid

2019-02-21 Thread Andi Kleen
On Thu, Feb 21, 2019 at 02:37:45PM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 08:12:25AM -0500, Prarit Bhargava wrote: > > Users cannot disable multiple CPU features with the kernel parameter > > clearcpuid=. For example, "clearcpuid=154 clearcpuid=227" only disables > > CPUID bit 154.

Re: [PATCH v2] driver: platform: Support parsing GpioInt 0 in platform_get_irq()

2019-02-21 Thread Enrico Granata
Thanks for catching that and sorry for the delayed response, I was on vacation. I think your analysis makes sense. I would personally lean towards the former suggestion (keeping the change localized to the return value of platform_get_irq() which is the function that apparently has an informal con

Re: [PATCH] x86/fpu: Parse comma separated list passed in clearcpuid

2019-02-21 Thread Prarit Bhargava
On 2/21/19 1:58 PM, Andi Kleen wrote: > On Thu, Feb 21, 2019 at 02:37:45PM +0100, Peter Zijlstra wrote: >> On Thu, Feb 21, 2019 at 08:12:25AM -0500, Prarit Bhargava wrote: >>> Users cannot disable multiple CPU features with the kernel parameter >>> clearcpuid=. For example, "clearcpuid=154 clea

Re: [PATCH] test_sysctl: add proc_do_large_bitmap test function

2019-02-21 Thread Eric Sandeen
On 2/21/19 12:43 PM, Eric Sandeen wrote: > Add test to build up bitmap range string and test the bitmap > proc handler. > > Signed-off-by: Eric Sandeen > --- > > nb: test_modprobe & load_req_mod fail for me before we ever > get to this test, but commenting them out, my test runs as expected.

[PATCH 0/2] docs: Add some struct file refcounting information

2019-02-21 Thread Jonathan Corbet
Al Viro's recent "braindump" on how struct file refcounting works is too good to lose, so let's capture it in Documentation/. There are two changes here: - Clean up the filesystem book, move stuff around, and generally try to create some order here. No text changes other than some connecting

Re: [PATCH] bpfilter: remove extra header search paths for bpfilter_umh

2019-02-21 Thread David Miller
From: Masahiro Yamada Date: Fri, 22 Feb 2019 00:54:47 +0900 > On Thu, Feb 21, 2019 at 11:46 PM Guenter Roeck wrote: >> >> On Thu, Jan 31, 2019 at 12:15:35PM +0900, Masahiro Yamada wrote: >> > Currently, the header search paths -Itools/include and >> > -Itools/include/uapi are not used. Let's dro

Re: [PATCH v4 04/16] powerpc/mm/32s: use generic mmu_mapin_ram() for all blocks.

2019-02-21 Thread Christophe Leroy
On 02/21/2019 01:51 PM, Michael Ellerman wrote: Christophe Leroy writes: Now that mmu_mapin_ram() is able to handle other blocks than the one starting at 0, the WII can use it for all its blocks. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable_32.c | 27 +

[PATCH 1/2] docs: Bring some order to filesystem documentation

2019-02-21 Thread Jonathan Corbet
Documentation/filesystems is, like much of the rest of the kernel's documentation, a jumble of unorganized information. Split the documentation into categories and try to bring some order to the top-level index.rst files. No text changes other than a few section-introductory blurbs; this is all j

[PATCH 2/2] docs: Add struct file refcounting and SCM_RIGHTS mess info

2019-02-21 Thread Jonathan Corbet
Work up some text posted by Al and add it to the filesystem manual. Co-developed-by: Al Viro Signed-off-by: Jonathan Corbet --- Documentation/filesystems/index.rst | 1 + Documentation/filesystems/lifecycles.rst | 357 +++ 2 files changed, 358 insertions(+) create mo

[PATCH v5 07/16] powerpc/mm/32s: use _PAGE_EXEC in setbat()

2019-02-21 Thread Christophe Leroy
Do not set IBAT when setbat() is called without _PAGE_EXEC Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ppc_mmu_32.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index 5fc59b195fef..ff8580c6ab11

Re: [PATCH 0/2] docs: Add some struct file refcounting information

2019-02-21 Thread Jonathan Corbet
On Thu, 21 Feb 2019 12:02:28 -0700 Jonathan Corbet wrote: > Al Viro's recent "braindump" on how struct file refcounting works is too > good to lose, so let's capture it in Documentation/. There are two changes > here: > > - Clean up the filesystem book, move stuff around, and generally try to

[PATCH v5 11/16] powerpc/kconfig: define CONFIG_DATA_SHIFT and CONFIG_ETEXT_SHIFT

2019-02-21 Thread Christophe Leroy
CONFIG_STRICT_KERNEL_RWX requires a special alignment for DATA for some subarches. Today it is just defined as an #ifdef in vmlinux.lds.S In order to get more flexibility, this patch moves the definition of this alignment in Kconfig On some subarches, CONFIG_STRICT_KERNEL_RWX will require a speci

[PATCH v5 00/16] powerpc/32: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-02-21 Thread Christophe Leroy
The purpose of this serie is to: - use BATs with STRICT_KERNEL_RWX on book3s (See patch 13 for details.) - use LTLBs with STRICT_KERNEL_RWX on 8xx (See patch 15 for a few details.) v5: - Changed var type from unsigned long to phys_addr_t in mapin_ram() to fix build failure due to type mismatch in

[PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-02-21 Thread Christophe Leroy
Today, STRICT_KERNEL_RWX is based on the use of regular pages to map kernel pages. On Book3s 32, it has three consequences: - Using pages instead of BAT for mapping kernel linear memory severely impacts performance. - Exec protection is not effective because no-execute cannot be set at page level

[PATCH v5 16/16] powerpc/kconfig: make _etext and data areas alignment configurable on 8xx

2019-02-21 Thread Christophe Leroy
On 8xx, large pages (512kb or 8M) are used to map kernel linear memory. Aligning to 8M reduces TLB misses as only 8M pages are used in that case. We make 8M the default for data. This patchs allows the user to do it via Kconfig. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig

[PATCH v5 14/16] powerpc/kconfig: make _etext and data areas alignment configurable on Book3s 32

2019-02-21 Thread Christophe Leroy
Depending on the number of available BATs for mapping the different kernel areas, it might be needed to increase the alignment of _etext and/or of data areas. This patchs allows the user to do it via Kconfig. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 32

[PATCH v5 08/16] powerpc/32: add helper to write into segment registers

2019-02-21 Thread Christophe Leroy
This patch add an helper which wraps 'mtsrin' instruction to write into segment registers. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 1c98ef1f2d5

Re: [PATCH -next] platform/chrome: Fix off-by-one error in wilco_ec/debugfs.c

2019-02-21 Thread Nick Crews
Thanks Dan, noted. On Thu, Feb 21, 2019 at 11:31 AM Dan Carpenter wrote: > > On Wed, Feb 20, 2019 at 03:15:18PM -0700, Nick Crews wrote: > > Fixing something after it's already in the tree was a new > > process for me, so I tried to copy other people's examples. Please > > let me know if there's

[PATCH v5 10/16] powerpc/kconfig: define PAGE_SHIFT inside Kconfig

2019-02-21 Thread Christophe Leroy
This patch defined CONFIG_PPC_PAGE_SHIFT in order to be able to use PAGE_SHIFT value inside Kconfig. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig| 7 +++ arch/powerpc/include/asm/page.h | 13 ++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git

[PATCH v5 12/16] powerpc/mm/32s: add setibat() clearibat() and update_bats()

2019-02-21 Thread Christophe Leroy
setibat() and clearibat() allows to manipulate IBATs independently of DBATs. update_bats() allows to update bats after init. This is done with MMU off. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/mmu-hash.h | 2 ++ arch/powerpc/kernel/head_32.S | 35 +

[PATCH v5 15/16] powerpc/8xx: don't disable large TLBs with CONFIG_STRICT_KERNEL_RWX

2019-02-21 Thread Christophe Leroy
This patch implements handling of STRICT_KERNEL_RWX with large TLBs directly in the TLB miss handlers. To do so, etext and sinittext are aligned on 512kB boundaries and the miss handlers use 512kB pages instead of 8Mb pages for addresses close to the boundaries. It sets RO PP flags for addresses

[PATCH v5 03/16] powerpc/mm/32s: rework mmu_mapin_ram()

2019-02-21 Thread Christophe Leroy
This patch reworks mmu_mapin_ram() to be more generic and map as much blocks as possible. It now supports blocks not starting at address 0. It scans DBATs array to find free ones instead of forcing the use of BAT2 and BAT3. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ppc_mmu_32.c | 63 +

[PATCH v5 06/16] powerpc/wii: remove wii_mmu_mapin_mem2()

2019-02-21 Thread Christophe Leroy
wii_mmu_mapin_mem2() is not used anymore, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/embedded6xx/wii.c | 28 1 file changed, 28 deletions(-) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c

[PATCH v5 04/16] powerpc/mm/32s: use generic mmu_mapin_ram() for all blocks.

2019-02-21 Thread Christophe Leroy
Now that mmu_mapin_ram() is able to handle other blocks than the one starting at 0, the WII can use it for all its blocks. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable_32.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/arch/powerp

[PATCH v5 09/16] powerpc/mmu: add is_strict_kernel_rwx() helper

2019-02-21 Thread Christophe Leroy
Add a helper to know whether STRICT_KERNEL_RWX is enabled. This is based on rodata_enabled flag which is defined only when CONFIG_STRICT_KERNEL_RWX is selected. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/mmu.h | 11 +++ arch/powerpc/mm/init_32.c | 4 +--- 2 files

[PATCH v5 05/16] powerpc/32: always populate page tables for Abatron BDI.

2019-02-21 Thread Christophe Leroy
When CONFIG_BDI_SWITCH is set, the page tables have to be populated allthough large TLBs are used, because the BDI switch knows nothing about those large TLBs which are handled directly in TLB miss logic. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable_32.c | 5 - 1 file changed,

[PATCH v5 02/16] powerpc/mm/32: add base address to mmu_mapin_ram()

2019-02-21 Thread Christophe Leroy
At the time being, mmu_mapin_ram() always maps RAM from the beginning. But some platforms like the WII have to map a second block of RAM. This patch adds to mmu_mapin_ram() the base address of the block. At the moment, only base address 0 is supported. Signed-off-by: Christophe Leroy --- arch/p

[PATCH v5 01/16] powerpc/wii: properly disable use of BATs when requested.

2019-02-21 Thread Christophe Leroy
'nobats' kernel parameter or some options like CONFIG_DEBUG_PAGEALLOC deny the use of BATS for mapping memory. This patch makes sure that the specific wii RAM mapping function takes it into account as well. Fixes: de32400dd26e ("wii: use both mem1 and mem2 as ram") Cc: sta...@vger.kernel.org Revi

Re: [PATCH] huegtlbfs: fix races and page leaks during migration

2019-02-21 Thread Mike Kravetz
On 2/20/19 10:09 PM, Andrew Morton wrote: > On Tue, 12 Feb 2019 14:14:00 -0800 Mike Kravetz > wrote: > > cc:stable. It would be nice to get some review of this one, please? > >> diff --git a/mm/hugetlb.c b/mm/hugetlb.c >> index a80832487981..f859e319e3eb 100644 >> --- a/mm/hugetlb.c >> +++ b/m

Applied "regulator: core: Log forbidden DRMS operation" to the regulator tree

2019-02-21 Thread Mark Brown
The patch regulator: core: Log forbidden DRMS operation has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) an

Applied "regulator: s5m8767: Constify s5m8767_opmode_reg" to the regulator tree

2019-02-21 Thread Mark Brown
The patch regulator: s5m8767: Constify s5m8767_opmode_reg has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours)

Applied "regulator: s5m8767: Simplify s5m8767_set_voltage_time_sel implementation" to the regulator tree

2019-02-21 Thread Mark Brown
The patch regulator: s5m8767: Simplify s5m8767_set_voltage_time_sel implementation has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually someti

Re: [PATCH 4.9 04/20] net: Fix for_each_netdev_feature on Big endian

2019-02-21 Thread Greg Kroah-Hartman
On Thu, Feb 21, 2019 at 05:26:10PM +, Mehrtens, Hauke wrote: > -Original Message- > From: Greg Kroah-Hartman [mailto:gre...@linuxfoundation.org] > Sent: Thursday, February 21, 2019 3:36 PM > To: linux-kernel@vger.kernel.org > Cc: Greg Kroah-Hartman ; sta...@vger.kernel.org; > Mehrtens

Applied "regulator: lp873x: Constify lp873x_buck_ramp_delay array" to the regulator tree

2019-02-21 Thread Mark Brown
The patch regulator: lp873x: Constify lp873x_buck_ramp_delay array has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 2

[PATCH V2] test_sysctl: add proc_do_large_bitmap test function

2019-02-21 Thread Eric Sandeen
Add test to build up bitmap range string and test the bitmap proc handler. Signed-off-by: Eric Sandeen --- V2: set rc=0 for test success however this still fails indeterminately for me. Debugging, if I save off the test write string and the read string, re-writing it to the handler works fine.

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