[PATCH] vfio/mdev: Check globally for duplicate devices

2018-05-15 Thread Alex Williamson
When we create an mdev device, we check for duplicates against the parent device and return -EEXIST if found, but the mdev device namespace is global since we'll link all devices from the bus. We do catch this later in sysfs_do_create_link_sd() to return -EEXIST, but with it comes a kernel

Re: [PATCH 4.4 054/190] xfrm: fix state migration copy replay sequence numbers

2018-05-15 Thread Ben Hutchings
On Wed, 2018-04-11 at 20:35 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > -- > > > From: Antony Antony > > > [ Upstream commit a486cd23661c9387fb076c3f6ae8b2aa9d20d54a ] > > During xfrm

Re: [PATCH 4.4 054/190] xfrm: fix state migration copy replay sequence numbers

2018-05-15 Thread Ben Hutchings
On Wed, 2018-04-11 at 20:35 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > -- > > > From: Antony Antony > > > [ Upstream commit a486cd23661c9387fb076c3f6ae8b2aa9d20d54a ] > > During xfrm migration copy replay

[PATCH] vfio/mdev: Check globally for duplicate devices

2018-05-15 Thread Alex Williamson
When we create an mdev device, we check for duplicates against the parent device and return -EEXIST if found, but the mdev device namespace is global since we'll link all devices from the bus. We do catch this later in sysfs_do_create_link_sd() to return -EEXIST, but with it comes a kernel

Re: [PATCH -mm] mm, hugetlb: Pass fault address to no page handler

2018-05-15 Thread Kirill A. Shutemov
On Tue, May 15, 2018 at 08:57:56AM +0800, Huang, Ying wrote: > From: Huang Ying > > This is to take better advantage of huge page clearing > optimization (c79b57e462b5d, "mm: hugetlb: clear target sub-page last > when clearing huge page"). Which will clear to access

Re: [PATCH -mm] mm, hugetlb: Pass fault address to no page handler

2018-05-15 Thread Kirill A. Shutemov
On Tue, May 15, 2018 at 08:57:56AM +0800, Huang, Ying wrote: > From: Huang Ying > > This is to take better advantage of huge page clearing > optimization (c79b57e462b5d, "mm: hugetlb: clear target sub-page last > when clearing huge page"). Which will clear to access sub-page last > to avoid the

Re: [PATCH v3] x86/boot/64/clang: Use fixup_pointer() to access '__supported_pte_mask'

2018-05-15 Thread Kirill A. Shutemov
On Wed, May 09, 2018 at 11:18:22AM +0200, Alexander Potapenko wrote: > Clang builds with defconfig started crashing after commit fb43d6cb91ef > ("x86/mm: Do not auto-massage page protections") > This was caused by introducing a new global access in __startup_64(). > > Code in __startup_64() can

Re: [PATCH v3] x86/boot/64/clang: Use fixup_pointer() to access '__supported_pte_mask'

2018-05-15 Thread Kirill A. Shutemov
On Wed, May 09, 2018 at 11:18:22AM +0200, Alexander Potapenko wrote: > Clang builds with defconfig started crashing after commit fb43d6cb91ef > ("x86/mm: Do not auto-massage page protections") > This was caused by introducing a new global access in __startup_64(). > > Code in __startup_64() can

Re: [PATCH] vsprintf: Fix memory barriers of ptr_key to have_filed_random_ptr_key

2018-05-15 Thread Steven Rostedt
On Tue, 15 May 2018 12:03:32 -0700 Linus Torvalds wrote: > On Tue, May 15, 2018 at 11:57 AM Steven Rostedt wrote: > > + queue_work(system_unbound_wq, _ptr_key_work); > > I think this part just makes the whole thing entirely pointless.

Re: [PATCH] vsprintf: Fix memory barriers of ptr_key to have_filed_random_ptr_key

2018-05-15 Thread Steven Rostedt
On Tue, 15 May 2018 12:03:32 -0700 Linus Torvalds wrote: > On Tue, May 15, 2018 at 11:57 AM Steven Rostedt wrote: > > + queue_work(system_unbound_wq, _ptr_key_work); > > I think this part just makes the whole thing entirely pointless. > > Now the 'not_filled_random_ptr_key' thing

RE: for_each_cpu() is buggy for UP kernel?

2018-05-15 Thread Dexuan Cui
> From: Linus Torvalds > Sent: Tuesday, May 15, 2018 10:22 > To: Dexuan Cui > > On Mon, May 14, 2018 at 8:02 PM Dexuan Cui wrote: > > > If you're OK with the below fix (not tested yet), I'll submit a patch for > > it: >

