Re: [PATCH v4 09/10] x86/jump-label: remove support for custom poker

2018-11-11 Thread Nadav Amit
From: Peter Zijlstra Sent: November 11, 2018 at 3:05:53 PM GMT > To: Nadav Amit > Cc: Ingo Molnar , linux-kernel@vger.kernel.org, > x...@kernel.org, H. Peter Anvin , Thomas Gleixner > , Borislav Petkov , Dave Hansen > , Andy Lutomirski , Kees Cook > , Dave Hansen , M

Re: [PATCH v4 05/10] x86/alternative: initializing temporary mm for patching

2018-11-11 Thread Nadav Amit
From: Peter Zijlstra Sent: November 11, 2018 at 2:43:27 PM GMT > To: Nadav Amit > Cc: Ingo Molnar , linux-kernel@vger.kernel.org, > x...@kernel.org, H. Peter Anvin , Thomas Gleixner > , Borislav Petkov , Dave Hansen > , Kees Cook , Dave Hansen > > Subject: Re:

Re: [PATCH v4 06/10] x86/alternative: use temporary mm for text poking

2018-11-11 Thread Nadav Amit
From: Damian Tometzki Sent: November 11, 2018 at 7:11:42 PM GMT > To: Nadav Amit > Cc: Ingo Molnar , linux-kernel@vger.kernel.org>, > x...@kernel.org>, H. Peter Anvin , Thomas Gleixner > , Borislav Petkov , Dave Hansen > , Andy Lutomirski , Kees Cook > , Pete

Re: [PATCH v4 06/10] x86/alternative: use temporary mm for text poking

2018-11-11 Thread Nadav Amit
From: Peter Zijlstra Sent: November 11, 2018 at 2:59:36 PM GMT > To: Nadav Amit > Cc: Ingo Molnar , linux-kernel@vger.kernel.org, > x...@kernel.org, H. Peter Anvin , Thomas Gleixner > , Borislav Petkov , Dave Hansen > , Andy Lutomirski , Kees Cook > , Dave Hansen , M

[PATCH] vmw_balloon: fix inflation with batching

2018-07-02 Thread Nadav Amit
("vmw_balloon: fixing double free when batching mode is off") Cc: sta...@vger.kernel.org Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/dr

Re: [PATCH v3 0/7] vmw_balloon: addressing bugs and issues

2018-06-26 Thread Nadav Amit
at 4:00 PM, Nadav Amit wrote: > All of these patches are intended for 4.18: > > - Patches 1-5 are bug fixes. > - Patch 6 changes the GPL comment. It is actually required just to > remove the maintainers list from the source file (since it has > changed). > - Patch

Re: [PATCH v4 1/9] Makefile: Prepare for using macros for inline asm

2018-06-19 Thread Nadav Amit
at 5:40 PM, Masahiro Yamada wrote: > In the meanwhile, CFLAGS_REMOVE_ will do > as a workaround. Thanks! I appreciate your help. I will submit tomorrow an updated version. Regards, Nadav

Re: [RFC v2 PATCH 2/2] mm: mmap: zap pages with read mmap_sem for large mapping

2018-06-19 Thread Nadav Amit
at 4:34 PM, Yang Shi wrote: > When running some mmap/munmap scalability tests with large memory (i.e. >> 300GB), the below hung task issue may happen occasionally. > > INFO: task ps:14018 blocked for more than 120 seconds. > Tainted: GE 4.9.79-009.ali3000.alios7.x86_64 #1 > "ec

Re: [RFC v2 PATCH 2/2] mm: mmap: zap pages with read mmap_sem for large mapping

2018-06-19 Thread Nadav Amit
at 4:08 PM, Yang Shi wrote: > > > On 6/19/18 3:17 PM, Nadav Amit wrote: >> at 4:34 PM, Yang Shi >> wrote: >> >> >>> When running some mmap/munmap scalability tests with large memory (i.e. >>> >>>> 300GB), the below hung ta

