[PATCH 13/32] net/tipc: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/tipc/socket.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index fcbd6489a8b5..527d113c38b0 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -693,10 +693,9 @@ static int t

[PATCH 14/32] net/sctp: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/sctp/sctp.h | 3 +-- net/sctp/ipv6.c | 2 +- net/sctp/protocol.c | 2 +- net/sctp/socket.c | 4 +--- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 608d123ef2

[PATCH 20/32] net/rxrpc: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/rxrpc/af_rxrpc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 21ad6a3a465c..46d393ef99e0 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@ -729,15 +729,11 @@

[PATCH 16/32] net/caif: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/caif/caif_socket.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 64048cec41e0..3e47cafbe3e7 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -934,15

[PATCH 15/32] net/bluetooth: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/bluetooth/bluetooth.h | 2 +- net/bluetooth/af_bluetooth.c | 7 ++- net/bluetooth/l2cap_sock.c| 2 +- net/bluetooth/rfcomm/sock.c | 2 +- net/bluetooth/sco.c | 2 +- 5 files changed, 6 insertions(+), 9 deletions

Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-10 Thread David Woodhouse
On Wed, 2018-01-10 at 16:56 +0100, Paolo Bonzini wrote: > On 10/01/2018 16:48, Woodhouse, David wrote: > >> > >> And what is the point of this "always set IBRS=1" then? Are there > >> some other things lurking in the shadows? > > Yes. *FUTURE* CPUs will have a mode where you can just set IBRS and >

[PATCH 19/32] net/iucv: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/iucv/af_iucv.h | 2 -- net/iucv/af_iucv.c | 7 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index f4c21b5a1242..b0eaeb02d46d 100644 --- a/include/net/iucv/af_

