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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yc0IyjWqEjqx56To@google.com>
Date:   Thu, 30 Dec 2021 01:18:02 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     kernel test robot <lkp@...el.com>
Cc:     Tom Lendacky <thomas.lendacky@....com>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: vmlinux.o: warning: objtool: __svm_sev_es_vcpu_run()+0x54: BP
 used as a scratch register

On Wed, Nov 17, 2021, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   8ab774587903771821b59471cc723bba6d893942
> commit: 16809ecdc1e8ab7278f1d60021ac809edd17d060 KVM: SVM: Provide an updated VMRUN invocation for SEV-ES guests
> date:   11 months ago
> config: x86_64-buildonly-randconfig-r005-20211117 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=16809ecdc1e8ab7278f1d60021ac809edd17d060
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 16809ecdc1e8ab7278f1d60021ac809edd17d060
>         # save the attached .config to linux build tree
>         mkdir build_dir
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    vmlinux.o: warning: objtool: __do_fast_syscall_32()+0x3d: call to syscall_enter_from_user_mode_work() leaves .noinstr.text section
>    vmlinux.o: warning: objtool: __svm_vcpu_run()+0x10e: BP used as a scratch register
> >> vmlinux.o: warning: objtool: __svm_sev_es_vcpu_run()+0x54: BP used as a scratch register

__svm_vcpu_run() and __svm_sev_es_vcpu_run() PUSH/POP RBP but don't create a stack
frame, which triggers the objtool warning because objtool things the code is using
BP as a scratch register (obviously).  This shows up when CONFIG_FRAME_POINTER=y
and KVM AMD is built into the kernel (apparently 'objtool check' isn't run on modules?).

The easy fix to is add "mov %rsp, %rbp" to create a stack frame.  Kinda pointless
since neither function makes true calls to other functions, but the extra MOV is
harmless and it'd be nice to get rid of the objtool warning.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