[PATCH v5 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-19 Thread Nadav Amit
: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Greg Kroah-Hartman Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Nadav Amit --- arch/x86/include/asm/jump_label.h | 65 ++- arch/x86/kernel/macros.S | 1

[PATCH v5 7/9] x86: extable: use macros instead of inline assembly

2018-06-19 Thread Nadav Amit
: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/asm.h | 61 +- arch/x86/kernel/macros.S | 1 + 2 files changed, 28 insertions(+), 34 deletions(-) di

[PATCH v5 8/9] x86: cpufeature: use macros instead of inline assembly

2018-06-19 Thread Nadav Amit
Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Signed-off-by: Nadav Amit --- arch/x86/include/asm/cpufeature.h | 82 ++- arch/x86/kernel/macros.S | 1 + 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/arch/x86/include/asm/cpufeature

[PATCH v5 1/9] Makefile: Prepare for using macros for inline asm

2018-06-19 Thread Nadav Amit
Marek Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: linux-kbu...@vger.kernel.org Signed-off-by: Nadav Amit --- Makefile | 9 +++-- arch/x86/Makefile| 11 +-- arch/x86/kernel/macros.S | 7 +++ scripts/Kbui

[PATCH v5 5/9] x86: bug: prevent gcc distortions

2018-06-19 Thread Nadav Amit
(-165) Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/bug.h | 98 ++ arch/x86/kernel/macros.S | 1 + include/asm-gen

[PATCH v5 3/9] x86: refcount: prevent gcc distortions

2018-06-19 Thread Nadav Amit
) Functions such as kref_get(), free_user(), fuse_file_get() now get inlined. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Kees Cook Cc: Jan Beulich Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/refco

[PATCH v5 4/9] x86: alternatives: macrofy locks for better inlining

2018-06-19 Thread Nadav Amit
nel.org Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/alternative-asm.h | 20 ++-- arch/x86/include/asm/alternative.h | 11 ++- arch/x86/kernel/macros.S | 1 + 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/arch/x

[PATCH v5 2/9] x86: objtool: use asm macro for better compiler decisions

2018-06-19 Thread Nadav Amit
: 40302 (-19) Cc: Christopher Li Cc: linux-spa...@vger.kernel.org Reviewed-by: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/kernel/macros.S | 2 ++ include/linux/compiler.h | 56 ++-- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a

[PATCH v3 1/7] vmw_balloon: fix inflation of 64-bit GFNs

2018-06-19 Thread Nadav Amit
: ef0f8f112984 ("VMware balloon: partially inline vmballoon_reserve_page.") Cc: sta...@vger.kernel.org Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/misc/vmw_b

[PATCH v3 0/7] vmw_balloon: addressing bugs and issues

2018-06-19 Thread Nadav Amit
h new features to be set on top of this set, which will be intended for 4.19. v2->v3: * Removing empty lines (Greg) * Removing the GPL message entirely (Greg) v1->v2: * Reordering patches to have bug fixes first (Greg) * Fixing SPDX tag * Cc'ing stable when ap

[PATCH v3 2/7] vmw_balloon: do not use 2MB without batching

2018-06-19 Thread Nadav Amit
settings, make the code more robust by not enabling 2MB support without batching. Fixes: 365bd7ef7ec8e ("VMware balloon: Support 2m page ballooning.") Cc: sta...@vger.kernel.org Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 8 +++- 1 file

[PATCH v3 5/7] vmw_balloon: remove inflation rate limiting

2018-06-19 Thread Nadav Amit
Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 92 +- 1 file changed, 11 insertions(+), 81 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index e7cfc85f6961..400a1ccefc8e 10064

[PATCH v3 7/7] vmw_balloon: update maintainers list

2018-06-19 Thread Nadav Amit
Philip Moltman is no longer a maintainer of the VMware balloon. Setting Nadav Amit as one instead. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 624c3fd11d04

[PATCH v3 6/7] vmw_balloon: update copyright message

2018-06-19 Thread Nadav Amit
Removing the GPL wording and replace it with an SPDX tag. The immediate trigger for doing it now is the need to remove the list of maintainers from the source file, as the maintainer list changed. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 22

[PATCH v3 3/7] vmw_balloon: VMCI_DOORBELL_SET does not check status

2018-06-19 Thread Nadav Amit
performance. Fixes: 48e3d668b790 ("VMware balloon: Enable notification via VMCI") Cc: sta...@vger.kernel.org Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) di

[PATCH v3 4/7] vmw_balloon: fix VMCI use when balloon built into kernel

2018-06-19 Thread Nadav Amit
llard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index a7df4c24a28d..e7cfc85f6961 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c

Re: [PATCH v3] vmw_balloon: fixing double free when batching mode is off

