Hello Christoph,
On Thu, Nov 19, 2020 at 06:02:06PM +, Christoph Hellwig wrote:
> What is the callers? The whole SetPageReservered + ioremap* thing
> you mention in the actual patch is completely bogus. I think we'll
> need to reject that as well and fix the caller.
The actual caller is not
caller
would need to still enforce they all have the same memtype, so it is
more likely able to enforce that it doesn't do overlapping ioremaps
at once than to be able to undo the changes to the direct mapping
pagetables
Fixes: f56d005d3034 ("x86: no CPA on iounmap")
S
-1);
}
}
MODULE_LICENSE("GPL");
==
Andrea Arcangeli (1):
x86: restore the write back cache of reserved RAM in iounmap()
arch/x86/mm/ioremap.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
sync, instead of keeping the dup around and applying the same update
to the dup.
Note: as far as I can tell spec_store_bypass_disable= documentation is
not duplicated in spectre.rst, that's better in my view. The more dups
we have the more one goes out of sync..
Andrea Arcangeli (1):
x86: dedup
This would need updating to make prctl be the new default, but it's
simpler to delete it and refer to the dup.
Signed-off-by: Andrea Arcangeli
---
Documentation/admin-guide/hw-vuln/spectre.rst | 51 +--
1 file changed, 2 insertions(+), 49 deletions(-)
diff --git a/Document
erified result of the new default with SMT
enabled:
(gdb) print spectre_v2_user_stibp
$1 = SPECTRE_V2_USER_PRCTL
(gdb) print spectre_v2_user_ibpb
$2 = SPECTRE_V2_USER_PRCTL
(gdb) print ssb_mode
$3 = SPEC_STORE_BYPASS_PRCTL
Acked-by: Kees Cook
Signed-off-by: Andrea Arcangeli
---
Documentation/admin
On Thu, Nov 05, 2020 at 12:22:29AM +0100, Thomas Gleixner wrote:
> On Wed, Nov 04 2020 at 16:57, Andrea Arcangeli wrote:
> > ---
> > Documentation/admin-guide/kernel-parameters.txt | 5 ++---
>
> Is Documentation/admin-guide/hw-vuln/* still correct? If not, please
> fix
upgraded his codebase
to the upstream kernel with both STIBP/SSBD enabled in seccomp jails.
Here's below a tentative RFC, the code is actually trivial, if you
could help reviewing/improving the commit header it would be great.
Thanks,
Andrea
>From 3f7adb783262dc7f4e71cdbf07b4ef9f6b8d3ed
Hello,
On Thu, Oct 08, 2020 at 04:22:36PM -0700, Nick Kralevich wrote:
> I haven't tried to verify this myself. I wonder if the usermode
> hardening changes also impacted this exploit? See
> https://lkml.org/lkml/2017/1/16/468
My plan was to:
1) reproduce with the old buggy kernel
2) forward po
ctl set to zero. So
without this commit, any Linux binary using userfaultfd to manage its
memory would behave differently if run within the Android userland.
==
Reviewed-by: Andrea Arcangeli
BTW, this is still a minor nitpick, but a printk_once of the 1/2 could
be added before the return -EP
that these processes
> will exploit userfaultfd's ability to delay kernel page faults to open
> timing windows for future exploits.
>
> Signed-off-by: Daniel Colascione
> Signed-off-by: Lokesh Gidra
Reviewed-by: Andrea Arcangeli
Hello Lokesh,
On Wed, Oct 07, 2020 at 01:26:55PM -0700, Lokesh Gidra wrote:
> On Wed, Sep 23, 2020 at 11:56 PM Lokesh Gidra wrote:
> >
> > This patch series is split from [1]. The other series enables SELinux
> > support for userfaultfd file descriptors so that its creation and
> > movement can b
Hello,
I'm posting this only for the record, feel free to ignore.
On Wed, Sep 23, 2020 at 04:29:17PM -0700, Kees Cook wrote:
> rfc:
> https://lore.kernel.org/lkml/20200616074934.1600036-1-keesc...@chromium.org/
> alternative:
> https://lore.kernel.org/containers/cover.1600661418.git.yifei...@il
Hello,
On Mon, Aug 17, 2020 at 03:11:16PM -0700, Lokesh Gidra wrote:
> There has been an emphasis that Android is probably the only user for
> the restriction of userfaults from kernel-space and that it wouldn’t
> be useful anywhere else. I humbly disagree! There are various areas
> where the PROT
Hello Tetsuo,
On Sat, Aug 08, 2020 at 10:01:21AM +0900, Tetsuo Handa wrote:
> use of killable waits disables ability to detect possibility of deadlock
> (because
> lockdep can't check possibility of deadlock which involves actions in
> userspace), for
> syzkaller process is SIGKILLed after 5 sec
Hello!
On Sat, Aug 01, 2020 at 10:39:00AM -0700, Linus Torvalds wrote:
> On Sat, Aug 1, 2020 at 8:30 AM Tetsuo Handa
> wrote:
> >
> > Waiting for response at
> > https://lkml.kernel.org/r/45a9b2c8-d0b7-8f00-5b30-0cfe3e028...@i-love.sakura.ne.jp
> > .
>
> I think handle_userfault() should have
On Fri, Jul 10, 2020 at 05:57:46PM +0100, Matthew Wilcox wrote:
> btw, using the hpage_ prefix already caused one problem in the hugetlb
> code:
>
> https://lore.kernel.org/linux-mm/20200629185003.97202-1-mike.krav...@oracle.com/
>
> I'd suggest we rename these to THP_PMD_* and THP_PUD_* to make
Hello Hugh and Mike,
On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote:
> Adding Andrea to Cc, he's the one who structured it that way,
> and should be consulted.
>
> I'm ambivalent myself. Many's the time I've been irritated by the
> BUILD_BUG() in HPAGE_etc, and it's responsible for
Hello,
On Mon, Jun 22, 2020 at 04:30:41PM +0100, Robin Murphy wrote:
> On 2020-06-22 13:46, Joerg Roedel wrote:
> > + Robin
> >
> > Robin, any idea on this?
>
> After a bit of archaeology, this dates back to the original review:
>
> https://lore.kernel.org/linux-arm-kernel/54c285d4.3070...@arm.
Hello,
On Thu, Jun 18, 2020 at 06:14:49PM -0700, Roman Gushchin wrote:
> I agree. The whole
>
> page = alloc_pages_node(nid, alloc_flags, order);
> if (!page)
> continue;
> if (!order)
> break;
> if (!PageCompound(page)) {
> split_
On Wed, May 20, 2020 at 01:17:20PM -0700, Lokesh Gidra wrote:
> Adding the Android kernel team in the discussion.
Unless I'm mistaken that you can already enforce bit 1 of the second
parameter of the userfaultfd syscall to be set with seccomp-bpf, this
would be more a question to the Android userl
On Wed, May 20, 2020 at 03:48:04PM -0400, Andrea Arcangeli wrote:
> The sysctl /proc/sys/kernel/unprivileged_bpf_disabled is already there
Oops I picked the wrong unprivileged_* :) of course I meant:
/proc/sys/vm/unprivileged_userfaultfd
Hello Kees,
On Wed, May 20, 2020 at 11:03:39AM -0700, Kees Cook wrote:
> Err, did I miss a separate 6-patch series? I can't find anything on lore.
Daniel included the link of the previous series I referred to is the
cover letter 0/2:
https://lore.kernel.org/lkml/20200211225547.235083-1-dan...@go
Hello everyone,
On Fri, May 08, 2020 at 12:54:03PM -0400, Michael S. Tsirkin wrote:
> On Fri, May 08, 2020 at 12:52:34PM -0400, Michael S. Tsirkin wrote:
> > On Wed, Apr 22, 2020 at 05:26:32PM -0700, Daniel Colascione wrote:
> > > This sysctl can be set to either zero or one. When zero (the defaul
Hello Jonathan and everyone,
On Thu, May 07, 2020 at 01:15:03PM -0600, Jonathan Corbet wrote:
> On Wed, 6 May 2020 15:38:16 -0400
> Peter Xu wrote:
>
> > If this is going to be added... I am thinking whether it should be easier to
> > add another value for unprivileged_userfaultfd, rather than a
Hello,
On Sat, Oct 12, 2019 at 06:14:23PM -0700, Andy Lutomirski wrote:
> [adding more people because this is going to be an ABI break, sigh]
That wouldn't break the ABI, no more than when if you boot a kernel
built with CONFIG_USERFAULTFD=n.
All non-cooperative features can be removed any time
On Wed, Oct 16, 2019 at 09:07:39AM +0200, Paolo Bonzini wrote:
> Yet you would add CPUID to the list even though it is not even there in
> your benchmarks, and is *never* invoked in a hot path by *any* sane
I justified CPUID as a "short term" benchmark gadget, it's one of
those it shouldn't be a p
On Wed, Oct 16, 2019 at 12:22:31AM +0200, Paolo Bonzini wrote:
> Oh come on. 0.9 is not 12-years old. virtio 1.0 is 3.5 years old
> (March 2016). Anything older than 2017 is going to use 0.9.
Sorry if I got the date wrong, but still I don't see the point in
optimizing for legacy virtio. I can't
On Tue, Oct 15, 2019 at 09:46:58PM +0200, Paolo Bonzini wrote:
> On 15/10/19 18:49, Andrea Arcangeli wrote:
> > On Tue, Oct 15, 2019 at 10:28:39AM +0200, Paolo Bonzini wrote:
> >> If you're including EXIT_REASON_EPT_MISCONFIG (MMIO access) then you
> >> should in
On Tue, Oct 15, 2019 at 10:28:39AM +0200, Paolo Bonzini wrote:
> If you're including EXIT_REASON_EPT_MISCONFIG (MMIO access) then you
> should include EXIT_REASON_IO_INSTRUCTION too. Depending on the devices
> that are in the guest, the doorbell register might be MMIO or PIO.
The fact outb/inb de
On Sat, Oct 05, 2019 at 06:46:40AM +0800, Wei Yang wrote:
> On Wed, Oct 02, 2019 at 08:45:05PM -0400, Andrea Arcangeli wrote:
> >Hello,
> >
> >On Tue, Aug 06, 2019 at 01:38:59PM +0800, Wei Yang wrote:
> >> Finally new_flags equals old vm_flags *OR* vm_flags.
> >
't allow a driver to allocate an hugepage if any
> subpage is reserved in the e820 map at boot, if any driver sets the
> reserved bit of head page before mapping the hugepage in userland,
> it needs to set the reserved bit in all subpages to be safe.
>
> Signed-off-by:
Hello,
On Tue, Aug 06, 2019 at 01:38:59PM +0800, Wei Yang wrote:
> Finally new_flags equals old vm_flags *OR* vm_flags.
>
> It is not necessary to mask them first.
>
> Signed-off-by: Wei Yang
> ---
> fs/userfaultfd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/
Hello,
On Fri, Sep 13, 2019 at 12:05:26PM -0600, Alex Williamson wrote:
> On Mon, 2 Sep 2019 15:32:42 +0800
> Ben Luo wrote:
>
> > 在 2019/8/30 上午1:06, Alex Williamson 写道:
> > > On Fri, 30 Aug 2019 00:58:22 +0800
> > > Ben Luo wrote:
> > >
> > >> 在 2019/8/28 下午11:55, Alex Williamson 写道:
> >
Add more section prefixes of some KVM common code function because
with the monolithic KVM model the section checker can now do a more
accurate static analysis at build time and this allows to build
without CONFIG_SECTION_MISMATCH_WARN_ONLY=n.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm
resources than disk space.
The pointer to function virtual template model cannot provide any
runtime benefit because kvm-intel and kvm-amd can't be loaded at the
same time.
This removes kvm.ko and it links and duplicates all kvm.ko objects to
both kvm-amd and kvm-intel.
Signed-off-by: A
request_immediate_exit is one of those few cases where the pointer to
function of the method isn't fixed at build time and it requires
special handling because hardware_setup() may override it at runtime.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/vmx/vmx.c | 5 -
1 file chang
it in the
__init section, but to drop it. As long as it's defined in vmx as a
kvm_x86 operation, it's expectable that might eventually be called at
runtime while hot plugging new CPUs.
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/vmx/vmx.c
mmit. After all those small commits
done incrementally with this patchset, the kvm_x86_ops structure can
be deleted.
https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/log/?h=kvm-mono2
Thanks,
Andrea
Andrea Arcangeli (14):
KVM: monolithic: x86: remove kvm.ko
KVM: monolithic: x86: disable linki
ster_notifier' exported
twice. Previous export was in arch/x86/kvm/kvm-intel.ko
WARNING: arch/x86/kvm/kvm-amd: 'kvm_page_track_unregister_notifier' exported
twice. Previous export was in arch/x86/kvm/kvm-intel.ko
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/cpuid.c| 5 --
ll is made.
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/kvm_host.h | 4 ++--
arch/x86/kvm/svm.c | 2 +-
arch/x86/kvm/vmx/vmx.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
Eliminate wasteful call/ret non RETPOLINE case and unnecessary fentry
dynamic tracing hooking points.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/vmx/vmx.c | 30 +-
1 file changed, 5 insertions(+), 25 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86
27;t hurt the common case and
the expectation here is that if they would ever become measurable, it
would be because they are increasing (and not decreasing) performance.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/vmx/vmx.c | 24 ++--
1 file changed, 22 insertions(+), 2 dele
Linking both vmx and svm into the kernel at the same time isn't
possible anymore or the kvm_x86/kvm_x86_pmu external function names
would collide.
Reported-by: kbuild test robot
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/Kconfig | 24 ++--
1 file change
: arch/x86/kvm/kvm-amd: 'kvm_read_guest' exported twice. Previous export
was in arch/x86/kvm/kvm-intel.ko
WARNING: arch/x86/kvm/kvm-amd: 'kvm_write_guest' exported twice. Previous
export was in arch/x86/kvm/kvm-intel.ko
Signed-off-by: Andrea Arcangeli
---
virt/kvm/event
l+559
do_vfs_ioctl+164
ksys_ioctl+96
__x64_sys_ioctl+22
do_syscall_64+89
entry_SYSCALL_64_after_hwframe+68
]: 2390
@[]: 33410
@total: 315707
Note the highest hit above is __delay so probably not worth optimizing
even if it would be more frequent than 2k hits per sec.
Signed-off-by: A
64+89
entry_SYSCALL_64_after_hwframe+68
]: 499845
@total: 1780243
SVM has no TSC based programmable preemption timer so it is invoking
ktime_get() frequently.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/svm.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/x86/kvm/svm.c b
Cleanup after the structure was finally left completely unused.
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/kvm_host.h | 3 ---
arch/x86/kvm/pmu.h | 20
arch/x86/kvm/pmu_amd.c | 15 ---
arch/x86/kvm/svm.c | 1
On Wed, Sep 25, 2019 at 01:03:32PM +0200, Christophe de Dinechin wrote:
>
>
> > On 23 Sep 2019, at 11:31, Vitaly Kuznetsov wrote:
> >
> > Andrea Arcangeli mailto:aarca...@redhat.com>> writes:
> >
> >> It's enough to check the exit value and i
Hello,
On Mon, Sep 23, 2019 at 12:15:23PM +0200, Paolo Bonzini wrote:
> On 20/09/19 23:24, Andrea Arcangeli wrote:
> > Adjusts the section prefixes of some KVM common code function because
> > with the monolithic methods the section checker can now do a more
> > accurate a
On Mon, Sep 23, 2019 at 03:05:14PM -0400, Andrea Arcangeli wrote:
> On Mon, Sep 23, 2019 at 11:57:57AM +0200, Paolo Bonzini wrote:
> > On 23/09/19 11:31, Vitaly Kuznetsov wrote:
> > > +#ifdef CONFIG_RETPOLINE
> > > + if (exit_reason == EXIT_REASON_MSR_WRITE)
>
On Mon, Sep 23, 2019 at 09:55:27PM -0400, Andrea Arcangeli wrote:
> This commit I reverted adds literally 3 inlines called by 3 functions,
> in a very fast path, how many bytes of .text difference did you expect
> by dropping some call/ret from a very fast path when you asked me to
>
On Tue, Sep 24, 2019 at 03:25:34AM +0200, Paolo Bonzini wrote:
> On 24/09/19 03:00, Andrea Arcangeli wrote:
> > Before and after this specific commit there is a difference with gcc 8.3.
> >
> > full patchset applied
> >
> > 753699 879719616 851286 cfd5
On Mon, Sep 23, 2019 at 12:19:12PM +0200, Paolo Bonzini wrote:
> On 20/09/19 23:25, Andrea Arcangeli wrote:
> > They can be called directly more efficiently, so we can as well mark
> > some of them inline in case gcc doesn't decide to inline them.
>
> What is the ou
On Mon, Sep 23, 2019 at 12:21:43PM +0200, Paolo Bonzini wrote:
> On 20/09/19 23:25, Andrea Arcangeli wrote:
> > Cleanup after this was finally left fully unused.
> >
> > Signed-off-by: Andrea Arcangeli
> > ---
> > arch/x86/include/asm/kvm_host.h
Hi Paolo,
On Tue, Sep 24, 2019 at 02:15:39AM +0200, Paolo Bonzini wrote:
> Do you really need that? Why couldn't the handle_* functions simply be
> exported from nested.c to vmx.c?
I prefer the direct call too indeed.
If Sean doesn't want to export those generic names to the whole kernel
it wou
On Mon, Sep 23, 2019 at 04:45:00PM -0700, Sean Christopherson wrote:
> With a straight rename to kvm_x86_() instead of wrappers, we
> shouldn't need kvm_ops.c. kvm_ops.h might be helpful, but it'd be just
> as easy to keep them in kvm_host.h and would likely yield a more
> insightful diff[*].
Yes
On Mon, Sep 23, 2019 at 02:24:35PM -0700, Sean Christopherson wrote:
> An extra CALL+RET isn't going to be noticeable, especially on modern
> hardware as the high frequency VMWRITE/VMREAD fields should hit the
> shadow VMCS.
In your last email with regard to the inlining optimizations made
possibl
On Mon, Sep 23, 2019 at 03:35:26PM -0700, Sean Christopherson wrote:
> On Fri, Sep 20, 2019 at 05:24:55PM -0400, Andrea Arcangeli wrote:
> > request_immediate_exit is one of those few cases where the pointer to
> > function of the method isn't fixed at build time and it
Hello,
On Mon, Sep 23, 2019 at 01:23:49PM -0700, Sean Christopherson wrote:
> The attached patch should do the trick.
The two most attractive options to me remains what I already have
implemented under #ifdef CONFIG_RETPOLINE with direct calls
(optionally replacing the "if" with a small "switch"
On Mon, Sep 23, 2019 at 12:19:30PM +0200, Paolo Bonzini wrote:
> On 20/09/19 23:24, Andrea Arcangeli wrote:
> > diff --git a/arch/x86/kvm/svm_ops.c b/arch/x86/kvm/svm_ops.c
> > new file mode 100644
> > index ..2aaabda92179
> > --- /dev/null
> > +++ b/a
On Mon, Sep 23, 2019 at 11:15:58AM -0700, Sean Christopherson wrote:
> On the flip side, using a switch for the fast-path handlers gives the
> compiler more flexibility to rearrange and combine checks. Of course that
> doesn't mean the compiler will actually generate faster code for our
> purposes
On Mon, Sep 23, 2019 at 11:57:57AM +0200, Paolo Bonzini wrote:
> On 23/09/19 11:31, Vitaly Kuznetsov wrote:
> > +#ifdef CONFIG_RETPOLINE
> > + if (exit_reason == EXIT_REASON_MSR_WRITE)
> > + return handle_wrmsr(vcpu);
> > + else if (exit_reason == EXIT_REASON_P
On Mon, Sep 23, 2019 at 06:53:10PM +0200, Paolo Bonzini wrote:
> On 23/09/19 18:37, Sean Christopherson wrote:
> >> Would it be too much if we get rid of
> >> kvm_vmx_exit_handlers completely replacing this code with one switch()?
> > Hmm, that'd require redirects for nVMX functions since they are
Hello,
On Mon, Sep 23, 2019 at 08:30:57AM -0700, Sean Christopherson wrote:
> On Mon, Sep 23, 2019 at 12:22:23PM +0200, Paolo Bonzini wrote:
> > On 20/09/19 23:24, Andrea Arcangeli wrote:
> > > We can't assume the SPEC_CTRL msr is zero at boot because it could be
> >
request_immediate_exit is one of those few cases where the pointer to
function of the method isn't fixed at build time and it requires
special handling because hardware_setup() may override it at runtime.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/vmx/vmx_ops.c | 5 -
1 file ch
nclude it in the baseline
measurements too.
A git clonable branch for quick testing is available here:
https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/log/?h=kvm-mono1
Thanks,
Andrea
Andrea Arcangeli (17):
x86: spec_ctrl: fix SPEC_CTRL initialization after kexec
KVM: monolithic: x86
Cleanup after this was finally left fully unused.
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/kvm_host.h | 3 ---
arch/x86/kvm/pmu.h | 19 ---
arch/x86/kvm/pmu_amd.c | 15 ---
arch/x86/kvm/svm.c | 1 -
arch/x86/kvm
The exports would be duplicated across kvm-amd and kvm-intel if
they're kept, this cleanup various harmless warnings about it.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/cpuid.c| 5 --
arch/x86/kvm/hyperv.c | 2 -
arch/x86/kvm/irq.c | 4 --
arch/x86/kvm/irq_comm.c
kvm_vcpu_ioctl+559
do_vfs_ioctl+164
ksys_ioctl+96
__x64_sys_ioctl+22
do_syscall_64+89
entry_SYSCALL_64_after_hwframe+68
]: 227076
@total: 3829460
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/kvm_ops.h | 166
arch/x86/kvm/svm
They can be called directly more efficiently, so we can as well mark
some of them inline in case gcc doesn't decide to inline them.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/vmx/vmx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b
l+559
do_vfs_ioctl+164
ksys_ioctl+96
__x64_sys_ioctl+22
do_syscall_64+89
entry_SYSCALL_64_after_hwframe+68
]: 2390
@[]: 33410
@total: 315707
Note the highest hit above is __delay so probably not worth optimizing
even if it would be more frequent than 2k hits per sec.
Signed-off-by: A
This removes kvm.ko and it links and duplicates all kvm.ko objects to
both kvm-amd and kvm-intel.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/Makefile b/arch/x86/kvm/Makefile
index 31ecf7a76d5a
Adjusts the section prefixes of some KVM common code function because
with the monolithic methods the section checker can now do a more
accurate analysis at build time and this allows to build without
CONFIG_SECTION_MISMATCH_WARN_ONLY=n.
Signed-off-by: Andrea Arcangeli
---
virt/kvm/kvm_main.c
Plug in the new external functions and their extern declarations in
the respective kernel modules (kvm-intel and kvm-amd).
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/svm.c | 2 ++
arch/x86/kvm/vmx/vmx.c | 2 ++
3 files changed
Now that the new methods are plugged in and they are functional use
them instead of invoking the pointer to functions through kvm_x86_ops.
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/kvm_host.h | 10 +-
arch/x86/kvm/cpuid.c| 22 +--
arch/x86/kvm/hyperv.c
y and
unexpectedly leave bit 2 set in SPEC_CTRL.
Signed-off-by: Andrea Arcangeli
---
arch/x86/include/asm/msr-index.h | 2 ++
arch/x86/kernel/cpu/bugs.c | 20 +++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/as
e. Previous export was in arch/x86/kvm/kvm-intel.ko
WARNING: arch/x86/kvm/kvm-amd: 'kvm_page_track_unregister_notifier' exported
twice. Previous export was in arch/x86/kvm/kvm-intel.ko
a
Signed-off-by: Andrea Arcangeli
---
virt/kvm/eventfd.c | 1 -
virt/kvm/kvm_main.c | 65 ---
Plug in the new external functions and their extern declarations in
the respective kernel modules (kvm-intel and kvm-amd).
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/pmu.h | 2 ++
arch/x86/kvm/pmu_amd.c | 2 ++
arch/x86/kvm/vmx/pmu_intel.c | 2 ++
3 files changed, 6
This replaces all kvm_pmu_ops pointer to functions with regular
external functions that don't require indirect calls.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/pmu_amd_ops.c | 68
arch/x86/kvm/pmu_ops.h | 22 +++
arch/x86/kv
It's enough to check the exit value and issue a direct call to avoid
the retpoline for all the common vmexit reasons.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/vmx/vmx.c | 24 ++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vm
64+89
entry_SYSCALL_64_after_hwframe+68
]: 499845
@total: 1780243
SVM has no TSC based programmable preemption timer so it is invoking
ktime_get() frequently.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/svm.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/x86/kvm/svm.c b
Adjusts the section prefixes of some KVM common code function because
with the monolithic methods the section checker can now do a more
accurate analysis at build time and this allows to build without
CONFIG_SECTION_MISMATCH_WARN_ONLY=n.
Signed-off-by: Andrea Arcangeli
---
arch/x86/kvm/svm.c
On Wed, Sep 04, 2019 at 12:54:15PM -0700, David Rientjes wrote:
> Two commits:
>
> commit a8282608c88e08b1782141026eab61204c1e533f
> Author: Andrea Arcangeli
> Date: Tue Aug 13 15:37:53 2019 -0700
>
> Revert "mm, thp: restore node-local hugepag
changed, 13 insertions(+), 12 deletions(-)
Reviewed-by: Andrea Arcangeli
Thanks,
Andrea
Hello everyone,
On Wed, May 22, 2019 at 02:18:03PM -0700, Andrew Morton wrote:
> > arch/x86/kernel/fpu/signal.c:198:8-31: -> gup with !pages
This simply had not to return -EFAULT if ret < nr_pages.. but ret >= 0.
Instead it did:
if (ret == nr_pages)
goto r
tate backporting, but in my view
it's more a bug in the coredump code that will eventually have to be
rewritten to stop invoking page faults without the mmap_sem for
reading. So the long term plan is still to drop all
mmget_still_valid().
Cc:
Fixes: ba76149f47d8 ("thp: khugepaged")
Re
Hello everyone,
On Thu, May 23, 2019 at 05:57:37PM -0700, Andrew Morton wrote:
> On Mon, 20 May 2019 10:54:16 -0700 (PDT) David Rientjes
> wrote:
>
> > We are going in circles, *yes* there is a problem for potential swap
> > storms today because of the poor interaction between memory compactio
in feature for guest mode is worth it, to swap "DN 4k | DN+1 THP"
with "DN+1 THP | DN 4k" at every NUMA distance crossing.
Signed-off-by: Andrea Arcangeli
---
include/linux/mempolicy.h | 2 ++
mm/huge_memory.c | 42 ---
mm/mempol
rther. The silver lining is that this
extra time allowed to think more at this issue and also plan for a
future direction to improve things further in terms of THP NUMA
locality.
Thank you,
Andrea
Andrea Arcangeli (2):
Revert "Revert "mm, thp: consolidate THP gfp handling into
alloc_hug
This reverts commit 356ff8a9a78fb35d6482584d260c3754dcbdf669.
Signed-off-by: Andrea Arcangeli
---
include/linux/gfp.h | 12
mm/huge_memory.c| 27 ++-
mm/mempolicy.c | 32 +++-
mm/shmem.c | 2 +-
4 files changed
Hello,
On Thu, Mar 21, 2019 at 01:43:35PM +, Luis Chamberlain wrote:
> On Wed, Mar 20, 2019 at 03:01:12PM -0400, Andrea Arcangeli wrote:
> > but
> > that would be better be achieved through SECCOMP and not globally.'.
>
> That begs the question why not use seccomp
Hello,
On Tue, Mar 19, 2019 at 06:28:23PM +, Dr. David Alan Gilbert wrote:
> ---
> Userfaultfd can be misued to make it easier to exploit existing use-after-free
> (and similar) bugs that might otherwise only make a short window
> or race condition available. By using userfaultfd to stall a k
users. When this is
> > set to zero, only privileged users (root user, or users with the
> > CAP_SYS_PTRACE capability) will be able to use the userfaultfd
> > syscalls.
> >
> > Suggested-by: Andrea Arcangeli
> > Suggested-by: Mike Rapoport
> > Signed-of
On Sat, Mar 16, 2019 at 05:38:54PM +0800, zhong jiang wrote:
> On 2019/3/16 5:39, Andrea Arcangeli wrote:
> > On Fri, Mar 08, 2019 at 03:10:08PM +0800, zhong jiang wrote:
> >> I can reproduce the issue in arm64 qemu machine. The issue will leave
> >> af
On Fri, Mar 08, 2019 at 03:10:08PM +0800, zhong jiang wrote:
> I can reproduce the issue in arm64 qemu machine. The issue will leave after
> applying the
> patch.
>
> Tested-by: zhong jiang
Thanks a lot for the quick testing!
> Meanwhile, I just has a little doubt whether it is necessary to
On Thu, Mar 14, 2019 at 11:58:15AM +0100, Paolo Bonzini wrote:
> On 14/03/19 00:44, Andrea Arcangeli wrote:
> > Then I thought we can add a tristate so an open of /dev/kvm would also
> > allow the syscall to make things more user friendly because
> > unprivileged container
On Wed, Mar 13, 2019 at 01:01:40PM -0700, Mike Kravetz wrote:
> On 3/13/19 11:52 AM, Andrea Arcangeli wrote:
> >
> > hugetlbfs is more complicated to detect, because even if you inherit
> > it from fork(), the services that mounts the fs may be in a different
> >
Hi Paolo,
On Wed, Mar 13, 2019 at 03:12:28PM -0400, Paolo Bonzini wrote:
>
> > On Wed, Mar 13, 2019 at 09:22:31AM +0100, Paolo Bonzini wrote:
> > Unless somebody suggests a consistent way to make hugetlbfs "just
> > work" (like we could achieve clean with CRIU and KVM), I think Oracle
> > will ne
Hello,
On Wed, Mar 13, 2019 at 09:22:31AM +0100, Paolo Bonzini wrote:
> On 13/03/19 07:00, Peter Xu wrote:
> >> However, I can imagine more special cases being added for other users.
> >> And,
> >> once you have more than one special case then you may want to combine them.
> >> For example, kvm
101 - 200 of 1750 matches
Mail list logo