RE: for_each_cpu() is buggy for UP kernel?

2018-05-15 Thread Dexuan Cui
> From: Linus Torvalds > Sent: Tuesday, May 15, 2018 10:22 > To: Dexuan Cui > > On Mon, May 14, 2018 at 8:02 PM Dexuan Cui wrote: > > > If you're OK with the below fix (not tested yet), I'll submit a patch for > > it: > > > --- a/kernel/time/tick-broadcast.c > > +++

Re: [PATCH 1/2] tools/testing/selftests/x86: fix warning: "SEGV_PKUERR|SEGV_BNDERR" redefined

2018-05-15 Thread Shuah Khan
On 05/14/2018 03:31 AM, Ingo Molnar wrote: > > * Shuah Khan wrote: > >> On 05/08/2018 10:25 AM, Dave Hansen wrote: >>> On 05/08/2018 02:14 AM, Li Zhijian wrote: SEGV_PKUERR and SEGV_BNDERR are defined since glibc-2.27 >>> >>> >>> Acked-by: Dave Hansen

Re: [PATCH 1/2] tools/testing/selftests/x86: fix warning: "SEGV_PKUERR|SEGV_BNDERR" redefined

2018-05-15 Thread Shuah Khan
On 05/14/2018 03:31 AM, Ingo Molnar wrote: > > * Shuah Khan wrote: > >> On 05/08/2018 10:25 AM, Dave Hansen wrote: >>> On 05/08/2018 02:14 AM, Li Zhijian wrote: SEGV_PKUERR and SEGV_BNDERR are defined since glibc-2.27 >>> >>> >>> Acked-by: Dave Hansen >>> >> >> Thanks. Queuing this up for

Re: [PATCH 2/6] x86/intel_rdt/mba_sc: Enable/disable MBA software controller