2018-05-31 Thread Nadav Amit
Nadav Amit wrote: > Nadav Amit wrote: > >> Ping. Please consider it for inclusion for rc4. >> >> Nadav Amit wrote: >> >>> From: Gil Kupfer >>> >>> The balloon.page field is used for two different purposes if batching is >>&g

Re: Can kfree() sleep at runtime?

2018-05-31 Thread Nadav Amit
Jia-Ju Bai wrote: > > > On 2018/5/31 22:30, Christopher Lameter wrote: >> On Thu, 31 May 2018, Matthew Wilcox wrote: >> Freeing a page in the page allocator also was traditionally not sleeping. That has changed? >>> No. "Your bug" being "The bug in your static analysis tool". It pr

Re: [PATCH v3] vmw_balloon: fixing double free when batching mode is off

2018-06-01 Thread Nadav Amit
Greg Kroah-Hartman wrote: > On Thu, May 31, 2018 at 08:56:52PM +0000, Nadav Amit wrote: >> Nadav Amit wrote: >> >>> Nadav Amit wrote: >>> >>>> Ping. Please consider it for inclusion for rc4. >>>> >>>> Nadav Amit wrote:

[PATCH v3 RESEND] vmw_balloon: fixing double free when batching mode is off

2018-06-01 Thread Nadav Amit
.org Reported-by: Oleksandr Natalenko Signed-off-by: Gil Kupfer Signed-off-by: Nadav Amit Reviewed-by: Xavier Deguillard Tested-by: Oleksandr Natalenko --- drivers/misc/vmw_balloon.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/misc

[PATCH v4 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-12 Thread Nadav Amit
: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Greg Kroah-Hartman Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Nadav Amit --- arch/x86/include/asm/jump_label.h | 65 ++- arch/x86/kernel/macros.S | 1

[PATCH v4 8/9] x86: cpufeature: use macros instead of inline assembly

2018-06-12 Thread Nadav Amit
Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Signed-off-by: Nadav Amit --- arch/x86/include/asm/cpufeature.h | 82 ++- arch/x86/kernel/macros.S | 1 + 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/arch/x86/include/asm/cpufeature

[PATCH v4 1/9] Makefile: Prepare for using macros for inline asm

2018-06-12 Thread Nadav Amit
Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: linux-kbu...@vger.kernel.org Signed-off-by: Nadav Amit --- Makefile | 9 +++-- arch/x86/Makefile| 11 +-- arch/x86/kernel/Makefile | 6 ++ arch/x86/kernel/macros.S | 7 ++

[PATCH v4 0/9] x86: macrofying inline asm for better compilation

2018-06-12 Thread Nadav Amit
of the comments according to my judgment (Jan) * Adding exception-table, cpufeature and jump-labels * Removing new-line cleanup; to be submitted separately Nadav Amit (9): Makefile: Prepare for using macros for inline asm x86: objtool: use asm macro for better comp

[PATCH v4 5/9] x86: bug: prevent gcc distortions

2018-06-12 Thread Nadav Amit
(-165) Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/bug.h | 98 ++ arch/x86/kernel/macros.S | 1 + include/asm-gen

[PATCH v4 6/9] x86: prevent inline distortion by paravirt ops

2018-06-12 Thread Nadav Amit
Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Nadav Amit --- arch/x86/include/asm/paravirt_types.h | 56 +-- arch/x86/kernel/macros.S | 1 + 2 files changed, 28 inserti

[PATCH v4 3/9] x86: refcount: prevent gcc distortions

2018-06-12 Thread Nadav Amit
) Functions such as kref_get(), free_user(), fuse_file_get() now get inlined. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Kees Cook Cc: Jan Beulich Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/refco

[PATCH v4 7/9] x86: extable: use macros instead of inline assembly

2018-06-12 Thread Nadav Amit
: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/asm.h | 61 +- arch/x86/kernel/macros.S | 1 + 2 files changed, 28 insertions(+), 34 deletions(-) di

[PATCH v4 2/9] x86: objtool: use asm macro for better compiler decisions

2018-06-12 Thread Nadav Amit
: 40302 (-19) Cc: Christopher Li Cc: linux-spa...@vger.kernel.org Reviewed-by: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/kernel/macros.S | 2 ++ include/linux/compiler.h | 56 ++-- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a

[PATCH v4 4/9] x86: alternatives: macrofy locks for better inlining