[PATCH 21/32] pipe: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/pipe.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index a449ca0ec0c6..33a32d13b83d 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -514,19 +514,22 @@ static long pipe_ioctl(struct file *filp,

[PATCH 24/32] aio: don't print the page size at boot time

2018-01-10 Thread Christoph Hellwig
The page size is in no way related to the aio code, and printing it in the (debug) dmesg at every boot serves no purpose. Signed-off-by: Christoph Hellwig Acked-by: Jeff Moyer --- fs/aio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index a062d75109cb..03d59593912d

[PATCH 26/32] aio: refactor read/write iocb setup

2018-01-10 Thread Christoph Hellwig
Don't reference the kiocb structure from the common aio code, and move any use of it into helper specific to the read/write path. This is in preparation for aio_poll support that wants to use the space for different fields. Signed-off-by: Christoph Hellwig --- fs/aio.c | 172 +++

[PATCH 23/32] timerfd: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/timerfd.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/timerfd.c b/fs/timerfd.c index 0510717f3a53..ee36bb5b2698 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -226,21 +226,20 @@ static int timerfd_release

Re: Avoid speculative indirect calls in kernel

2018-01-10 Thread Thomas Gleixner
On Tue, 9 Jan 2018, Dave Hansen wrote: > On 01/09/2018 04:45 PM, Thomas Gleixner wrote: > > On Mon, 8 Jan 2018, Andrea Arcangeli wrote: > >> On Mon, Jan 08, 2018 at 09:53:02PM +0100, Thomas Gleixner wrote: > >> Did my best to do the cleanest patch for tip, but I now figured Dave's > >> original com

Re: [PATCH 1/3] ata: Allow having a port recovery callback

2018-01-10 Thread Sergei Shtylyov
Hello! On 01/10/2018 02:04 AM, Florian Fainelli wrote: Some AHCI controllers may need to recovery from a failure to identify a drive, Recover. such as the Broadcom AHCI controller, make that possible at both the libata-core.c and AHCI controller level such that we can provide such an err

[PATCH 28/32] aio: simplify cancellation

2018-01-10 Thread Christoph Hellwig
With the current aio code there is no need for the magic KIOCB_CANCELLED value, as a cancelation just kicks the driver to queue the completion ASAP, with all actual completion handling done in another thread. Given that both the completion path and cancelation take the context lock there is no need

[PATCH 27/32] aio: sanitize ki_list handling

2018-01-10 Thread Christoph Hellwig
Instead of handcoded non-null checks always initialize ki_list to an empty list and use list_empty / list_empty_careful on it. While we're at it also error out on a double call to kiocb_set_cancel_fn instead of ignoring it. Signed-off-by: Christoph Hellwig --- fs/aio.c | 13 ++--- 1 fil

[PATCH 30/32] aio: add delayed cancel support

2018-01-10 Thread Christoph Hellwig
The upcoming aio poll support would like to be able to complete the iocb inline from the cancellation context, but that would cause a lock order reversal. Add support for optionally moving the cancelation outside the context lock to avoid this reversal. Signed-off-by: Christoph Hellwig --- fs/a

[PATCH 32/32] aio: implement io_pgetevents

2018-01-10 Thread Christoph Hellwig
This is the io_getevents equivalent of ppoll/pselect and allows to properly mix signals and aio completions (especially with IOCB_CMD_POLL) and atomically executes the following sequence: sigset_t origmask; pthread_sigmask(SIG_SETMASK, &sigmask, &origmask); ret = io_geteve

[PATCH 29/32] aio: delete iocbs from the active_reqs list in kiocb_cancel

2018-01-10 Thread Christoph Hellwig
One we cancel an iocb there is no reason to keep it on the active_reqs list, given that the list is only used to look for cancelation candidates. Signed-off-by: Christoph Hellwig --- fs/aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 6204c1

[PATCH 31/32] aio: implement IOCB_CMD_POLL

2018-01-10 Thread Christoph Hellwig
Simple one-shot poll through the io_submit() interface. To poll for a file descriptor the application should submit an iocb of type IOCB_CMD_POLL. It will poll the fd for the events specified in the the first 32 bits of the aio_buf field of the iocb. Unlike poll or epoll without EPOLLONESHOT thi

[PATCH 25/32] aio: remove an outdated comment in aio_complete

2018-01-10 Thread Christoph Hellwig
These days we don't treat sync iocbs special in the aio completion code as they never use it. Remove the old comment, and move the BUG_ON for a sync iocb to the top of the function. Signed-off-by: Christoph Hellwig Acked-by: Jeff Moyer --- fs/aio.c | 11 ++- 1 file changed, 2 insertion

[PATCH 22/32] eventfd: switch to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/eventfd.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 6318a9b57e53..2bbbf13cb816 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -114,14 +114,20 @@ static int eventfd_release(struct

[PATCH 18/32] net/phonet: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/phonet/socket.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/phonet/socket.c b/net/phonet/socket.c index 7563b0ac8386..c18c906c025f 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c @@ -341,15 +341,12 @@ static in

[PATCH 17/32] net/nfc: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/nfc/llcp_sock.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c index 985909f105eb..1ee9f35084b1 100644 --- a/net/nfc/llcp_sock.c +++ b/net/nfc/llcp_sock.c @@ -549,16 +549,13 @@ static

[PATCH 11/32] net/atm: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/atm/common.c | 11 +++ net/atm/common.h | 2 +- net/atm/pvc.c| 2 +- net/atm/svc.c| 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/net/atm/common.c b/net/atm/common.c index 8f12f1c6fa14..07223ef2a220 100644 --- a/n

[PATCH 07/32] net/tcp: convert to ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/tcp.h | 4 ++-- net/ipv4/af_inet.c | 3 ++- net/ipv4/tcp.c | 33 ++--- net/ipv6/af_inet6.c | 3 ++- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index

[PATCH 09/32] net: convert datagram_poll users tp ->poll_mask

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/isdn/mISDN/socket.c| 2 +- drivers/net/ppp/pppoe.c| 2 +- drivers/staging/irda/net/af_irda.c | 6 +++--- include/linux/skbuff.h | 3 +-- include/net/udp.h | 2 +- net/appletalk/ddp.c

[PATCH 05/32] net: add support for ->poll_mask in proto_ops

2018-01-10 Thread Christoph Hellwig
The socket file operations still implement ->poll until all protocols are switched over. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 3 +++ net/socket.c| 51 ++- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git

[PATCH 04/32] net: refactor socket_poll

2018-01-10 Thread Christoph Hellwig
Factor out two busy poll related helpers for late reuse, and remove a command that isn't very helpful, especially with the __poll_t annotations in place. Signed-off-by: Christoph Hellwig --- include/net/busy_poll.h | 15 +++ net/socket.c| 21 - 2 files

[PATCH 01/32] fs: update documentation for __poll_t

2018-01-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 75d2d57e2c44..220bba28f72b 100644 --

[PATCH net-next v4 0/4] net: mvpp2: 1000BaseX and 2500BaseX support

2018-01-10 Thread Antoine Tenart
Hi all, This series adds 1000BaseX and 2500BaseX support to the Marvell PPv2 driver. In order to use it, the 2.5 SGMII mode is added in the Marvell common PHY driver (cp110-comphy). This was tested on a mcbin. All patches should probably go through net-next as patch 4/4 depends on patch 1/4 to b

[PATCH net-next v4 3/4] net: mvpp2: 1000baseX support

2018-01-10 Thread Antoine Tenart
This patch adds the 1000Base-X PHY mode support in the Marvell PPv2 driver. 1000Base-X is quite close the SGMII and uses nearly the same code path. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/marvell/mvpp2.c | 45 1 file changed, 35 insertions(+),

[PATCH net-next v4 4/4] net: mvpp2: 2500baseX support

2018-01-10 Thread Antoine Tenart
This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses nearly the same code path. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn --- drivers/net/ethernet/marvell/mvpp2.c | 49 ++

Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-10 Thread Paolo Bonzini
On 10/01/2018 16:48, Woodhouse, David wrote: >> >> And what is the point of this "always set IBRS=1" then? Are there >> some other things lurking in the shadows? > Yes. *FUTURE* CPUs will have a mode where you can just set IBRS and > leave it set for ever and not worry about any of this, and the >

Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code

2018-01-10 Thread David Woodhouse
On Wed, 2018-01-10 at 16:47 +0100, Andrea Arcangeli wrote: > On Wed, Jan 10, 2018 at 03:24:17PM +, David Woodhouse wrote: > > Since it achieves nothing¹ but to make userspace run slower, there's no > > need to write it again on returning to userspace. It will perform that > > function just fine

Re: [PATCH 31/31] aio: implement io_pgetevents

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 04:49:04PM +0100, Christoph Hellwig wrote: > On Wed, Jan 10, 2018 at 04:48:05PM +0100, Arnd Bergmann wrote: > > Ok, fair enough. Given that the old version gets obsoleted by this > > one, it shouldn't get much uglier than it already is here when you > > start out with a regu

Re: [PATCH 21/22] arm64: replace ZONE_DMA with ZONE_DMA32

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 04:55:17PM +0100, Christoph Hellwig wrote: > On Wed, Jan 10, 2018 at 12:58:14PM +, Robin Murphy wrote: > > On 10/01/18 08:09, Christoph Hellwig wrote: > >> arm64 uses ZONE_DMA for allocations below 32-bits. These days we > >> name the zone for that ZONE_DMA32, which wil

Re: [PATCH 21/22] arm64: replace ZONE_DMA with ZONE_DMA32

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 12:58:14PM +, Robin Murphy wrote: > On 10/01/18 08:09, Christoph Hellwig wrote: >> arm64 uses ZONE_DMA for allocations below 32-bits. These days we >> name the zone for that ZONE_DMA32, which will allow to use the >> dma-direct and generic swiotlb code as-is, so rename

[PATCH v2] block: silently forbid sending any ioctl to a partition

2018-01-10 Thread Paolo Bonzini
After the first few months, the message has not led to many bug reports. It's been almost five years now, and in practice the main source of it seems to be MTIOCGET that someone is using to detect tape devices. While we could whitelist it just like CDROM_GET_CAPABILITY, this patch just removes the

Re: next/master build: 198 builds: 1 failed, 197 passed, 1 error, 148 warnings (next-20180110)

2018-01-10 Thread Christian König
Hi Arnd, Am 10.01.2018 um 16:45 schrieb Arnd Bergmann: 14 drivers/gpu/drm/ttm/ttm_page_alloc_dma.c:1186:2: warning: ignoring return value of 'register_shrinker', declared with attribute warn_unused_result [-Wunused-result] 14 drivers/gpu/drm/ttm/ttm_page_alloc.c:485:2: warning: ignoring return

Re: [PATCH 0/7] ARM: dts: STi: Fix DT dtc warnings

2018-01-10 Thread Arnd Bergmann
On Wed, Jan 10, 2018 at 9:21 AM, wrote: > From: Patrice Chotard > > This series fixes all dtc warnings related to STi platforms dt files. > It has been triggered by Rob Herring [1] > > [1] https://www.spinics.net/lists/devicetree/msg206209.html > > For most of implicated node, a simple move outs

[PATCH v5 for 4.16 04/11] membarrier: Document scheduler barrier requirements

2018-01-10 Thread Mathieu Desnoyers
Document the membarrier requirement on having a full memory barrier in __schedule() after coming from user-space, before storing to rq->curr. It is provided by smp_mb__after_spinlock() in __schedule(). Document that membarrier requires a full barrier on transition from kernel thread to userspace t

[PATCH v2 for 4.16 02/11] membarrier: selftest: Test private expedited cmd

2018-01-10 Thread Mathieu Desnoyers
Test the new MEMBARRIER_CMD_PRIVATE_EXPEDITED and MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED commands. Add checks expecting specific error values on system calls expected to fail. Signed-off-by: Mathieu Desnoyers Acked-by: Shuah Khan Acked-by: Greg Kroah-Hartman CC: Peter Zijlstra CC: Paul E.

Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-10 Thread Woodhouse, David
On Wed, 2018-01-10 at 10:41 -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 10, 2018 at 03:28:43PM +0100, Paolo Bonzini wrote: > > On 10/01/2018 15:06, Arjan van de Ven wrote: > > > On 1/10/2018 5:20 AM, Paolo Bonzini wrote: > > >> * a simple specification that does "IBRS=1 blocks indirect > bran

[PATCH for 4.16 06/11] membarrier: selftest: Test shared expedited cmd

2018-01-10 Thread Mathieu Desnoyers
Test the new MEMBARRIER_CMD_SHARED_EXPEDITED and MEMBARRIER_CMD_REGISTER_SHARED_EXPEDITED commands. Signed-off-by: Mathieu Desnoyers Acked-by: Shuah Khan CC: Greg Kroah-Hartman CC: Peter Zijlstra CC: Paul E. McKenney CC: Boqun Feng CC: Andrew Hunter CC: Maged Michael CC: Avi Kivity CC: Be

[PATCH v2 for 4.16 05/11] membarrier: provide SHARED_EXPEDITED command

2018-01-10 Thread Mathieu Desnoyers
Allow expedited membarrier to be used for data shared between processes (shared memory). Processes wishing to receive the membarriers register with MEMBARRIER_CMD_REGISTER_SHARED_EXPEDITED. Those which want to issue membarrier invoke MEMBARRIER_CMD_SHARED_EXPEDITED. This allows extremely simple k

[PATCH v2 for 4.16 08/11] x86: Introduce sync_core_before_usermode

2018-01-10 Thread Mathieu Desnoyers
Introduce an architecture function that ensures the current CPU issues a core serializing instruction before returning to usermode. This is needed for the membarrier "sync_core" command. Architectures defining the sync_core_before_usermode() static inline need to select ARCH_HAS_SYNC_CORE_BEFORE_

[PATCH v3 for 4.16 09/11] membarrier: x86: Provide core serializing command

2018-01-10 Thread Mathieu Desnoyers
There are two places where core serialization is needed by membarrier: 1) When returning from the membarrier IPI, 2) After scheduler updates curr to a thread with a different mm, before going back to user-space, since the curr->mm is used by membarrier to check whether it needs to send an IP

