Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-17 Thread Josh Poimboeuf
On Wed, Sep 16, 2020 at 11:22:02AM -0700, Nick Desaulniers wrote: > I looked into this a bit, and IIRC, the issue was that compiler > generated functions aren't very good about keeping track of whether > they should or should not emit framepointer setup/teardown > prolog/epilogs. In LLVM's IR, -fn

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-17 Thread Daniel Kiss
> On 17 Sep 2020, at 13:04, Mark Rutland wrote: > > On Wed, Sep 16, 2020 at 10:30:42PM +0100, Daniel Kiss wrote: >> >>Thanks for the summary -- yeah, that was my suspicion, that some >>attribute was being lost somewhere. And I think if we generalize this, >>and don't just try to atta

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-17 Thread Mark Rutland
On Wed, Sep 16, 2020 at 10:30:42PM +0100, Daniel Kiss wrote: > > Thanks for the summary -- yeah, that was my suspicion, that some > attribute was being lost somewhere. And I think if we generalize this, > and don't just try to attach "frame-pointer" attr to the function, we > proba

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Fangrui Song
On 2020-09-16, 'Marco Elver' via Clang Built Linux wrote: On Wed, 16 Sep 2020 at 20:22, 'Nick Desaulniers' via kasan-dev wrote: On Wed, Sep 16, 2020 at 1:46 AM Marco Elver wrote: > > On Wed, 16 Sep 2020 at 10:30, wrote: > > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > > > O

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 05:50:54PM -0400, Arvind Sankar wrote: > On Tue, Sep 15, 2020 at 10:49:12PM +0200, Borislav Petkov wrote: > > > > (Btw, clang doesn't need to add that "xor %eax,%eax" - panic() should not be > > returning, ever. :-)) > > > > I think this is because panic() is varargs, an

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Marco Elver
On Wed, 16 Sep 2020 at 20:22, 'Nick Desaulniers' via kasan-dev wrote: > > On Wed, Sep 16, 2020 at 1:46 AM Marco Elver wrote: > > > > On Wed, 16 Sep 2020 at 10:30, wrote: > > > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > > > > On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers > >

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Nick Desaulniers
On Wed, Sep 16, 2020 at 1:46 AM Marco Elver wrote: > > On Wed, 16 Sep 2020 at 10:30, wrote: > > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > > > On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers > > > wrote: > > > > On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote: > > > >

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Borislav Petkov
On Wed, Sep 16, 2020 at 11:28:26AM -0700, Nick Desaulniers wrote: > pt. 3 > https://nickdesaulniers.github.io/blog/2014/04/18/lets-write-some-x86-64/ /me adds to the read list. > ...2014, jesus... > > "But you never can tell exactly what the compiler is doing. It doesn’t > always come out the w

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Nick Desaulniers
On Wed, Sep 16, 2020 at 4:34 AM Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 05:50:54PM -0400, Arvind Sankar wrote: > > On Tue, Sep 15, 2020 at 10:49:12PM +0200, Borislav Petkov wrote: > > > > > > (Btw, clang doesn't need to add that "xor %eax,%eax" - panic() should not > > > be > > > retu

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Marco Elver
On Wed, 16 Sep 2020 at 11:06, wrote: > On Wed, Sep 16, 2020 at 10:46:41AM +0200, Marco Elver wrote: > > On Wed, 16 Sep 2020 at 10:30, wrote: > > > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > > > > On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers > > > > wrote: > > > > > On Tue,

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread peterz
On Wed, Sep 16, 2020 at 10:46:41AM +0200, Marco Elver wrote: > On Wed, 16 Sep 2020 at 10:30, wrote: > > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > > > On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers > > > wrote: > > > > On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote:

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Marco Elver
On Wed, 16 Sep 2020 at 00:34, Nick Desaulniers wrote: > On Tue, Sep 15, 2020 at 2:02 PM Josh Poimboeuf wrote: > > > > panic() is noreturn, so the compiler is enforcing the fact that it > > doesn't return, by trapping if it does return. > > > > I seem to remember that's caused by CONFIG_UBSAN_TRAP

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Marco Elver
On Wed, 16 Sep 2020 at 10:30, wrote: > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > > On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers > > wrote: > > > On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote: > > > > > init/calibrate.o: warning: objtool: asan.module_ctor()+0xc: c

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread peterz
On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote: > On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers > wrote: > > On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote: > > > init/calibrate.o: warning: objtool: asan.module_ctor()+0xc: call without > > > frame pointer save/setup > > >

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-16 Thread Ilie Halip
> Should objtool be made aware of the config option and then not check > traps after no-returns? > > I suspect the latter, but I'm not sure how feasible it is to > implement. Josh, Marco, do you have thoughts on the above? This seems to do the trick. diff --git a/tools/objtool/check.c b/tools/ob

[tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/seves branch HEAD: e6eb15c9ba3165698488ae5c34920eea20eaa38e KVM: nSVM: Avoid freeing uninitialized pointers in svm_set_nested_state() Warning in current branch: arch/x86/kernel/sev-es.o: warning: objtool: ist_ex

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 09:42:56PM +0800, kernel test robot wrote: > tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git > x86/seves > branch HEAD: e6eb15c9ba3165698488ae5c34920eea20eaa38e KVM: nSVM: Avoid > freeing uninitialized pointers in svm_set_nested_state() > >

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Marco Elver
On Tue, 15 Sep 2020 at 23:28, Josh Poimboeuf wrote: > On Tue, Sep 15, 2020 at 02:13:01PM -0700, Nick Desaulniers wrote: > > Triple checking what I wrote above; it looks like the randconfig had > > BOTH CONFIG_KASAN=y and CONFIG_UBSAN=y enabled. Aren't the sanitizers > > supposed to be mutually ex

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 10:18:16PM +0800, Rong Chen wrote: > I attached the config for your reference. Thanks. Can you pls fix your reporting so that the mail has the .config attached? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Arvind Sankar
On Tue, Sep 15, 2020 at 02:59:19PM -0700, Nick Desaulniers wrote: > On Tue, Sep 15, 2020 at 2:50 PM Arvind Sankar wrote: > > > > On Tue, Sep 15, 2020 at 10:49:12PM +0200, Borislav Petkov wrote: > > > > > > (Btw, clang doesn't need to add that "xor %eax,%eax" - panic() should not > > > be > > > r

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 2:02 PM Josh Poimboeuf wrote: > > panic() is noreturn, so the compiler is enforcing the fact that it > doesn't return, by trapping if it does return. > > I seem to remember that's caused by CONFIG_UBSAN_TRAP. Indeed, if I remove CONFIG_UBSAN_TRAP from the 0day report's ran

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 10:18:16PM +0800, Rong Chen wrote: > On Tue, Sep 15, 2020 at 03:55:19PM +0200, Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 09:42:56PM +0800, kernel test robot wrote: > > > tree/branch: > > > https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git > > > x86

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 1:12 PM Nick Desaulniers wrote: > > On Tue, Sep 15, 2020 at 10:02 AM Josh Poimboeuf wrote: > > > > On Tue, Sep 15, 2020 at 06:05:54PM +0200, Borislav Petkov wrote: > > > On Tue, Sep 15, 2020 at 10:18:16PM +0800, Rong Chen wrote: > > > > On Tue, Sep 15, 2020 at 03:55:19PM +

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 2:50 PM Arvind Sankar wrote: > > On Tue, Sep 15, 2020 at 10:49:12PM +0200, Borislav Petkov wrote: > > > > (Btw, clang doesn't need to add that "xor %eax,%eax" - panic() should not be > > returning, ever. :-)) > > > > I think this is because panic() is varargs, and clang do

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Arvind Sankar
On Tue, Sep 15, 2020 at 10:49:12PM +0200, Borislav Petkov wrote: > > (Btw, clang doesn't need to add that "xor %eax,%eax" - panic() should not be > returning, ever. :-)) > I think this is because panic() is varargs, and clang doesn't support gcc's -mskip-rax-setup. The normal ABI requires the c

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Josh Poimboeuf
On Tue, Sep 15, 2020 at 02:13:01PM -0700, Nick Desaulniers wrote: > Triple checking what I wrote above; it looks like the randconfig had > BOTH CONFIG_KASAN=y and CONFIG_UBSAN=y enabled. Aren't the sanitizers > supposed to be mutually exclusive? If so, we should ensure that via > kconfig these ca

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 04:02:31PM -0500, Josh Poimboeuf wrote: > panic() is noreturn, so the compiler is enforcing the fact that it > doesn't return, by trapping if it does return. > > I seem to remember that's caused by CONFIG_UBSAN_TRAP. >From IRC: yah, CONFIG_UBSAN_TRAP=y in that config. But

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Josh Poimboeuf
On Tue, Sep 15, 2020 at 10:49:12PM +0200, Borislav Petkov wrote: > On Tue, Sep 15, 2020 at 01:12:24PM -0700, Nick Desaulniers wrote: > > 1 warning: objtool: ist_exc_vmm_communication()+0x12: unreachable > > instruction > > That looks interesting. So your .o has: > > 04c0 : > 4

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 01:12:24PM -0700, Nick Desaulniers wrote: > 1 warning: objtool: ist_exc_vmm_communication()+0x12: unreachable > instruction That looks interesting. So your .o has: 04c0 : 4c0: 55 push %rbp 4c1: 48 89 e5mov

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 10:02 AM Josh Poimboeuf wrote: > > On Tue, Sep 15, 2020 at 06:05:54PM +0200, Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 10:18:16PM +0800, Rong Chen wrote: > > > On Tue, Sep 15, 2020 at 03:55:19PM +0200, Borislav Petkov wrote: > > > > On Tue, Sep 15, 2020 at 09:42:56

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Josh Poimboeuf
On Tue, Sep 15, 2020 at 06:05:54PM +0200, Borislav Petkov wrote: > On Tue, Sep 15, 2020 at 10:18:16PM +0800, Rong Chen wrote: > > On Tue, Sep 15, 2020 at 03:55:19PM +0200, Borislav Petkov wrote: > > > On Tue, Sep 15, 2020 at 09:42:56PM +0800, kernel test robot wrote: > > > > tree/branch: > > > > h

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 12:02:48PM -0500, Josh Poimboeuf wrote: > If somebody can share the .o file, I can take a look. If only I could reproduce... So I built: /home/share/src/llvm/tc-build/install/bin/clang-12 --version ClangBuiltLinux clang version 12.0.0 (https://github.com/llvm/llvm-project

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 10:41:24AM -0700, Nick Desaulniers wrote: > We want them finding bugs in unreleased versions of the compiler, > before those bugs in ship in release. This is a good thing. The bug report should probably say that compiler used is an unreleased one so that I can prioritize b

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 11:01 AM Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 10:41:24AM -0700, Nick Desaulniers wrote: > > We want them finding bugs in unreleased versions of the compiler, > > before those bugs in ship in release. This is a good thing. > > The bug report should probably sa

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Marco Elver
On Tue, 15 Sep 2020 at 19:40, Nick Desaulniers wrote: > > On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote: > > > > On Tue, Sep 15, 2020 at 12:02:48PM -0500, Josh Poimboeuf wrote: > > > If somebody can share the .o file, I can take a look. > > > > If only I could reproduce... > > > > So I b

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 10:02 AM Josh Poimboeuf wrote: > > On Tue, Sep 15, 2020 at 06:05:54PM +0200, Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 10:18:16PM +0800, Rong Chen wrote: > > > On Tue, Sep 15, 2020 at 03:55:19PM +0200, Borislav Petkov wrote: > > > > On Tue, Sep 15, 2020 at 09:42:56

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 10:34 AM Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 07:21:52PM +0200, Borislav Petkov wrote: > > I'm thinking clang12 is too unstable to take it seriously... > > Yeah, I'm being told v12 is not even close to getting released. So why > are you 0day guys testing with

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 10:21 AM Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 12:02:48PM -0500, Josh Poimboeuf wrote: > > If somebody can share the .o file, I can take a look. > > If only I could reproduce... > > So I built: > > /home/share/src/llvm/tc-build/install/bin/clang-12 --version >

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 07:21:52PM +0200, Borislav Petkov wrote: > I'm thinking clang12 is too unstable to take it seriously... Yeah, I'm being told v12 is not even close to getting released. So why are you 0day guys testing with it and reporting issues? Are you testing unreleased compilers and re

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Rong Chen
On Tue, Sep 15, 2020 at 03:55:19PM +0200, Borislav Petkov wrote: > On Tue, Sep 15, 2020 at 09:42:56PM +0800, kernel test robot wrote: > > tree/branch: > > https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/seves > > branch HEAD: e6eb15c9ba3165698488ae5c34920eea20eaa38e KVM: nSV