2018-06-12 Thread Nadav Amit
nel.org Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/alternative-asm.h | 20 ++-- arch/x86/include/asm/alternative.h | 11 ++- arch/x86/kernel/macros.S | 1 + 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/arch/x

[PATCH 1/7] vmw_balloon: update copyright message

2018-06-13 Thread Nadav Amit
Removing the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice according to checkpatch request. In addition, updating the year and adding a license tag. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_ball

[PATCH 6/7] vmw_balloon: fix VMCI use when balloon built into kernel

2018-06-13 Thread Nadav Amit
e_initcall() instead of module_init() to address this issue. It does not address a situation in which VMCI is built as a module and the balloon is built into the kernel. Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH 0/7] vmw_balloon: addressing bugs and issues

2018-06-13 Thread Nadav Amit
This patch-set addresses minor issues and bugs in the VMware balloon driver. Patches 3-7 address bugs that were not reported by customers, but we would like to get them to 4.18 if possible. We will send separately later a patch-set with new features to be set on top of this set. Nadav Amit (7

[PATCH 3/7] vmw_balloon: fix inflation of 64-bit GFNs

2018-06-13 Thread Nadav Amit
: ef0f8f112984 ("VMware balloon: partially inline vmballoon_reserve_page.") Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/dr

[PATCH 5/7] vmw_balloon: VMCI_DOORBELL_SET does not check status

2018-06-13 Thread Nadav Amit
Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index db3cf91a515d..6e0b09b79fb5 100644 ---

[PATCH 4/7] vmw_balloon: do not use 2MB without batching

2018-06-13 Thread Nadav Amit
settings, make the code more robust by not enabling 2MB support without batching. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c

[PATCH 2/7] vmw_balloon: update maintainers list

2018-06-13 Thread Nadav Amit
Philip Moltman is no longer a maintainer of the VMware balloon. Setting Nadav Amit as one instead. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- MAINTAINERS| 2 +- drivers/misc/vmw_balloon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH 7/7] vmw_balloon: remove inflation rate limiting

2018-06-13 Thread Nadav Amit
quentially throttled down even further. We therefore remove all the rate limiting mechanisms, including the slow allocation cycles, as they are likely to do more harm than good. Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 92 +- 1 file c

Re: [PATCH 1/7] vmw_balloon: update copyright message

2018-06-13 Thread Nadav Amit
at 11:20 AM, Greg Kroah-Hartman wrote: > On Wed, Jun 13, 2018 at 04:03:53AM -0700, Nadav Amit wrote: >> Removing the paragraph about writing to the Free Software Foundation's >> mailing address from the sample GPL notice according to checkpatch >> request. >> &

Re: [PATCH 3/7] vmw_balloon: fix inflation of 64-bit GFNs

2018-06-13 Thread Nadav Amit
at 11:21 AM, Greg Kroah-Hartman wrote: > On Wed, Jun 13, 2018 at 04:03:55AM -0700, Nadav Amit wrote: >> When balloon batching is not supported by the hypervisor, the guest >> frame number (GFN) must fit in 32-bit. However, due to a bug, this check >> was mistakenly ignor

[PATCH v2 3/7] vmw_balloon: VMCI_DOORBELL_SET does not check status

2018-06-13 Thread Nadav Amit
performance. Fixes: 48e3d668b790 ("VMware balloon: Enable notification via VMCI") Cc: sta...@vger.kernel.org Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) di

[PATCH v2 1/7] vmw_balloon: fix inflation of 64-bit GFNs

2018-06-13 Thread Nadav Amit
: ef0f8f112984 ("VMware balloon: partially inline vmballoon_reserve_page.") Cc: sta...@vger.kernel.org Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/misc/vmw

[PATCH v2 2/7] vmw_balloon: do not use 2MB without batching

2018-06-13 Thread Nadav Amit
settings, make the code more robust by not enabling 2MB support without batching. Fixes: 365bd7ef7ec8e ("VMware balloon: Support 2m page ballooning.") Cc: sta...@vger.kernel.org Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 8 +++- 1 file

[PATCH v2 7/7] vmw_balloon: update maintainers list

2018-06-13 Thread Nadav Amit
Philip Moltman is no longer a maintainer of the VMware balloon. Setting Nadav Amit as one instead. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- MAINTAINERS| 2 +- drivers/misc/vmw_balloon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH v2 5/7] vmw_balloon: remove inflation rate limiting

