lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190925121330.GA13637@redhat.com>
Date:   Wed, 25 Sep 2019 08:13:30 -0400
From:   Andrea Arcangeli <aarcange@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        "Dr. David Alan Gilbert" <dgilbert@...hat.com>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Peter Xu <peterx@...hat.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/17] KVM: monolithic: x86: adjust the section prefixes

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 analysis at build time and this allows to build without
> > CONFIG_SECTION_MISMATCH_WARN_ONLY=n.
> > 
> > Signed-off-by: Andrea Arcangeli <aarcange@...hat.com>
> 
> I think it's the opposite---the checker is detecting *missing* section
> prefixes, for example vmx_exit, kvm_exit, kvm_arch_hardware_unsetup etc.
> could be marked __exit.

I added the two missing __init.

The __exit removed from unsetup is because kvm_arch_hardware_unsetup
is called by kvm_init, so unless somehow kvm_init can go in the exit
section and be dropped too during the final kernel link (which would
prevent KVM to initialize in the first place at kernel boot), it's not
feasible to call a function located in the exit section and dropped
during the kernel link from there.

As far as I can tell with upstream KVM if you hit the
kvm_arch_hardware_unsetup function during kvm_init error path it'll
crash the kernel at boot because of it.

Removing __exit fixes that potential upstream crash and upstream bug.

The comment header was short, I'll add more commentary to the commit
header to reduce the confusion about why removing __exit is needed.

Thanks,
Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