[PATCH v5 3/4] staging: mt7621-mmc: Remove macro INIT_MSG and its usages

2018-08-23 Thread Nishad Kamdar
Removed all usages of INIT_MSG and dropped it from dbg.h. Signed-off-by: Nishad Kamdar --- Changes in v5: - No change --- drivers/staging/mt7621-mmc/dbg.h | 7 --- drivers/staging/mt7621-mmc/sd.c | 16 2 files changed, 23 deletions(-) diff --git

[PATCH v5 3/4] staging: mt7621-mmc: Remove macro INIT_MSG and its usages

2018-08-23 Thread Nishad Kamdar
Removed all usages of INIT_MSG and dropped it from dbg.h. Signed-off-by: Nishad Kamdar --- Changes in v5: - No change --- drivers/staging/mt7621-mmc/dbg.h | 7 --- drivers/staging/mt7621-mmc/sd.c | 16 2 files changed, 23 deletions(-) diff --git

[PATCH v5 2/4] staging: mt7621-mmc: Fix debug macro ERR_MSG and its usages

2018-08-23 Thread Nishad Kamdar
Replace all usages of ERR_MSG with with dev_ without __func__ or __LINE__ or current->comm and current->pid. Remove the do {} while(0) loop for the single statement macro. Delete commented ERR_MSG() usage. Drop ERR_MSG from dbg.h. Issue found by checkpatch. Signed-off-by: Nishad Kamdar ---

[PATCH v5 2/4] staging: mt7621-mmc: Fix debug macro ERR_MSG and its usages

2018-08-23 Thread Nishad Kamdar
Replace all usages of ERR_MSG with with dev_ without __func__ or __LINE__ or current->comm and current->pid. Remove the do {} while(0) loop for the single statement macro. Delete commented ERR_MSG() usage. Drop ERR_MSG from dbg.h. Issue found by checkpatch. Signed-off-by: Nishad Kamdar ---

[GIT PULL] gcc-plugins update for v4.19-rc1 (fix)

