Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1803233rwb; Sun, 6 Aug 2023 03:21:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0XhzQbgLojNY2ezV72dwYi8XyudjjAZCAKfB0rsBQXkaRc8SGdOJWUAhHv3RTkeWHbB7s X-Received: by 2002:a05:6a00:194b:b0:668:9bf9:fa70 with SMTP id s11-20020a056a00194b00b006689bf9fa70mr6664202pfk.34.1691317303399; Sun, 06 Aug 2023 03:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691317303; cv=none; d=google.com; s=arc-20160816; b=ZbqG41KjiT0Xfs7mERU3vfBT9jAUuKfZXnsk+PXHDMWRcOONyHAVWR3BhUgWjdbHG8 SWj7/GSK7wNyQxmd/9Uizc2pwBxPpyK1LL8EduH1WUMYZ4QIQQ2rL4HjaK1aXVAuzo3j lpq3KdtEqXit/+qyozQZuS0oq/gw4pMYzkA2rmGgXZzS0Ma+YkSg4ge2YFyheZgnkpL+ TNPnkkYgu3tQhTyTeismncQnko742zKTUS55HAbBOt/VWaFQ9fy/Oeq9GH+xLTgXlsPb y2Ct6SnmMK2mLjmTTOwfBzocrzTcdY9pv8C4xvTi9Zp9XqUFFHmer4UF9qHjS17pEAne oWyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kI5TUFTPGDpf4qlYMqKl5yge/1AcCk5h5BiAXz15M5o=; fh=bUsfhlSxo5mbGO/gV6Q/B6Bpk+EeS6wLgNtVxkEE7VY=; b=PM2SCkqkMdY0QVwEab7pO+rSl0L+559fsKcP9Kj6NAnk1CIUkzl1BcJae5qKl5dZfJ BMiD4M1WnkpQw0vmKo4jU/b/3xebuNE8VcbEmBTKpQ/GlVCpCmIzkYWpJTYgZPYn1Y+k vKps2wj7GGJDGrF1I+5n/ZJQ/x9H1f4GEzGqob5swi7btt+pLXTAu4kjtVhnf9rVdar5 mmSajEbeJmpdTz/J6Y3pLpOFQv9EpenVkQNmb0Nko9O57pJF0qnYkl7Wpg+MbngY2zni tqe6OUk9rMlPJQDZ83zTbbiTBGs1o3uxABtoEbZ2ZD5sF90wHiH+486cQJzH+JEu58wn ltSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lH0B0hdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cg19-20020a056a00291300b00687546abaf6si4192549pfb.195.2023.08.06.03.21.31; Sun, 06 Aug 2023 03:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lH0B0hdj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbjHFKFn (ORCPT + 99 others); Sun, 6 Aug 2023 06:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjHFKFk (ORCPT ); Sun, 6 Aug 2023 06:05:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F08611D; Sun, 6 Aug 2023 03:05:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3D5D361028; Sun, 6 Aug 2023 10:05:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D6D7C433CB; Sun, 6 Aug 2023 10:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691316338; bh=VZ5GVUQPDjKt21Zcn+VayYYZpoqhGa0Z+aHB0bMUUEE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lH0B0hdjiIWlp6CXWjQetMdNHOyNDR/0mCFj4XqeiC6EVqqN9c/v4N9gYFKYhpwca rh8k2rpj1y1ClWARKygabscnzh33tNHFzg69DvkN9tcJZhrWVGL/SHTELCe3o1MH+D i7BiaeXe9oP9oMjCJZeJSvRVeaics0MjRKXhDjQfPBHnc4j5MikUJ3JJ97htx/EHc2 OHEib2WmC87KxdKavLuutDOXaDh9TTSDxEmkeE1H0mx6YtCbgfliEbkLgU6ENlq1lk hBKLOS5kV5LNiM3fUSX+u7CdrXgij/xOfYmFfIohrmtsKaGqwGcR0rWzMbOgM2zqUe 4uLUN5XqHMLqA== Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-4fe457ec6e7so5914574e87.3; Sun, 06 Aug 2023 03:05:38 -0700 (PDT) X-Gm-Message-State: AOJu0YzNopJK08yU4h+ETT1YdVkezoYIuC/glEvIniiXyBYtL16XI84w sboPRQ1nIK1cgzfk1L8n0a9MRcRHnP1GA+RzcVw= X-Received: by 2002:ac2:5937:0:b0:4f8:7551:7485 with SMTP id v23-20020ac25937000000b004f875517485mr3446727lfi.5.1691316336624; Sun, 06 Aug 2023 03:05:36 -0700 (PDT) MIME-Version: 1.0 References: <20230802154831.2147855-1-ardb@kernel.org> <20230805144030.GDZM5fXvaqXBLxwXfj@fat_crate.local> <20230805210631.GEZM6518W3qOCYYgNK@fat_crate.local> In-Reply-To: From: Ard Biesheuvel Date: Sun, 6 Aug 2023 12:05:25 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 00/23] efi/x86: Avoid bare metal decompressor during EFI boot To: Borislav Petkov Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Evgeniy Baskov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , Peter Jones , Gerd Hoffmann , Dave Young , Mario Limonciello , Kees Cook , Tom Lendacky , "Kirill A . Shutemov" , Linus Torvalds , Joerg Roedel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 6 Aug 2023 at 00:19, Ard Biesheuvel wrote: > > On Sat, 5 Aug 2023 at 23:07, Borislav Petkov wrote: > > > > On Sat, Aug 05, 2023 at 07:37:17PM +0200, Ard Biesheuvel wrote: > > > So this is the host booting, right? > > > > Yes. > > > > > So is the position of the C bit perhaps getting detect incorrectly? > > > > I don't know yet. But the evildoer is someone else: > > > > 02d47ce2ae02 ("x86/head_64: Store boot_params pointer in callee save register") > > > > after bisection. More staring later as to why... > > > > How bizarre. > > But that was a bonus patch anyway, so we could just drop it for now. I suspect this should fix the issue: --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -110,6 +110,7 @@ SYM_CODE_START_NOALIGN(startup_64) * programmed into CR3. */ leaq _text(%rip), %rdi + movq %r15, %rsi call __startup_64 /* Form the CR3 value being sure to include the CR3 modifier */