Re: [PATCH 31/31] aio: implement io_pgetevents

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 04:48:05PM +0100, Arnd Bergmann wrote: > Ok, fair enough. Given that the old version gets obsoleted by this > one, it shouldn't get much uglier than it already is here when you > start out with a regular timespec. We just need to be aware of possible > clashes when we get th

Re: [PATCH 31/31] aio: implement io_pgetevents

2018-01-10 Thread Arnd Bergmann
On Wed, Jan 10, 2018 at 3:59 PM, Christoph Hellwig wrote: > On Wed, Jan 10, 2018 at 12:03:24PM +0100, Arnd Bergmann wrote: >> I'd suggest passing a variant of timespec with two 64-bit members. >> Deepa has posted patches for this structure in the past and was planning >> to do a new version (with

[PATCH for 4.16 07/11] membarrier: Provide core serializing command

2018-01-10 Thread Mathieu Desnoyers
Provide core serializing membarrier command to support memory reclaim by JIT. Each architecture needs to explicitly opt into that support by documenting in their architecture code how they provide the core serializing instructions required when returning from the membarrier IPI, and after the sche

[PATCH for 4.16 11/11] membarrier: selftest: Test private expedited sync core cmd

2018-01-10 Thread Mathieu Desnoyers
Test the new MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE and MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE commands. Signed-off-by: Mathieu Desnoyers Acked-by: Shuah Khan CC: Greg Kroah-Hartman CC: Peter Zijlstra CC: Paul E. McKenney CC: Boqun Feng CC: Andrew Hunter CC: Maged Michael