2018-08-23 Thread Kees Cook
Hi, Please pull this gcc-plugins fix for v4.19-rc1. This is for better behavior when the kernel is built with Clang, reported by Stefan Agner. Thanks! -Kees The following changes since commit 7ccb95e8fe9131b8fa14b947c60dfb30044fa002: gcc-plugins: Regularize Makefile.gcc-plugins (2018-07-24

[GIT PULL] gcc-plugins update for v4.19-rc1 (fix)

2018-08-23 Thread Kees Cook
Hi, Please pull this gcc-plugins fix for v4.19-rc1. This is for better behavior when the kernel is built with Clang, reported by Stefan Agner. Thanks! -Kees The following changes since commit 7ccb95e8fe9131b8fa14b947c60dfb30044fa002: gcc-plugins: Regularize Makefile.gcc-plugins (2018-07-24

[PATCH v5 1/4] staging: mt7621-mmc: Remove commented code for N_MSG

2018-08-23 Thread Nishad Kamdar
This patch removes the dead code for N_MSG(). Signed-off-by: Nishad Kamdar --- Changes in v5: - Remove commented code for N_MSG() --- drivers/staging/mt7621-mmc/dbg.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h

[PATCH v5 1/4] staging: mt7621-mmc: Remove commented code for N_MSG

2018-08-23 Thread Nishad Kamdar
This patch removes the dead code for N_MSG(). Signed-off-by: Nishad Kamdar --- Changes in v5: - Remove commented code for N_MSG() --- drivers/staging/mt7621-mmc/dbg.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h

[PATCH v5 0/4] staging: mt7621-mmc: Fix debug macros and their usages

2018-08-23 Thread Nishad Kamdar
The patchset fixes the four debug macros N_MSG, ERR_MSG, INIT_MSG and IRQ_MSG. Each patch fixes one particular macro and its usages. For N_MSG, removes the commented code in dbg.h. For ERR_MSG and IRQ_MSG, replaces printk with dev_ without __func__ or __LINE__ or current->comm and current->pid.

[PATCH v5 0/4] staging: mt7621-mmc: Fix debug macros and their usages

2018-08-23 Thread Nishad Kamdar
The patchset fixes the four debug macros N_MSG, ERR_MSG, INIT_MSG and IRQ_MSG. Each patch fixes one particular macro and its usages. For N_MSG, removes the commented code in dbg.h. For ERR_MSG and IRQ_MSG, replaces printk with dev_ without __func__ or __LINE__ or current->comm and current->pid.

Re: [PATCH 4.4 00/79] 4.4.152-stable review

2018-08-23 Thread Guenter Roeck
On Thu, Aug 23, 2018 at 06:56:21PM +0200, Greg Kroah-Hartman wrote: > On Thu, Aug 23, 2018 at 09:30:21AM -0700, Guenter Roeck wrote: > > On Thu, Aug 23, 2018 at 09:52:36AM +0200, Greg Kroah-Hartman wrote: > > > This is the start of the stable review cycle for the 4.4.152 release. > > > There are

Re: [PATCH 4.4 00/79] 4.4.152-stable review

2018-08-23 Thread Guenter Roeck
On Thu, Aug 23, 2018 at 06:56:21PM +0200, Greg Kroah-Hartman wrote: > On Thu, Aug 23, 2018 at 09:30:21AM -0700, Guenter Roeck wrote: > > On Thu, Aug 23, 2018 at 09:52:36AM +0200, Greg Kroah-Hartman wrote: > > > This is the start of the stable review cycle for the 4.4.152 release. > > > There are

Re: [PATCH v4 1/4] staging: mt7621-mmc: Fix debug macro N_MSG

2018-08-23 Thread Nishad Kamdar
On Wed, Aug 22, 2018 at 02:38:44PM +0300, Dan Carpenter wrote: > On Wed, Aug 22, 2018 at 04:40:56PM +0530, Nishad Kamdar wrote: > > On Wed, Aug 22, 2018 at 12:09:36PM +0300, Dan Carpenter wrote: > > > On Wed, Aug 22, 2018 at 02:04:55PM +0530, Nishad Kamdar wrote: > > > > This patch fixes the debug

Re: [PATCH V9 1/2] scsi: ufs: set the device reference clock setting

2018-08-23 Thread Evan Green
On Tue, Aug 21, 2018 at 3:18 AM Sayali Lokhande wrote: > > From: Subhash Jadavani > > UFS host supplies the reference clock to UFS device and UFS device > specification allows host to provide one of the 4 frequencies (19.2 MHz, > 26 MHz, 38.4 MHz, 52 MHz) for reference clock. Host should set the

Re: [PATCH v4 1/4] staging: mt7621-mmc: Fix debug macro N_MSG

2018-08-23 Thread Nishad Kamdar
On Wed, Aug 22, 2018 at 02:38:44PM +0300, Dan Carpenter wrote: > On Wed, Aug 22, 2018 at 04:40:56PM +0530, Nishad Kamdar wrote: > > On Wed, Aug 22, 2018 at 12:09:36PM +0300, Dan Carpenter wrote: > > > On Wed, Aug 22, 2018 at 02:04:55PM +0530, Nishad Kamdar wrote: > > > > This patch fixes the debug

Re: [PATCH V9 1/2] scsi: ufs: set the device reference clock setting

2018-08-23 Thread Evan Green
On Tue, Aug 21, 2018 at 3:18 AM Sayali Lokhande wrote: > > From: Subhash Jadavani > > UFS host supplies the reference clock to UFS device and UFS device > specification allows host to provide one of the 4 frequencies (19.2 MHz, > 26 MHz, 38.4 MHz, 52 MHz) for reference clock. Host should set the

Re: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Jason Gunthorpe
On Thu, Aug 23, 2018 at 04:39:29PM +, Parav Pandit wrote: > > > > From: Jason Gunthorpe > > Sent: Thursday, August 23, 2018 9:55 AM > > To: Eric Biggers > > Cc: Doug Ledford ; linux-r...@vger.kernel.org; > > dasaratharaman.chandramo...@intel.com; Leon Romanovsky > > ;

Re: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Jason Gunthorpe
On Thu, Aug 23, 2018 at 04:39:29PM +, Parav Pandit wrote: > > > > From: Jason Gunthorpe > > Sent: Thursday, August 23, 2018 9:55 AM > > To: Eric Biggers > > Cc: Doug Ledford ; linux-r...@vger.kernel.org; > > dasaratharaman.chandramo...@intel.com; Leon Romanovsky > > ;

[BUGFIX PATCH -tip] kprobes/x86: Fix to copy RIP relative instruction correctly

2018-08-23 Thread Masami Hiramatsu
Since copy_optimized_instructions() misses to update real RIP address while copying several instructions to working buffer, it adjusts RIP-relative instruction with wrong RIP address for the 2nd and subsequent instructions. This may break the kernel (like kernel freeze) because probed instruction

[BUGFIX PATCH -tip] kprobes/x86: Fix to copy RIP relative instruction correctly

2018-08-23 Thread Masami Hiramatsu
Since copy_optimized_instructions() misses to update real RIP address while copying several instructions to working buffer, it adjusts RIP-relative instruction with wrong RIP address for the 2nd and subsequent instructions. This may break the kernel (like kernel freeze) because probed instruction

Re: [PATCH v4 2/4] staging: mt7621-mmc: Fix debug macro ERR_MSG and its usages

2018-08-23 Thread Nishad Kamdar
On Wed, Aug 22, 2018 at 12:13:42PM +0300, Dan Carpenter wrote: > On Wed, Aug 22, 2018 at 02:13:07PM +0530, Nishad Kamdar wrote: > > diff --git a/drivers/staging/mt7621-mmc/sd.c > > b/drivers/staging/mt7621-mmc/sd.c > > index 04d23cc7cd4a..6b2c72fc61f2 100644 > > ---

Re: [PATCH v4 2/4] staging: mt7621-mmc: Fix debug macro ERR_MSG and its usages

2018-08-23 Thread Nishad Kamdar
On Wed, Aug 22, 2018 at 12:13:42PM +0300, Dan Carpenter wrote: > On Wed, Aug 22, 2018 at 02:13:07PM +0530, Nishad Kamdar wrote: > > diff --git a/drivers/staging/mt7621-mmc/sd.c > > b/drivers/staging/mt7621-mmc/sd.c > > index 04d23cc7cd4a..6b2c72fc61f2 100644 > > ---

RE: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Parav Pandit
Hi Doug, > -Original Message- > From: Doug Ledford > Sent: Thursday, August 23, 2018 11:56 AM > To: Parav Pandit ; Jason Gunthorpe ; > Eric Biggers > Cc: linux-r...@vger.kernel.org; dasaratharaman.chandramo...@intel.com; > Leon Romanovsky ; linux-kernel@vger.kernel.org; > Mark Bloch ;

RE: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Parav Pandit
Hi Doug, > -Original Message- > From: Doug Ledford > Sent: Thursday, August 23, 2018 11:56 AM > To: Parav Pandit ; Jason Gunthorpe ; > Eric Biggers > Cc: linux-r...@vger.kernel.org; dasaratharaman.chandramo...@intel.com; > Leon Romanovsky ; linux-kernel@vger.kernel.org; > Mark Bloch ;

Re: [PATCH v4 1/4] staging: mt7621-mmc: Fix debug macro N_MSG

2018-08-23 Thread Nishad Kamdar
On Wed, Aug 22, 2018 at 01:26:41PM +0200, Greg Kroah-Hartman wrote: > On Wed, Aug 22, 2018 at 04:40:56PM +0530, Nishad Kamdar wrote: > > On Wed, Aug 22, 2018 at 12:09:36PM +0300, Dan Carpenter wrote: > > > On Wed, Aug 22, 2018 at 02:04:55PM +0530, Nishad Kamdar wrote: > > > > This patch fixes the

Re: [PATCH v4 1/4] staging: mt7621-mmc: Fix debug macro N_MSG

2018-08-23 Thread Nishad Kamdar
On Wed, Aug 22, 2018 at 01:26:41PM +0200, Greg Kroah-Hartman wrote: > On Wed, Aug 22, 2018 at 04:40:56PM +0530, Nishad Kamdar wrote: > > On Wed, Aug 22, 2018 at 12:09:36PM +0300, Dan Carpenter wrote: > > > On Wed, Aug 22, 2018 at 02:04:55PM +0530, Nishad Kamdar wrote: > > > > This patch fixes the

Re: [PATCH v3 1/2] mm: migration: fix migration of huge PMD shared pages

2018-08-23 Thread Mike Kravetz
On 08/23/2018 05:48 AM, Michal Hocko wrote: > On Tue 21-08-18 18:10:42, Mike Kravetz wrote: > [...] > > OK, after burning myself when trying to be clever here it seems like > your proposed solution is indeed simpler. > >> +bool huge_pmd_sharing_possible(struct vm_area_struct *vma, >> +

Re: [PATCH v3 1/2] mm: migration: fix migration of huge PMD shared pages

2018-08-23 Thread Mike Kravetz
On 08/23/2018 05:48 AM, Michal Hocko wrote: > On Tue 21-08-18 18:10:42, Mike Kravetz wrote: > [...] > > OK, after burning myself when trying to be clever here it seems like > your proposed solution is indeed simpler. > >> +bool huge_pmd_sharing_possible(struct vm_area_struct *vma, >> +

Re: [PATCH 4.4 00/79] 4.4.152-stable review

2018-08-23 Thread Greg Kroah-Hartman
On Thu, Aug 23, 2018 at 09:30:21AM -0700, Guenter Roeck wrote: > On Thu, Aug 23, 2018 at 09:52:36AM +0200, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.4.152 release. > > There are 79 patches in this series, all will be posted as a response > > to this one.

Re: [PATCH 4.4 00/79] 4.4.152-stable review

2018-08-23 Thread Greg Kroah-Hartman
On Thu, Aug 23, 2018 at 09:30:21AM -0700, Guenter Roeck wrote: > On Thu, Aug 23, 2018 at 09:52:36AM +0200, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.4.152 release. > > There are 79 patches in this series, all will be posted as a response > > to this one.

Re: [lkp-robot] [mm] 15d36fecd0: WARNING:at_kernel/memremap.c:#devm_memremap_pages

2018-08-23 Thread Dave Jiang
I am not able to reproduce when I booted my test system with "mem=8G memmap=4G!8G". I ended up with a single pmem: [ 57.750556] nd_pmem namespace0.0: unable to guarantee persistence of writes [ 57.881573] pmem0: detected capacity change from 0 to 4294967296 However in the reported kmsg, it

Re: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Doug Ledford
On Thu, 2018-08-23 at 16:39 +, Parav Pandit wrote: > > -Original Message- > > From: Jason Gunthorpe > > Sent: Thursday, August 23, 2018 9:55 AM > > To: Eric Biggers > > Cc: Doug Ledford ; linux-r...@vger.kernel.org; > > dasaratharaman.chandramo...@intel.com; Leon Romanovsky > > ;

Re: [lkp-robot] [mm] 15d36fecd0: WARNING:at_kernel/memremap.c:#devm_memremap_pages

2018-08-23 Thread Dave Jiang
I am not able to reproduce when I booted my test system with "mem=8G memmap=4G!8G". I ended up with a single pmem: [ 57.750556] nd_pmem namespace0.0: unable to guarantee persistence of writes [ 57.881573] pmem0: detected capacity change from 0 to 4294967296 However in the reported kmsg, it

Re: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Doug Ledford
On Thu, 2018-08-23 at 16:39 +, Parav Pandit wrote: > > -Original Message- > > From: Jason Gunthorpe > > Sent: Thursday, August 23, 2018 9:55 AM > > To: Eric Biggers > > Cc: Doug Ledford ; linux-r...@vger.kernel.org; > > dasaratharaman.chandramo...@intel.com; Leon Romanovsky > > ;

Re: [PATCH] sched/fair: vruntime should normalize when switching from fair

2018-08-23 Thread Dietmar Eggemann
Hi, On 08/21/2018 01:54 AM, Miguel de Dios wrote: On 08/17/2018 11:27 AM, Steve Muckle wrote: From: John Dias When rt_mutex_setprio changes a task's scheduling class to RT, we're seeing cases where the task's vruntime is not updated correctly upon return to the fair class. Specifically, the

Re: [PATCH] sched/fair: vruntime should normalize when switching from fair

2018-08-23 Thread Dietmar Eggemann
Hi, On 08/21/2018 01:54 AM, Miguel de Dios wrote: On 08/17/2018 11:27 AM, Steve Muckle wrote: From: John Dias When rt_mutex_setprio changes a task's scheduling class to RT, we're seeing cases where the task's vruntime is not updated correctly upon return to the fair class. Specifically, the

Re: [PATCH v1] security/capabilities: remove check for -EINVAL

2018-08-23 Thread James Morris
On Wed, 22 Aug 2018, Serge E. Hallyn wrote: > Quoting Christian Brauner (christ...@brauner.io): > > bprm_caps_from_vfs_caps() never returned -EINVAL so remove the > > rc == -EINVAL check. > > > > Signed-off-by: Christian Brauner > > Thanks. > > Reviewed-by: Serge Hallyn Thanks, I'll queue

Re: [PATCH v1] security/capabilities: remove check for -EINVAL

2018-08-23 Thread James Morris
On Wed, 22 Aug 2018, Serge E. Hallyn wrote: > Quoting Christian Brauner (christ...@brauner.io): > > bprm_caps_from_vfs_caps() never returned -EINVAL so remove the > > rc == -EINVAL check. > > > > Signed-off-by: Christian Brauner > > Thanks. > > Reviewed-by: Serge Hallyn Thanks, I'll queue

[PATCH v2 2/2]: perf record: enable asynchronous trace writing

2018-08-23 Thread Alexey Budankov
Trace file offsets are different for every enqueued write operation and calculated dynamically in trace streaming loop and don't overlap so write requests can be written in parallel. record__mmap_read_sync implements sort of a barrier between spilling ready profiling data to disk.

[PATCH v2 2/2]: perf record: enable asynchronous trace writing

2018-08-23 Thread Alexey Budankov
Trace file offsets are different for every enqueued write operation and calculated dynamically in trace streaming loop and don't overlap so write requests can be written in parallel. record__mmap_read_sync implements sort of a barrier between spilling ready profiling data to disk.

[RESEND PATCH V5 2/8] x86/fsgsbase/64: Introduce FS/GS base helper functions

2018-08-23 Thread Chang S. Bae
With new helpers, FS/GS base access is centralized. Eventually, when FSGSBASE instruction enabled, it will be faster. "inactive" GS base refers to base backed up at kernel entries and of inactive (user) task's. task_seg_base() is moved out to kernel/process_64.c, where the helper functions are

[RESEND PATCH V5 2/8] x86/fsgsbase/64: Introduce FS/GS base helper functions

2018-08-23 Thread Chang S. Bae
With new helpers, FS/GS base access is centralized. Eventually, when FSGSBASE instruction enabled, it will be faster. "inactive" GS base refers to base backed up at kernel entries and of inactive (user) task's. task_seg_base() is moved out to kernel/process_64.c, where the helper functions are

[RESEND PATCH V5 0/8] x86: infrastructure to enable FSGSBASE

2018-08-23 Thread Chang S. Bae
Resending the patchset that was posted before [6]. Given feedbacks from [1], it was suggested to separate two parts and to (re-)submit this patchset first. To facilitate FSGSBASE, Andy's FS/GS base read fix is first ordered, then some helper functions and refactoring work are included. Cleanup

[RESEND PATCH V5 0/8] x86: infrastructure to enable FSGSBASE

2018-08-23 Thread Chang S. Bae
Resending the patchset that was posted before [6]. Given feedbacks from [1], it was suggested to separate two parts and to (re-)submit this patchset first. To facilitate FSGSBASE, Andy's FS/GS base read fix is first ordered, then some helper functions and refactoring work are included. Cleanup

Re: [PATCH v3 1/2] mm: migration: fix migration of huge PMD shared pages

2018-08-23 Thread Mike Kravetz
On 08/23/2018 01:21 AM, Kirill A. Shutemov wrote: > On Thu, Aug 23, 2018 at 09:30:35AM +0200, Michal Hocko wrote: >> On Wed 22-08-18 09:48:16, Mike Kravetz wrote: >>> On 08/22/2018 05:28 AM, Michal Hocko wrote: On Tue 21-08-18 18:10:42, Mike Kravetz wrote: [...] > diff --git

[RESEND PATCH V5 1/8] x86/arch_prctl/64: Make ptrace read FS/GS base accurately

2018-08-23 Thread Chang S. Bae
From: Andy Lutomirski ptrace can read FS/GS base using the register access API (PTRACE_PEEKUSER, etc) or PTRACE_ARCH_PRCTL. Make both of these mechanisms return the actual FS/GS base. This will improve debuggability by providing the correct information to ptracer (GDB and etc). Signed-off-by:

[RESEND PATCH V5 3/8] x86/fsgsbase/64: Make ptrace use FS/GS base helpers

2018-08-23 Thread Chang S. Bae
The FS/GS base helper functions are used on ptrace APIs (PTRACE_ARCH_PRCTL, PTRACE_SETREG, PTRACE_GETREG, etc). The FS/GS-update mechanism is now a bit organized. Based-on-code-from: Andy Lutomirski Signed-off-by: Chang S. Bae Cc: H. Peter Anvin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Dave

Re: [PATCH v3 1/2] mm: migration: fix migration of huge PMD shared pages

2018-08-23 Thread Mike Kravetz
On 08/23/2018 01:21 AM, Kirill A. Shutemov wrote: > On Thu, Aug 23, 2018 at 09:30:35AM +0200, Michal Hocko wrote: >> On Wed 22-08-18 09:48:16, Mike Kravetz wrote: >>> On 08/22/2018 05:28 AM, Michal Hocko wrote: On Tue 21-08-18 18:10:42, Mike Kravetz wrote: [...] > diff --git

[RESEND PATCH V5 1/8] x86/arch_prctl/64: Make ptrace read FS/GS base accurately

2018-08-23 Thread Chang S. Bae
From: Andy Lutomirski ptrace can read FS/GS base using the register access API (PTRACE_PEEKUSER, etc) or PTRACE_ARCH_PRCTL. Make both of these mechanisms return the actual FS/GS base. This will improve debuggability by providing the correct information to ptracer (GDB and etc). Signed-off-by:

[RESEND PATCH V5 3/8] x86/fsgsbase/64: Make ptrace use FS/GS base helpers

2018-08-23 Thread Chang S. Bae
The FS/GS base helper functions are used on ptrace APIs (PTRACE_ARCH_PRCTL, PTRACE_SETREG, PTRACE_GETREG, etc). The FS/GS-update mechanism is now a bit organized. Based-on-code-from: Andy Lutomirski Signed-off-by: Chang S. Bae Cc: H. Peter Anvin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Dave

Re: [PATCH] x86/kvm/nVMX: avoid redundant double assignment of nested_run_pending

2018-08-23 Thread Eduardo Valentin
On Thu, Aug 23, 2018 at 06:24:24PM +0200, Vitaly Kuznetsov wrote: > nested_run_pending is set 20 lines above and check_vmentry_prereqs()/ > check_vmentry_postreqs() don't seem to be resetting it (the later, however, > checks it). > Reviewed-by: Eduardo Valentin > Signed-off-by: Vitaly

Re: [PATCH] x86/kvm/nVMX: avoid redundant double assignment of nested_run_pending

2018-08-23 Thread Eduardo Valentin
On Thu, Aug 23, 2018 at 06:24:24PM +0200, Vitaly Kuznetsov wrote: > nested_run_pending is set 20 lines above and check_vmentry_prereqs()/ > check_vmentry_postreqs() don't seem to be resetting it (the later, however, > checks it). > Reviewed-by: Eduardo Valentin > Signed-off-by: Vitaly

[RESEND PATCH V5 5/8] x86/fsgsbase/64: Factor out load FS/GS segments from __switch_to

2018-08-23 Thread Chang S. Bae
Instead of open coding the calls to load_seg_legacy(), add a load_fsgs() helper to handle fs and gs. When FSGSBASE is enabled, load_fsgs() will be updated. Signed-off-by: Chang S. Bae Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: H. Peter Anvin Cc:

[RESEND PATCH V5 5/8] x86/fsgsbase/64: Factor out load FS/GS segments from __switch_to

2018-08-23 Thread Chang S. Bae
Instead of open coding the calls to load_seg_legacy(), add a load_fsgs() helper to handle fs and gs. When FSGSBASE is enabled, load_fsgs() will be updated. Signed-off-by: Chang S. Bae Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: H. Peter Anvin Cc:

[RESEND PATCH V5 6/8] x86/segments/64: Rename PER_CPU segment to CPU_NUMBER

2018-08-23 Thread Chang S. Bae
64-bit doesn't use the entry for per CPU data, but for CPU (and node) numbers. The change will clarify the real usage of this entry in GDT. Suggested-by: H. Peter Anvin Signed-off-by: Chang S. Bae Acked-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: Ingo Molnar Cc: Andi Kleen Cc: Dave

[RESEND PATCH V5 7/8] x86/vdso: Introduce helper functions for CPU and node number

2018-08-23 Thread Chang S. Bae
The CPU initialization in vDSO is now a bit cleaned up by the new helper functions. The helper functions will take care of combining CPU and node number and reading each from the combined value. Suggested-by: Andy Lutomirski Suggested-by: Thomas Gleixner Signed-off-by: Chang S. Bae Cc: H.

[RESEND PATCH V5 4/8] x86/fsgsbase/64: Use FS/GS base helpers in core dump

2018-08-23 Thread Chang S. Bae
The open coded access is now replaced, that might prevent from using the enhanced FSGSBASE mechanism. Based-on-code-from: Andy Lutomirski Signed-off-by: Chang S. Bae Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: H. Peter Anvin Cc: Ingo Molnar Cc:

[RESEND PATCH V5 6/8] x86/segments/64: Rename PER_CPU segment to CPU_NUMBER

2018-08-23 Thread Chang S. Bae
64-bit doesn't use the entry for per CPU data, but for CPU (and node) numbers. The change will clarify the real usage of this entry in GDT. Suggested-by: H. Peter Anvin Signed-off-by: Chang S. Bae Acked-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: Ingo Molnar Cc: Andi Kleen Cc: Dave

[RESEND PATCH V5 7/8] x86/vdso: Introduce helper functions for CPU and node number

2018-08-23 Thread Chang S. Bae
The CPU initialization in vDSO is now a bit cleaned up by the new helper functions. The helper functions will take care of combining CPU and node number and reading each from the combined value. Suggested-by: Andy Lutomirski Suggested-by: Thomas Gleixner Signed-off-by: Chang S. Bae Cc: H.

[RESEND PATCH V5 4/8] x86/fsgsbase/64: Use FS/GS base helpers in core dump

2018-08-23 Thread Chang S. Bae
The open coded access is now replaced, that might prevent from using the enhanced FSGSBASE mechanism. Based-on-code-from: Andy Lutomirski Signed-off-by: Chang S. Bae Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: H. Peter Anvin Cc: Ingo Molnar Cc:

[RESEND PATCH V5 8/8] x86/vdso: Move out the CPU initialization

2018-08-23 Thread Chang S. Bae
The CPU and node number will be written, as early enough, to the segment limit of per CPU data and TSC_AUX MSR entry. The information has been retrieved by vgetcpu in user space and will be also loaded from the paranoid entry, when FSGSBASE enabled. The new setup function is named after the

[RESEND PATCH V5 8/8] x86/vdso: Move out the CPU initialization

2018-08-23 Thread Chang S. Bae
The CPU and node number will be written, as early enough, to the segment limit of per CPU data and TSC_AUX MSR entry. The information has been retrieved by vgetcpu in user space and will be also loaded from the paranoid entry, when FSGSBASE enabled. The new setup function is named after the

[PATCH v2 1/2]: perf util: map data buffer for preserving collected data

2018-08-23 Thread Alexey Budankov
The data buffer and accompanying AIO control block are allocated at perf_mmap object and the mapped data buffer size is equal to the kernel one. The buffer is then used to preserve profiling data ready for dumping and queue it for asynchronous writing into perf trace thru implemented

[PATCH v2 1/2]: perf util: map data buffer for preserving collected data

2018-08-23 Thread Alexey Budankov
The data buffer and accompanying AIO control block are allocated at perf_mmap object and the mapped data buffer size is equal to the kernel one. The buffer is then used to preserve profiling data ready for dumping and queue it for asynchronous writing into perf trace thru implemented

[PATCH] HID: add support for Apple Magic Keyboards

2018-08-23 Thread Sean O'Brien
USB device Vendor 05ac (Apple) Device 026c (Magic Keyboard with Numeric Keypad) Bluetooth devices Vendor 004c (Apple) Device 0267 (Magic Keyboard) Device 026c (Magic Keyboard with Numeric Keypad) Support already exists for the Magic Keyboard over USB

[PATCH] HID: add support for Apple Magic Keyboards

2018-08-23 Thread Sean O'Brien
USB device Vendor 05ac (Apple) Device 026c (Magic Keyboard with Numeric Keypad) Bluetooth devices Vendor 004c (Apple) Device 0267 (Magic Keyboard) Device 026c (Magic Keyboard with Numeric Keypad) Support already exists for the Magic Keyboard over USB

RE: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Parav Pandit
> -Original Message- > From: Jason Gunthorpe > Sent: Thursday, August 23, 2018 9:55 AM > To: Eric Biggers > Cc: Doug Ledford ; linux-r...@vger.kernel.org; > dasaratharaman.chandramo...@intel.com; Leon Romanovsky > ; linux-kernel@vger.kernel.org; Mark Bloch > ; Moni Shoua ; Parav

RE: [RDMA bug] KASAN: use-after-free Read in __list_del_entry_valid (4)

2018-08-23 Thread Parav Pandit
> -Original Message- > From: Jason Gunthorpe > Sent: Thursday, August 23, 2018 9:55 AM > To: Eric Biggers > Cc: Doug Ledford ; linux-r...@vger.kernel.org; > dasaratharaman.chandramo...@intel.com; Leon Romanovsky > ; linux-kernel@vger.kernel.org; Mark Bloch > ; Moni Shoua ; Parav

[PATCH v2 0/2]: perf: reduce data loss when profiling highly parallel CPU bound workloads

2018-08-23 Thread Alexey Budankov
Currently in record mode the tool implements trace writing serially. The algorithm loops over mapped per-cpu data buffers and stores ready data chunks into a trace file using write() system call. At some circumstances the kernel may lack free space in a buffer because the other buffer's half

Disabling CPU vulnerabilities workarounds

2018-08-23 Thread Artem S. Tashkinov
Hello LKML, As time goes by more and more fixes of Intel/AMD/ARM CPUs vulnerabilities are added to the Linux kernel without a simple way to disable them all in one fell swoop. Disabling is a good option for strictly confined environments where no 3d party untrusted code is ever to be run,

[PATCH v2 0/2]: perf: reduce data loss when profiling highly parallel CPU bound workloads

2018-08-23 Thread Alexey Budankov
Currently in record mode the tool implements trace writing serially. The algorithm loops over mapped per-cpu data buffers and stores ready data chunks into a trace file using write() system call. At some circumstances the kernel may lack free space in a buffer because the other buffer's half

Disabling CPU vulnerabilities workarounds

2018-08-23 Thread Artem S. Tashkinov
Hello LKML, As time goes by more and more fixes of Intel/AMD/ARM CPUs vulnerabilities are added to the Linux kernel without a simple way to disable them all in one fell swoop. Disabling is a good option for strictly confined environments where no 3d party untrusted code is ever to be run,

Re: [PATCH 4.4 00/79] 4.4.152-stable review

2018-08-23 Thread Guenter Roeck
On Thu, Aug 23, 2018 at 09:52:36AM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.4.152 release. > There are 79 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me

Re: [PATCH 4.4 00/79] 4.4.152-stable review

2018-08-23 Thread Guenter Roeck
On Thu, Aug 23, 2018 at 09:52:36AM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.4.152 release. > There are 79 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me

Re: [PATCH] x86/kvm/nVMX: avoid redundant double assignment of nested_run_pending

2018-08-23 Thread Paolo Bonzini
On 23/08/2018 18:24, Vitaly Kuznetsov wrote: > nested_run_pending is set 20 lines above and check_vmentry_prereqs()/ > check_vmentry_postreqs() don't seem to be resetting it (the later, however, > checks it). > > Signed-off-by: Vitaly Kuznetsov > --- > arch/x86/kvm/vmx.c | 3 --- > 1 file

Re: [PATCH] x86/kvm/nVMX: avoid redundant double assignment of nested_run_pending

2018-08-23 Thread Paolo Bonzini
On 23/08/2018 18:24, Vitaly Kuznetsov wrote: > nested_run_pending is set 20 lines above and check_vmentry_prereqs()/ > check_vmentry_postreqs() don't seem to be resetting it (the later, however, > checks it). > > Signed-off-by: Vitaly Kuznetsov > --- > arch/x86/kvm/vmx.c | 3 --- > 1 file

[PATCH 0/2] xfs: Use wake_q for waking up log space waiters

2018-08-23 Thread Waiman Long
While running the AIM7 microbenchmark, it was found that there was a severe spinlock contention problem in the current XFS log space reservation code. To alleviate the problem, the log space waiter waiting and waking functions are modified to use the wake_q for waking up waiters without holding

[PATCH 0/2] xfs: Use wake_q for waking up log space waiters

2018-08-23 Thread Waiman Long
While running the AIM7 microbenchmark, it was found that there was a severe spinlock contention problem in the current XFS log space reservation code. To alleviate the problem, the log space waiter waiting and waking functions are modified to use the wake_q for waking up waiters without holding

[PATCH 1/2] sched/core: Export wake_q functions to kernel modules

2018-08-23 Thread Waiman Long
The use of wake_q_add() and wake_up_q() functions help to do task wakeup without holding lock can help to reduce lock hold time. They should be available to kernel modules as well. A new wake_q_empty() inline function is also added. Signed-off-by: Waiman Long --- include/linux/sched/wake_q.h |

[PATCH 1/2] sched/core: Export wake_q functions to kernel modules

2018-08-23 Thread Waiman Long
The use of wake_q_add() and wake_up_q() functions help to do task wakeup without holding lock can help to reduce lock hold time. They should be available to kernel modules as well. A new wake_q_empty() inline function is also added. Signed-off-by: Waiman Long --- include/linux/sched/wake_q.h |

[PATCH 2/2] xfs: Use wake_q for waking up log space waiters

2018-08-23 Thread Waiman Long
Running the AIM7 fserver workload on a 2-socket 24-core 48-thread Broadwell system, it was found that there were severe spinlock contention in the XFS code. In particular, native_queued_spin_lock_slowpath() consumes 69.7% of cpu time. The xlog_grant_head_check() function call and its sub-function

[PATCH 2/2] xfs: Use wake_q for waking up log space waiters

2018-08-23 Thread Waiman Long
Running the AIM7 fserver workload on a 2-socket 24-core 48-thread Broadwell system, it was found that there were severe spinlock contention in the XFS code. In particular, native_queued_spin_lock_slowpath() consumes 69.7% of cpu time. The xlog_grant_head_check() function call and its sub-function

Re: [PATCH] cpufreq: ti-cpufreq: Only register platform_device when supported

2018-08-23 Thread Dave Gerlach
On 08/23/2018 02:50 AM, Johan Hovold wrote: > On Wed, Aug 22, 2018 at 09:44:32PM -0500, Dave Gerlach wrote: >> Currently the ti-cpufreq driver blindly registers a 'ti-cpufreq' to force >> the driver to probe on any platforms where the driver is built in. >> However, this should only happen on

Re: [PATCH] cpufreq: ti-cpufreq: Only register platform_device when supported

2018-08-23 Thread Dave Gerlach
On 08/23/2018 02:50 AM, Johan Hovold wrote: > On Wed, Aug 22, 2018 at 09:44:32PM -0500, Dave Gerlach wrote: >> Currently the ti-cpufreq driver blindly registers a 'ti-cpufreq' to force >> the driver to probe on any platforms where the driver is built in. >> However, this should only happen on

Re: [PATCH v2 1/3] mm: rework memcg kernel stack accounting

2018-08-23 Thread Roman Gushchin
On Wed, Aug 22, 2018 at 04:12:13PM +0200, Michal Hocko wrote: > On Tue 21-08-18 14:35:57, Roman Gushchin wrote: > > If CONFIG_VMAP_STACK is set, kernel stacks are allocated > > using __vmalloc_node_range() with __GFP_ACCOUNT. So kernel > > stack pages are charged against corresponding memory

Re: [PATCH v2 1/3] mm: rework memcg kernel stack accounting

2018-08-23 Thread Roman Gushchin
On Wed, Aug 22, 2018 at 04:12:13PM +0200, Michal Hocko wrote: > On Tue 21-08-18 14:35:57, Roman Gushchin wrote: > > If CONFIG_VMAP_STACK is set, kernel stacks are allocated > > using __vmalloc_node_range() with __GFP_ACCOUNT. So kernel > > stack pages are charged against corresponding memory

[PATCH] x86/kvm/nVMX: avoid redundant double assignment of nested_run_pending

2018-08-23 Thread Vitaly Kuznetsov
nested_run_pending is set 20 lines above and check_vmentry_prereqs()/ check_vmentry_postreqs() don't seem to be resetting it (the later, however, checks it). Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/vmx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c

[PATCH] x86/kvm/nVMX: avoid redundant double assignment of nested_run_pending

2018-08-23 Thread Vitaly Kuznetsov
nested_run_pending is set 20 lines above and check_vmentry_prereqs()/ check_vmentry_postreqs() don't seem to be resetting it (the later, however, checks it). Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/vmx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c

Re: [PATCH v4 RESEND 5/5] KVM: x86: hyperv: implement PV IPI send hypercalls

2018-08-23 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Wed, Aug 22, 2018 at 12:18:32PM +0200, Vitaly Kuznetsov wrote: >> Using hypercall for sending IPIs is faster because this allows to specify >> any number of vCPUs (even > 64 with sparse CPU set), the whole procedure >> will take only one VMEXIT. >> >> Current Hyper-V

Re: [PATCH] AMD perf PMU events for AMD Family 17h.

2018-08-23 Thread William Cohen
On 08/23/2018 10:31 AM, Arnaldo Carvalho de Melo wrote: > Em Thu, Aug 23, 2018 at 01:21:45PM +0200, Martin Liška escreveu: >> May I please ping this. > > I was waiting for someone to give some ack, perhaps Will Cohen can take > a brief look and provide that? Will? > > Thanks, > > - Arnaldo >

Re: [PATCH v4 RESEND 5/5] KVM: x86: hyperv: implement PV IPI send hypercalls

2018-08-23 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Wed, Aug 22, 2018 at 12:18:32PM +0200, Vitaly Kuznetsov wrote: >> Using hypercall for sending IPIs is faster because this allows to specify >> any number of vCPUs (even > 64 with sparse CPU set), the whole procedure >> will take only one VMEXIT. >> >> Current Hyper-V

Re: [PATCH] AMD perf PMU events for AMD Family 17h.

2018-08-23 Thread William Cohen
On 08/23/2018 10:31 AM, Arnaldo Carvalho de Melo wrote: > Em Thu, Aug 23, 2018 at 01:21:45PM +0200, Martin Liška escreveu: >> May I please ping this. > > I was waiting for someone to give some ack, perhaps Will Cohen can take > a brief look and provide that? Will? > > Thanks, > > - Arnaldo >

Re: SEV guest regression in 4.18

2018-08-23 Thread Paolo Bonzini
On 23/08/2018 17:29, Sean Christopherson wrote: > On Thu, Aug 23, 2018 at 01:26:55PM +0200, Paolo Bonzini wrote: >> On 22/08/2018 22:11, Brijesh Singh wrote: >>> >>> Yes, this is one of approach I have in mind. It will avoid splitting >>> the larger pages; I am thinking that early in boot code we

Re: SEV guest regression in 4.18

2018-08-23 Thread Paolo Bonzini
On 23/08/2018 17:29, Sean Christopherson wrote: > On Thu, Aug 23, 2018 at 01:26:55PM +0200, Paolo Bonzini wrote: >> On 22/08/2018 22:11, Brijesh Singh wrote: >>> >>> Yes, this is one of approach I have in mind. It will avoid splitting >>> the larger pages; I am thinking that early in boot code we

Re: [PATCH v1 1/2]: perf util: map data buffer for preserving collected data

2018-08-23 Thread Alexey Budankov
Hi Arnaldo, On 23.08.2018 17:30, Arnaldo Carvalho de Melo wrote: > Em Thu, Aug 23, 2018 at 01:30:47PM +0300, Alexey Budankov escreveu: >> +++ b/tools/perf/util/evlist.c >> @@ -718,6 +718,8 @@ static void perf_evlist__munmap_nofree(struct >> perf_evlist *evlist) >> void

Re: [PATCH v1 1/2]: perf util: map data buffer for preserving collected data

2018-08-23 Thread Alexey Budankov
Hi Arnaldo, On 23.08.2018 17:30, Arnaldo Carvalho de Melo wrote: > Em Thu, Aug 23, 2018 at 01:30:47PM +0300, Alexey Budankov escreveu: >> +++ b/tools/perf/util/evlist.c >> @@ -718,6 +718,8 @@ static void perf_evlist__munmap_nofree(struct >> perf_evlist *evlist) >> void

Re: [RFC v8 PATCH 2/5] uprobes: introduce has_uprobes helper

2018-08-23 Thread Yang Shi
On 8/23/18 8:15 AM, Oleg Nesterov wrote: On 08/22, Srikar Dronamraju wrote: * Vlastimil Babka [2018-08-22 12:55:59]: On 08/15/2018 08:49 PM, Yang Shi wrote: We need check if mm or vma has uprobes in the following patch to check if a vma could be unmapped with holding read mmap_sem.

Re: [RFC v8 PATCH 2/5] uprobes: introduce has_uprobes helper

2018-08-23 Thread Yang Shi
On 8/23/18 8:15 AM, Oleg Nesterov wrote: On 08/22, Srikar Dronamraju wrote: * Vlastimil Babka [2018-08-22 12:55:59]: On 08/15/2018 08:49 PM, Yang Shi wrote: We need check if mm or vma has uprobes in the following patch to check if a vma could be unmapped with holding read mmap_sem.

Re: [PATCH v4 RESEND 5/5] KVM: x86: hyperv: implement PV IPI send hypercalls

2018-08-23 Thread Roman Kagan
On Wed, Aug 22, 2018 at 12:18:32PM +0200, Vitaly Kuznetsov wrote: > Using hypercall for sending IPIs is faster because this allows to specify > any number of vCPUs (even > 64 with sparse CPU set), the whole procedure > will take only one VMEXIT. > > Current Hyper-V TLFS (v5.0b) claims that

Re: [PATCH v4 RESEND 5/5] KVM: x86: hyperv: implement PV IPI send hypercalls

2018-08-23 Thread Roman Kagan
On Wed, Aug 22, 2018 at 12:18:32PM +0200, Vitaly Kuznetsov wrote: > Using hypercall for sending IPIs is faster because this allows to specify > any number of vCPUs (even > 64 with sparse CPU set), the whole procedure > will take only one VMEXIT. > > Current Hyper-V TLFS (v5.0b) claims that

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