2018-06-13 Thread Nadav Amit
Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 92 +- 1 file changed, 11 insertions(+), 81 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index e7cfc85f6961..400a1ccefc8e 10064

[PATCH v2 4/7] vmw_balloon: fix VMCI use when balloon built into kernel

2018-06-13 Thread Nadav Amit
llard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index a7df4c24a28d..e7cfc85f6961 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_

[PATCH v2 6/7] vmw_balloon: update copyright message

2018-06-13 Thread Nadav Amit
Removing the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice according to checkpatch request. In addition, updating the year and adding a license tag. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_ball

[PATCH v2 0/7] vmw_balloon: addressing bugs and issues

2018-06-13 Thread Nadav Amit
send separately later a patch-set with new features to be set on top of this set. v1->v2: * Reordering patches to have bug fixes first (Greg) * Fixing SPDX tag * Cc'ing stable when appropriate Nadav Amit (7): vmw_balloon: fix inflation of 64-bit GFNs vmw_balloon: d

Re: [PATCH v4 1/9] Makefile: Prepare for using macros for inline asm

2018-06-13 Thread Nadav Amit
Thanks for your comment! I am certainly Makefile-challenged, so your help is highly appreciated. Please see my responses/questions inline. at 10:43 AM, Masahiro Yamada wrote: > 2018-06-12 20:50 GMT+09:00 Nadav Amit : >> Using macros for inline assembly improves both readab

Re: [PATCH v2 6/7] vmw_balloon: update copyright message

2018-06-13 Thread Nadav Amit
at 10:24 PM, Greg Kroah-Hartman wrote: > On Wed, Jun 13, 2018 at 06:54:11AM -0700, Nadav Amit wrote: >> Removing the paragraph about writing to the Free Software Foundation's >> mailing address from the sample GPL notice according to checkpatch >> request. >> &

Re: [PATCH v2 1/7] vmw_balloon: fix inflation of 64-bit GFNs

2018-06-13 Thread Nadav Amit
at 10:23 PM, Greg Kroah-Hartman wrote: > On Wed, Jun 13, 2018 at 06:54:06AM -0700, Nadav Amit wrote: >> When balloon batching is not supported by the hypervisor, the guest >> frame number (GFN) must fit in 32-bit. However, due to a bug, this check >> was mistakenly ignor

Re: [PATCH v2 1/7] vmw_balloon: fix inflation of 64-bit GFNs

2018-06-13 Thread Nadav Amit
at 10:50 PM, Greg Kroah-Hartman wrote: > On Thu, Jun 14, 2018 at 05:41:01AM +0000, Nadav Amit wrote: >> at 10:23 PM, Greg Kroah-Hartman wrote: >> >>> On Wed, Jun 13, 2018 at 06:54:06AM -0700, Nadav Amit wrote: >>>> When balloon batching is not supported by

Re: [PATCH v2 6/7] vmw_balloon: update copyright message

2018-06-15 Thread Nadav Amit
at 1:35 PM, valdis.kletni...@vt.edu wrote: > On Thu, 14 Jun 2018 05:33:46 -0000, Nadav Amit said: > >>>> In addition, updating the year and adding a license tag. > >>>> +// SPDX-License-Identifier: GPL-2.0 > >>> You still have a lot of boiler-plate

[PATCH 6/6] x86: removing unneeded new-lines

2018-05-17 Thread Nadav Amit
kernel.org Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/asm.h | 4 ++-- arch/x86/include/asm/cmpxchg.h | 10 +- arch/x86/include/asm/special_insns.h | 12 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/x86/i

[PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-17 Thread Nadav Amit
Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/bug.h | 56 +- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/arch/x86/i

[PATCH 4/6] x86: prevent inline distortion by paravirt ops

2018-05-17 Thread Nadav Amit
Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Nadav Amit --- arch/x86/include/asm/paravirt_types.h | 63 +-- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/arch/x86/i

[PATCH 3/6] x86: alternative: macrofy locks for better inlining

2018-05-17 Thread Nadav Amit
nel.org Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/alternative.h | 34 +++--- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 4cd6a3b71824..1dc47c9fd480 10

[PATCH 1/6] x86: objtool: use asm macro for better compiler decisions

2018-05-17 Thread Nadav Amit
text symbols: Before: 40033 After: 40015 (-18) Cc: Christopher Li Cc: linux-spa...@vger.kernel.org Signed-off-by: Nadav Amit --- include/linux/compiler.h | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/include/linux/compiler.h b/include

[PATCH 5/6] x86: refcount: prevent gcc distortions

2018-05-17 Thread Nadav Amit
: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Kees Cook Cc: Jan Beulich Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/include/asm/refcount.h | 62 + 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/arch/x86/i

[PATCH 0/6] Macrofying inline assembly for better compilation

2018-05-17 Thread Nadav Amit
er Cc: virtualizat...@lists.linux-foundation.org Cc: x...@kernel.org Nadav Amit (6): x86: objtool: use asm macro for better compiler decisions x86: bug: prevent gcc distortions x86: alternative: macrofy locks for better inlining x86: prevent inline distortion by paravirt ops x86: refcoun

Re: [PATCH 0/6] Macrofying inline assembly for better compilation

2018-05-18 Thread Nadav Amit
David Laight wrote: > From: Nadav Amit >> Sent: 17 May 2018 17:14 >> This patch-set deals with an interesting yet stupid problem: kernel code >> that does not get inlined despite its simplicity. There are several >> causes for this behavior: "cold" at

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
Peter Zijlstra wrote: > On Thu, May 17, 2018 at 09:13:58AM -0700, Nadav Amit wrote: >> +asm(".macro __BUG_FLAGS ins:req file:req line:req flags:req size:req\n" >> +"1:\t \\ins\n\t" >> +".pushsection __bug_table,\"aw\"\n" >&

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
Ingo Molnar wrote: > > * Peter Zijlstra wrote: > >> On Thu, May 17, 2018 at 09:13:58AM -0700, Nadav Amit wrote: >>> +asm(".macro __BUG_FLAGS ins:req file:req line:req flags:req size:req\n" >>> +"1:\t \\ins\n\t" >>> +&q

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
Borislav Petkov wrote: > On Fri, May 18, 2018 at 10:13:54AM +0200, Ingo Molnar wrote: >> Yes, that's my main worry too about all these inlining changes: >> the very, very marked reduction in the readability of assembly code. > > Same reaction here: the small improvements this brings is simply no

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
Borislav Petkov wrote: > On Fri, May 18, 2018 at 02:36:21PM +0000, Nadav Amit wrote: >> I didn’t try too hard to find more affected (micro)benchmarks, but I am >> pretty sure there are: > > So you being pretty sure there are, doesn't make me go, oh, ok, then, > this

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
Borislav Petkov wrote: > On Fri, May 18, 2018 at 03:46:33PM +0000, Nadav Amit wrote: >> In case you didn’t read the cover-letter: the patch-set does give a 2% >> performance improvement for #PF-MADV_DONTNEED microbenchmark loop. > > I saw it but *micro*-benchmark doesn'

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
Linus Torvalds wrote: > On Fri, May 18, 2018 at 12:59 AM Peter Zijlstra > wrote: > >> This is an awesome hack, but is there really nothing we can do to make >> it more readable? Esp, that global asm doing the macro definition is a >> pain to read. > > I actually find that macro to be *more* le

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
h...@zytor.com wrote: > On May 18, 2018 11:50:12 AM PDT, Linus Torvalds > wrote: >> On Fri, May 18, 2018 at 11:34 AM wrote: >> >>> On May 18, 2018 11:25:32 AM PDT, Linus Torvalds < >> torva...@linux-foundation.org> wrote: >> >>> Unfortunately gcc doesn't guarantee that global assembly inlines

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
Linus Torvalds wrote: > On Fri, May 18, 2018 at 12:02 PM Nadav Amit wrote: > >> I can add a -Wa,[filename.s] switch. It works, but sort of undocumented. > > Oh, if it assembles things together, then that sounds optimal. > > And yes, like hpa says, we should ma

Re: [PATCH 2/6] x86: bug: prevent gcc distortions

2018-05-18 Thread Nadav Amit
h...@zytor.com wrote: > On May 18, 2018 12:21:00 PM PDT, Linus Torvalds > wrote: >> On Fri, May 18, 2018 at 12:18 PM Nadav Amit wrote: >> >>> Gnu ASM manual says: "Each time you run as it assembles exactly one >> source >>> program. The

Re: [PATCH v2 0/4] Static calls

2018-12-11 Thread Nadav Amit
> On Dec 11, 2018, at 10:05 AM, Josh Poimboeuf wrote: > > On Fri, Dec 07, 2018 at 04:06:32PM +, Edward Cree wrote: >> Sorry if this has been pointed out before (it's a very long thread), but >> in the out-of-line implementation, it appears that static_call_update() >> never alters key->func.

Re: [PATCH v2 4/4] x86/vmalloc: Add TLB efficient x86 arch_vunmap

2018-12-11 Thread Nadav Amit
> On Dec 11, 2018, at 4:03 PM, Rick Edgecombe > wrote: > > This adds a more efficient x86 architecture specific implementation of > arch_vunmap, that can free any type of special permission memory with only 1 > TLB > flush. > > In order to enable this, _set_pages_p and _set_pages_np are made n

Re: [PATCH v2 0/4] Static calls

2018-12-12 Thread Nadav Amit
> On Dec 12, 2018, at 9:11 AM, Edward Cree wrote: > > On 12/12/18 05:59, Nadav Amit wrote: >> Thanks for cc’ing me. (I didn’t know about the other patch-sets.) > Well in my case, that's because I haven't posted any yet. (Will follow up > shortly with what I

Re: [PATCH v2 0/4] Static calls

2018-12-12 Thread Nadav Amit
> On Dec 12, 2018, at 10:33 AM, Edward Cree wrote: > > On 12/12/18 18:14, Nadav Amit wrote: >> Second, (2i) is not very intuitive for me. Using the out-of-line static >> calls seems to me as less performant than the inline (potentially, I didn’t >> check). >>

Re: [PATCH v2 4/4] x86/vmalloc: Add TLB efficient x86 arch_vunmap

2018-12-12 Thread Nadav Amit
> On Dec 12, 2018, at 1:05 PM, Edgecombe, Rick P > wrote: > > On Wed, 2018-12-12 at 06:30 +, Nadav Amit wrote: >>> On Dec 11, 2018, at 4:03 PM, Rick Edgecombe >>> wrote: >>> >>> This adds a more efficient x86 architecture specific implement

Re: [PATCH v2 0/4] Static calls

2018-12-12 Thread Nadav Amit
> On Dec 12, 2018, at 1:36 PM, Edward Cree wrote: > > On 12/12/18 21:15, Nadav Amit wrote: >>> On Dec 12, 2018, at 10:33 AM, Edward Cree wrote: >>> >>> AIUI the outline version uses a tail-call (i.e. jmpq *target) rather than an >>> additional cal

Re: [PATCH v2 2/4] modules: Add new special vfree flags

2018-12-12 Thread Nadav Amit
> On Dec 11, 2018, at 4:03 PM, Rick Edgecombe > wrote: > > Add new flags for handling freeing of special permissioned memory in vmalloc, > and remove places where the handling was done in module.c. > > This will enable this flag for all architectures. > > Signed-off-by: Rick Edgecombe > --- >

Re: [PATCH v7 13/14] module: Do not set nx for module memory before freeing

2018-12-13 Thread Nadav Amit
> On Dec 13, 2018, at 6:10 AM, Jessica Yu wrote: > > +++ Nadav Amit [04/12/18 17:34 -0800]: >> When module memory is about to be freed, there is no apparent reason to >> make it (and its data) executable, but that's exactly what is done >> today. This

Re: [PATCH v2 2/4] modules: Add new special vfree flags

2018-12-13 Thread Nadav Amit
> On Dec 13, 2018, at 11:02 AM, Edgecombe, Rick P > wrote: > > On Wed, 2018-12-12 at 23:40 +, Nadav Amit wrote: >>> On Dec 11, 2018, at 4:03 PM, Rick Edgecombe >>> wrote: >>> >>> Add new flags for handling freeing of special permissioned me

Re: [PATCH] kbuild, x86: revert macros in extended asm workarounds

2018-12-18 Thread Nadav Amit
> On Dec 17, 2018, at 1:16 AM, Sedat Dilek wrote: > > On Thu, Dec 13, 2018 at 10:19 AM Masahiro Yamada > wrote: >> Revert the following commits: >> >> - 5bdcd510c2ac9efaf55c4cbd8d46421d8e2320cd >> ("x86/jump-labels: Macrofy inline assembly code to work around GCC inlining >> bugs") >> >> - d

Re: [PATCH v3 00/12] x86, kbuild: revert macrofying inline assembly code

2018-12-18 Thread Nadav Amit
> On Dec 17, 2018, at 8:03 AM, Masahiro Yamada > wrote: > > This series reverts the in-kernel workarounds for inlining issues. > > The commit description of 77b0bf55bc67 mentioned > "We also hope that GCC will eventually get fixed,..." > > Now, GCC provides a solution. > > https://na01.safeli

Re: [PATCH] kbuild, x86: revert macros in extended asm workarounds

2018-12-15 Thread Nadav Amit
> On Dec 14, 2018, at 4:51 PM, Masahiro Yamada > wrote: > > Hi Peter, > > On Thu, Dec 13, 2018 at 7:53 PM Peter Zijlstra wrote: >> On Thu, Dec 13, 2018 at 06:17:41PM +0900, Masahiro Yamada wrote: >>> Revert the following commits: >>> >>> - 5bdcd510c2ac9efaf55c4cbd8d46421d8e2320cd >>> ("x86/j

Re: [PATCH v2] x86, kbuild: revert macrofying inline assembly code

2018-12-15 Thread Nadav Amit
> On Dec 15, 2018, at 6:50 PM, Masahiro Yamada > wrote: > > Revert the following 9 commits: > > [1] 5bdcd510c2ac ("x86/jump-labels: Macrofy inline assembly code to >work around GCC inlining bugs") > >This was partially reverted because it made good cleanups >irrespective of the inl

Re: [PATCH] kbuild, x86: revert macros in extended asm workarounds

2018-12-16 Thread Nadav Amit
> On Dec 16, 2018, at 2:00 AM, Borislav Petkov wrote: > > On Sun, Dec 16, 2018 at 02:33:39AM +0000, Nadav Amit wrote: >> In general, I think that from the start it was clear that the motivation for >> the patch-set is not just performance and also better code. For example,

Re: Should this_cpu_read() be volatile?

2018-12-11 Thread Nadav Amit
> On Dec 10, 2018, at 12:55 AM, Peter Zijlstra wrote: > > On Sun, Dec 09, 2018 at 04:57:43PM -0800, Nadav Amit wrote: >>> On Dec 8, 2018, at 2:52 AM, Peter Zijlstra wrote: > >>> My patch proposed here: >>> >>> https://marc.info/?l=linux-mm&am

Re: [PATCH 03/12] __wr_after_init: generic header

2018-12-21 Thread Nadav Amit
> On Dec 19, 2018, at 1:33 PM, Igor Stoppa wrote: > > +static inline void *wr_memset(void *p, int c, __kernel_size_t len) > +{ > + return __wr_op((unsigned long)p, (unsigned long)c, len, WR_MEMSET); > +} What do you think about doing something like: #define __wr __attribute__((addr

[RFC v2 4/6] x86: interface for accessing indirect branch locations

2018-12-30 Thread Nadav Amit
Adding a C interface to access the locations of indirect branches. To be used for dynamic patching. Signed-off-by: Nadav Amit --- arch/x86/include/asm/sections.h | 2 ++ include/linux/module.h | 9 + kernel/module.c | 8 3 files changed, 19 insertions

[RFC v2 5/6] x86: learning and patching indirect branch targets

2018-12-30 Thread Nadav Amit
branches are set back into learning mode to see whether the targets have changed. The current policy might be too aggressive. Signed-off-by: Nadav Amit --- arch/x86/kernel/nospec-branch.c | 992 include/linux/cpuhotplug.h | 1 + 2 files changed, 993 insertions

[RFC v2 6/6] x86: outline optpoline

2018-12-30 Thread Nadav Amit
continue execution from there. The current version does not reclaim memory if an entire page of outline optpoline blocks is released (e.g., due to module removal). There are various additional optimizations that are possible to reduce the memory consumption of each optpoline. Signed-off-by: Nadav

[RFC v2 1/6] x86: introduce kernel restartable sequence

2018-12-30 Thread Nadav Amit
a general infrastructure and API that others can use for such sequences. Yet, it should not be hard to make such extension later. Signed-off-by: Nadav Amit --- arch/x86/entry/entry_64.S| 16 ++-- arch/x86/include/asm/nospec-branch.h | 12 arch/x86/kern

[RFC v2 2/6] objtool: ignore instructions

2018-12-30 Thread Nadav Amit
In certain cases there is a need to suppress objtool warnings on specific instructions. Provide an interface to achieve this goal. Signed-off-by: Nadav Amit --- tools/objtool/check.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tools/objtool/check.c

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