Re: [PATCH] crypto: marvell/cesa - Fix DMA API misuse

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 04:25:22PM +0100, Boris Brezillon wrote: > On Wed, 10 Jan 2018 15:15:43 + > Robin Murphy wrote: > > > phys_to_dma() is an internal helper for certain DMA API implementations, > > and is not appropriate for drivers to use. It appears that what the CESA > > driver really

[PATCH for 4.16 10/11] membarrier: arm64: Provide core serializing command

2018-01-10 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers CC: Peter Zijlstra CC: Andy Lutomirski CC: Paul E. McKenney CC: Boqun Feng CC: Andrew Hunter CC: Maged Michael CC: Avi Kivity CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: Dave Watson CC: Thomas Gleixner CC: Ingo Molnar CC: "H.

[PATCH v7 for 4.16 03/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2018-01-10 Thread Mathieu Desnoyers
Allow PowerPC to skip the full memory barrier in switch_mm(), and only issue the barrier when scheduling into a task belonging to a process that has registered to use expedited private. Threads targeting the same VM but which belong to different thread groups is a tricky case. It has a few consequ

[PATCH for 4.16 01/11] Fix: membarrier: add missing preempt off around smp_call_function_many

2018-01-10 Thread Mathieu Desnoyers
smp_call_function_many requires disabling preemption around the call. Signed-off-by: Mathieu Desnoyers CC: Linus Torvalds CC: Peter Zijlstra CC: Paul E. McKenney CC: Boqun Feng CC: Andrew Hunter CC: Maged Michael CC: Avi Kivity CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael El

Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code

2018-01-10 Thread Andrea Arcangeli
On Wed, Jan 10, 2018 at 03:24:17PM +, David Woodhouse wrote: > Since it achieves nothing¹ but to make userspace run slower, there's no > need to write it again on returning to userspace. It will perform that > function just fine without doing so. Ok, very glad we are on the same page now. Not

[PATCH for 4.16 00/11] membarrier updates for 4.16

2018-01-10 Thread Mathieu Desnoyers
Hi Ingo, Hi Peter, Here are the membarrier patch series I would like to upstream for 4.16. It would be appreciated of those can go through the tip tree. Highlights: "Fix: membarrier: add missing preempt off around smp_call_function_many" is in the series mainly because the following patches appl

Re: [PATCH 10/22] swiotlb: refactor coherent buffer allocation

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 12:22:18PM +, Robin Murphy wrote: >> +if (phys_addr == SWIOTLB_MAP_ERROR) >> +goto out_warn; >> - /* Confirm address can be DMA'd by device */ >> -if (dev_addr + size - 1 > dma_mask) { >> -printk("hwdev DMA mask

Re: [PATCH v3 6/6] coresight: etm4x: Support panic kdump

2018-01-10 Thread Mathieu Poirier
On 9 January 2018 at 22:33, Leo Yan wrote: > On Tue, Jan 09, 2018 at 01:21:28PM -0700, Mathieu Poirier wrote: >> On Thu, Dec 21, 2017 at 04:20:15PM +0800, Leo Yan wrote: >> > ETMv4 hardware information and configuration needs to be saved as >> > metadata; these metadata should be compatible with t

Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-10 Thread Paolo Bonzini
On 10/01/2018 16:41, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 10, 2018 at 03:28:43PM +0100, Paolo Bonzini wrote: >> On 10/01/2018 15:06, Arjan van de Ven wrote: >>> On 1/10/2018 5:20 AM, Paolo Bonzini wrote: * a simple specification that does "IBRS=1 blocks indirect branch prediction al

Re: next/master build: 198 builds: 1 failed, 197 passed, 1 error, 148 warnings (next-20180110)

2018-01-10 Thread Arnd Bergmann
On Wed, Jan 10, 2018 at 7:59 AM, kernelci.org bot wrote: > > next/master build: 198 builds: 1 failed, 197 passed, 1 error, 148 warnings > (next-20180110) > > Errors summary: > 1 drivers/perf/arm_dsu_pmu.c:661:2: error: implicit declaration of function > 'bitmap_from_u

Re: [RFC PATCH v2 2/6] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI

2018-01-10 Thread Ingo Molnar
* Borislav Petkov wrote: > On Wed, Jan 10, 2018 at 08:25:08AM +0100, Ingo Molnar wrote: > > We could taint the kernel and warn prominently in the syslog when PTI is > > disabled > > globally on the boot line though, if running on affected CPUs. > > > > Something like: > > > > "x86/intel: Pa

Re: [PATCH 09/12] perf script: Add support to display lost events

2018-01-10 Thread Jiri Olsa
On Wed, Jan 10, 2018 at 12:40:50PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, Jan 07, 2018 at 05:03:53PM +0100, Jiri Olsa escreveu: > > +++ b/tools/perf/util/event.c > > +static size_t perf_event__fprintf_lost(union perf_event *event, FILE *fp) > > +{ > > + return fprintf(fp, " lost %lu\n",

Re: [RFC PATCH v2 2/6] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI

2018-01-10 Thread Willy Tarreau
On Wed, Jan 10, 2018 at 03:45:06PM +0100, Borislav Petkov wrote: > On Wed, Jan 10, 2018 at 08:25:08AM +0100, Ingo Molnar wrote: > > We could taint the kernel and warn prominently in the syslog when PTI is > > disabled > > globally on the boot line though, if running on affected CPUs. > > > > Som

Re: Missing watchdog after ACPI watchdog creation failure

2018-01-10 Thread Takashi Iwai
On Wed, 10 Jan 2018 16:23:43 +0100, Mika Westerberg wrote: > > On Wed, Jan 10, 2018 at 04:13:51PM +0100, Takashi Iwai wrote: > > Hi, > > > > on the recent kernels, i2c-i801 skips the creation of iTCO wdt when > > ACPI WDAT is present. It's fine when ACPI really creates the watchdog > > device.

Re: [PATCH v3 3/6] coresight: Support panic kdump functionality

2018-01-10 Thread Mathieu Poirier
On 9 January 2018 at 22:19, Leo Yan wrote: > On Tue, Jan 09, 2018 at 11:41:26AM -0700, Mathieu Poirier wrote: >> On Thu, Dec 21, 2017 at 04:20:12PM +0800, Leo Yan wrote: >> > After kernel panic happens, coresight has many useful info can be used >> > for analysis. For example, the trace info from

Re: [PATCH bpf-next v3 5/5] error-injection: Support fault injection framework

2018-01-10 Thread Josef Bacik
On Wed, Jan 10, 2018 at 07:19:05PM +0900, Masami Hiramatsu wrote: > Support in-kernel fault-injection framework via debugfs. > This allows you to inject a conditional error to specified > function using debugfs interfaces. > > Here is the result of test script described in > Documentation/fault-in

Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-10 Thread Konrad Rzeszutek Wilk
On Wed, Jan 10, 2018 at 03:28:43PM +0100, Paolo Bonzini wrote: > On 10/01/2018 15:06, Arjan van de Ven wrote: > > On 1/10/2018 5:20 AM, Paolo Bonzini wrote: > >> * a simple specification that does "IBRS=1 blocks indirect branch > >> prediction altogether" would actually satisfy the specification ju

Re: [PATCH 09/12] perf script: Add support to display lost events

2018-01-10 Thread Arnaldo Carvalho de Melo
Em Sun, Jan 07, 2018 at 05:03:53PM +0100, Jiri Olsa escreveu: > +++ b/tools/perf/util/event.c > +static size_t perf_event__fprintf_lost(union perf_event *event, FILE *fp) > +{ > + return fprintf(fp, " lost %lu\n", event->lost.lost); > +} Had to make this: return fprintf(fp, " lost %"

Re: [PATCH 32/33] cris: use dma-direct

2018-01-10 Thread h...@lst.de
On Wed, Jan 10, 2018 at 03:27:41PM +, Alexey Brodkin wrote: > Hi Christoph, > > On Wed, 2018-01-10 at 09:00 +0100, Christoph Hellwig wrote: > > cris currently has an incomplete direct mapping dma_map_ops implementation > > is PCI support is enabled. Replace it with the fully feature generic >

Re: [PATCH V4 13/45] block: blk-merge: try to make front segments in full size

2018-01-10 Thread Dmitry Osipenko
On 10.01.2018 05:40, Ming Lei wrote: > On Tue, Jan 09, 2018 at 08:02:53PM +0300, Dmitry Osipenko wrote: >> On 09.01.2018 17:33, Ming Lei wrote: >>> On Tue, Jan 09, 2018 at 04:18:39PM +0300, Dmitry Osipenko wrote: On 09.01.2018 05:34, Ming Lei wrote: > On Tue, Jan 09, 2018 at 12:09:27AM +03

Re: [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 03:31:08PM +, Robin Murphy wrote: > Yes indeed, modulo Vladimir's comments - it does seem prudent to fix the > obvious off-by-ones as we touch them. I've wanted to do something like this > for ages, but never got around to it myself. I've fixed these now in a separate

Re: [PATCH] x86/kasan: panic if there is not enough memory to boot.

2018-01-10 Thread Dmitry Vyukov
On Wed, Jan 10, 2018 at 4:36 PM, Andrey Ryabinin wrote: > Currently KASAN doesn't panic in case it don't have enough memory > to boot. Instead, it crashes in some random place: > > kernel BUG at arch/x86/mm/physaddr.c:27! > > RIP: 0010:__phys_addr+0x268/0x276 > Call Trace: > kasan_populate_sh

Re: [RFC PATCH v2 2/6] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI

2018-01-10 Thread Willy Tarreau
Hi Boris! On Wed, Jan 10, 2018 at 03:42:39PM +0100, Borislav Petkov wrote: > On Tue, Jan 09, 2018 at 11:40:09PM +0100, Willy Tarreau wrote: > > Boris, please don't try to make me look like a fool when I'm trying to > > explain a common process. > > I haven't even intended to do that, sorry, maybe

Re: [PATCH bpf-next v3 4/5] error-injection: Add injectable error types

2018-01-10 Thread Josef Bacik
On Wed, Jan 10, 2018 at 07:18:35PM +0900, Masami Hiramatsu wrote: > Add injectable error types for each error-injectable function. > > One motivation of error injection test is to find software flaws, > mistakes or mis-handlings of expectable errors. If we find such > flaws by the test, that is a

Re: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-10 Thread Jiri Olsa
On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > The perf record has specific codes to calculate the ringbuffer position > for both overwrite and non-overwrite mode. > The perf top will support both modes later. > It is useful to make the specific codes g

[PATCH] x86/kasan: panic if there is not enough memory to boot.

2018-01-10 Thread Andrey Ryabinin
Currently KASAN doesn't panic in case it don't have enough memory to boot. Instead, it crashes in some random place: kernel BUG at arch/x86/mm/physaddr.c:27! RIP: 0010:__phys_addr+0x268/0x276 Call Trace: kasan_populate_shadow+0x3f2/0x497 kasan_init+0x12e/0x2b2 setup_arch+0x2825/0x2a2c

Re: [PATCH bpf-next v3 3/5] error-injection: Separate error-injection from kprobe

2018-01-10 Thread Josef Bacik
On Wed, Jan 10, 2018 at 07:18:05PM +0900, Masami Hiramatsu wrote: > Since error-injection framework is not limited to be used > by kprobes, nor bpf. Other kernel subsystems can use it > freely for checking safeness of error-injection, e.g. > livepatch, ftrace etc. > So this separate error-injection

Re: [PATCH 08/22] swiotlb: wire up ->dma_supported in swiotlb_dma_ops

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 12:16:15PM +, Robin Murphy wrote: > On 10/01/18 08:09, Christoph Hellwig wrote: >> To properly reject too small DMA masks based on the addressability of the >> bounce buffer. > > I reckon this is self-evident enough that it should simply be squashed into > the previous

[PATCH 3/3] misc/ti-st: Delete an unnecessary return statement in two functions

2018-01-10 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 10 Jan 2018 16:16:55 +0100 The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected functions. Signed-off-by: Markus Elfring --- driver

[PATCH 2/3] misc/ti-st: Improve a size determination in kim_probe()

2018-01-10 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 10 Jan 2018 16:10:45 +0100 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was det

Re: [iptables] extensions: add support for 'srh' match

2018-01-10 Thread Pablo Neira Ayuso
On Fri, Dec 29, 2017 at 12:08:25PM +0100, Ahmed Abdelsalam wrote: > This patch adds a new exetension to iptables to supprt 'srh' match > The implementation considers revision 7 of the SRH draft. > https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-07 > > Signed-off-by: Ahmed Abdels

Re: [PATCH v6 00/10] Retpoline: Avoid speculative indirect calls in kernel

2018-01-10 Thread Dr. David Alan Gilbert
* Woodhouse, David (d...@amazon.co.uk) wrote: > On Mon, 2018-01-08 at 02:42 -0800, Paul Turner wrote: > > > > While the cases above involve the crafting and use of poisoned > > entries.  Recall also that one of the initial conditions was that we > > should avoid RSB underflow as some CPUs may try

[PATCH 1/3] misc/ti-st: Delete an error message for a failed memory allocation in kim_probe()

2018-01-10 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 10 Jan 2018 16:04:52 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/misc/ti-st/st_kim.c | 5 ++--- 1 file changed, 2 insertions(+)

Re: [PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 11:49:34AM +, Robin Murphy wrote: >> +#ifdef CONFIG_ZONE_DMA >> +if (mask < DMA_BIT_MASK(ARCH_ZONE_DMA_BITS)) >> +return 0; >> +#else >> +/* >> + * Because 32-bit DMA masks are so common we expect every architecture >> + * to be able to satisf

[PATCH 0/3] misc/TI-ST: Adjustments for three function implementations

2018-01-10 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 10 Jan 2018 16:26:36 +0100 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete an error message for a failed memory allocation in kim_probe() Improve a size determination in kim_probe() Delete an unne

Re: [net-next v2] netfilter: add segment routing header 'srh' match

2018-01-10 Thread Pablo Neira Ayuso
On Sun, Jan 07, 2018 at 07:22:02PM +0100, Ahmed Abdelsalam wrote: > It allows matching packets based on Segment Routing Header > (SRH) information. > The implementation considers revision 7 of the SRH draft. > https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-07 > > Currently supp

Re: [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header

2018-01-10 Thread Robin Murphy
On 10/01/18 15:26, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 02:56:01PM +, Robin Murphy wrote: I took a look at these, and it seems their phys_to_dma() usage is doing the thing which we subsequently formalised as dma_map_resource(). I've had a crack at a quick patch to update the CESA

Re: [PATCH 27/33] dma-direct: use node local allocations for coherent memory

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 12:06:22PM +, Robin Murphy wrote: > On 10/01/18 08:00, Christoph Hellwig wrote: >> To preserve the x86 behavior. > > And combined with patch 10/22 of the SWIOTLB refactoring, this means > SWIOTLB allocations will also end up NUMA-aware, right? Great, that's what > we w

Re: general protection fault in cgroup_fd_array_put_ptr

2018-01-10 Thread Daniel Borkmann
On 01/10/2018 01:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on b4464bcab38d3f7fe995a7cb960eeac6889bec08 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. >

Re: [PATCH 20/33] dma-mapping: clear harmful GFP_* flags in common code

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 11:59:30AM +, Robin Murphy wrote: > Just a note that if we're all happy to enshrine the "allocations are always > zeroed" behaviour in the API (I am too, for the record), we should remember > to follow up once the dust settles to update the docs and I guess just > #de

Re: perf: perf_fuzzer quickly locks up on 4.15-rc7

2018-01-10 Thread Vince Weaver
On Tue, 9 Jan 2018, Vince Weaver wrote: > Also I managed to hit (presumably) the same bug on a skylake machine. > That one doesn't have a serial cable hooked up to it, I'll try to see if I > can find one. > > I am running debian-unstable with gcc 7.2 if it makes a difference. I built the kerne

Re: [PATCH 32/33] cris: use dma-direct

2018-01-10 Thread Alexey Brodkin
Hi Christoph, On Wed, 2018-01-10 at 09:00 +0100, Christoph Hellwig wrote: > cris currently has an incomplete direct mapping dma_map_ops implementation > is PCI support is enabled. Replace it with the fully feature generic _if_ PCI support is enabled. -Alexey

Re: [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 02:56:01PM +, Robin Murphy wrote: > I took a look at these, and it seems their phys_to_dma() usage is doing the > thing which we subsequently formalised as dma_map_resource(). I've had a > crack at a quick patch to update the CESA driver; qcom_nandc looks slightly > m

Re: [PATCH 02/36] usercopy: Include offset in overflow report

2018-01-10 Thread Christopher Lameter
On Tue, 9 Jan 2018, Kees Cook wrote: > -static void report_usercopy(unsigned long len, bool to_user, const char > *type) > +int report_usercopy(const char *name, const char *detail, bool to_user, > + unsigned long offset, unsigned long len) > { > - pr_emerg("kernel memory %s

Re: [PATCH] crypto: marvell/cesa - Fix DMA API misuse

2018-01-10 Thread Boris Brezillon
On Wed, 10 Jan 2018 15:15:43 + Robin Murphy wrote: > phys_to_dma() is an internal helper for certain DMA API implementations, > and is not appropriate for drivers to use. It appears that what the CESA > driver really wants to be using is dma_map_resource() - admittedly that > didn't exist whe

Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code

2018-01-10 Thread David Woodhouse
On Wed, 2018-01-10 at 16:13 +0100, Andrea Arcangeli wrote: > > Can you also tell if IBRS must be written as a barrier to SPEC_CTRL in > return to userland (kernel exit) when ibrs_enabled 2? Generally we > wouldn't run a barrier there with ibrs_enabled 2, but absolutely > nothing is intuitive here

Re: [PATCH bpf-next v3 2/5] tracing/kprobe: bpf: Compare instruction pointer with original one

2018-01-10 Thread Josef Bacik
On Wed, Jan 10, 2018 at 07:17:35PM +0900, Masami Hiramatsu wrote: > Compare instruction pointer with original one on the > stack instead using per-cpu bpf_kprobe_override flag. > > This patch also consolidates reset_current_kprobe() and > preempt_enable_no_resched() blocks. Those can be done > in

Re: [PATCH BUGFIX 1/1] block, bfq: compile group put for oom queue only if BFQ_GROUP_IOSCHED is set

2018-01-10 Thread Jens Axboe
On 1/10/18 7:58 AM, Paolo Valente wrote: > Commit ("block, bfq: release oom-queue ref to root group on exit") > added a missing put of the root bfq group for the oom queue. That put > has to be, and can be, performed only if CONFIG_BFQ_GROUP_IOSCHED is > defined: the function doing the put is even

Re: Missing watchdog after ACPI watchdog creation failure

2018-01-10 Thread Mika Westerberg
On Wed, Jan 10, 2018 at 04:13:51PM +0100, Takashi Iwai wrote: > Hi, > > on the recent kernels, i2c-i801 skips the creation of iTCO wdt when > ACPI WDAT is present. It's fine when ACPI really creates the watchdog > device. But, we've got a report showing that the watchdog is missing > on some mac

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