2018-05-15 Thread Shivappa Vikas
On Sun, 13 May 2018, Thomas Gleixner wrote: > On Fri, 20 Apr 2018, Vikas Shivappa wrote: > > +/* > > + * Enable or disable the MBA software controller > > + * which helps user specify bandwidth in MBps. > > + * MBA software controller is supported only if > > + * MBM is supported and MBA is in

Re: [PATCH 2/6] x86/intel_rdt/mba_sc: Enable/disable MBA software controller

2018-05-15 Thread Shivappa Vikas
On Sun, 13 May 2018, Thomas Gleixner wrote: > On Fri, 20 Apr 2018, Vikas Shivappa wrote: > > +/* > > + * Enable or disable the MBA software controller > > + * which helps user specify bandwidth in MBps. > > + * MBA software controller is supported only if > > + * MBM is supported and MBA is in

Re: [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10

2018-05-15 Thread Thor Thayer
On 05/15/2018 10:11 AM, Dinh Nguyen wrote: On 05/11/2018 11:10 AM, thor.tha...@linux.intel.com wrote: From: Thor Thayer Add qspi_clock The qspi_clk frequency is updated by U-Boot before starting Linux. Add QSPI interface node. Add QSPI flash memory child

Re: [PATCHv2] arm64: dts: stratix10: Add QSPI support for Stratix10

2018-05-15 Thread Thor Thayer
On 05/15/2018 10:11 AM, Dinh Nguyen wrote: On 05/11/2018 11:10 AM, thor.tha...@linux.intel.com wrote: From: Thor Thayer Add qspi_clock The qspi_clk frequency is updated by U-Boot before starting Linux. Add QSPI interface node. Add QSPI flash memory child node. Setup the QSPI memory

Re: [PATCH -mm] mm, hugetlb: Pass fault address to no page handler

2018-05-15 Thread David Rientjes
On Tue, 15 May 2018, Huang, Ying wrote: > From: Huang Ying > > This is to take better advantage of huge page clearing > optimization (c79b57e462b5d, "mm: hugetlb: clear target sub-page last > when clearing huge page"). Which will clear to access sub-page last > to avoid

Re: [PATCH -mm] mm, hugetlb: Pass fault address to no page handler

2018-05-15 Thread David Rientjes
On Tue, 15 May 2018, Huang, Ying wrote: > From: Huang Ying > > This is to take better advantage of huge page clearing > optimization (c79b57e462b5d, "mm: hugetlb: clear target sub-page last > when clearing huge page"). Which will clear to access sub-page last > to avoid the cache lines of to

[PATCH 01/32] fs: unexport poll_schedule_timeout

2018-05-15 Thread Christoph Hellwig
No users outside of select.c. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 3 +-- include/linux/poll.h | 2 -- 2 files changed, 1 insertion(+), 4

[PATCH 01/32] fs: unexport poll_schedule_timeout

2018-05-15 Thread Christoph Hellwig
No users outside of select.c. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 3 +-- include/linux/poll.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/select.c b/fs/select.c index

[PATCH 03/32] fs: update documentation to mention __poll_t and match the code

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Greg Kroah-Hartman --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 03/32] fs: update documentation to mention __poll_t and match the code

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Greg Kroah-Hartman --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/Locking

[PATCH 05/32] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-05-15 Thread Christoph Hellwig
->get_poll_head returns the waitqueue that the poll operation is going to sleep on. Note that this means we can only use a single waitqueue for the poll, unlike some current drivers that use two waitqueues for different events. But now that we have keyed wakeups and heavily use those for poll

[PATCH 05/32] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-05-15 Thread Christoph Hellwig
->get_poll_head returns the waitqueue that the poll operation is going to sleep on. Note that this means we can only use a single waitqueue for the poll, unlike some current drivers that use two waitqueues for different events. But now that we have keyed wakeups and heavily use those for poll

[PATCH 06/32] aio: simplify KIOCB_KEY handling

2018-05-15 Thread Christoph Hellwig
No need to pass the key field to lookup_iocb to compare it with KIOCB_KEY, as we can do that right after retrieving it from userspace. Also move the KIOCB_KEY definition to aio.c as it is an internal value not used by any other place in the kernel. Signed-off-by: Christoph Hellwig

[PATCH 06/32] aio: simplify KIOCB_KEY handling

2018-05-15 Thread Christoph Hellwig
No need to pass the key field to lookup_iocb to compare it with KIOCB_KEY, as we can do that right after retrieving it from userspace. Also move the KIOCB_KEY definition to aio.c as it is an internal value not used by any other place in the kernel. Signed-off-by: Christoph Hellwig --- fs/aio.c

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

2018-05-15 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 double lock of ctx_lock as-is. Add a new delayed_cancel_reqs list of iocbs that should be cancelled from outside the ctx_lock by calling the (re-)added ki_cancel

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

2018-05-15 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 double lock of ctx_lock as-is. Add a new delayed_cancel_reqs list of iocbs that should be cancelled from outside the ctx_lock by calling the (re-)added ki_cancel

[PATCH 11/32] net: refactor socket_poll

2018-05-15 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

[PATCH 11/32] net: refactor socket_poll

2018-05-15 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

Re: [PATCH 4/5] libubigen: Maintain a eraseblock association table

2018-05-15 Thread David Oberhollenzer
On 05/14/2018 01:25 PM, Richard Weinberger wrote: > @@ -229,6 +234,12 @@ int ubigen_write_volume(const struct ubigen_info *ui, > memset(outbuf + ui->data_offs + len, 0xFF, > ui->peb_size - ui->data_offs - len); > > + vi->eba[lnum] = lseek(out, 0,

Re: [PATCH 4/5] libubigen: Maintain a eraseblock association table

2018-05-15 Thread David Oberhollenzer
On 05/14/2018 01:25 PM, Richard Weinberger wrote: > @@ -229,6 +234,12 @@ int ubigen_write_volume(const struct ubigen_info *ui, > memset(outbuf + ui->data_offs + len, 0xFF, > ui->peb_size - ui->data_offs - len); > > + vi->eba[lnum] = lseek(out, 0,

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

2018-05-15 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 | 1 + net/socket.c| 48 - 2 files changed, 44 insertions(+), 5 deletions(-) diff

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

2018-05-15 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 | 1 + net/socket.c| 48 - 2 files changed, 44 insertions(+), 5 deletions(-) diff --git

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

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

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

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

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

2018-05-15 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 fc78a0508ae1..1f2af59935db

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/dccp/dccp.h | 3 +-- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- net/dccp/proto.c | 13 ++--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index f91e3816806b..0ea2ee56ac1b

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/unix/af_unix.c | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 68bb70a62afe..1a9cdad4ab82 100644 --- a/net/unix/af_unix.c +++

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

2018-05-15 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 fc78a0508ae1..1f2af59935db 100644 ---

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/dccp/dccp.h | 3 +-- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- net/dccp/proto.c | 13 ++--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index f91e3816806b..0ea2ee56ac1b 100644 ---

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/unix/af_unix.c | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 68bb70a62afe..1a9cdad4ab82 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -638,9

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

2018-05-15 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

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

2018-05-15 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

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

2018-05-15 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

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

2018-05-15 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

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

2018-05-15 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 a6fb1b3bcad9..c7991867d622 100644 --- a/net/caif/caif_socket.c +++

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

2018-05-15 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 a6fb1b3bcad9..c7991867d622 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@

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

2018-05-15 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 ---

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

2018-05-15 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 ---

[PATCH] tick/broadcast: Use for_each_cpu() specially on UP kernels

2018-05-15 Thread Dexuan Cui
for_each_cpu() unintuitively reports CPU0 as set independent of the actual cpumask content on UP kernels. This causes an unexpected PIT interrupt storm on a UP kernel running in an SMP virtual machine on Hyper-V, and as a result, the virtual machine can suffer from a strange random delay of 1~20

[PATCH] tick/broadcast: Use for_each_cpu() specially on UP kernels

2018-05-15 Thread Dexuan Cui
for_each_cpu() unintuitively reports CPU0 as set independent of the actual cpumask content on UP kernels. This causes an unexpected PIT interrupt storm on a UP kernel running in an SMP virtual machine on Hyper-V, and as a result, the virtual machine can suffer from a strange random delay of 1~20

Re: [PATCH v8 09/10] drivers: qcom: rpmh: add support for batch RPMH request

2018-05-15 Thread Doug Anderson
Hi, On Tue, May 15, 2018 at 11:03 AM, Lina Iyer wrote: >>> Also, the bus requests have quite a churn during the course of an >>> usecase. They are setup and invalidated often. >>> It is faster to have them separate and invalidate the whole lot of the >>> batch_cache instead

Re: [PATCH v8 09/10] drivers: qcom: rpmh: add support for batch RPMH request

2018-05-15 Thread Doug Anderson
Hi, On Tue, May 15, 2018 at 11:03 AM, Lina Iyer wrote: >>> Also, the bus requests have quite a churn during the course of an >>> usecase. They are setup and invalidated often. >>> It is faster to have them separate and invalidate the whole lot of the >>> batch_cache instead of intertwining them

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

2018-05-15 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 39d6f431da83..bb0840e234f3 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -509,19 +509,22 @@ static long

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

2018-05-15 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 39d6f431da83..bb0840e234f3 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -509,19 +509,22 @@ static long pipe_ioctl(struct file *filp,

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

2018-05-15 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 08d3bd602f73..61c9514da5e9 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -101,14 +101,20 @@ static int

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

2018-05-15 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 08d3bd602f73..61c9514da5e9 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -101,14 +101,20 @@ static int eventfd_release(struct

[PATCH 32/32] random: convert to ->poll_mask

2018-05-15 Thread Christoph Hellwig
The big change is that random_read_wait and random_write_wait are merged into a single waitqueue that uses keyed wakeups. Because wait_event_* doesn't know about that this will lead to occassional spurious wakeups in _random_read and add_hwgenerator_randomness, but wait_event_* is designed to

[PATCH 32/32] random: convert to ->poll_mask

2018-05-15 Thread Christoph Hellwig
The big change is that random_read_wait and random_write_wait are merged into a single waitqueue that uses keyed wakeups. Because wait_event_* doesn't know about that this will lead to occassional spurious wakeups in _random_read and add_hwgenerator_randomness, but wait_event_* is designed to

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

2018-05-15 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 cdad49da3ff7..d84a2bee4f82 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -226,21 +226,20 @@ static int

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

2018-05-15 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 cdad49da3ff7..d84a2bee4f82 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -226,21 +226,20 @@ static int

[PATCH 28/32] crypto: af_alg: convert to ->poll_mask

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- crypto/af_alg.c | 13 +++-- crypto/algif_aead.c | 4 ++-- crypto/algif_skcipher.c | 4 ++-- include/crypto/if_alg.h | 3 +-- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c

[PATCH 28/32] crypto: af_alg: convert to ->poll_mask

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- crypto/af_alg.c | 13 +++-- crypto/algif_aead.c | 4 ++-- crypto/algif_skcipher.c | 4 ++-- include/crypto/if_alg.h | 3 +-- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index

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

2018-05-15 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 9a2c8e7c000e..6b170f2e47f2 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@

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

2018-05-15 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 9a2c8e7c000e..6b170f2e47f2 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@ -734,15 +734,11 @@

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

2018-05-15 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 9ecf02def928..ea2bfc3aafb9 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c @@ -340,15

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

2018-05-15 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 9ecf02def928..ea2bfc3aafb9 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c @@ -340,15 +340,12 @@ static

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

2018-05-15 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 ea0c0c6f1874..ab5bb14b49af 100644 --- a/net/nfc/llcp_sock.c +++ b/net/nfc/llcp_sock.c @@ -548,16

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

2018-05-15 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 ea0c0c6f1874..ab5bb14b49af 100644 --- a/net/nfc/llcp_sock.c +++ b/net/nfc/llcp_sock.c @@ -548,16 +548,13 @@ static

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

2018-05-15 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 252a52ae0893..58549338582a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -692,10 +692,9

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

2018-05-15 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 252a52ae0893..58549338582a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -692,10 +692,9 @@ static int

[PATCH 10/32] aio: implement IOCB_CMD_POLL

2018-05-15 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

[PATCH 10/32] aio: implement IOCB_CMD_POLL

2018-05-15 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

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman --- drivers/isdn/mISDN/socket.c | 2 +- drivers/net/ppp/pppoe.c | 2 +- drivers/staging/ipx/af_ipx.c | 2 +- include/linux/skbuff.h | 3 +-- include/net/udp.h|

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman --- drivers/isdn/mISDN/socket.c | 2 +- drivers/net/ppp/pppoe.c | 2 +- drivers/staging/ipx/af_ipx.c | 2 +- include/linux/skbuff.h | 3 +-- include/net/udp.h| 2 +- net/appletalk/ddp.c | 2

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/vmw_vsock/af_vsock.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index c1076c19b858..bb5d5fa68c35 100644 --- a/net/vmw_vsock/af_vsock.c +++

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

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/vmw_vsock/af_vsock.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index c1076c19b858..bb5d5fa68c35 100644 --- a/net/vmw_vsock/af_vsock.c +++

[PATCH 13/32] net: remove sock_no_poll

2018-05-15 Thread Christoph Hellwig
Now that sock_poll handles a NULL ->poll or ->poll_mask there is no need for a stub. Signed-off-by: Christoph Hellwig --- crypto/af_alg.c | 1 - crypto/algif_hash.c | 2 -- crypto/algif_rng.c | 1 - drivers/isdn/mISDN/socket.c | 1 -

[PATCH 13/32] net: remove sock_no_poll

2018-05-15 Thread Christoph Hellwig
Now that sock_poll handles a NULL ->poll or ->poll_mask there is no need for a stub. Signed-off-by: Christoph Hellwig --- crypto/af_alg.c | 1 - crypto/algif_hash.c | 2 -- crypto/algif_rng.c | 1 - drivers/isdn/mISDN/socket.c | 1 - drivers/net/ppp/pptp.c | 1

[PATCH 08/32] aio: replace kiocb_set_cancel_fn with a cancel_kiocb file operation

2018-05-15 Thread Christoph Hellwig
The current kiocb_set_cancel_fn implementation assumes the kiocb is embedded into an aio_kiocb, which is fundamentally unsafe as it might have been submitted by non-aio callers. Instead add a cancel_kiocb file operation that replaced the ki_cancel function pointer set by kiocb_set_cancel_fn, and

[PATCH 02/32] fs: cleanup do_pollfd

2018-05-15 Thread Christoph Hellwig
Use straightline code with failure handling gotos instead of a lot of nested conditionals. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 48

[PATCH 08/32] aio: replace kiocb_set_cancel_fn with a cancel_kiocb file operation

2018-05-15 Thread Christoph Hellwig
The current kiocb_set_cancel_fn implementation assumes the kiocb is embedded into an aio_kiocb, which is fundamentally unsafe as it might have been submitted by non-aio callers. Instead add a cancel_kiocb file operation that replaced the ki_cancel function pointer set by kiocb_set_cancel_fn, and

[PATCH 02/32] fs: cleanup do_pollfd

2018-05-15 Thread Christoph Hellwig
Use straightline code with failure handling gotos instead of a lot of nested conditionals. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 48 +++- 1 file changed, 23 insertions(+), 25

aio poll and a new in-kernel poll API V11

2018-05-15 Thread Christoph Hellwig
Hi all, this series adds support for the IOCB_CMD_POLL operation to poll for the readyness of file descriptors using the aio subsystem. The API is based on patches that existed in RHAS2.1 and RHEL3, which means it already is supported by libaio. To implement the poll support efficiently new

aio poll and a new in-kernel poll API V11

2018-05-15 Thread Christoph Hellwig
Hi all, this series adds support for the IOCB_CMD_POLL operation to poll for the readyness of file descriptors using the aio subsystem. The API is based on patches that existed in RHAS2.1 and RHEL3, which means it already is supported by libaio. To implement the poll support efficiently new

[PATCH 07/32] aio: simplify cancellation

2018-05-15 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

[PATCH 07/32] aio: simplify cancellation

2018-05-15 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

[PATCH 04/32] fs: add new vfs_poll and file_can_poll helpers

2018-05-15 Thread Christoph Hellwig
These abstract out calls to the poll method in preparation for changes in how we poll. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong ---

[PATCH 04/32] fs: add new vfs_poll and file_can_poll helpers

2018-05-15 Thread Christoph Hellwig
These abstract out calls to the poll method in preparation for changes in how we poll. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- drivers/staging/comedi/drivers/serial2002.c | 4 ++-- drivers/vfio/virqfd.c | 2 +-

Re: [PATCH V2] mlx4_core: allocate ICM memory in page size chunks

2018-05-15 Thread Qing Huang
On 5/15/2018 12:08 PM, Eric Dumazet wrote: On 05/15/2018 11:53 AM, Qing Huang wrote: This is control path so it is less latency-sensitive. Let's not produce unnecessary degradation here, please call kvzalloc so we maintain a similar behavior when contiguous memory is available, and a

Re: [PATCH V2] mlx4_core: allocate ICM memory in page size chunks

2018-05-15 Thread Qing Huang
On 5/15/2018 12:08 PM, Eric Dumazet wrote: On 05/15/2018 11:53 AM, Qing Huang wrote: This is control path so it is less latency-sensitive. Let's not produce unnecessary degradation here, please call kvzalloc so we maintain a similar behavior when contiguous memory is available, and a

Re: [PATCH 4.14 49/62] Bluetooth: btusb: Only check needs_reset_resume DMI table for QCA rome chipsets

2018-05-15 Thread Guenter Roeck
On Tue, May 15, 2018 at 10:07:02AM -0700, Brian Norris wrote: > + Guenter > > On Mon, May 14, 2018 at 08:49:05AM +0200, Greg Kroah-Hartman wrote: > > 4.14-stable review patch. If anyone has any objections, please let me know. > > FYI, this backport is wrong. See below. > > > --

Re: [PATCH 4.14 49/62] Bluetooth: btusb: Only check needs_reset_resume DMI table for QCA rome chipsets

2018-05-15 Thread Guenter Roeck
On Tue, May 15, 2018 at 10:07:02AM -0700, Brian Norris wrote: > + Guenter > > On Mon, May 14, 2018 at 08:49:05AM +0200, Greg Kroah-Hartman wrote: > > 4.14-stable review patch. If anyone has any objections, please let me know. > > FYI, this backport is wrong. See below. > > > --

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Dan Carpenter
<samitolva...@google.com> > > > Signed-off-by: Hans Verkuil <hansv...@cisco.com> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab+sams...@kernel.org> > > > > > Thanks, Mauro. > > > > > Possibly... There was an ancient bug in S

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Dan Carpenter
Verkuil > > > Signed-off-by: Mauro Carvalho Chehab > > > > > Thanks, Mauro. > > > > > Possibly... There was an ancient bug in Smatch's function pointer > > handling. I just pushed a fix for it now so the warning is there on > > linux-next

Re: [PATCH v9 00/24] ILP32 for ARM64

2018-05-15 Thread Yury Norov
Hi all, On Tue, May 15, 2018 at 10:11:50PM +0300, Yury Norov wrote: > This series enables AARCH64 with ILP32 mode. > > As supporting work, it introduces ARCH_32BIT_OFF_T configuration > option that is enabled for existing 32-bit architectures but disabled > for new arches (so 64-bit off_t

Re: [PATCH v9 00/24] ILP32 for ARM64

2018-05-15 Thread Yury Norov
Hi all, On Tue, May 15, 2018 at 10:11:50PM +0300, Yury Norov wrote: > This series enables AARCH64 with ILP32 mode. > > As supporting work, it introduces ARCH_32BIT_OFF_T configuration > option that is enabled for existing 32-bit architectures but disabled > for new arches (so 64-bit off_t

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