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: <ZfAajHpcEULEmi/8@gmail.com>
Date: Tue, 12 Mar 2024 10:04:12 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Borislav Petkov <bp@...en8.de>, x86-ml <x86@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] x86/sev for v6.9-rc1


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> > diff --cc arch/x86/include/asm/coco.h
> > index 76c310b19b11,21940ef8d290..42871bb262d0
> > --- a/arch/x86/include/asm/coco.h
> > +++ b/arch/x86/include/asm/coco.h
> > @@@ -10,9 -11,15 +11,15 @@@ enum cc_vendor
> >         CC_VENDOR_INTEL,
> >   };
> >
> >  -extern enum cc_vendor cc_vendor;
> > + extern u64 cc_mask;
> > +
> >   #ifdef CONFIG_ARCH_HAS_CC_PLATFORM
> >  +extern enum cc_vendor cc_vendor;
> 
> I put the 'cc_mask' declaration inside the #ifdef too.
> 
> Because those two variables are defined together, and without
> CONFIG_ARCH_HAS_CC_PLATFORM the whole coco/ subdirectory that defines
> them won't even be built, as far as I can tell.
> 
> And I don't see any _use_ of 'cc_mask' anywhere outside of that one
> 'cc_set_mask()' inline function and the coco/core.c file. So declaring
> it only when it's all enabled seems to be the right thing.
> 
> Let's hope my artistic merge resolution doesn't end up coming back to bite me.

So it does come back in a fashion, because the tip:x86/boot tree has an 
internal merge of x86/sev, where it dutifully followed the original pattern 
of:

   1c811d403afd x86/sev: Fix position dependent variable references in startup code

.. instead of merging it smartly like you did. :-/

And because I think it would suck to force you to do the same smart merge 
conflict resolution *twice*, I did it myself in x86/boot and documented the 
background:

  commit 2e2bc42c8381d2c0e9604b59e49264821da29368 (origin/x86/boot, x86/boot)
  Merge: 428080c9b19b 855684c7d938
  Author: Ingo Molnar <mingo@...nel.org>
  Date:   Tue Mar 12 09:49:52 2024 +0100

    Merge branch 'linus' into x86/boot, to resolve conflict
    
    There's a new conflict with Linus's upstream tree, because
    in the following merge conflict resolution in <asm/coco.h>:
    
      38b334fc767e Merge tag 'x86_sev_for_v6.9_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
    
    Linus has resolved the conflicting placement of 'cc_mask' better
    than the original commit:
    
      1c811d403afd x86/sev: Fix position dependent variable references in startup code
    
    ... which was also done by an internal merge resolution:
    
      2e5fc4786b7a Merge branch 'x86/sev' into x86/boot, to resolve conflicts and to pick up dependent tree
    
    But Linus is right in 38b334fc767e, the 'cc_mask' declaration is sufficient
    within the #ifdef CONFIG_ARCH_HAS_CC_PLATFORM block.
    
    So instead of forcing Linus to do the same resolution again, merge in Linus's
    tree and follow his conflict resolution.
    
     Conflicts:
            arch/x86/include/asm/coco.h
    
    Signed-off-by: Ingo Molnar <mingo@...nel.org>

You'll get the x86/boot pull request later today. If that extra merge 
commit is too much, please merge FETCH_HEAD~1 instead to discard my merge 
commit.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