xes: 529ce23a764f ("mm: switch mm->get_unmapped_area() to a flag")
Suggested-by: Dan Williams
Signed-off-by: Rick Edgecombe
Link:
https://lore.kernel.org/lkml/6603bed6662a_4a98a29...@dwillia2-mobl3.amr.corp.intel.com.notmuch/
---
Based on linux-next.
---
arch/sparc/kernel/sys_sparc_64.c | 9
y actual size reductions in the compiled layout of mm_struct.
But depending on compiler or arch alignment requirements, the change could
shrink the size of mm_struct.
Signed-off-by: Rick Edgecombe
Acked-by: Dave Hansen
Acked-by: Liam R. Howlett
Reviewed-by: Kirill A. Shutemov
Cc: linux-s...@v
aware list_lru's since it is not needed by the
intended caller.
Signed-off-by: Rick Edgecombe
---
include/linux/list_lru.h | 13 +
mm/list_lru.c| 28
2 files changed, 41 insertions(+)
diff --git a/include/linux/list_lru.h b/include/
Callers of module_alloc() will set permissions on the allocation. Use
the VM_GROUP_PAGES to reduce direct map breakage.
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel
!CONFIG_BPF_JIT_ALWAYS_ON.
The new APIs and invasive changes in the callers can happen after vmalloc huge
pages bring more benefits. Although, I can post shootdown reduction changes with
previous comments integrated if anyone disagrees.
Based on v5.11.
Thanks,
Rick
Rick Edgecombe (3):
list: Support
c GFP flag that matches the
intended user of this vm_flag (module_alloc()). In the case of the vm
and GFP flags mismatching, fail the page allocation. In the case of a
huge page size page not being available, fallback to the normal page
allocator logic and use non-grouped pages.
Signed-off-by:
hings
so flags are less likely to be missed in the future.
Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap")
Suggested-by: Matthew Wilcox
Signed-off-by: Rick Edgecombe
---
[v2]
Changed comment format like suggested by Matthew and listed him as Suggested-by.
Dropped Revie
mment
and remove whitespace for VM_KASAN such that the flags lower down are less
likely to be missed in the future.
Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap")
Signed-off-by: Rick Edgecombe
---
include/linux/vmalloc.h | 6 ++
1 file changed, 2 insertions(+), 4 del
essed via TDP. So zap based on a maximum gfn calculated with MAXPHYADDR
retrieved from CPUID. This is already stored in shadow_phys_bits, so use
it instead of x86_phys_bits.
Fixes: faaf05b00aec ("kvm: x86/mmu: Support zapping SPTEs in the TDP MMU")
Signed-off-by: Rick Edgecombe
---
a
;s chosen place for executable code.
Signed-off-by: Rick Edgecombe
---
arch/Kconfig| 3 +
include/linux/vmalloc.h | 82
mm/nommu.c | 66
mm/vmalloc.c| 135
4 files changed,
Since modules can have a separate writable address during loading,
do the orc unwind at the writable address.
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/unwind_orc.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel
ff-by: Rick Edgecombe
---
include/linux/module.h | 22 ++
kernel/module.c| 14 +-
2 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/include/linux/module.h b/include/linux/module.h
index 9964f909d879..32dd22b2a38a 100644
--- a/include/linux/module.h
relocations at the writable address of the perm_allocation to
support a future implementation that has the writable address in a
different allocation.
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/module.c | 84 +---
1 file changed, 71 insertions(+), 13
Since modules can have a separate writable address during loading,
do the nop application at the writable address.
As long as info is on hand about if the operations is happening during
a module load, don't do a full text_poke() when writing data to a
writable address.
Signed-off-by:
Modules being loaded using perm_allocs may have a separate writable
address. Handle this case in alternatives for operations called during
module loading.
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/alternative.c | 25 -
1 file changed, 16 insertions(+), 9
Use the module writable address to accommodate arch's that have a
separate writable address for perm_alloc.
Signed-off-by: Rick Edgecombe
---
kernel/trace/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
directed to a separate writable
staging area.
Signed-off-by: Rick Edgecombe
---
arch/arm/net/bpf_jit_32.c | 3 +-
arch/arm64/net/bpf_jit_comp.c | 5 ++--
arch/mips/net/bpf_jit.c | 2 +-
arch/mips/net/ebpf_jit.c | 3 +-
arch/powerpc/net/bpf_jit_comp.c | 2 +-
arch
other caches.
Signed-off-by: Rick Edgecombe
---
arch/x86/Kconfig | 1 +
arch/x86/include/asm/set_memory.h | 2 +
arch/x86/mm/Makefile | 1 +
arch/x86/mm/pat/set_memory.c | 13 +
arch/x86/mm/vmalloc.c | 438 ++
5
orted.
So this should not have any functional change yet. It is just a change
to how the different regions of the module allocations are tracked in
module.c such that future patches can actually make the regions separate
allocations.
Signed-off-by: Rick Edgecombe
---
include/linux/module.h
ail.gmail.com/
[1] https://lore.kernel.org/lkml/20201009201410.3209180-1-ira.we...@intel.com/
[2] https://lore.kernel.org/lkml/20200924132904.1391-1-r...@kernel.org/
This RFC has been acked by Dave Hansen.
Rick Edgecombe (10):
vmalloc: Add basic perm alloc implementation
bpf: Use perm_alloc() for BPF
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: ab5130186d7476dcee0d4e787d19a521ca552ce9
Gitweb:
https://git.kernel.org/tip/ab5130186d7476dcee0d4e787d19a521ca552ce9
Author:Rick Edgecombe
AuthorDate:Wed, 22 Apr 2020 20:13:55 -07:00
inherrit the MTRR type with this implementation.
There shouldn't be any legacy use of KVM XO, but hypothetically it could
interfere with the uncacheable MTRR type.
Signed-off-by: Rick Edgecombe
---
arch/x86/kvm/mtrr.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kvm/m
ling
the kernel. The hope is that there will not be a large impact, but more testing
is needed.
Status
==
Regression testing is still needed including the nested virtualization case and
impact of XO in the other memslot address spaces. This is based on 5.3.
[1] https://lwn.net/Articles/301888/
Rick Edgeco
cases. Instead of changing that
everywhere a conditional is added in paging_tmpl.h to check for the KVM XO
bit. This should probably be made to work with the logic in
permission_fault instead of having a special case.
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x8
Add a KVM capability for the KVM_MEM_EXECONLY memslot type. This memslot
type is supported if the HW supports execute-only TDP.
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx/vmx.c | 1 +
arch/x86
Add documentation for the KVM_CAP_EXECONLY_MEM capability and
KVM_MEM_EXECONLY memslot.
Signed-off-by: Rick Edgecombe
---
Documentation/virt/kvm/api.txt | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Documentation/virt/kvm/api.txt b/Documentation/virt/kvm
Rename USE_EARLY_PGTABLE_L5 to USE_EARLY_PGTABLE so that it can be used
by other early boot detectable page table features.
Signed-off-by: Rick Edgecombe
---
arch/x86/boot/compressed/misc.h | 2 +-
arch/x86/include/asm/pgtable_64_types.h | 4 ++--
arch/x86/kernel/cpu/common.c
Add _PAGE_BIT_NR and _PAGE_NR, the values of which are determined
dynamically at boot. This page type is only valid after checking for for
the KVM XO CPUID bit.
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/pgtable_types.h | 11 +++
arch/x86/mm/init.c | 3
patch by Yu Zhang.
Signed-off-by: Yu Zhang
Signed-off-by: Rick Edgecombe
---
arch/x86/kvm/mmu.c | 9 -
include/uapi/linux/kvm.h | 1 +
tools/include/uapi/linux/kvm.h | 1 +
virt/kvm/kvm_main.c| 15 ++-
4 files changed, 24 insertions(+), 2
Add X86_FEATURE_KVM_XO which reduces the physical address bits exposed by
CPUID and uses the hosts highest physical address bit as an XO/NR
permission bit in the guest page tables. Adjust reserved mask so KVM guest
page tables walks are aware this bit is not reserved.
Signed-off-by: Rick
at boot time and so can't be known at compile time.
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/pgtable_types.h | 2 ++
arch/x86/kernel/head64.c | 3 +++
mm/mmap.c| 30 +++-
3 files changed, 30 insertions(+), 5 dele
(KVM XO), and
a pgtable_kvmxo_enabled() helper similar to pgtable_l5_enabled() so that
pgtable_kvmxo_enabled() can be used in early code that includes
arch/x86/include/asm/sparsemem.h.
Lastly, in head64.c detect and this feature and perform necessary
adjustments to physical_mask.
Signed-off-by: Rick
Add printing of the NR permission to the page table dump code.
Signed-off-by: Rick Edgecombe
---
arch/x86/mm/dump_pagetables.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index ab67822fd2f4..8932aa9e3a9e
Add CONFIG_KVM_XO for supporting KVM based execute only memory.
Signed-off-by: Rick Edgecombe
---
arch/x86/Kconfig | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 222855cc0158..3a3af2a456e8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86
VMX supports providing the guest virtual address that caused and EPT
violation. Add support for this so it can be used by the KVM XO feature.
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/kvm_host.h | 4
arch/x86/include/asm/vmx.h | 1 +
arch/x86/kvm/vmx/vmx.c | 5
Commit-ID: 31e67340cc65edfd9dac5ef26f81de8414ce5906
Gitweb: https://git.kernel.org/tip/31e67340cc65edfd9dac5ef26f81de8414ce5906
Author: Rick Edgecombe
AuthorDate: Mon, 27 May 2019 14:10:58 -0700
Committer: Ingo Molnar
CommitDate: Mon, 3 Jun 2019 11:47:25 +0200
mm/vmalloc: Avoid rare
Commit-ID: 8e41f8726dcf423621e2b6938d015b9796f6f676
Gitweb: https://git.kernel.org/tip/8e41f8726dcf423621e2b6938d015b9796f6f676
Author: Rick Edgecombe
AuthorDate: Mon, 27 May 2019 14:10:57 -0700
Committer: Ingo Molnar
CommitDate: Mon, 3 Jun 2019 11:47:25 +0200
mm/vmalloc: Fix
Nadav Amit
Cc: Ard Biesheuvel
Signed-off-by: Rick Edgecombe
---
Hi,
This is what I came up with for working around the sparc issue. The
other solution I had looked at was making a CONFIG_ARCH_NEEDS_VM_FLUSH
and just opt out only sparc. Very open to suggestions.
arch/x86/kernel/ftrace.c |
fixed in dropped patch
v2->v3:
- Split into two patches (Andy)
v1->v2:
- Update commit message with more detail
- Fix flush end range on !CONFIG_ARCH_HAS_SET_DIRECT_MAP case
Rick Edgecombe (2):
vmalloc: Fix calculation of direct map addr range
vmalloc: Avoid rare case of flush
.
Fixes: 868b104d7379 ("mm/vmalloc: Add flag for freeing of special permsissions")
Cc: Meelis Roos
Cc: Peter Zijlstra
Cc: "David S. Miller"
Cc: Dave Hansen
Cc: Borislav Petkov
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Nadav Amit
Signed-off-by: Rick Edgecombe
---
mm/vmalloc.c | 11 ++
a
Cc: "David S. Miller"
Cc: Dave Hansen
Cc: Borislav Petkov
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Nadav Amit
Signed-off-by: Rick Edgecombe
---
mm/vmalloc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 3ede9c064477..7f1
Update commit message with more detail
- Fix flush end range on !CONFIG_ARCH_HAS_SET_DIRECT_MAP case
Rick Edgecombe (2):
vmalloc: Fix calculation of direct map addr range
vmalloc: Avoid rare case of flushing tlb with weird arguements
mm/vmalloc.c | 9 ++---
1 file changed, 6 insertions(+
of special permsissions")
Cc: Meelis Roos
Cc: Peter Zijlstra
Cc: "David S. Miller"
Cc: Dave Hansen
Cc: Borislav Petkov
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Nadav Amit
Signed-off-by: Rick Edgecombe
---
mm/vmalloc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff
quot;David S. Miller"
Cc: Dave Hansen
Cc: Borislav Petkov
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Nadav Amit
Signed-off-by: Rick Edgecombe
---
mm/vmalloc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index c42872ed82ac..836888ae01f6
nd range on !CONFIG_ARCH_HAS_SET_DIRECT_MAP case
Rick Edgecombe (2):
vmalloc: Fix calculation of direct map addr range
vmalloc: Remove work as from vfree path
mm/vmalloc.c | 23 +--
1 file changed, 13 insertions(+), 10 deletions(-)
--
2.20.1
From: Rick Edgecombe
Calling vm_unmap_alias() in vm_remove_mappings() could potentially be a
lot of work to do on a free operation. Simply flushing the TLB instead of
the whole vm_unmap_alias() operation makes the frees faster and pushes
the heavy work to happen on allocation where it would be
From: Rick Edgecombe
The calculation of the direct map address range to flush was wrong.
This could cause problems on x86 if a RO direct map alias ever got loaded
into the TLB. This shouldn't normally happen, but it could cause the
permissions to remain RO on the direct map alias, and the
Cc: Andy Lutomirski
Cc: Ingo Molnar
Cc: Nadav Amit
Signed-off-by: Rick Edgecombe
---
Changes since v1:
- Update commit message with more detail
- Fix flush end range on !CONFIG_ARCH_HAS_SET_DIRECT_MAP case
mm/vmalloc.c | 23 +--
1 file changed, 13 insertions(+), 10 dele
Commit-ID: 241a1f22380646bc4d1dd18e5bc246877513da68
Gitweb: https://git.kernel.org/tip/241a1f22380646bc4d1dd18e5bc246877513da68
Author: Rick Edgecombe
AuthorDate: Thu, 25 Apr 2019 17:11:40 -0700
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 12:38:01 +0200
x86/kprobes: Use
Commit-ID: 7fdfe1e40b225b1d163f9afed2fa3f04442dbaad
Gitweb: https://git.kernel.org/tip/7fdfe1e40b225b1d163f9afed2fa3f04442dbaad
Author: Rick Edgecombe
AuthorDate: Thu, 25 Apr 2019 17:11:39 -0700
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 12:38:00 +0200
x86/ftrace: Use vmalloc
Commit-ID: d53d2f78ceadba081fc7785570798c3c8d50a718
Gitweb: https://git.kernel.org/tip/d53d2f78ceadba081fc7785570798c3c8d50a718
Author: Rick Edgecombe
AuthorDate: Thu, 25 Apr 2019 17:11:38 -0700
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 12:37:59 +0200
bpf: Use vmalloc
Commit-ID: 1a7b7d9220819afe79d1ec5d759fe4349bd2453e
Gitweb: https://git.kernel.org/tip/1a7b7d9220819afe79d1ec5d759fe4349bd2453e
Author: Rick Edgecombe
AuthorDate: Thu, 25 Apr 2019 17:11:37 -0700
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 12:37:58 +0200
modules: Use vmalloc
Commit-ID: d63326928611600ad65baff54a70f53b02b3cdfe
Gitweb: https://git.kernel.org/tip/d63326928611600ad65baff54a70f53b02b3cdfe
Author: Rick Edgecombe
AuthorDate: Thu, 25 Apr 2019 17:11:35 -0700
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 12:37:57 +0200
mm/hibernation: Make
Commit-ID: 868b104d7379e28013e9d48bdd2db25e0bdcf751
Gitweb: https://git.kernel.org/tip/868b104d7379e28013e9d48bdd2db25e0bdcf751
Author: Rick Edgecombe
AuthorDate: Thu, 25 Apr 2019 17:11:36 -0700
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 12:37:58 +0200
mm/vmalloc: Add flag
Commit-ID: d253ca0c3865a8d9a8c01143cf20425e0be4d0ce
Gitweb: https://git.kernel.org/tip/d253ca0c3865a8d9a8c01143cf20425e0be4d0ce
Author: Rick Edgecombe
AuthorDate: Thu, 25 Apr 2019 17:11:34 -0700
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 12:37:56 +0200
x86/mm/cpa: Add
uaccess_okay()
bpf: Fail bpf_probe_write_user() while mm is switched
Rick Edgecombe (7):
x86/mm/cpa: Add set_direct_map_ functions
mm: Make hibernate handle unmapped pages
vmalloc: Add flag for free of special permsissions
modules: Use vmalloc special flag
bpf: Use vmalloc special flag
x
-by: Jann Horn
Suggested-by: Jann Horn
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
kernel/trace/bpf_trace.c | 8
1 file changed, 8 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index d64c00afceb5..94b0e37d90ef 100644
--- a/kernel/trace
From: Nadav Amit
text_poke() already ensures that the written value is the correct one
and fails if that is not the case. There is no need for an additional
comparison. Remove it.
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel
Use new flag VM_FLUSH_RESET_PERMS for handling freeing of special
permissioned memory in vmalloc and remove places where memory was set NX
and RW before freeing which is no longer needed.
Cc: Masami Hiramatsu
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/kprobes/core.c | 7 +--
1 file
e text_mutex in
text_poke*()")
Suggested-by: Peter Zijlstra
Acked-by: Jiri Kosina
Acked-by: Peter Zijlstra (Intel)
Reviewed-by: Masami Hiramatsu
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/text-patching.h | 1 +
arch/x86/kernel/alter
^X protection.
Cc: Kees Cook
Cc: Peter Zijlstra
Cc: Dave Hansen
Cc: Masami Hiramatsu
Cc: Jessica Yu
Suggested-by: Thomas Gleixner
Suggested-by: Andy Lutomirski
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/alternative.c | 28 +---
arch
-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/jump_label.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
index e7d8c636b228
Signed-off-by: Rick Edgecombe
---
include/linux/sched/task.h | 1 +
kernel/fork.c | 24 ++--
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 2e97a2227045..f1227f2c38a4 100644
--- a/include
Lutomirski
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/mmu_context.h | 33 ++
1 file changed, 33 insertions(+)
diff --git a/arch/x86/include/asm/mmu_context.h
b/arch/x86/include/asm/mmu_context.h
index 19d18fae6ec6..d684b954f3c0
: Wrote 171996 kbytes in 0.21 seconds (819.02 MB/s)
After:
[4.504714] PM: Wrote 178932 kbytes in 0.22 seconds (813.32 MB/s)
Cc: Dave Hansen
Cc: Andy Lutomirski
Cc: Peter Zijlstra
Cc: "Rafael J. Wysocki"
Cc: Pavel Machek
Cc: Borislav Petkov
Acked-by: Pavel Machek
Signed-of
queue. Instead of call_rcu it now uses synchronize_rcu() in the work
queue.
Lastly, there is now a WARN_ON in module_memfree since it should not be
called in an interrupt with special memory as is required for
VM_FLUSH_RESET_PERMS.
Cc: Jessica Yu
Cc: Steven Rostedt
Signed-off-by: Rick Edgecombe
initialized after some static-keys are
enabled/disabled.
Cc: Andy Lutomirski
Cc: Kees Cook
Cc: Dave Hansen
Cc: Masami Hiramatsu
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/jump_label.c | 7 ++-
1 file changed, 6 insertions
i
Cc: Peter Zijlstra
Signed-off-by: Rick Edgecombe
---
arch/Kconfig | 4
arch/x86/Kconfig | 1 +
arch/x86/include/asm/set_memory.h | 3 +++
arch/x86/mm/pageattr.c| 14 +++---
include/linux/set_memory.h| 11 +++
5
: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/mmu_context.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/arch/x86/include/asm/mmu_context.h
b/arch/x86/include/asm/mmu_context.h
index d684b954f3c0..81861862038a 100644
--- a/arch/x86/include
)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/fixmap.h | 2 -
arch/x86/kernel/alternative.c | 108 +++---
arch/x86/xen/mmu_pv.c | 2 -
3 files changed, 86 insertions(+), 26 deletions(-)
diff --git a/arch/x86/include/asm
(VMware)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/ftrace.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index ef49517f6bb2..53ba1aa3a01f 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel
From: Nadav Amit
The return value of text_poke_early() and text_poke_bp() is useless.
Remove it.
Cc: Andy Lutomirski
Cc: Kees Cook
Cc: Dave Hansen
Cc: Masami Hiramatsu
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/text
behavior of the
normal vm_unmap_aliases function is unchanged.
Cc: Borislav Petkov
Suggested-by: Dave Hansen
Suggested-by: Andy Lutomirski
Suggested-by: Will Deacon
Signed-off-by: Rick Edgecombe
---
include/linux/vmalloc.h | 15 ++
mm/vmalloc.c| 113
Use new flag VM_FLUSH_RESET_PERMS for handling freeing of special
permissioned memory in vmalloc and remove places where memory was set NX
and RW before freeing which is no longer needed.
Cc: Steven Rostedt
Acked-by: Steven Rostedt (VMware)
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel
lexei Starovoitov
Signed-off-by: Rick Edgecombe
---
include/linux/filter.h | 17 +++--
kernel/bpf/core.c | 1 -
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 14ec3bdad9a9..7d3abde3f183 100644
--- a/include/
Zijlstra (Intel)
Reviewed-by: Masami Hiramatsu
Tested-by: Masami Hiramatsu
Suggested-by: Andy Lutomirski
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/pgtable.h | 3 +++
arch/x86/include/asm/text-patching.h | 2 ++
arch/x86/kernel/alternative.c
From: Nadav Amit
Add a comment to clarify that users of text_poke() must ensure that
no races with module removal take place.
Cc: Masami Hiramatsu
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/alternative.c | 5 +
1 file changed, 5 insertions(+)
diff --git
().
Add a default implementation of nmi_uaccess_okay() for architectures
that do not have such a function.
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/tlbflush.h | 2 ++
include/asm-generic/tlb.h | 9 +
2 files changed, 11 insertions(+)
diff
: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/kprobes/core.c | 24
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index a034cb808e7e..1591852d3ac4 100644
--- a/arch/x86/kernel
Lutomirski
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/mmu_context.h | 33 ++
1 file changed, 33 insertions(+)
diff --git a/arch/x86/include/asm/mmu_context.h
b/arch/x86/include/asm/mmu_context.h
index 19d18fae6ec6..d684b954f3c0
)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/fixmap.h | 2 -
arch/x86/kernel/alternative.c | 108 +++---
arch/x86/xen/mmu_pv.c | 2 -
3 files changed, 86 insertions(+), 26 deletions(-)
diff --git a/arch/x86/include/asm
From: Nadav Amit
text_poke() already ensures that the written value is the correct one
and fails if that is not the case. There is no need for an additional
comparison. Remove it.
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel
Signed-off-by: Rick Edgecombe
---
include/linux/sched/task.h | 1 +
kernel/fork.c | 24 ++--
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 44c6f15800ff..c5a00a7b3beb 100644
--- a/include
Zijlstra (Intel)
Reviewed-by: Masami Hiramatsu
Tested-by: Masami Hiramatsu
Suggested-by: Andy Lutomirski
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/pgtable.h | 3 +++
arch/x86/include/asm/text-patching.h | 2 ++
arch/x86/kernel/alternative.c
From: Nadav Amit
Prevent user watchpoints from mistakenly firing while the temporary mm
is being used. As the addresses that of the temporary mm might overlap
those of the user-process, this is necessary to prevent wrong signals
or worse things from happening.
Cc: Andy Lutomirski
Signed-off-by:
lexei Starovoitov
Signed-off-by: Rick Edgecombe
---
include/linux/filter.h | 17 +++--
kernel/bpf/core.c | 1 -
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/include/linux/filter.h b/include/linux/filter.h
index b9f93e62db96..f7b6c8a2e591 100644
--- a/include/
: Wrote 171996 kbytes in 0.21 seconds (819.02 MB/s)
After:
[4.504714] PM: Wrote 178932 kbytes in 0.22 seconds (813.32 MB/s)
Cc: Dave Hansen
Cc: Andy Lutomirski
Cc: Peter Zijlstra
Cc: "Rafael J. Wysocki"
Cc: Pavel Machek
Cc: Borislav Petkov
Acked-by: Pavel Machek
Signed-of
-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/kprobes/core.c | 24
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 4ba75afba527..98c671e89889 100644
--- a/arch/x86
behavior of the
normal vm_unmap_aliases function is unchanged.
Cc: Borislav Petkov
Suggested-by: Dave Hansen
Suggested-by: Andy Lutomirski
Suggested-by: Will Deacon
Signed-off-by: Rick Edgecombe
---
include/linux/vmalloc.h | 13 +
mm/vmalloc.c| 113
From: Nadav Amit
Add a comment to clarify that users of text_poke() must ensure that
no races with module removal take place.
Cc: Masami Hiramatsu
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/alternative.c | 5 +
1 file changed, 5 insertions(+)
diff --git
-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/jump_label.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
index e7d8c636b228
break the W^X protection.
Cc: Kees Cook
Cc: Peter Zijlstra
Cc: Dave Hansen
Cc: Masami Hiramatsu
Cc: Jessica Yu
Suggested-by: Thomas Gleixner
Suggested-by: Andy Lutomirski
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/alternative.c | 28
i
Cc: Peter Zijlstra
Signed-off-by: Rick Edgecombe
---
arch/Kconfig | 4
arch/x86/Kconfig | 1 +
arch/x86/include/asm/set_memory.h | 3 +++
arch/x86/mm/pageattr.c| 14 +++---
include/linux/set_memory.h| 10 ++
5
(VMware)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/ftrace.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 8257a59704ae..13c8249b197f 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel
Use new flag VM_FLUSH_RESET_PERMS for handling freeing of special
permissioned memory in vmalloc and remove places where memory was set NX
and RW before freeing which is no longer needed.
Cc: Masami Hiramatsu
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/kprobes/core.c | 7 +--
1 file
From: Nadav Amit
The return value of text_poke_early() and text_poke_bp() is useless.
Remove it.
Cc: Andy Lutomirski
Cc: Kees Cook
Cc: Dave Hansen
Cc: Masami Hiramatsu
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/include/asm/text
Use new flag VM_FLUSH_RESET_PERMS for handling freeing of special
permissioned memory in vmalloc and remove places where memory was set NX
and RW before freeing which is no longer needed.
Cc: Steven Rostedt
Acked-by: Steven Rostedt (VMware)
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel
queue. Instead of call_rcu it now uses synchronize_rcu() in the work
queue.
Lastly, there is now a WARN_ON in module_memfree since it should not be
called in an interrupt with special memory as is required for
VM_FLUSH_RESET_PERMS.
Cc: Jessica Yu
Cc: Steven Rostedt
Signed-off-by: Rick Edgecombe
initialized after some static-keys are
enabled/disabled.
Cc: Andy Lutomirski
Cc: Kees Cook
Cc: Dave Hansen
Cc: Masami Hiramatsu
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Nadav Amit
Signed-off-by: Rick Edgecombe
---
arch/x86/kernel/jump_label.c | 7 ++-
1 file changed, 6 insertions
r custom poker
x86/alternative: Remove the return value of text_poke_*()
x86/alternative: Comment about module removal races
Rick Edgecombe (7):
x86/mm/cpa: Add set_direct_map_ functions
mm: Make hibernate handle unmapped pages
vmalloc: Add flag for free of special permsissions
modules: Us
1 - 100 of 201 matches
Mail list logo